Open brianmay opened 1 month ago
Updated to latest zwave-js-ui but nothing changed.
@brianmay Are you using zwave integration or mqtt discovery?
Mqtt discovery
Is there a specific reason why you are not using the zwave js integration with zui as server?
Using the integration is the recommended way for Home Assistant users: https://zwave-js.github.io/zwave-js-ui/#/homeassistant/homeassistant-official
I have a lot of my personal code that talks directly using mqtt.
What should I change in the discovery payload in order to fix the issue so? If a valueId reports power factor or Kvah should I use a different device class? If so which one?
No idea sorry. I asked here: https://github.com/home-assistant/core/issues/128325#issuecomment-2420469228 but the only answer was "It seems the logs are clear on this. Also the sensor docs are clear." which doesn't really help me.
Oh, I see, from: https://www.home-assistant.io/integrations/sensor/
power_factor: Power factor (unitless), unit may be None or %
Pulse count probably shouldn't have a unit.
kVAh - if kWh not appropriate (not really sure here), then maybe it shouldn't have a unit.
Also I think in all cases the device class == power is wrong.
Yeah I was reading that too but cannot find the appropriate unit for kVAh, there is apparent_power
but that only lists VA
. Could you try to manually edit the discovery payload from UI and re-send it to see what's the correct device class to use foreach unit?
Also could you paste here a node export please? I see I actually handle this here:
But maybe that doesn't cover all cases
Is there somewhere I can send you my node export in private? Rather not send a complete list of my devices to a public forum...
Getting puzzled here, because for the relevant device all I see is:
"16": {
"name": "Pump",
"loc": "Workshop"
},
I expected to see more details (???).
I suspect what we would need is:
power factor: "device_class": "power_factor", delete unit_of_measurement Pulse count: delete device_class, delete unit_of_measurement kVAh: delete device_class, delete unit_of_measurement
For the last two, there doesn't seem to be any good pre-existing device class. Surprised I can't find a "apparent_energy" class actually. "apparent_power" is measuring power, not energy.
I tested this. But of course, just because it isn't showing errors doesn't mean it is correct...
Also I would really like to know why, out of 5 of this devices running the same firmware, only one of them seems to be producing these values. That seems very odd.
Here is the meter section of that device:
Here is the meter section of another one, same type exactly:
Have tried clicking "rediscover node" on both, it didn't change anything.
Is there somewhere I can send you my node export in private? Rather not send a complete list of my devices to a public forum...
PM here: daniel.sorridi@gmail.com
Getting puzzled here, because for the relevant device all I see is:
Are you clicking on advanced and then debug export?
I suspect what we would need is:
I need to understand how to detect this properly. @kpine do you have any clue how home assistant handles this?
Also I would really like to know why, out of 5 of this devices running the same firmware, only one of them seems to be producing these values. That seems very odd.
Rediscover node has no effect on this as this is ZUI values and rediscover node is an action sent to MQTT discovery. You could try to run a new interview of the node but I'm not sure if that would help. Do you know if that device has fw updates available? About this I cc @AlCalzone
I need to understand how to detect this properly. @kpine do you have any clue how home assistant handles this?
HA doesn't use the value unit except as a last resort. It has its own mappings based on Command Class and other properties and complicated logic. I couldn't say whether this approach is necessary for your use case.
PM here: daniel.sorridi@gmail.com
Done
Are you clicking on advanced and then debug export?
advanced -> Backup -> Export
Do you know if that device has fw updates available?
I am not familiar with any fw updates. zwave js ui reports all devices on "FW: v1.4".
I am wondering if the difference is the version of zwave I had installed when I did the interviewing. Either that, or I actually have a different generations of what should be the exact same product.
The oldest device seems to have the most metrics (15), the most recent device has the fewest (only 4). Huh?
Wonder if I should re-interview the old device and see if I still get all the metrics back again. But no going back again if I do lose them... Which might kill any chances of testing a fix for the incorrect units.
advanced -> Backup -> Export
I think he's looking for the debug exports either under the node's Advanced menu, or from the "Debug Info" panel.
Wonder if I should re-interview the old device and see if I still get all the metrics back again. But no going back again if I do lose them... Which might kill any chances of testing a fix for the incorrect units
You could always try downgrading to a previous version and see if the working behavior can be reproduced. Might be challenging to find the version unless you can remember a time frame. I would be a nice feature to have the a timestamp and/or version number saved for the last interview.
power factor: "device_class": "power_factor", delete unit_of_measurement Pulse count: delete device_class, delete unit_of_measurement kVAh: delete device_class, delete unit_of_measurement
Agree for the first two, which are unitless, but this part actually looks like a bug in node-zwave-js
.
The latter seems to be simply missing in HA, so deleting the unit is more of a workaround than a proper fix.
Thanks both @kpine and @AlCalzone , so seems this should be fixed with the next driver release? Except for the part of removing kVAh units as seems there is no option for that ATM, may be worth if @brianmay opens an issue on HA about that maybe?
There's an ongoing discussion about the missing units here: https://github.com/home-assistant/architecture/discussions/724
I think he's looking for the debug exports either under the node's Advanced menu, or from the "Debug Info" panel.
I sent him both of those files to his email also.
@brianmay Thanks, received!
Checklist
Deploy method
Docker
Z-Wave JS UI version
9.19.0
ZwaveJS version
13.3.0
Describe the bug
Home assistant shows these errors:
I was told this is not a bug in home assistant: https://github.com/home-assistant/core/issues/128325
To Reproduce
(only one of my ZW096 power switch device outputs these values, bit confused here)
Expected behavior
No errors.
Additional context
I just noticed my zwave-js-ui is old, don't see anything in changelog about this being fixed, but will try anyway.