Shellyforhass: Dimmer switches doesnt update in lovelace

Created on 23 Jan 2020  路  18Comments  路  Source: StyraHem/ShellyForHASS

Hi.

I want to use "binary_sensor.shelly_shdm_1_xxxxxx_2_switch" on my shelly dimmer but it doesnt update i lovelace.
All of my five shelly 2.5 is working but none of my three dimmers.

Isnt dimmer switches supported ?

fixed question

All 18 comments

Isn't updating or is just slow ( like 60 secs) ?

Simone

No update at all

Please upload a debug log. Be aware that is really verbose.

Simone

I'm also experiencing this behavior with my Shelly dimmer. Latest HASSIO on Rpi3 B+ and latest Shelly for HASS Integration installed (0.1.6). With all of my Shelly 1 and Shelly 2.5 devices switch state is updated in Lovelace or in state card under attributes... Can you fix this so I can use event click option for multiple presses of the push button connected to the shelly dimmer switch input #1.

@mariobarisic , like asked to @dodg3r we need at least debug log to start digging into the issue.

Simone

@chemelli74 is there some special debug log for this integration or you need just regular HA logg for inspection and analysis?

@chemelli74 is there some special debug log for this integration or you need just regular HA logg for inspection and analysis?

https://github.com/StyraHem/ShellyForHASS/wiki/FAQ4:-Enable-debug-log

Simone

OK, here is DEBUG log from HA, I hope it helps:

pyShelly.log

Mario

Ok.

So I found out that in my case its a slow update causing the problems, just like you asked me chemelli74.
If I hold the button for ON in 4 seconds lovelace changes to ON.
So with this delays double click doesnt work.

Nice finding @dodg3r I will try the same on both of my dimmers. I have pressed pushbutton rather long but maybe not long enough. It's very strange that switch input on Shelly1 is almost instant in Lovelace and on dimmer is so delayed?!

Ok.

So I found out that in my case its a slow update causing the problems, just like you asked me chemelli74.
If I hold the button for ON in 4 seconds lovelace changes to ON.
So with this delays double click doesnt work.

Please check if the CoAP message is received in time or delayed.
We need to understand if the issue is in the firmware sending a late message or in ShellyForHASS non handling it (similar issue to #205 ).

Simone

@chemelli74 how can we see CoAP messages? In Home Assistant or via shelly cloud API? Sorry for Noob question.
Small update, I have made small automation, when I press push button on dimmer switch input1 longer then 1s HA brightness will be set to 50%. Yesterday i have tried several time to activate, execute automation but without any success. Then I realize that input switch is not updated when pressed. Today when I long press button lights are dimmed to 50%,strange right??

I think that the dimmer it self has some function build in.
If you doubleclick, the dimmer it self sets 100% dim. So using automation on dimmer switch 1 isnt a good idea i think :)
But I麓m trying to use switch 2 with another light but i麓m using momentary switches and becuase of the delay by 4 seconds hassio doesnt react to my on/off command.

If I press switch2 with a single click (on/off) at 15:40:59 then I get this message and no lovelace update. (/status updates immediatly).

2020-02-26 15:40:59 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.51 b'P\x1e\x07\xd2\xb3cit\x01s\xed\x0b\xec\x02SHDM-1#XXXXXX#1\xd2C\x96\x00\x82L\x00\xff{"G":[[0,111, 100],[0,121, 0],[0,131, 0],[0,141, 0]]}' 2020-02-26 15:40:59 DEBUG (CoAP) [pyShelly] CoAP msg: 30 192.168.1.51 bytearray(b'P\x1e\x07\xd2\xb3cit\x01s\xed\x0b\xec\x02SHDM-1#XXXXXX#1\xd2C\x96\x00\x82L\x00\xff{"G":[[0,111, 100],[0,121, 0],[0,131, 0],[0,141, 0]]}') 2020-02-26 15:40:59 DEBUG (CoAP) [pyShelly] CoAP Code: 30, Type SHDM-1, Id XXXXXX, Payload *{"G":[[0,111,100],[0,121,0],[0,131,0],[0,141,0]]}* 2020-02-26 15:40:59 INFO (CoAP) [pyShelly] Update id:XXXXXX state:False stateValue:{'brightness': 100} values:None info_values:{'switch_1': False, 'switch_2': False, 'current_consumption': 0}

If I press and hold switch 2 at 15:45:59 I get this message

2020-02-26 15:45:59 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.51 b'P\x1e\x07\xe6\xb3cit\x01s\xed\x0b\xec\x02SHDM-1#XXXXXX#1\xd2C\x96\x00\x82L\x00\xff{"G":[[0,111, 100],[0,121, 0],[0,131, 0],[0,141, 0]]}' 2020-02-26 15:45:59 DEBUG (CoAP) [pyShelly] CoAP msg: 30 192.168.1.51 bytearray(b'P\x1e\x07\xe6\xb3cit\x01s\xed\x0b\xec\x02SHDM-1#XXXXXX#1\xd2C\x96\x00\x82L\x00\xff{"G":[[0,111, 100],[0,121, 0],[0,131, 0],[0,141, 0]]}') 2020-02-26 15:45:59 DEBUG (CoAP) [pyShelly] CoAP Code: 30, Type SHDM-1, Id XXXXXX, Payload *{"G":[[0,111,100],[0,121,0],[0,131,0],[0,141,0]]}* 2020-02-26 15:45:59 INFO (CoAP) [pyShelly] Update id:XXXXXX state:False stateValue:{'brightness': 100} values:None info_values:{'switch_1': False, 'switch_2': False, 'current_consumption': 0} 2020-02-26 15:45:59 INFO (CoAP) [pyShelly] Update id:XXXXXX-1 state:False stateValue:None values:None info_values:None 2020-02-26 15:45:59 INFO (CoAP) [pyShelly] Update id:XXXXXX-2 state:False stateValue:None values:None info_values:None

After 15 seconds I get an update in lovelace and this message

2020-02-26 15:46:14 DEBUG (CoAP) [pyShelly] CoAP msg: 192.168.1.51 b'P\x1e\x07\xe7\xb3cit\x01s\xed\x0b\xec\x02SHDM-1#XXXXXX#1\xd2C\x96\x00\x82L\x00\xff{"G":[[0,111, 100],[0,121, 0],[0,131, 0],[0,141, 1]]}' 2020-02-26 15:46:14 DEBUG (CoAP) [pyShelly] CoAP msg: 30 192.168.1.51 bytearray(b'P\x1e\x07\xe7\xb3cit\x01s\xed\x0b\xec\x02SHDM-1#XXXXXX#1\xd2C\x96\x00\x82L\x00\xff{"G":[[0,111, 100],[0,121, 0],[0,131, 0],[0,141, 1]]}') 2020-02-26 15:46:14 DEBUG (CoAP) [pyShelly] CoAP Code: 30, Type SHDM-1, Id XXXXXX, Payload *{"G":[[0,111,100],[0,121,0],[0,131,0],[0,141,1]]}* 2020-02-26 15:46:14 INFO (CoAP) [pyShelly] Update id:XXXXXX state:False stateValue:{'brightness': 100} values:None info_values:{'switch_1': False, 'switch_2': True, 'current_consumption': 0} 2020-02-26 15:46:14 INFO (CoAP) [pyShelly] Update id:XXXXXX-1 state:False stateValue:None values:None info_values:None 2020-02-26 15:46:14 INFO (CoAP) [pyShelly] Update id:XXXXXX-2 state:True stateValue:None values:None info_values:None

@dodg3r nice finding, thx for your testing!

At first sight, I would say lovelace updates as soon as the correct CoAP message arrives; so is more a fw issue.

Simone

Please update to latest beta (0.1.7.b2) and to latest firmware (v1.6.0) and recheck.

Simone

Hi.

In beta2 there is no delays. The switch entity changes the same second I press the button..

Thank you for feedback.

Simone

Was this page helpful?
0 / 5 - 0 ratings