Closed egeback closed 2 years ago
Hi! Thanks for the proposal. I've added the device part of the sensor registration (will add a new development firmware later today). However I fail to see what usecase the availability attribute/topic would be? :) I would think in usecase where you have a hub for example or similar where lots of other hardware sensors exists that communicate between this hub/bridge. But in the case of the p1ib, I dont know? Its hard to change availability to offline when the p1ib is disconnected from Wi-Fi accesspoint or possible dead due to power cycling of the p1 port.
One usecase would be the initial installation where possible the AMS:s P1 port is yet activated, but it might be a bit overkill to have this information in each sensor for that one time. Also its quite easy to just look in the web ui on the "Meter Telegrams" values if any messages from the meter is sent.
Regards, Andreas
Hi
Great, looking forward to the release.
For the feature request on availability the use case would be if for some reason we stop getting data at all. So the availability info as you see for Zigbee2Mqtt is only one status for the device not the individual sensors. And on the use case, automation could detect issue and more constant storage of data in HA if data is missing.
Regards, Marky
Hi, Yes, that is true I suppose. I'll look into it! In the meantime there is a development firmware build you can try out (build b0524da in the p1ib firmware meny), if you want, which adds the device attribute.
Regards, Andreas
Hi
Tested the development build and it looks like the device auto discover addition works as expected.. Thanks.
Regards, Marky
Hi Marty, The latest development firmware have the availability option enabled, if you wanna try it out!
Cheers, Andreas
Hi Andreas,
I have tested the build and it works as expected. Tested a reboot and the state was changed.
Topic: p1ib/.../state
So from my perspective the request is fulfilled, but I guess you want to make a stable release to close the issue.
Best Regards, Marky
Feature in release 97b55c9.
Hi
The home assistant MQTT auto discovery has the possibility to group multiple entries into devices for better mapping. Looking at the current implementation in p1ib it does not to expose this. The optional field is described here: https://www.home-assistant.io/integrations/sensor.mqtt/#device.
Also the availability tag could be good if data varies or the unit is closed down. Described here https://www.home-assistant.io/integrations/sensor.mqtt/#availability. (This probably needs that p1ib also needs a birth and will message to be added)
Current exposed json:
example from zigbee2mqtt:
Regards, Marky