Hi,
I migrated (basically set up a new OH3) my OH 2.5 instance to OH 3.
Everything went smoothly, except some problems concerning the shelly motion sensor.
I’m currently using openHAB 3.0.2, with the Shelly Binding 3.1.0.202105081702 and I encounter the problem, that no motion item is updated.
In the shelly manager, it’s visible that CoIOT messages are received from the motion sensor.
The IP set in the WebUI is also correct.
The thing setting (file based) is:
Thing shelly:shellymotion:60a423937252 "Shelly Motion - EG Cloakroom" [deviceIp="192.168.2.179", userId="", password="", eventsCoIoT=true]
The item settings (file based) are:
Number Korridor_Motionsensor_Luminance "Luminanz" (luminance) { channel="shelly:shellymotion:60a423937252:sensors#lux" }
DateTime Korridor_Motionsensor_LastUpdate "Update" { channel="shelly:shellymotion:60a423937252:sensors#lastUpdate" }
Switch Korridor_Motionsensor_Motion "Bewegung" (motion) { channel="shelly:shellymotion:60a423937252:sensors#motion" }
String Korridor_Motionsensor_Illumination "Illumination" { channel="shelly:shellymotion:60a423937252:sensors#illumination" }
DateTime Korridor_Motionsensor_Motion_Timestamp "Motion Update" { channel="shelly:shellymotion:60a423937252:sensors#motionTimestamp" }
Number Korridor_Motionsensor_Battery "Cloakroom Motion Sensor" (battery) { channel="shelly:shellymotion:60a423937252:battery#batteryLevel" }
Switch Korridor_Motionsensor_Battery_Low "Ladezustand kritsch" { channel="shelly:shellymotion:60a423937252:battery#lowBattery" }
The trace reveals the following problem:
2021-05-25 11:36:54.977 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: CoIoT Message from /192.168.2.179:5683 (MID=14245): {"G":[[0,6107,1],[0,3119,1621942611],[0,3120,1],[0,6110,0],[0,3106,100],[0,3111,82],[0,9103,25]]}
2021-05-25 11:36:54.978 [DEBUG] [lly.internal.util.ShellyChannelCache] - shellymotion-60a423937252: Channel device#heartBeat updated with 2021-05-25T11:36:54.000+0200 (type class org.openhab.core.library.types.DateTimeType).
2021-05-25 11:36:54.980 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellymotion-60a423937252: Watchdog restarted (expires in 3660 sec)
2021-05-25 11:36:54.981 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: CoIoT Sensor data {"G":[[0,6107,1],[0,3119,1621942611],[0,3120,1],[0,6110,0],[0,3106,100],[0,3111,82],[0,9103,25]]} (serial=4864)
2021-05-25 11:36:54.982 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: 7 CoAP sensor updates received
2021-05-25 11:36:54.983 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: Sensor value[0]: id=6107, Value=1.0 (motion, Type=A, Range=0/1;-1, Link=1: sensor_0)
2021-05-25 11:36:54.984 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: Sensor value[1]: id=3119, Value=1.621942611E9 (timestamp, Type=S, Range=U32;-1, Link=1: sensor_0)
2021-05-25 11:36:54.986 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: Sensor value[2]: id=3120, Value=1.0 (motionActive, Type=A, Range=0/1;-1, Link=1: sensor_0)
2021-05-25 11:36:54.988 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: Sensor value[3]: id=6110, Value=0.0 (vibration, Type=A, Range=0/1;-1, Link=1: sensor_0)
2021-05-25 11:36:54.989 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: Sensor value[4]: id=3106, Value=100.0 (luminosity, Type=L, Range=U32;-1, Link=1: sensor_0)
2021-05-25 11:36:54.990 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: Sensor value[5]: id=3111, Value=82.0 (battery, Type=B, Range=0/100;-1, Link=2: device)
2021-05-25 11:36:54.991 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: Sensor value[6]: id=9103, Value=25.0 (cfgChanged, Type=EVC, Range=U16, Link=2: device)
2021-05-25 11:36:54.993 [DEBUG] [lly.internal.util.ShellyChannelCache] - shellymotion-60a423937252: Channel sensors#lux updated with 100 lx (type class org.openhab.core.library.types.QuantityType).
2021-05-25 11:36:54.996 [DEBUG] [lly.internal.util.ShellyChannelCache] - shellymotion-60a423937252: Channel sensors#motion updated with ON (type class org.openhab.core.library.types.OnOffType).
2021-05-25 11:36:54.998 [DEBUG] [lly.internal.util.ShellyChannelCache] - shellymotion-60a423937252: Channel sensors#motionTimestamp updated with 2021-05-25T11:36:51.000+0200 (type class org.openhab.core.library.types.DateTimeType).
2021-05-25 11:36:55.001 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellymotion-60a423937252: 3 channels updated from CoIoT status, serial=4864
2021-05-25 11:36:55.002 [DEBUG] [lly.internal.util.ShellyChannelCache] - shellymotion-60a423937252: Channel sensors#lastUpdate updated with 2021-05-25T11:36:55.000+0200 (type class org.openhab.core.library.types.DateTimeType).
2021-05-25 11:36:55.273 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellymotion-60a423937252: Updating status (refreshSettings=false)
2021-05-25 11:36:55.274 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellymotion-60a423937252: HTTP GET for http://192.168.2.179/status
2021-05-25 11:36:57.840 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellymotion-60a423937252: HTTP Response 200: {
"wifi_sta": {"connected": true,"ssid": "Yggdrasil","ip": "192.168.2.179","rssi": -45},"cloud": {"enabled": false,"connected": false},"mqtt": {"connected": false},"time": "11:36","unixtime": 1621942614,"serial": 0,"has_update": false,"mac": "60A423937252","cfg_changed_cnt": 0,"sleep_time": 0,"actions_stats": {"skipped": 0},"lux": {"value":100,"illumination": "dark","is_valid": true},"sensor": {"motion": true,"vibration": false,"timestamp": 1621942613,"active": true,"is_valid": true},"bat": {"value":82,"voltage": 3.966},"charger": false,"update": {"status": "unknown","has_update": false,"new_version": "20210226-072307/v1.1.0@f31e1d2b","old_version": "20210226-072307/v1.1.0@f31e1d2b","beta_version": null},"ram_total": 65536,"ram_free": 62820,"fs_size": 65536,"fs_free": 59708,"uptime": 3740,"active/sleep_ratio": 0.00,"ps_mode": 1
}
2021-05-25 11:36:57.843 [DEBUG] [lly.internal.util.ShellyChannelCache] - shellymotion-60a423937252: Channel device#heartBeat updated with 2021-05-25T11:36:57.000+0200 (type class org.openhab.core.library.types.DateTimeType).
2021-05-25 11:36:57.844 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellymotion-60a423937252: Watchdog restarted (expires in 3660 sec)
2021-05-25 11:36:57.846 [DEBUG] [lly.internal.util.ShellyChannelCache] - shellymotion-60a423937252: Channel device#uptime updated with 3740 s (type class org.openhab.core.library.types.QuantityType).
2021-05-25 11:36:57.848 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellymotion-60a423937252: HTTP GET for http://192.168.2.179/status
2021-05-25 11:36:57.917 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellymotion-60a423937252: HTTP Response 200: {
"wifi_sta": {"connected": true,"ssid": "Yggdrasil","ip": "192.168.2.179","rssi": -45},"cloud": {"enabled": false,"connected": false},"mqtt": {"connected": false},"time": "11:36","unixtime": 1621942614,"serial": 0,"has_update": false,"mac": "60A423937252","cfg_changed_cnt": 0,"sleep_time": 0,"actions_stats": {"skipped": 0},"lux": {"value":100,"illumination": "dark","is_valid": true},"sensor": {"motion": true,"vibration": false,"timestamp": 1621942613,"active": true,"is_valid": true},"bat": {"value":82,"voltage": 3.966},"charger": false,"update": {"status": "unknown","has_update": false,"new_version": "20210226-072307/v1.1.0@f31e1d2b","old_version": "20210226-072307/v1.1.0@f31e1d2b","beta_version": null},"ram_total": 65536,"ram_free": 62820,"fs_size": 65536,"fs_free": 59708,"uptime": 3740,"active/sleep_ratio": 0.00,"ps_mode": 1
}
2021-05-25 11:36:57.919 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellymotion-60a423937252: Create missing sensor channel(s)
2021-05-25 11:36:57.921 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellymotion-60a423937252: Unable to refresh status: Unable to update status
java.lang.IllegalArgumentException: Channel definition for sensors#vibration not found!
at org.openhab.binding.shelly.internal.provider.ShellyChannelDefinitions$ChannelMap.get(ShellyChannelDefinitions.java:602) ~[bundleFile:?]
at org.openhab.binding.shelly.internal.provider.ShellyChannelDefinitions.getDefinition(ShellyChannelDefinitions.java:234) ~[bundleFile:?]
at org.openhab.binding.shelly.internal.provider.ShellyChannelDefinitions.addChannel(ShellyChannelDefinitions.java:461) ~[bundleFile:?]
at org.openhab.binding.shelly.internal.provider.ShellyChannelDefinitions.createSensorChannels(ShellyChannelDefinitions.java:422) ~[bundleFile:?]
at org.openhab.binding.shelly.internal.handler.ShellyComponents.updateSensors(ShellyComponents.java:256) ~[bundleFile:?]
at org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.refreshStatus(ShellyBaseHandler.java:422) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
2021-05-25 11:36:57.924 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellymotion-60a423937252: 0 more updates requested
It seems that the status is received by OH, but it won’t update. Does anyone have an idea, what’s wrong here?
@markus7017 Do you have an idea what’s wrong here?