jghaanstra / cloud.shelly

Homey app to control Shelly Cloud devices
GNU General Public License v3.0
21 stars 15 forks source link

Shelly 1 "Input 1 turned on" does not match "Turned on" #185

Closed json81 closed 1 year ago

json81 commented 1 year ago

Seems to be a problem with Shelly 1 "Input 1" to Homey. I have a switch setup to Shelly 1:s only input. When using the switch Homey does not always register "Input 1 turned on" but always register on "Turned on".

shelly1

Could the issue be when the intervall between "input 1 turn on" and "Input 1 turn off" is to small?

jghaanstra commented 1 year ago

Is this on Homey Pro or Homey Cloud?

And are all the switch turned on/off events done by manually flipping the input? The input does not change when the Shelly is controlled through an automation (like with a Homey flow).

And as what button type is the switch configured?

json81 commented 1 year ago

Hi!

jghaanstra commented 1 year ago

And to how many seconds the auto ON and auto OFF settings are configured?

json81 commented 1 year ago

5 seconds

jghaanstra commented 1 year ago

Dont really know what could be causing this. 5 seconds is more than enough time to process any incoming status updates. Unless you do not have CoAP traffic set up correctly. If you change the state of the Shelly though the switch, does it update the onoff state in Homey near instant? If not, that would explain this. It means you depend on polling and the status is updated only every 60 seconds or so and a state change could be missed.

The only other thing I can think of is that the Shelly is not sending all events. This is kind of hard to troubleshoot for me though. I'll keep this open but more information is welcome. For instance, if the input on the device itself is shown correctly even when Homey has not picked up on the event.

json81 commented 1 year ago

Hi! Thank's for your fast reply. It changes the state instantly in Homey. But I think we can stop our investigation until I have done some more testing. I have another setup (with same button configuration) and that one looks OK. I will report back soon.

json81 commented 1 year ago

Hi! I have now checked my other Shelly 1 and I am sorry to say that is has the same problem. "Turned on/off" is reported correctly and every time. "Input 1 turned on/off" is not working all the time. This is not an issue in my use case because I can use either of them.

Some more problems I found during testing: 1) Wrong time stamps on the main page. 2) Wrong state of external input on the main page. 3) External input shows wrong text in the log. When I turned "External switch" on in Shelly Web, it shows "External input turned off" in the log.

shelly1-a

shelly1b

jghaanstra commented 1 year ago

Turned on/off" is reported correctly and every time. "Input 1 turned on/off" is not working all the time.

As mentioned previously, did you verify the input state on the Shelly to see if that is changed according to your expectations and Homey is really out of sync? I need you to verify if the issue is actually in my app. My app only processes status updates. If these are not send the issue is actually in the Shelly firmware.

Wrong time stamps on the main page.

I don't control these timestamps. You should report this to Athom.

Wrong state of external input on the main page. External input shows wrong text in the log. When I turned "External switch" on in Shelly Web, it shows "External input turned off" in the log.

Did you reverse the state in the configuration of the external input. This would explain this behaviour.

json81 commented 1 year ago

Yes, Shelly works as it should. When the connected switch button is pressed, Shelly closes the relay and a LED is turned on. After 5 seconds Shelly turns the LED of according to internal schedule.

The state is not reversed.

shelly1c

json81 commented 1 year ago

shelly1d

jghaanstra commented 1 year ago

Yes, Shelly works as it should. When the connected switch button is pressed, Shelly closes the relay and a LED is turned on. After 5 seconds Shelly turns the LED of according to internal schedule.

But did you verify the input state under http://shellyip/status if it reflects the correct state. You could actually verify the external state there as well.

It would actually help if you could post the output here so I could have a look at the actual values.

jghaanstra commented 1 year ago

Any news to this?