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

Improvements in MQTT including AutoDiscovery for the Home Assistant #449

Merged
merged 3 commits into from
Aug 3, 2021

Conversation

xyzroe
Copy link
Contributor

@xyzroe xyzroe commented Jul 30, 2021

  1. Put things in order in MQTT topics:
  • Boot and heartbeat messages are brought to the same format and go to the same topic - /send.
  • Separate topic for commands - /cmd.
  1. Opening by button or MQTT is recorded in the access log and reported by MQTT
  2. In the MQTT settings, there is option for the Home Assistant, which:
  • Simplifies the format of the access log messages and pass it into topic - /tag.
  • Added discrete topics for lock, door and doorbell (io/lock, /io/door, /io/doorbell) which are written at startup and when changed.
  • When turned on, AutoDiscovery messages are sent to configure the HA (lock, door, doorbell, username, key number)
  • If the connection to the device is interrupted, it becomes inaccessible - LWT

xyzroe added 2 commits July 30, 2021 18:27
    1. Boot and heartbeat messages are brought to the same format and go to the same topic - /send.
    2. Separate topic for commands - /cmd.
2. Opening by button or MQTT is recorded in the access log and reported by MQTT
3. In the MQTT settings, there is option for the Home Assistant, which
    1. Simplifies the format of the access log messages and pass it into topic - /tag.
    2. Added discrete topics for lock, door and doorbell (io/lock, /io/door, /io/doorbell) which are written at startup and when changed.
    3. When turned on, AutoDiscovery messages are sent to configure the HA (lock, door, doorbell, username, key number)
    4. If the connection to the device is interrupted, it becomes inaccessible - LWT
Added printing of all events to the serial port
Removed duplicate printing to the serial port in some places
Added tamper - triggered when the door is opened with the lock closed, restored when the door is closed.
Formated all code with VSCode C++ formater
@omersiar
Copy link
Collaborator

Thanks, I'll review it shortly.

Added max door open time parameter at hardware settings. If door is open over this time tamper will trig.
Added HA AutoDiscovery topic for tamper.
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

Successfully merging this pull request may close these issues.

2 participants