-
Notifications
You must be signed in to change notification settings - Fork 24
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
Heartbeat and Touch Input event. label:enhancement #16
Comments
There are no timers for state checks. Proximity, humidity and temp are only updated when they change. Sending an ONLINE state is trivial but you won't know when its offline, unless the device sends periodic heartbeats indicating its online and anyone listening has logic to know that online state is only valid for a certain amount of time. (Which I believe MQTT Sensors do in HomeAssistant, but we don't follow that flow) Not exactly sure what you are asking for the second part. Proximity and Screen state is sent. We can't really send events on touches because they are VERY noisy (hundreds of events when touching/dragging). Maybe breakdown your flow/requirements and we can figure out any intermediate events that can be sent. |
There is a line in your code every 500s to check the relay state, temp and humidity. Also can we not use the Last Will and Testament feature for status? Have it set to OFFLINE. ** I will update this post with my workflow and possible requirements tomorrow. Late here and I'm doing a poor job describing my process. ** |
You’re right. Haven’t looked at the code in ages :). I was mixing up the sensor (proximity and buttons) blocking polls with temp/humidity data. |
I was looking at your code trying to figure out how to add two extra mqtt events. One to send out a status of the connection on something like Relay01/status "ONLINE". I was thinking maybe on the same timer that checks the relays and humidity or when connection is setup to mqtt. Could add a last will for "OFFLINE". Also I noticed you are able to detect touch screen inputs but it doesn't send any mqtt messages. I wanted to create a screensaver of sorts. I have MagicMirror and Homeassistant web portals both on the home screen. I use Tasker and AutoInput to switch between them after an amount of inactivity. I would like to keep magic mirror displayed when waking the screen from proximity and if touched switch to homeassistant, a kind of crude screensaver I guess. Would it be difficult to send mqtt payloads on those two events? I have been trying to hack together a solution with my poor understanding of C but to no avail.
The text was updated successfully, but these errors were encountered: