-
Notifications
You must be signed in to change notification settings - Fork 286
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
Feature: MQTT notifications #103
Comments
I have created this issue to log what I initiated and to discuss any nice to have to integrate regarding MQTT.
|
@jbaudoux this is great! Are you looking to add |
@jbaudoux , some thoughts on the notifications.
I am sure there are a whole bunch of additional uses but these were the ones that I have made most use of with my set-up. Happy to provide a view on the message structure that I use. |
Please add Water Level % and also Operation status (enabled/disabled as on/off) to MQTT notification. |
ADS 1115 with CUSTOM_SENSOR MQTT : StohanzlMart@791d2be https://github.com/StohanzlMart/OpenSprinkler-Firmware/compare/791d2be..a2a3db3 |
At a minimum, I'd really like the ability to modify, what I'll refer to as the prefix, the opensprinkler portion of the topic so that different location / devices can be differentiated. Taking it one step further it would be useful to modify the topic for each mqtt message with templating, so the flow sensor topic could be customized as such: my/differentiating/prefix/{device_name}/volume/ Water Usage My primary goal is to monitor water usage realtime to detect failures such as broken lines or stuck valves. Currently I have a service running on a server that subscribes to "opensprinkler/sensor/flow/#" and then publishes a new message with a new topic and format to be consumed downstream. Currently, this information is only published when a station ends and not in realtime so I can't create alerts using a time series like I do with other data, so it would be desirable to publish a message each time the flow sensor pulses. |
modify, what I'll refer to as the prefix, the opensprinkler portion of the topic
Merging many systems together into one MQTT set of topics is often (usually?) handled by an MQTT bridge. A bridge is usually a separate MQTT broker configured to merge topics including renaming topics.
… On Jul 11, 2024, at 3:24 PM, Alex Hanson ***@***.***> wrote:
At a minimum, I'd really like the ability to modify, what I'll refer to as the prefix, the opensprinkler portion of the topic so that different location / devices can be differentiated. Taking it one step further it would be useful to modify the topic for each mqtt message with templating, so the flow sensor topic could be customized as such:
my/differentiating/prefix/{device_name}/volume/ Water Usage
My primary goal is to monitor water usage realtime to detect failures such as broken lines or stuck valves. Currently I have a service running on a server that subscribes to "opensprinkler/sensor/flow/#" and then publishes a new message with a new topic and format to be consumed downstream. Currently, this information is only published when a station ends and not in realtime so I can't create alerts using a time series like I do with other data, so it would be desirable to publish a message each time the flow sensor pulses.
—
Reply to this email directly, view it on GitHub <#103 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAOLKMCXA7GXYORDOKHYTY3ZL4A3RAVCNFSM6AAAAABKX2N2V2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRUGA2TKNZQGM>.
You are receiving this because you are subscribed to this thread.
|
Yes, but if I am unable to modify the prefix to make each instance unique then I have to have a bridge per device. |
We can modify the firmware to make the root topic editable via UI. In the meantime, you can always modify the firmware yourself. The root topic is defined here: |
Hi - really appreciate what you've done / are doing here. Just had a quick question - what is the reason the weather update event isn't implemented for MQTT? |
There is no particular reason. The developer who wrote the MQTT feature initially didn't include weather event, or didn't feel it was needed. In fact, we are working to improve the MQTT feature at the moment, so I just went ahead and added the weather event: |
Awesome thank you for the incredibly fast response! I'll keep an eye out for a new release with these improvements! |
@chadkouse, this addition has been addressed in PR #288 and will be released in firmware 2.2.1. |
Allow to connect to MQTT broker.
Send notifications of the events:
topic: opensprinkler/system
message: {"state":"started"}
topic: opensprinkler/station/<id starting at 0>
message: {"state":1}
topic: opensprinkler/station/<id starting at 0>
message:
if flow sensor configured: {"state":0,"duration":[integer],"flow":[float]}
else: {"state":0,"duration":}
topic: opensprinkler/sensor/flow
message: {"count":[integer],"volume":[float]}
topic: opensprinkler/sensor/rain
message: {"state":0/1}
not implemented yet
Allow to configure the events to be notified.
The text was updated successfully, but these errors were encountered: