Closed parkflyer closed 9 months ago
Thanks!
As I thought, all on/off switches end in 12080
.
If you call user/var/40/10021/0/0/12080
, you can see the current state of the Kessel. It should be 1802
for Aus
and 1803
for Ein
.
I can use that to filter switches on API v1.1 without having to call the varinfo
endpoint.
Querying of /user/var/40/10021/0/0/12080
leads to:
<eta version="1.0">
<value uri="/user/var/40/10021/0/0/12080" strValue="Ein" unit="" decPlaces="0" scaleFactor="1" advTextOffset="1802">1803</value>
</eta>
According to /user/menu
this is
<object uri="/40/10021/0/0/12080" name="Ein/Aus Taste"/>
and returns "Ein" or "Aus", depending on the state of the On/Off switch.
Querying of /user/var/40/10021/0/0/12000
delivers
<eta version="1.0">
<value uri="/user/var/40/10021/0/0/12000" strValue="Glutabbrand" unit="" decPlaces="0" scaleFactor="1" advTextOffset="2000">2007</value>
</eta>
which is what I'm mainly looking for.
I just updated the integration to also work on API v1.1. Some sensors may not be found correctly, but the ones that are shown in the configuration dialog should work without any problems,
Please test the integration and respond if there are any problems.
Thats what the " advTextOffset="1802" " is for. If You substract this value, You get a 0/1! I will test ist these days.
regards
Thank you very much, Tidone - works like a charm (so far)!
Works fine. Thanks! But any chance to integrate "/user/errors" (see API)? For me its one of the most interesting item. Pushing this message to a mobile is very nice ( aka "Aschebox jetzt entleeren" or "Zündung fehlgeschlagen"). For me the global /user/errors would be ok, I dont need the messages on node level /user/error/112 and so on...
@parkflyer Nice, thanks for letting me know!
@greentux
I already read the /user/errors
endpoint and put every message in a list, but I only use it to set the binary state sensor, i.e. if there is at least one message in the list, the Error sensor is set.
I looked through the possible HA entities, but I couldn't find anything which would let me print all messages. If you have an idea how to show all messages in the list in HA, please let me know!
I could add a sensor which shows the total number of error messages, and a second sensor which prints the most recent error message, if there is more than one.
I think that would be a good solution. One binary (error on/off) and and sensor with message(s). Most recent or all, your choice.
@greentux I updated the integration to include some error sensors and events:
Also, I implemented the automatic device registration feature of HA. Now all sensors are grouped under a single device.
Cool, thanks!
I will close this issue as both features (V1 API & Error events) have now been implemented.
Please open a new issue if you encounter a bug, or have some feature suggestions.
As requested here the result of a /user/menu call on a ETA V1 API device (sorry, indentation got lost):