Hi there,
I am running OH 3.1 M5 in a docker environment on my NAS and have a number of Shelly power plugs that successfully run in my setup. I just bought 2 Shelly flood sensors and during the setup I was asked to install the latest firmware. Unfortunately I did not test with the firmware that was on the device at delivery hence I can only tell that the reporting through the shelly binding item definition does not work correctly but everything works fine via MQTT.
The firmware level I m using is: 20210909-144708/v1.11.4-DNSfix-ge6b2f6d
When I turn on the device all three defined items flood, battery, lastUpdate
(see definitions below) receive data
openhab> items list | grep ShFl
ShFl_EGsens (Type=SwitchItem, State=OFF, Label=Shelly Flood EG Sensor, Category=null)
ShFl_EGbatt (Type=NumberItem, State=93, Label=Shelly Flood EG Battery Level, Category=null)
ShFl_EGdate (Type=DateTimeItem, State=2021-10-01T09:43:21.000+0200, Label=Shelly Flood EG Last Update, Category=null)
and I also see that the channel:
shelly:shellyflood:XXXXXX:device#alarm
gets triggered with “POWERON” and “BUTTON” and ALARM" when the device is awake!!!
But when the sensor goes to sleep and I force the flood alarm by putting water underneath the device it only reports the changes via MQTT but not via the binding.
I turned on the debug mode for the Shelly binding but at the moment of activating the flood alarm nothing is logged in context of this event. I only see in frequent intervalls the normal polling request that fail because the device is asleep.
2021-10-01 06:26:56.825 [DEBUG] [ng.shelly.internal.api.ShellyHttpApi] - shellyflood-XXXXXX: API Timeout, retry #3 (Device unreachable or API Timeout (GET http://111.222.333.444/cit/d))
2021-10-01 06:26:57.787 [DEBUG] [ng.shelly.internal.api.ShellyHttpApi] - shellyflood-XXXXXX: API Timeout, retry #6 (Device unreachable or API Timeout (GET http://111.222.333.444/shelly))
I have defined these three items
:
Switch ShFl_EGsens "Shelly Flood EG Sensor" {channel="shelly:shellyflood:XXXXXX:sensors#flood"}
Number ShFl_EGbatt "Shelly Flood EG Battery Level" {channel="shelly:shellyflood:XXXXXX:battery#batteryLevel"}
DateTime ShFl_EGdate "Shelly Flood EG Last Update" {channel="shelly:shellyflood:XXXXXX:sensors#lastUpdate"}
Here is the thing
definition:
Thing shelly:shellyflood:XXXXXX "ShellyFlood EG" [deviceIp="111.222.333.444", userId="XYZ", password="XYZ", lowBattery=15, eventsSwitch=true, eventsButton=true, eventsSensorReport=true, eventsCoIoT=true]
I kindly appreciate any hints, ideas and advice how to get the reporting via the binding working?
Of course I can fall back to MQTT but maybe this is a code issue that can also happen to other Shelly devices with the latest firmware.
Thank you for your attention!
Cheers
Justus