[BUG] Shelly 2.5: binary_sensor.switch changes state rapidly without physically clicking the button
See original GitHub issueEnvironment
- ShellyForHASS release with the issue: 0.1.9
- Last working ShellyForHASS release (if known): unknown
- Home Assistant Core release with the issue: 0.113.3
- Operating environment (Home Assistant/Supervised/Docker/venv): Home Assistant Supervised (RPi 2 B)
Describe the bug
Device: Shelly 2.5 with FW 1.7.0 -> button type configured as “Edge Switch” (changes state on every hit)
binary_sensor for switch changes state to ON/OFF rapidly without hitting the switch.
Steps to Reproduce
- Setup shelly as “Edge Switch”
- Observe history log
Expected behavior
binary_sensor.shelly_shsw_25_98f4abf2ef44_2_switch should only change the state when physically hitting the button
Screenshots
Traceback/Error logs
Sample CoAP messages received
2020-08-10 13:59:44 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.242 b'PE\x00\n\xed\x0b\xf7\tSHSW-25#98F4ABF2EF44#1\xff{"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"}],"sen":[{"I":112,"T":"S","D":"State","R":"0/1","L":0},{"I":122,"T":"S","D":"State","R":"0/1","L":1},{"I":111,"T":"P","D":"Power","R":"0/2300","L":0},{"I":121,"T":"P","D":"Power","R":"0/2300","L":1},{"I":118,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":0},{"I":128,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":1},{"I":115,"T":"T","D":"Temperature C","R":"-40/300","L":2},{"I":116,"T":"T","D":"Temperature F","R":"-40/300","L":2},{"I":117,"T":"S","D":"Overtemp","R":"0/1","L":2},{"I":211,"T":"S","D":"Energy counter 0 [W-min]","L":0},{"I":212,"T":"S","D":"Energy counter 1 [W-min]","L":0},{"I":213,"T":"S","D":"Energy counter 2 [W-min]","L":0},{"I":214,"T":"S","D":"Energy counter total [W-min]","L":0},{"I":221,"T":"S","D":"Energy counter 0 [W-min]","L":1},{"I":222,"T":"S","D":"Energy counter 1 [W-min]","L":1},{"I":223,"T":"S","D":"Energy counter 2 [W-min]","L":1},{"I":224,"T":"S","D":"Energy counter'
2020-08-10 13:59:44 DEBUG (CoAP) [pyShelly] CoAP msg: 69 192.168.1.242 bytearray(b'PE\x00\n\xed\x0b\xf7\tSHSW-25#98F4ABF2EF44#1\xff{"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"}],"sen":[{"I":112,"T":"S","D":"State","R":"0/1","L":0},{"I":122,"T":"S","D":"State","R":"0/1","L":1},{"I":111,"T":"P","D":"Power","R":"0/2300","L":0},{"I":121,"T":"P","D":"Power","R":"0/2300","L":1},{"I":118,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":0},{"I":128,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":1},{"I":115,"T":"T","D":"Temperature C","R":"-40/300","L":2},{"I":116,"T":"T","D":"Temperature F","R":"-40/300","L":2},{"I":117,"T":"S","D":"Overtemp","R":"0/1","L":2},{"I":211,"T":"S","D":"Energy counter 0 [W-min]","L":0},{"I":212,"T":"S","D":"Energy counter 1 [W-min]","L":0},{"I":213,"T":"S","D":"Energy counter 2 [W-min]","L":0},{"I":214,"T":"S","D":"Energy counter total [W-min]","L":0},{"I":221,"T":"S","D":"Energy counter 0 [W-min]","L":1},{"I":222,"T":"S","D":"Energy counter 1 [W-min]","L":1},{"I":223,"T":"S","D":"Energy counter 2 [W-min]","L":1},{"I":224,"T":"S","D":"Energy counter')
2020-08-10 13:59:44 DEBUG (CoAP) [pyShelly] CoAP Code: 69, Type SHSW-25, Id 98F4ABF2EF44, Payload *{"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"}],"sen":[{"I":112,"T":"S","D":"State","R":"0/1","L":0},{"I":122,"T":"S","D":"State","R":"0/1","L":1},{"I":111,"T":"P","D":"Power","R":"0/2300","L":0},{"I":121,"T":"P","D":"Power","R":"0/2300","L":1},{"I":118,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":0},{"I":128,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":1},{"I":115,"T":"T","D":"TemperatureC","R":"-40/300","L":2},{"I":116,"T":"T","D":"TemperatureF","R":"-40/300","L":2},{"I":117,"T":"S","D":"Overtemp","R":"0/1","L":2},{"I":211,"T":"S","D":"Energycounter0[W-min]","L":0},{"I":212,"T":"S","D":"Energycounter1[W-min]","L":0},{"I":213,"T":"S","D":"Energycounter2[W-min]","L":0},{"I":214,"T":"S","D":"Energycountertotal[W-min]","L":0},{"I":221,"T":"S","D":"Energycounter0[W-min]","L":1},{"I":222,"T":"S","D":"Energycounter1[W-min]","L":1},{"I":223,"T":"S","D":"Energycounter2[W-min]","L":1},{"I":224,"T":"S","D":"Energycounter*
2020-08-10 13:59:44 DEBUG (Thread-414) [pyShelly] http://192.168.1.117/status - Ok
2020-08-10 13:59:44 DEBUG (Thread-414) [pyShelly] Update id:C4D52A-1 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 0}
2020-08-10 13:59:44 DEBUG (Thread-414) [pyShelly] Update id:C4D52A-2 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': True, 'over_power': False, 'total_consumption': 0}
2020-08-10 13:59:44 DEBUG (Thread-414) [pyShelly] Update id:C4D52A-1 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 13:59:44 DEBUG (Thread-414) [pyShelly] Update id:C4D52A-2 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 13:59:44 DEBUG (Thread-414) [pyShelly] Update id:C4D52A-1 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:44 DEBUG (Thread-414) [pyShelly] Update id:C4D52A-2 state:True stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:44 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.117 b'P\x1es\xb5\xb3cit\x01s\xed\x0b\xec\x03SHSW-25#C4D52A#1\xd2C\x96\x00\x82\x1a\x06\xff{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,62.54],[0,116,144.58],[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-08-10 13:59:44 DEBUG (CoAP) [pyShelly] CoAP msg: 30 192.168.1.117 bytearray(b'P\x1es\xb5\xb3cit\x01s\xed\x0b\xec\x03SHSW-25#C4D52A#1\xd2C\x96\x00\x82\x1a\x06\xff{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,62.54],[0,116,144.58],[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-08-10 13:59:44 DEBUG (CoAP) [pyShelly] CoAP Code: 30, Type SHSW-25, Id C4D52A, Payload *{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,62.54],[0,116,144.58],[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-08-10 13:59:44 DEBUG (CoAP) [pyShelly] Update id:C4D52A-1 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 0}
2020-08-10 13:59:44 DEBUG (CoAP) [pyShelly] Update id:C4D52A-2 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 0}
2020-08-10 13:59:44 DEBUG (CoAP) [pyShelly] Update id:C4D52A-1 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 13:59:44 DEBUG (CoAP) [pyShelly] Update id:C4D52A-2 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 13:59:44 DEBUG (CoAP) [pyShelly] Update id:C4D52A-1 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:44 DEBUG (CoAP) [pyShelly] Update id:C4D52A-2 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:45 DEBUG (Cloud) [pyShelly] Update from cloud
2020-08-10 13:59:45 DEBUG (Cloud) [pyShelly] POST to Shelly Cloud
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.240 b'P\x1e\r\'\xb3cit\x01s\xed\x0b\xec\tSHSW-25#98F4ABF2E4E0#1\xd2C\x96\x00\x82c\x16\xff{"G":[[0,112,0],[0,122,0],[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,1191]]}'
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] CoAP msg: 30 192.168.1.240 bytearray(b'P\x1e\r\'\xb3cit\x01s\xed\x0b\xec\tSHSW-25#98F4ABF2E4E0#1\xd2C\x96\x00\x82c\x16\xff{"G":[[0,112,0],[0,122,0],[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,1191]]}')
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] CoAP Code: 30, Type SHSW-25, Id 98F4ABF2E4E0, Payload *{"G":[[0,112,0],[0,122,0],[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,1191]]}*
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-1 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 0}
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-2 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 20}
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-1 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-2 state:0.0 stateValue:None values:None info_values:{'total_consumption': 20}
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-1 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-2 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.240 b'PE\x00\n\xed\x0b\xf7\tSHSW-25#98F4ABF2E4E0#1\xff{"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"}],"sen":[{"I":112,"T":"S","D":"State","R":"0/1","L":0},{"I":122,"T":"S","D":"State","R":"0/1","L":1},{"I":111,"T":"P","D":"Power","R":"0/2300","L":0},{"I":121,"T":"P","D":"Power","R":"0/2300","L":1},{"I":118,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":0},{"I":128,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":1},{"I":115,"T":"T","D":"Temperature C","R":"-40/300","L":2},{"I":116,"T":"T","D":"Temperature F","R":"-40/300","L":2},{"I":117,"T":"S","D":"Overtemp","R":"0/1","L":2},{"I":211,"T":"S","D":"Energy counter 0 [W-min]","L":0},{"I":212,"T":"S","D":"Energy counter 1 [W-min]","L":0},{"I":213,"T":"S","D":"Energy counter 2 [W-min]","L":0},{"I":214,"T":"S","D":"Energy counter total [W-min]","L":0},{"I":221,"T":"S","D":"Energy counter 0 [W-min]","L":1},{"I":222,"T":"S","D":"Energy counter 1 [W-min]","L":1},{"I":223,"T":"S","D":"Energy counter 2 [W-min]","L":1},{"I":224,"T":"S","D":"Energy counter'
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] CoAP msg: 69 192.168.1.240 bytearray(b'PE\x00\n\xed\x0b\xf7\tSHSW-25#98F4ABF2E4E0#1\xff{"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"}],"sen":[{"I":112,"T":"S","D":"State","R":"0/1","L":0},{"I":122,"T":"S","D":"State","R":"0/1","L":1},{"I":111,"T":"P","D":"Power","R":"0/2300","L":0},{"I":121,"T":"P","D":"Power","R":"0/2300","L":1},{"I":118,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":0},{"I":128,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":1},{"I":115,"T":"T","D":"Temperature C","R":"-40/300","L":2},{"I":116,"T":"T","D":"Temperature F","R":"-40/300","L":2},{"I":117,"T":"S","D":"Overtemp","R":"0/1","L":2},{"I":211,"T":"S","D":"Energy counter 0 [W-min]","L":0},{"I":212,"T":"S","D":"Energy counter 1 [W-min]","L":0},{"I":213,"T":"S","D":"Energy counter 2 [W-min]","L":0},{"I":214,"T":"S","D":"Energy counter total [W-min]","L":0},{"I":221,"T":"S","D":"Energy counter 0 [W-min]","L":1},{"I":222,"T":"S","D":"Energy counter 1 [W-min]","L":1},{"I":223,"T":"S","D":"Energy counter 2 [W-min]","L":1},{"I":224,"T":"S","D":"Energy counter')
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] CoAP Code: 69, Type SHSW-25, Id 98F4ABF2E4E0, Payload *{"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"}],"sen":[{"I":112,"T":"S","D":"State","R":"0/1","L":0},{"I":122,"T":"S","D":"State","R":"0/1","L":1},{"I":111,"T":"P","D":"Power","R":"0/2300","L":0},{"I":121,"T":"P","D":"Power","R":"0/2300","L":1},{"I":118,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":0},{"I":128,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":1},{"I":115,"T":"T","D":"TemperatureC","R":"-40/300","L":2},{"I":116,"T":"T","D":"TemperatureF","R":"-40/300","L":2},{"I":117,"T":"S","D":"Overtemp","R":"0/1","L":2},{"I":211,"T":"S","D":"Energycounter0[W-min]","L":0},{"I":212,"T":"S","D":"Energycounter1[W-min]","L":0},{"I":213,"T":"S","D":"Energycounter2[W-min]","L":0},{"I":214,"T":"S","D":"Energycountertotal[W-min]","L":0},{"I":221,"T":"S","D":"Energycounter0[W-min]","L":1},{"I":222,"T":"S","D":"Energycounter1[W-min]","L":1},{"I":223,"T":"S","D":"Energycounter2[W-min]","L":1},{"I":224,"T":"S","D":"Energycounter*
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.241 b'PE\x00\n\xed\x0b\xf7\tSHSW-25#98F4ABF2E4B5#1\xff{"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"}],"sen":[{"I":112,"T":"S","D":"State","R":"0/1","L":0},{"I":122,"T":"S","D":"State","R":"0/1","L":1},{"I":111,"T":"P","D":"Power","R":"0/2300","L":0},{"I":121,"T":"P","D":"Power","R":"0/2300","L":1},{"I":118,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":0},{"I":128,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":1},{"I":115,"T":"T","D":"Temperature C","R":"-40/300","L":2},{"I":116,"T":"T","D":"Temperature F","R":"-40/300","L":2},{"I":117,"T":"S","D":"Overtemp","R":"0/1","L":2},{"I":211,"T":"S","D":"Energy counter 0 [W-min]","L":0},{"I":212,"T":"S","D":"Energy counter 1 [W-min]","L":0},{"I":213,"T":"S","D":"Energy counter 2 [W-min]","L":0},{"I":214,"T":"S","D":"Energy counter total [W-min]","L":0},{"I":221,"T":"S","D":"Energy counter 0 [W-min]","L":1},{"I":222,"T":"S","D":"Energy counter 1 [W-min]","L":1},{"I":223,"T":"S","D":"Energy counter 2 [W-min]","L":1},{"I":224,"T":"S","D":"Energy counter'
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] CoAP msg: 69 192.168.1.241 bytearray(b'PE\x00\n\xed\x0b\xf7\tSHSW-25#98F4ABF2E4B5#1\xff{"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"}],"sen":[{"I":112,"T":"S","D":"State","R":"0/1","L":0},{"I":122,"T":"S","D":"State","R":"0/1","L":1},{"I":111,"T":"P","D":"Power","R":"0/2300","L":0},{"I":121,"T":"P","D":"Power","R":"0/2300","L":1},{"I":118,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":0},{"I":128,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":1},{"I":115,"T":"T","D":"Temperature C","R":"-40/300","L":2},{"I":116,"T":"T","D":"Temperature F","R":"-40/300","L":2},{"I":117,"T":"S","D":"Overtemp","R":"0/1","L":2},{"I":211,"T":"S","D":"Energy counter 0 [W-min]","L":0},{"I":212,"T":"S","D":"Energy counter 1 [W-min]","L":0},{"I":213,"T":"S","D":"Energy counter 2 [W-min]","L":0},{"I":214,"T":"S","D":"Energy counter total [W-min]","L":0},{"I":221,"T":"S","D":"Energy counter 0 [W-min]","L":1},{"I":222,"T":"S","D":"Energy counter 1 [W-min]","L":1},{"I":223,"T":"S","D":"Energy counter 2 [W-min]","L":1},{"I":224,"T":"S","D":"Energy counter')
2020-08-10 13:59:47 DEBUG (CoAP) [pyShelly] CoAP Code: 69, Type SHSW-25, Id 98F4ABF2E4B5, Payload *{"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"}],"sen":[{"I":112,"T":"S","D":"State","R":"0/1","L":0},{"I":122,"T":"S","D":"State","R":"0/1","L":1},{"I":111,"T":"P","D":"Power","R":"0/2300","L":0},{"I":121,"T":"P","D":"Power","R":"0/2300","L":1},{"I":118,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":0},{"I":128,"T":"S","D":"Input","R":"0(off)/1(on)/2(longpush)","L":1},{"I":115,"T":"T","D":"TemperatureC","R":"-40/300","L":2},{"I":116,"T":"T","D":"TemperatureF","R":"-40/300","L":2},{"I":117,"T":"S","D":"Overtemp","R":"0/1","L":2},{"I":211,"T":"S","D":"Energycounter0[W-min]","L":0},{"I":212,"T":"S","D":"Energycounter1[W-min]","L":0},{"I":213,"T":"S","D":"Energycounter2[W-min]","L":0},{"I":214,"T":"S","D":"Energycountertotal[W-min]","L":0},{"I":221,"T":"S","D":"Energycounter0[W-min]","L":1},{"I":222,"T":"S","D":"Energycounter1[W-min]","L":1},{"I":223,"T":"S","D":"Energycounter2[W-min]","L":1},{"I":224,"T":"S","D":"Energycounter*
2020-08-10 13:59:47 DEBUG (Cloud) [pyShelly] POST to Shelly Cloud
2020-08-10 13:59:49 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.241 b'P\x1em#\xb3cit\x01s\xed\x0b\xec\tSHSW-25#98F4ABF2E4B5#1\xd2C\x96\x00\x82\xb4Z\xff{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,65.75],[0,116,150.35],[0,117,0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,5801],[0,221,0.000],[0,222,0.000],[0,223,0.000],[0,224,0]]}'
2020-08-10 13:59:49 DEBUG (CoAP) [pyShelly] CoAP msg: 30 192.168.1.241 bytearray(b'P\x1em#\xb3cit\x01s\xed\x0b\xec\tSHSW-25#98F4ABF2E4B5#1\xd2C\x96\x00\x82\xb4Z\xff{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,65.75],[0,116,150.35],[0,117,0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,5801],[0,221,0.000],[0,222,0.000],[0,223,0.000],[0,224,0]]}')
2020-08-10 13:59:49 DEBUG (CoAP) [pyShelly] CoAP Code: 30, Type SHSW-25, Id 98F4ABF2E4B5, Payload *{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,65.75],[0,116,150.35],[0,117,0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,5801],[0,221,0.000],[0,222,0.000],[0,223,0.000],[0,224,0]]}*
2020-08-10 13:59:49 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4B5-1 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 97}
2020-08-10 13:59:49 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4B5-2 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 0}
2020-08-10 13:59:49 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4B5-1 state:0.0 stateValue:None values:None info_values:{'total_consumption': 97}
2020-08-10 13:59:49 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4B5-2 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 13:59:49 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4B5-1 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:49 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4B5-2 state:False stateValue:{'last_event': 'L', 'event_cnt': 1} values:None info_values:None
2020-08-10 13:59:54 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.242 b'P\x1e\xb4\xfe\xb3cit\x01s\xed\x0b\xec\tSHSW-25#98F4ABF2EF44#1\xd2C\x96\x00\x82\xa9\x00\xff{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,61.89],[0,116,143.40],[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-08-10 13:59:54 DEBUG (CoAP) [pyShelly] CoAP msg: 30 192.168.1.242 bytearray(b'P\x1e\xb4\xfe\xb3cit\x01s\xed\x0b\xec\tSHSW-25#98F4ABF2EF44#1\xd2C\x96\x00\x82\xa9\x00\xff{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,61.89],[0,116,143.40],[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-08-10 13:59:54 DEBUG (CoAP) [pyShelly] CoAP Code: 30, Type SHSW-25, Id 98F4ABF2EF44, Payload *{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,61.89],[0,116,143.40],[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-08-10 13:59:54 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2EF44-1 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 0}
2020-08-10 13:59:54 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2EF44-2 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 0}
2020-08-10 13:59:54 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2EF44-1 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 13:59:54 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2EF44-2 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 13:59:54 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2EF44-1 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:54 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2EF44-2 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:58 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.243 b'P\x1eD&\xb3cit\x01s\xed\x0b\xec\x03SHSW-25#10E84F#1\xd2C\x96\x00\x82s\xb2\xff{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,1],[0,128,1],[0,115,58.55],[0,116,137.40],[0,117,0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,10574],[0,221,0.000],[0,222,0.000],[0,223,0.000],[0,224,10909]]}'
2020-08-10 13:59:58 DEBUG (CoAP) [pyShelly] CoAP msg: 30 192.168.1.243 bytearray(b'P\x1eD&\xb3cit\x01s\xed\x0b\xec\x03SHSW-25#10E84F#1\xd2C\x96\x00\x82s\xb2\xff{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,1],[0,128,1],[0,115,58.55],[0,116,137.40],[0,117,0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,10574],[0,221,0.000],[0,222,0.000],[0,223,0.000],[0,224,10909]]}')
2020-08-10 13:59:58 DEBUG (CoAP) [pyShelly] CoAP Code: 30, Type SHSW-25, Id 10E84F, Payload *{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,1],[0,128,1],[0,115,58.55],[0,116,137.40],[0,117,0],[0,211,0.000],[0,212,0.000],[0,213,0.000],[0,214,10574],[0,221,0.000],[0,222,0.000],[0,223,0.000],[0,224,10909]]}*
2020-08-10 13:59:58 DEBUG (CoAP) [pyShelly] Update id:10E84F-1 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': True, 'over_power': False, 'total_consumption': 176}
2020-08-10 13:59:58 DEBUG (CoAP) [pyShelly] Update id:10E84F-2 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': True, 'over_power': False, 'total_consumption': 182}
2020-08-10 13:59:58 DEBUG (CoAP) [pyShelly] Update id:10E84F-1 state:0.0 stateValue:None values:None info_values:{'total_consumption': 176}
2020-08-10 13:59:58 DEBUG (CoAP) [pyShelly] Update id:10E84F-2 state:0.0 stateValue:None values:None info_values:{'total_consumption': 182}
2020-08-10 13:59:58 DEBUG (CoAP) [pyShelly] Update id:10E84F-1 state:True stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:58 DEBUG (CoAP) [pyShelly] Update id:10E84F-2 state:True stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:59 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.117 b'P\x1es\xb6\xb3cit\x01s\xed\x0b\xec\x03SHSW-25#C4D52A#1\xd2C\x96\x00\x82\x1a\x06\xff{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,62.54],[0,116,144.58],[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-08-10 13:59:59 DEBUG (CoAP) [pyShelly] CoAP msg: 30 192.168.1.117 bytearray(b'P\x1es\xb6\xb3cit\x01s\xed\x0b\xec\x03SHSW-25#C4D52A#1\xd2C\x96\x00\x82\x1a\x06\xff{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,62.54],[0,116,144.58],[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-08-10 13:59:59 DEBUG (CoAP) [pyShelly] CoAP Code: 30, Type SHSW-25, Id C4D52A, Payload *{"G":[[0,112,0],[0,122,0],[0,111,0.000000],[0,121,0.000000],[0,118,0],[0,128,0],[0,115,62.54],[0,116,144.58],[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-08-10 13:59:59 DEBUG (CoAP) [pyShelly] Update id:C4D52A-1 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 0}
2020-08-10 13:59:59 DEBUG (CoAP) [pyShelly] Update id:C4D52A-2 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 0}
2020-08-10 13:59:59 DEBUG (CoAP) [pyShelly] Update id:C4D52A-1 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 13:59:59 DEBUG (CoAP) [pyShelly] Update id:C4D52A-2 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 13:59:59 DEBUG (CoAP) [pyShelly] Update id:C4D52A-1 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 13:59:59 DEBUG (CoAP) [pyShelly] Update id:C4D52A-2 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 14:00:02 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.240 b'P\x1e\r(\xb3cit\x01s\xed\x0b\xec\tSHSW-25#98F4ABF2E4E0#1\xd2C\x96\x00\x82c\x16\xff{"G":[[0,112,0],[0,122,0],[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,1191]]}'
2020-08-10 14:00:02 DEBUG (CoAP) [pyShelly] CoAP msg: 30 192.168.1.240 bytearray(b'P\x1e\r(\xb3cit\x01s\xed\x0b\xec\tSHSW-25#98F4ABF2E4E0#1\xd2C\x96\x00\x82c\x16\xff{"G":[[0,112,0],[0,122,0],[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,1191]]}')
2020-08-10 14:00:02 DEBUG (CoAP) [pyShelly] CoAP Code: 30, Type SHSW-25, Id 98F4ABF2E4E0, Payload *{"G":[[0,112,0],[0,122,0],[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,1191]]}*
2020-08-10 14:00:02 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-1 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 0}
2020-08-10 14:00:02 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-2 state:False stateValue:None values:None info_values:{'current_consumption': 0, 'switch': False, 'over_power': False, 'total_consumption': 20}
2020-08-10 14:00:02 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-1 state:0.0 stateValue:None values:None info_values:{'total_consumption': 0}
2020-08-10 14:00:02 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-2 state:0.0 stateValue:None values:None info_values:{'total_consumption': 20}
2020-08-10 14:00:02 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-1 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
2020-08-10 14:00:02 DEBUG (CoAP) [pyShelly] Update id:98F4ABF2E4E0-2 state:False stateValue:{'last_event': '', 'event_cnt': 0} values:None info_values:None
I can provide more logs if needed.
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Shelly 2.5 Binary Sensors not recognizing state change
In hassio the visual state of the switch does not change when you throw the physical switch? Can you take the switches out...
Read more >ShellyForHASS | The switch sensor of a master bedroom shelly ...
This morning all my Shelly devices are not working via HA when I click on them they change state for 2 to 3...
Read more >Rules - Tasmota
Rules perform actions based on triggers (e.g., switch state change, temperature threshold, events like system boot, a defined timer elapsing, custom defined ...
Read more >Deep Dive into the EZVIZ DB1 Doorbell with Home Assistant
For example, if you set it to 5 seconds, the Shelly input sensor will switch on for exactly 5 seconds, starting when the...
Read more >List of Compatible Devices - Hubitat Documentation
Brand Device Product Number Device type Protocol Driv...
2GIG 700 Series Smart Thermostat STZ‑1 Thermostat Z‑Wave Gen...
ADT (Nortek) Water Leak Detector 10016864C Water Sensor...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hi all, this is due to the shelly firmware 18 , i just downgraded and its working fine
yo have to singe up to shelly supports to get the old firmware here it is for the dimmer
http://archive.shelly-support.eu/v1.7.7/SHDM-1_build.zip
you can execute in a browser to do a OTA upgrade http://<your dimmer ip>/ota?url=http://archive.shelly-support.eu/v1.7.7/SHDM-1_build.zip
don’t use this for another device then a dimmer , if you have a different device get your proper zip file
go here https://www.shelly-support.eu/index.php?shelly-firmware-archive/
there is also a shelly toll you can upgrade/downgrade firmware easy
I am facing the same issue - after upgrading to “Shelly For HASS - version 0.2.0” (and upgrading my Shellys to FW1.8.3). This is however only on ONE of 23 Shelly devices - one 1PM. I keeps changing the the “physical switch-state” (binary_sensor.switch / event: “shelly_switch_click”) on every “poll” (checked in the logs - and compared to DeveloperTools-Events and NodeRed).
I have however other “1PM”-devices which do not constantly change the “physical switch-state” (binary_sensor.switch / event: “shelly_switch_click”).
I rebooted this shelly, took it off power, deleted the full integration in HASS (and reconfigured it) - the issue remains. I have NO idea why the switch-state is triggered on “polling”. There is a physical switch connected to the SW port of the Shelly-1PM, but this physical-switch is not being touched (nor can I measure and amperage or voltage change on the SW port).
Also, no signal for an SW state change is coming from CoAP. The state change is ONLY triggered though Polling (and I cannot see why …) .
The Timing seems to happen in sync with the polling:
I tried to capture this in this animated GIF (it happens every 60 sec - due to the polling interval …) - unfortunately the animation was removed by GITHUB - so only an image) :
Can “polling” be turned-off" in any way? (As CoAP is just working fine …) What would I “loose” by “disabling polling”?