Shelly Binding

I just received my Shelly Dimmer 2. Tried it with 2.5.5 release and it failed obviously. So I uninstalled the 2.5.5 version, installed the 2.5.7-SNAPSHOT and now Im seeing this:

Error while starting bundle: file:/openhab/addons/org.openhab.binding.shelly-2.5.7-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.shelly [316]
Unresolved requirement: Import-Package: org.eclipse.californium.core; version=“[2.0.0,3.0.0)”

Do I need to be on Openhab 2.5.7-SNAPSHOT as well?

No, you need to install the Californium libs, see https://github.com/markus7017/myfiles/blob/master/shelly/READMEbeta.md
files are here https://github.com/markus7017/myfiles/blob/master/shelly/

1 Like

Ah perfect, I will try that tonight

Hi Markus,

Just wanted to let you know that i’ve got binding 2.5.7 up and running. All seems to be working. RGBW2 with the new 1.7.3 FW is now reporting power consumption data again. Cheers!

Hi Markus, One slightly strange behaviour to note with RGBW2. I have the ‘auto-ON’ function set to OFF, so when i change the brightness, the channel does NOT switch on.

The actual behaviour of the device is exactly as it should be, however, OH reports that the channel becomes ‘ON’ when you change the brightness and ‘ON/OFF’ switches in sitemaps then reflect the wrong status. They remain showing ‘ON’ status, even though the channel is actually OFF.

I’m not sure if this is something to do with the binding or maybe more underlying OH behaviour. It is seeing the channel change in brightness and ‘expecting’ the channel to turn on (even though it doesn’t). What is strange is that the switch remains showing ‘ON’ until you manually change it. I would have thought that it would pick up that it was actually OFF after a while?

Here is an example from my events LOG:

2020-06-27 14:00:10.560 [ome.event.ItemCommandEvent] - Item 'Garage_South' received command 50
2020-06-27 14:00:10.575 [nt.ItemStatePredictedEvent] - Garage_South predicted to become 50
2020-06-27 14:00:10.618 [ome.event.ItemCommandEvent] - Item 'Garage_East' received command 50
2020-06-27 14:00:10.621 [GroupItemStateChangedEvent] - GarageExternalLights changed from OFF to ON through Garage_South

The South and East channels receive JUST a brightness change command, the channels remain OFF, but the group they are attached to becomes ‘ON’ and also the individual switches for the channels also turn ‘ON’ when shown on the site map.

Like i said, the behaviour of the Shelly is perfect and acting as expected, it is just a little bug with the sitemap not correctly reflecting the status of the channels that’s all.

Cheers!

So, tried the Button 1 with the newest Snapshot (2.5.7-SNAPSHOT) and newest firmware.

Pressing one short, then double, and so on, works fine (as far as I can tell).

But if I press one short… wait a while, then press one short again, the new ‘short press’ is ignored (same goes for every identical action: s wait a few seconds s, ss wait a few seconds ss, and so on).

2020-06-28 00:59:09.423 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: CoIoT Message from /192.168.2.172:5683 (MID=4778): {"G":[[0,77,81],[0,118,0],[0,119,"SS"],[0,120,1]]}

2020-06-28 00:59:09.427 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: Duplicate serial 256 will be processed, because payload is different: {"G":[[0,77,81],[0,118,0],[0,119,"SS"],[0,120,1]]} vs. {"G":[[0,77,81],[0,118,0],[0,119,"S"],[0,120,1]]}

2020-06-28 00:59:09.432 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: CoIoT Sensor data {"G":[[0,77,81],[0,118,0],[0,119,"SS"],[0,120,1]]}

2020-06-28 00:59:09.438 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: 4 CoAP sensor updates received

2020-06-28 00:59:09.442 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: Update button state with RELEASED

2020-06-28 00:59:09.449 [vent.ChannelTriggeredEvent] - shelly:shellybutton1:a4cf12f450b6:status#button triggered RELEASED

2020-06-28 00:59:09.455 [vent.ChannelTriggeredEvent] - shelly:shellybutton1:a4cf12f450b6:status#button triggered DOUBLE_PRESSED

2020-06-28 00:59:15.216 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: CoIoT Message from /192.168.2.172:5683 (MID=47948): {"G":[[0,77,81],[0,118,0],[0,119,"S"],[0,120,1]]}

2020-06-28 00:59:15.221 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: Duplicate serial 256 will be processed, because payload is different: {"G":[[0,77,81],[0,118,0],[0,119,"S"],[0,120,1]]} vs. {"G":[[0,77,81],[0,118,0],[0,119,"SS"],[0,120,1]]}

2020-06-28 00:59:15.224 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: CoIoT Sensor data {"G":[[0,77,81],[0,118,0],[0,119,"S"],[0,120,1]]}

2020-06-28 00:59:15.228 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: 4 CoAP sensor updates received

2020-06-28 00:59:15.233 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: Update button state with RELEASED

2020-06-28 00:59:15.239 [vent.ChannelTriggeredEvent] - shelly:shellybutton1:a4cf12f450b6:status#button triggered RELEASED

2020-06-28 00:59:15.245 [vent.ChannelTriggeredEvent] - shelly:shellybutton1:a4cf12f450b6:status#button triggered SHORT_PRESSED

2020-06-28 00:59:20.517 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: CoIoT Message from /192.168.2.172:5683 (MID=37627): {"G":[[0,77,81],[0,118,0],[0,119,"SS"],[0,120,1]]}

2020-06-28 00:59:20.521 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: Duplicate serial 256 will be processed, because payload is different: {"G":[[0,77,81],[0,118,0],[0,119,"SS"],[0,120,1]]} vs. {"G":[[0,77,81],[0,118,0],[0,119,"S"],[0,120,1]]}

2020-06-28 00:59:20.523 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: CoIoT Sensor data {"G":[[0,77,81],[0,118,0],[0,119,"SS"],[0,120,1]]}

2020-06-28 00:59:20.527 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: 4 CoAP sensor updates received

2020-06-28 00:59:20.529 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: Update button state with RELEASED

2020-06-28 00:59:20.540 [vent.ChannelTriggeredEvent] - shelly:shellybutton1:a4cf12f450b6:status#button triggered RELEASED

2020-06-28 00:59:20.544 [vent.ChannelTriggeredEvent] - shelly:shellybutton1:a4cf12f450b6:status#button triggered DOUBLE_PRESSED

2020-06-28 00:59:27.201 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellybutton1-a4cf12f450b6: CoIoT Message from /192.168.2.172:5683 (MID=38199): {"G":[[0,77,81],[0,118,0],[0,119,"SS"],[0,120,1]]}

The last log entry (2020-06-28 00:59:27.201) is the repeated “double press”.
That’s a bug or am I wrong (or is this actually in development)?

it‘s still under development, thanks for the heads-up

for now you could trigger a rule acting on the change of the event count and then checking the type

my expectation was if i configure shelly1 with shellybinding 2.5.7 like


the url for the long-pressed would be write in, automatically in shelly url how it was in previous versions. But since i updated the shelly to 1.7 and shelly binding to 2.5.7 it is empty

Hi there,

same issue here. Running openHAB 2.5.6-1 (Release Build)

This is my debug/trace output:

2020-06-22 10:30:11.280 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075: CoIoT Message from /192.168.178.91:5683 (MID=15275): {"G":[[0,112,0],[0,122,0],[0,113,-1],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,58.91],[0,116,138.03],[0,117,0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,0],[0,221,0.000],[0,222,0.000],[0,223,0.000],[0,224,0]]}
2020-06-22 10:30:11.282 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075: CoIoT Sensor data {"G":[[0,112,0],[0,122,0],[0,113,-1],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,58.91],[0,116,138.03],[0,117,0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,0],[0,221,0.000],[0,222,0.000],[0,223,0.000],[0,224,0]]}
2020-06-22 10:30:11.284 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075: 18 CoAP sensor updates received
2020-06-22 10:30:11.286 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[0]: id=112, Value=0.0 (State, Type=S, Range=0/1, Link=0: Relay0)
2020-06-22 10:30:11.288 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[1]: id=122, Value=0.0 (State, Type=S, Range=0/1, Link=1: Relay1)
2020-06-22 10:30:11.290 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[2]: id=113, Value=-1.0 (Position, Type=S, Range=0/100, Link=2: Device)
2020-06-22 10:30:11.292 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[3]: id=111, Value=0.0 (Power, Type=P, Range=0/2300, Link=0: Relay0)
2020-06-22 10:30:11.294 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[4]: id=121, Value=0.0 (Power, Type=P, Range=0/2300, Link=1: Relay1)
2020-06-22 10:30:11.296 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[5]: id=118, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Relay0)
2020-06-22 10:30:11.298 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075: Coap update for button (type toggle)
2020-06-22 10:30:11.300 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[6]: id=128, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=1: Relay1)
2020-06-22 10:30:11.302 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075: Coap update for button (type toggle)
2020-06-22 10:30:11.303 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[7]: id=115, Value=58.91 (Temperature C, Type=T, Range=-40/300, Link=2: Device)
2020-06-22 10:30:11.306 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[8]: id=116, Value=138.03 (Temperature F, Type=T, Range=-40/300, Link=2: Device)
2020-06-22 10:30:11.308 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[9]: id=117, Value=0.0 (Overtemp, Type=S, Range=0/1, Link=2: Device)
2020-06-22 10:30:11.309 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[10]: id=211, Value=0.0 (Energy counter 0 [W-min], Type=S, Range=null, Link=0: Relay0)
2020-06-22 10:30:11.312 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[11]: id=212, Value=0.0 (Energy counter 1 [W-min], Type=S, Range=null, Link=0: Relay0)
2020-06-22 10:30:11.313 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[12]: id=213, Value=0.0 (Energy counter 2 [W-min], Type=S, Range=null, Link=0: Relay0)
2020-06-22 10:30:11.316 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[13]: id=214, Value=0.0 (Energy counter total [W-min], Type=S, Range=null, Link=0: Relay0)
2020-06-22 10:30:11.318 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[14]: id=221, Value=0.0 (Energy counter 0 [W-min], Type=S, Range=null, Link=1: Relay1)
2020-06-22 10:30:11.320 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[15]: id=222, Value=0.0 (Energy counter 1 [W-min], Type=S, Range=null, Link=1: Relay1)
2020-06-22 10:30:11.321 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[16]: id=223, Value=0.0 (Energy counter 2 [W-min], Type=S, Range=null, Link=1: Relay1)
2020-06-22 10:30:11.324 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075:  Sensor value[17]: id=224, Value=0.0 (Energy counter total [W-min], Type=S, Range=null, Link=1: Relay1)
2020-06-22 10:30:11.331 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-roller-fb1075: Channel roller#control updated with 100.0 % (type class org.eclipse.smarthome.core.library.types.QuantityType).
2020-06-22 10:30:11.333 [TRACE] [.internal.InfluxDBPersistenceService] - Tried to get item as class org.openhab.core.library.types.PercentType, state is 100.0
2020-06-22 10:30:11.334 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-roller-fb1075: 1 channels updated from CoIoT status
2020-06-22 10:30:11.334 [TRACE] [.internal.InfluxDBPersistenceService] - found fractional part
2020-06-22 10:30:11.336 [DEBUG] [.internal.InfluxDBPersistenceService] - got DecimalType value 100.0

2020-06-22 10:30:11.347 [TRACE] [.internal.InfluxDBPersistenceService] - storing OG_O_Rollade in influxdb value 100.0, OG_O_Rollade (Type=RollershutterItem, State=100.0)

@Uwe_Samer did you find a solution for that?

Thanks to all and many greetings
Damian

WIth shelly dimmer i have the problem does the dimmer recognizes a long pressed but send no trigger LONG_PRESSED

2020-06-29 21:41:13.523 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-    d45ff6: 11 CoAP sensor updates received
2020-06-29 21:41:13.526 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[0]: id=111, Value=57.0 (Brightness, Type=S, Range=0/100, Link=0: Dimmer)
2020-06-29 21:41:13.529 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[1]: id=121, Value=1.0 (State, Type=S, Range=0/1, Link=0: Dimmer)
2020-06-29 21:41:13.533 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[2]: id=131, Value=1.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Dimmer)
2020-06-29 21:41:13.535 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[3]: id=141, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Dimmer)
2020-06-29 21:41:13.539 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[4]: id=211, Value=0.0 (Energy counter 0 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-06-29 21:41:13.542 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[5]: id=212, Value=0.0 (Energy counter 1 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-06-29 21:41:13.546 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[6]: id=213, Value=0.0 (Energy counter 2 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-06-29 21:41:13.549 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[7]: id=214, Value=1705.0 (Energy counter total [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-06-29 21:41:13.553 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[8]: id=311, Value=45.75 (Temperature C, Type=T, Range=-40/300, Link=0: Dimmer)
2020-06-29 21:41:13.556 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[9]: id=312, Value=114.36 (Temperature F, Type=T, Range=-40/300, Link=0: Dimmer)
2020-06-29 21:41:13.559 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[10]: id=313, Value=0.0 (Overtemp, Type=S, Range=0/1, Link=0: Dimmer)
2020-06-29 21:41:13.563 [DEBUG] [lly.internal.util.ShellyChannelCache] - shellydimmer-d45ff6: Channel relay#brightness$Switch updated with ON (type class org.eclipse.smarthome.core.library.types.OnOffType).
2020-06-29 21:41:13.570 [DEBUG] [lly.internal.util.ShellyChannelCache] - shellydimmer-d45ff6: Channel relay#brightness$Value updated with 57 % (type class org.eclipse.smarthome.core.library.types.QuantityType).
2020-06-29 21:41:13.575 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: 2 channels updated from CoIoT status
2020-06-29 21:41:13.579 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: CoIoT Message from /192.168.177.20:5683 (MID=27404): {"G":[[0,111, 57],[0,121, 1],[0,131, 1],[0,141, 0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,1705],[0,311,45.75],[0,312,114.36],[0,313,0]]}
2020-06-29 21:41:13.582 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: Serial 15626 was already processed, ignore update
2020-06-29 21:41:13.922 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: Updating status
2020-06-29 21:41:13.923 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellydimmer-d45ff6: HTTP GET for http://192.168.177.20/status
2020-06-29 21:41:14.007 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellydimmer-d45ff6: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"MosHome","ip":"192.168.177.20","rssi":-73},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"21:41","unixtime":1593466874,"serial":1,"has_update":false,"mac":"F4CFA2D45FF6","lights":[{"ison":true,"has_timer":true,"timer_started":1593466874,"timer_duration":181,"timer_remaining":181,"mode":"white","brightness":57}],"meters":[{"power":0.00, "is_valid":true, "timestamp":1593466874,"counters":[0.000, 0.000, 0.000],"total":1705}],"inputs":[{"input":1,"event":"L","event_cnt":87},{"input":0,"event":"","event_cnt":0}],"tmp":{"tC":45.75,"tF":114.36, "is_valid":true},"calib_progress":0,"overtemperature":false,"loaderror":false,"overload":false,"update":{"status":"idle","has_update":false,"new_version":"20200601-123355/v1.7.0@d7961837","old_version":"20200601-123355/v1.7.0@d7961837"},"ram_total":48024,"ram_free":36860,"ram_lwm":29912,"fs_size":233681,"fs_free":131524,"uptime":194333}
2020-06-29 21:41:14.016 [TRACE] [.internal.handler.ShellyRelayHandler] - shellydimmer-d45ff6: Updating 1 dimmers(s)
2020-06-29 21:41:14.021 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: Updating relay#input1 with ON, input2 with OFF
2020-06-29 21:41:14.024 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: Updating 1 standard meter(s)
2020-06-29 21:41:14.029 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: 0 more updates requested
2020-06-29 21:41:14.387 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: CoIoT Message from /192.168.177.20:5683 (MID=27405): {"G":[[0,111, 57],[0,121, 1],[0,131, 2],[0,141, 0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,1705],[0,311,45.75],[0,312,114.36],[0,313,0]]}
2020-06-29 21:41:14.390 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: CoIoT Sensor data {"G":[[0,111, 57],[0,121, 1],[0,131, 2],[0,141, 0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,1705],[0,311,45.75],[0,312,114.36],[0,313,0]]}
2020-06-29 21:41:14.393 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: 11 CoAP sensor updates received
2020-06-29 21:41:14.396 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[0]: id=111, Value=57.0 (Brightness, Type=S, Range=0/100, Link=0: Dimmer)
2020-06-29 21:41:14.399 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[1]: id=121, Value=1.0 (State, Type=S, Range=0/1, Link=0: Dimmer)
2020-06-29 21:41:14.403 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[2]: id=131, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Dimmer)
2020-06-29 21:41:14.406 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[3]: id=141, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Dimmer)
2020-06-29 21:41:14.409 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[4]: id=211, Value=0.0 (Energy counter 0 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-06-29 21:41:14.413 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[5]: id=212, Value=0.0 (Energy counter 1 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-06-29 21:41:14.416 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[6]: id=213, Value=0.0 (Energy counter 2 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-06-29 21:41:14.420 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[7]: id=214, Value=1705.0 (Energy counter total [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-06-29 21:41:14.424 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[8]: id=311, Value=45.75 (Temperature C, Type=T, Range=-40/300, Link=0: Dimmer)
2020-06-29 21:41:14.428 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[9]: id=312, Value=114.36 (Temperature F, Type=T, Range=-40/300, Link=0: Dimmer)
2020-06-29 21:41:14.431 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[10]: id=313, Value=0.0 (Overtemp, Type=S, Range=0/1, Link=0: Dimmer)
2020-06-29 21:41:14.579 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-8caab50558d3: CoIoT Message from /192.168.177.16:5683 (MID=26810): {"G":[[0,112,0],[0,118,0]]}
2020-06-29 21:41:14.581 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shelly1-8caab50558d3: Serial 1280 was already processed, ignore update
2020-06-29 21:41:16.636 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: CoIoT Message from /192.168.177.20:5683 (MID=27406): {"G":[[0,111, 57],[0,121, 1],[0,131, 0],[0,141, 0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,1705],[0,311,45.75],[0,312,114.36],[0,313,0]]}
2020-06-29 21:41:16.638 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: CoIoT Sensor data {"G":[[0,111, 57],[0,121, 1],[0,131, 0],[0,141, 0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,1705],[0,311,45.75],[0,312,114.36],[0,313,0]]}

Hi Folks, I am using a few RGBW2 in my outdoor solar system. Sometimes this goes offline as the battery gets drained. When this happens, the ‘power meter’ values remain at the last value received. Is there a way to set them to go to zero if/when the device goes offline or if no update is received for X seconds?

Cheers!

Starting with binding 2.5.5 and firmware 1.6 the binding doesn‘t use action urls when CoIoT is enabled. In this case the status updates are received via CoAP messages, which also works for the button events. In this case Action URLs in the device are not set or even cleared when they point to OH, that‘s ok

the rgbw2 thing state changes to OFFLINE after the device is no longer reachable, this status changed could be observed by a rule; the binding does not invalidate the channel data in this state

This is sad, for testing my rules i take this url directly in the browser, so it’s really easy to check rules without be closed to the switch.
But when CoAP is not activated the url are write in ?

you could

  • disable Auto-CoIoT in the binding config (not the thing config!)
  • enable sensor urls in the thing config

but the servlet handling those requests is active all the time so you could use them in the browser independently what‘s set in the device or fhe thing config

Thank you for your great support, now it works

but its really easy to copy the url from shelly gui, I’m not be able to write the url by my one,

Now I try it with the dimmer, but there still not working the action events. Not for url as well for ColoT

show the log baby

1 Like

this is with url event

2020-07-01 23:26:29.360 [DEBUG] [elly.internal.api.ShellyEventServlet] - CallbackServlet: HTTP/1.1 Request from 192.168.178.33:34574/shelly/event/shellydimmer-d45ff6/light/0?{type=[btn1_longpush]}
2020-07-01 23:26:29.364 [TRACE] [elly.internal.api.ShellyEventServlet] - shellydimmer-d45ff6: Process event of type type=light, index=0
2020-07-01 23:26:29.367 [TRACE] [shelly.internal.ShellyHandlerFactory] - shellydimmer-d45ff6: Dispatch event to thing handler
2020-07-01 23:26:29.371 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: Event received: class=light, index=0, parameters={type=btn1_longpush}
2020-07-01 23:26:30.268 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellydimmer-d45ff6: HTTP GET for http://192.168.177.20/settings
2020-07-01 23:26:30.526 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellydimmer-d45ff6: HTTP Response 200: {"device":{"type":"SHDM-1","mac":"F4CFA2D45FF6","hostname":"shellydimmer-D45FF6","num_outputs":1,"num_meters":1},"wifi_ap":{"enabled":false,"ssid":"shellydimmer-D45FF6","key":""},"wifi_sta":{"enabled":true,"ssid":"MosHome","ipv4_method":"static","ip":"192.168.177.20","gw":"192.168.178.1","mask":"255.255.252.0","dns":null},"wifi_sta1":{"enabled":false,"ssid":null,"ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"mqtt": {"enable":false,"server":"192.168.33.3:1883","user":"","id":"shellydimmer-D45FF6","reconnect_timeout_max":60.000000,"reconnect_timeout_min":2.000000,"clean_session":true,"keep_alive":60,"max_qos":0,"retain":false,"update_period":30},"coiot": {"update_period":15},"sntp":{"server":"time.google.com","enabled":true},"login":{"enabled":false,"unprotected":false,"username":"adminshelly"},"pin_code":"","name":"","fw":"20200601-123355/v1.7.0@d7961837","factory_reset_from_switch":true,"discoverable":true,"build_info":{"build_id":"20200601-123355/v1.7.0@d7961837","build_timestamp":"2020-06-01T12:33:55Z","build_version":"1.0"},"cloud":{"enabled":false,"connected":false},"timezone":"Europe/Berlin","lat":51.227699,"lng":6.773460,"tzautodetect":true,"tz_utc_offset":7200,"tz_dst":true,"tz_dst_auto":true,"time":"23:26","unixtime":1593645991,"hwinfo":{"hw_revision":"dev-prototype","batch_id":0},"mode":"white","pulse_mode":0,"calibrated":false,"transition":2500,"fade_rate":3,"min_brightness":0,"lights":[{"name":"","ison":false,"default_state":"off","auto_on":0.00,"auto_off":180.00,"btn1_on_url":"http://192.168.177.1:8080/shelly/event/shellydimmer-d45ff6/light/0?type=btn1_on","btn1_off_url":"http://192.168.177.1:8080/shelly/event/shellydimmer-d45ff6/light/0?type=btn1_off","btn1_longpush_url":"http://192.168.177.1:8080/shelly/event/shellydimmer-d45ff6/light/0?type=btn1_longpush","btn1_shortpush_url":"http://192.168.177.1:8080/shelly/event/shellydimmer-d45ff6/light/0?type=btn1_shortpush","btn2_on_url":"http://192.168.177.1:8080/shelly/event/shellydimmer-d45ff6/light/0?type=btn2_on","btn2_off_url":"http://192.168.177.1:8080/shelly/event/shellydimmer-d45ff6/light/0?type=btn2_off","btn2_longpush_url":"http://192.168.177.1:8080/shelly/event/shellydimmer-d45ff6/light/0?type=btn2_longpush","btn2_shortpush_url":"http://192.168.177.1:8080/shelly/event/shellydimmer-d45ff6/light/0?type=btn2_shortpush","out_on_url":"http://192.168.177.1:8080/shelly/event/shellydimmer-d45ff6/light/0?type=out_on","out_off_url":"http://192.168.177.1:8080/shelly/event/shellydimmer-d45ff6/light/0?type=out_off","schedule":false,"schedule_rules":[],"btn_type":"detached","btn_debounce":80,"swap_inputs":0}],"night_mode":{"enabled":false, "start_time":"00:00", "end_time":"00:00", "brightness":0},"warm_up": {"enabled":0, "brightness":100, "time":50}}
2020-07-01 23:26:30.529 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellydimmer-d45ff6: Detected a Shelly Dimmer: fix Json (replace lights[] tag with dimmers[]
2020-07-01 23:26:30.552 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: Updating status
2020-07-01 23:26:30.555 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellydimmer-d45ff6: HTTP GET for http://192.168.177.20/status
2020-07-01 23:26:30.651 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellydimmer-d45ff6: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"MosHome","ip":"192.168.177.20","rssi":-73},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"23:26","unixtime":1593645991,"serial":1,"has_update":false,"mac":"F4CFA2D45FF6","lights":[{"ison":false,"has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"mode":"white","brightness":57}],"meters":[{"power":0.00, "is_valid":true, "timestamp":1593645991,"counters":[0.000, 0.000, 0.000],"total":0}],"inputs":[{"input":0,"event":"","event_cnt":0},{"input":0,"event":"","event_cnt":0}],"tmp":{"tC":48.33,"tF":119.00, "is_valid":true},"calib_progress":0,"overtemperature":false,"loaderror":false,"overload":false,"update":{"status":"idle","has_update":false,"new_version":"20200601-123355/v1.7.0@d7961837","old_version":"20200601-123355/v1.7.0@d7961837"},"ram_total":48024,"ram_free":35996,"ram_lwm":29520,"fs_size":233681,"fs_free":129516,"uptime":3146}
2020-07-01 23:26:30.672 [TRACE] [.internal.handler.ShellyRelayHandler] - shellydimmer-d45ff6: Updating 1 dimmers(s)
2020-07-01 23:26:30.677 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: Updating relay#input1 with OFF, input2 with OFF
2020-07-01 23:26:30.683 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: Updating 1 standard meter(s)
2020-07-01 23:26:30.688 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: 1 more updates requested
2020-07-01 23:26:30.972 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly1-8caab50558d3: CoIoT Message from /192.168.177.16:5683 (MID=22725): {"G":[[0,112,0],[0,118,0]]}

and this is with coloT

2020-07-01 23:34:39.807 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: CoIoT Message from /192.168.177.20:5683 (MID=8499): {"G":[[0,111, 57],[0,121, 0],[0,131, 1],[0,141, 0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,0],[0,311,48.25],[0,312,118.84],[0,313,0]]}
2020-07-01 23:34:39.809 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: CoIoT Sensor data {"G":[[0,111, 57],[0,121, 0],[0,131, 1],[0,141, 0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,0],[0,311,48.25],[0,312,118.84],[0,313,0]]}
2020-07-01 23:34:39.813 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: 11 CoAP sensor updates received
2020-07-01 23:34:39.816 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[0]: id=111, Value=57.0 (Brightness, Type=S, Range=0/100, Link=0: Dimmer)
2020-07-01 23:34:39.819 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[1]: id=121, Value=0.0 (State, Type=S, Range=0/1, Link=0: Dimmer)
2020-07-01 23:34:39.822 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[2]: id=131, Value=1.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Dimmer)
2020-07-01 23:34:39.825 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[3]: id=141, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Dimmer)
2020-07-01 23:34:39.828 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[4]: id=211, Value=0.0 (Energy counter 0 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-07-01 23:34:39.832 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[5]: id=212, Value=0.0 (Energy counter 1 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-07-01 23:34:39.835 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[6]: id=213, Value=0.0 (Energy counter 2 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-07-01 23:34:39.838 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[7]: id=214, Value=0.0 (Energy counter total [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-07-01 23:34:39.842 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[8]: id=311, Value=48.25 (Temperature C, Type=T, Range=-40/300, Link=0: Dimmer)
2020-07-01 23:34:39.845 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[9]: id=312, Value=118.84 (Temperature F, Type=T, Range=-40/300, Link=0: Dimmer)
2020-07-01 23:34:39.848 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[10]: id=313, Value=0.0 (Overtemp, Type=S, Range=0/1, Link=0: Dimmer)
2020-07-01 23:34:40.666 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: Updating status
2020-07-01 23:34:40.669 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellydimmer-d45ff6: HTTP GET for http://192.168.177.20/status
2020-07-01 23:34:40.689 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: CoIoT Message from /192.168.177.20:5683 (MID=8500): {"G":[[0,111, 57],[0,121, 0],[0,131, 2],[0,141, 0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,0],[0,311,48.25],[0,312,118.84],[0,313,0]]}
2020-07-01 23:34:40.692 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: CoIoT Sensor data {"G":[[0,111, 57],[0,121, 0],[0,131, 2],[0,141, 0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,0],[0,311,48.25],[0,312,118.84],[0,313,0]]}
2020-07-01 23:34:40.695 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6: 11 CoAP sensor updates received
2020-07-01 23:34:40.698 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[0]: id=111, Value=57.0 (Brightness, Type=S, Range=0/100, Link=0: Dimmer)
2020-07-01 23:34:40.701 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[1]: id=121, Value=0.0 (State, Type=S, Range=0/1, Link=0: Dimmer)
2020-07-01 23:34:40.706 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[2]: id=131, Value=2.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Dimmer)
2020-07-01 23:34:40.709 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[3]: id=141, Value=0.0 (Input, Type=S, Range=0(off)/1(on)/2(longpush), Link=0: Dimmer)
2020-07-01 23:34:40.712 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[4]: id=211, Value=0.0 (Energy counter 0 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-07-01 23:34:40.715 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[5]: id=212, Value=0.0 (Energy counter 1 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-07-01 23:34:40.719 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[6]: id=213, Value=0.0 (Energy counter 2 [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-07-01 23:34:40.722 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[7]: id=214, Value=0.0 (Energy counter total [W-min], Type=S, Range=null, Link=0: Dimmer)
2020-07-01 23:34:40.725 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[8]: id=311, Value=48.25 (Temperature C, Type=T, Range=-40/300, Link=0: Dimmer)
2020-07-01 23:34:40.729 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[9]: id=312, Value=118.84 (Temperature F, Type=T, Range=-40/300, Link=0: Dimmer)
2020-07-01 23:34:40.732 [TRACE] [elly.internal.coap.ShellyCoapHandler] - shellydimmer-d45ff6:  Sensor value[10]: id=313, Value=0.0 (Overtemp, Type=S, Range=0/1, Link=0: Dimmer)
2020-07-01 23:34:40.760 [TRACE] [ng.shelly.internal.api.ShellyHttpApi] - shellydimmer-d45ff6: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"MosHome","ip":"192.168.177.20","rssi":-73},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"23:34","unixtime":1593646480,"serial":1,"has_update":false,"mac":"F4CFA2D45FF6","lights":[{"ison":false,"has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"mode":"white","brightness":57}],"meters":[{"power":0.00, "is_valid":true, "timestamp":1593646480,"counters":[0.000, 0.000, 0.000],"total":0}],"inputs":[{"input":1,"event":"L","event_cnt":1},{"input":0,"event":"","event_cnt":0}],"tmp":{"tC":48.25,"tF":118.84, "is_valid":true},"calib_progress":0,"overtemperature":false,"loaderror":false,"overload":false,"update":{"status":"idle","has_update":false,"new_version":"20200601-123355/v1.7.0@d7961837","old_version":"20200601-123355/v1.7.0@d7961837"},"ram_total":48024,"ram_free":37244,"ram_lwm":31464,"fs_size":233681,"fs_free":131524,"uptime":59}
2020-07-01 23:34:40.778 [TRACE] [.internal.handler.ShellyRelayHandler] - shellydimmer-d45ff6: Updating 1 dimmers(s)
2020-07-01 23:34:40.783 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: Updating relay#input1 with ON, input2 with OFF
2020-07-01 23:34:40.789 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: Updating 1 standard meter(s)
2020-07-01 23:34:40.796 [TRACE] [y.internal.handler.ShellyBaseHandler] - shellydimmer-d45ff6: 1 more updates requested