Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status of outputs is lost/out of sync after device restart #476

Open
3 tasks done
schneis opened this issue Apr 27, 2023 · 0 comments
Open
3 tasks done

Status of outputs is lost/out of sync after device restart #476

schneis opened this issue Apr 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@schneis
Copy link

schneis commented Apr 27, 2023

Perform all steps below and tick them with [x]

  • Check the related part of the Documentation
  • Update openHASP to the latest version - v0.7.0-rc4
  • Reproduce the issue and describe all steps

Describe the bug

I am using Lanbon L8 devices running v0.6.3 and v0.7.0-rc4 - both versions exhibit this behavior.

When I enable an output (whether from an object on the display or via MQTT), and then at some point the device is restarted via the MQTT "restart" command, the output relay remains on. This is essentially as I would expect, however when the device completes restarting the output is shown as off in both the UI and when querying the output status via MQTT.

Where it gets interesting is that in this state if I attempt to disable the output via MQTT, the request is ignored - presumably because the device believes the output is off even though the output relay is on.

From this state, setting the output on via either the UI or MQTT produces no change with the output relay, however the UI is now back in sync with the state of the relay. From here an attempt to turn the output off works as expected.

To Reproduce

1 - Use the default button code for an Lanbon L8 ... the pages.jsonl that I am using:

{"page":1,"comment":"---------- Page 1 ----------"}
{"id":100,"obj":"switch","x":20, "y":31, "w":180,"h":75, "radius":40,"radius20":40,"groupid":1}
{"id":110,"obj":"switch","x":20, "y":117,"w":180,"h":75, "radius":40,"radius20":40,"groupid":2}
{"id":120,"obj":"switch","x":20, "y":203,"w":180,"h":75, "radius":40,"radius20":40,"groupid":3}

2 - Enable one of the outputs from the UI or via MQTT
3 - Issue a restart command via MQTT

Expected behavior

I am not familiar with the hardware design of these devices, so unsure if it is possible to query the output state on startup.

If it is, then expected behavior would be to query that and set the internal state to match that - this would provide a fairly seamless restart for the device user (in that all outputs/lights/etc remain in the state they were before the restart). (This is how my devices running Tasmota appear to function.)

If it is not possible to query the current output state, then expected behavior would be to set all of the output relays to the state that the device believes they are in (eg: all off).

Screenshots or video

I can attempt to provide this if the above description is not clear enough.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant