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

Make the bot posts of the door more user friendly #19

Open
redfast00 opened this issue Aug 16, 2022 · 1 comment
Open

Make the bot posts of the door more user friendly #19

redfast00 opened this issue Aug 16, 2022 · 1 comment

Comments

@redfast00
Copy link
Member

Currently, there are 2 mattermost channels in which door updates appear:

  • ~kelder: here, messages like door was open, redfast00 tried to lock door via the API get posted
  • ~verbose-mattermore: here, messages like "open" command from Mattermost handled, The door is now open and logging messages get posted

This approach was easy to implement (it's stateless, so we don't have to keep any state between requests in the mattermore backend), but is not that friendly for humans:

  • if you see a message in ~kelder and want to know if the action succeeded, you have to look in ~verbose-mattermore
  • it's hard to see when the door was manually opened: you have to look in ~verbose-mattermore and then discard all updates that are because of users electronically opening the door

Just changing the door was open, redfast00 tried to lock door into door was open, redfast00 locked the door is a bad approach: locking the door can fail (for example, if the door is misaligned and the dead bolt hits the strike plate), this would not be correct.

A possible approach is to use a state machine and a background task, but I'll leave it up to you on how you want to solve it.

@redfast00
Copy link
Member Author

This got partially fixed in #23: the bot now posts in ~kelder if the door was opened with a key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant