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

Resetting values of command-states #52

Closed
stef-73 opened this issue Sep 6, 2018 · 9 comments
Closed

Resetting values of command-states #52

stef-73 opened this issue Sep 6, 2018 · 9 comments

Comments

@stef-73
Copy link

stef-73 commented Sep 6, 2018

Actually, the states in the control-channel are not reset after using. So the state start remains on true, the zoneClean holds the last zone entered. This is quite annoying while using it in the vis. I've tried to use some bool-button with different texts for true and false, but as all the states remain on true, this doesn't work out.
As for now I use a trigger on the mihome-vacuum.0.info.state, but it would be very nice to have this done by the adapter itself.
So for the logic:
state 6 or 8 resets start, spotclean, pause, zoneclean.
state 8 resets "home" (going home)
state 11 (spot cleaning) resets start, pause
etcpp..

@BuZZy1337
Copy link
Member

Wouldn't it be enough just to set all states to "false" if the Status is 2, 3, 6 or 8?
Because normally you never set "start" to true and then set for example "spot clean" to true without the cleaner reached state 2 3 6 or 8 after the normal "start"?

@stef-73
Copy link
Author

stef-73 commented Sep 6, 2018

Except Home, this should go to false after state 8, but not with 6.

@stef-73
Copy link
Author

stef-73 commented Sep 7, 2018

For the state pause, this is a little bit different. If triggered from outside, it should go to true by state 10 and go to false by any other state.

@BuZZy1337
Copy link
Member

BuZZy1337 commented Sep 7, 2018

Do you just need it for displaying the states in VIS?
You can apply CSS to the widgets with an "if statement"..

For example "if mihome-vacuum.0.info.state == 8 then ......" so you can apply any styles with CSS to that Widget.

Maybe you should open a thread on forum.iobroker.net where we better can talk about that.

@stef-73
Copy link
Author

stef-73 commented Sep 7, 2018

This doesnt work with bool-switches. They are supposed to have a different look according to the value of the state. Of course its possible to overwrite this by a bit of js, but to have a reliable value in state would be much better. Will try to explain this in the forum..

@BuZZy1337
Copy link
Member

Did you already post anything about that in the forum?

@stef-73
Copy link
Author

stef-73 commented Sep 17, 2018

Just a second ago:
https://forum.iobroker.net/viewtopic.php?f=23&t=16952
Its in german..

@gaudes
Copy link

gaudes commented Feb 2, 2020

Hey,
I'd like to refresh this issue, same problem here. Bool objects in control or object "RoomClean" stay "true".
It would be perfect if states reset after changes (e.g. RoomClean=true until cleaning of room finished or canceled)

Thanks and regards,
Ralf

@dirkhe
Copy link
Contributor

dirkhe commented Feb 19, 2020

If a Button is triggered it id now Set to true, if action is triggered, gut this is Not the Cleaning Time.
As long as the robot is Cleaning the state control.clean_home is Set to true

@dirkhe dirkhe closed this as completed Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants