#zwave_js.refresh_value error

1 messages · Page 1 of 1 (latest)

atomic reef
#

I use this action to refresh the value of sensor.dishwasher_internal_temperature It has worked well for a while. Recently it has started to generate an error in Home Assistant.

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:761
integration: Sensor (documentation, issues)
First occurred: 9:44:26 PM (16 occurrences)
Last logged: 9:57:07 PM

Platform zwave_js does not generate unique IDs. ID 3479161084.182-112-0-32 already exists - ignoring sensor.dishwasher_internal_temperature
severe field
#

Look in .storage/core.entity_registry and see what's already registered with that unique id

#

If you have jq you could try

atomic reef
#

I already removed it. @severe field did something change with zwave_js.refresh_value?

#

It is trying to add the entity as well as refresh its value

severe field
#

I tried it w/o any issue

atomic reef
#

What did you try?

#

To use that service on an entity?

#

Are you running beta?

severe field
#

Yes. Have you tried other entities?

#

The service code itself has not changed. And the entity has to actually exist to get anywhere. Using a non-existent entity gives me:

Failed to perform the action zwave_js.refresh_value. No zwave_js entities found in service call. Got {'type': 'execute_script', 'sequence': [{'action': 'zwave_js.refresh_value', 'data': {'entity_id': ['light.dining_room_light_switch22']}}], 'id': 50}

atomic reef
#

Yes, I have tried other entities without error. Not sure what is going on. Just excluded, reset and included. Still doing it. Maybe specific to inovelli? No clue what to try next

#

Was working perfect until yesterday.

severe field
#

is there not another entity with the same unique id? that's what the error is complaining about.

atomic reef
#

No, not that I can find. I searched core.entity_registry and that sensor.dishwasher_internal_temperature is the only one that comes up

#

My setup is pretty solid these days, I don’t make many changes.

#

That’s what I am saying. It looks like zwave_js.refresh_value on that entity is trying to create duplicate entity with the exact same unique id

#

And same name

#

Same everything

#

When it can’t. It errors and ignores

#

I even tried changing the unique id. It changed it back

severe field
#

are there any other logs surrounding it?

atomic reef
#

Let me look

severe field
#

is the refresh actually working, and that comes after?

#

you might try enabling the integration debug logging to see what the sequencing is like

#

that's a config parameter?

#

Ah that's the ticket. I reproduced by enabling a config-parameter entity and refreshed

#

I guess I should check if it's any other kind of disabled entity.

atomic reef
#

ha...you figured it out?

#

and the refresh actually works

severe field
#

well, not sure what the root cause is. either 1) limited to config parameter entities or 2) entities that were disabled and then enabled

atomic reef
#

it was disabled when first added but it worked for like months

#

this just recently started happening

severe field
#

could simply be that

atomic reef
#

2024-09-29 16:07:32.016 INFO (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Running websocket_api script
2024-09-29 16:07:32.016 INFO (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Executing step call service
2024-09-29 16:07:32.065 ERROR (MainThread) [homeassistant.components.sensor] Platform zwave_js does not generate unique IDs. ID 3479161084.184-112-0-32 already exists - ignoring sensor.dishwasher_internal_temperature
2024-09-29 16:07:32.066 ERROR (MainThread) [homeassistant.components.sensor] Platform zwave_js does not generate unique IDs. ID 3479161084.184-112-0-32 already exists - ignoring sensor.dishwasher_internal_temperature
2024-09-29 16:07:32.067 INFO (MainThread) [homeassistant.components.zwave_js] Refreshing primary value ConfigurationValue(value_id='184-112-0-32') for sensor.dishwasher_internal_temperature, state update may be delayed for devices on battery
2024-09-29 16:07:34.494 INFO (MainThread) [pyalarmdotcomajax] Getting system data for 4306849.
2024-09-29 16:07:34.520 INFO (MainThread) [pyalarmdotcomajax] Getting all devices in 4306849.

severe field
#

debug logs show more

#

but basically just confirms it's trying to add the entityt

#
2024-09-29T20:09:47.984Z CNTRLR   [Node 064] [~] [Configuration] 9: 2 => 2                          [Endpoint 0]
2024-09-29 20:09:47.991 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":64,"args":{"commandClassName":"Configuration","commandClass":112,"property":9,"endpoint":0,"newValue":2,"prevValue":2,"propertyName":"LED Indicator Brightness"}}}', extra='')

2024-09-29 20:09:47.992 DEBUG (MainThread) [homeassistant.components.zwave_js] [select.master_bedroom_lamp_switch_led_indicator_brightness] Value 9/None changed to: 2
2024-09-29 20:09:47.994 DEBUG (MainThread) [homeassistant.components.zwave_js] Processing node Node(node_id=64) added value ConfigurationValue(value_id='64-112-0-9')
2024-09-29 20:09:48.000 DEBUG (MainThread) [homeassistant.components.zwave_js] Discovered entity: ZwaveDiscoveryInfo(node=Node(node_id=64), primary_value=ConfigurationValue(value_id='64-112-0-9'), assumed_state=False, platform=<Platform.SELECT: 'select'>, platform_data=None, additional_value_ids_to_watch=set(), platform_hint='config_parameter', platform_data_template=None, entity_registry_enabled_default=False, entity_category=None)
2024-09-29 20:09:48.002 ERROR (MainThread) [homeassistant.components.select] Platform zwave_js does not generate unique IDs. ID 3611217407.64-112-0-9 already exists - ignoring select.master_bedroom_lamp_switch_led_indicator_brightness
atomic reef
#

so its prob a beta issue?

severe field
#

I haven't gone back to check

atomic reef
#

now that you reproduced it and it is not something with my setup, i can roll back to stable and see. i rolled back to 0b3 and no change

#

not happening on 2024.9.3 so definately a beta issue. thanks. so it is only happening on config zwave entities?

severe field
#

I haven't found an entity I could test yet

atomic reef
#

ok, well i did a refresh 3 times without any errors on 2024.9.3

severe field
atomic reef
#

so if i have a binary_sensor.dishwasher_internal_temperature sensor?

severe field
#

Yep, reverting the PR fixes it

steady coyote
#

Which Z-Wave value ID does this correspond to?

severe field
#

It's a config parameter

steady coyote
#

huh?

severe field
#

I'm trying to find another default-disabled entity to test

#

Configuration CC

steady coyote
#

That's odd

severe field
#

that PR made changes to how discovered values are tracked

#
        if (
            not value.node.ready
            or not (device := self.dev_reg.async_get_device(identifiers={device_id}))
            or value.value_id in self.controller_events.discovered_value_ids[device.id]
        ):
            return
#

usually on a "value updated" event the 3rd line will exit

#

with new code the value ID is not present

steady coyote
#

@silver star @dry crow FYI

#

the nightmare PR continues 😄

severe field
#

Not seeing an issue with a default-disabled binary_sensor (Binary Sensor CC)

steady coyote
#

I guess the discovery schema for the config parameter needs an allow_multi now to also create a binary sensor.

#

IIRC that flag wasn't working correctly before

severe field
#

But it's already a select entity?

steady coyote
#

Hm I might be missing some of the context above

severe field
#

I was testing two different values to see if it was anything to do with being default disabled

#

at least so far, just related to config cc values

#

The binary sensor one is working as expected

steady coyote
#

Ok that's what I misunderstood

severe field
#

at least in relation to the value update

steady coyote
#

I thought somehow the config parameter was also discovered as a binary sensor, and that wasn't working

atomic reef
severe field
#

Ah but you were on the right track

#

allow_multi defaults to False

atomic reef
#

in my cass i have a binary_sensor.dishwasher_internal_temperature already if that matters

severe field
#

If it has a different unique id, shouldn't be relevant

dry crow
steady coyote
#

Just happened 3 minutes ago

dry crow
#

Euh I have to look into this tomorrow, but I can't garuantee that I am able to know how to fix it

severe field
#

I think it might be because config parameters are outside of the normal schema list

#
        # prevent re-discovery of the (primary) value if not allowed
        if not schema.allow_multi:
            discovered_value_ids[device.id].add(value.value_id)

    if value.command_class == CommandClass.CONFIGURATION:
        yield from async_discover_single_configuration_value(
            cast(ConfigurationValue, value)
        )
#

async_discover_single_configuration_value probably needs to add to discovered_value_ids

#

or something