-
-
Notifications
You must be signed in to change notification settings - Fork 674
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
Add support for messaging via mqtt #17148
Comments
What kind of "messaging"? |
This one https://docs.evcc.io/docs/reference/configuration/messaging So I think it is not really messaging but services that is used by messaging |
I see. That would mean adding a /cc @GrimmiMeloni in case you're interested |
Yeah for now I just use the script stuff with mosquito_pub |
Yeah, about time for me to contribute something again. ;) @normanmaurer what would an MVP look like? Does simply configuring a broker + a topic to publish to suffice? |
@GrimmiMeloni yes 🎉 |
Spannend ist noch wie wir mit title und msg umgehen. Vllt. Lassen wir bei den custom Integrationen einfach den title weg? |
Or we could also use json for the payload |
Like it. Could be an |
I am wondering why we are talking |
I just thought we have custom everywhere and |
OK. But if we already have a custom solution via |
Sorry, just have seen this issue. By accident, I've implemented a type 'mqtt' in #17278 which is just reusing the existing MQTT client. This simple addition is also documented in evcc-io/docs#670 |
Just read through this issue, my thoughts here:
|
Here is an example, how the title is treated in #17278 with JSON (otherwise its ignored): # MQTT Broker Configuration
mqtt:
broker: broker.mqtt:1883
user: evcc
password: s3cr3t
# Send lifecycle events via MQTT
messaging:
events:
connect:
# Title is added later to JSON. Just omit it if not needed
title: "Car connected"
# Use template to create JSON payload
msg: '{"car": "${vehicleTitle}", "mode": "${mode}", "event": "connect"}'
services:
- type: mqtt
topic: 'evcc/events' This will result in payloads that look like {
"car": "Ioniq 6",
"mode": "PV",
"title": "Car connected"
"event": "connect"
} |
Is there anything in the suggested PR that prevents this pattern? |
nope, the PR is great. I just wanted to add some more color to the issue. +1 for selecting #17211 over #17278 if some documentation on how to concretely implement the MQTT use case with |
Exactly identicial to any other |
Yes, true, but for newcomers like me it would be very helpful to have (nearly) full examples how to implement certain use cases, like requested in this issue. I opened evcc-io/docs#665 which somewhat touches this. In the context of this issue, it would be super helpful to have a full example of how to use custom plugins in the While the current documentation is good (thanks a lot for your efforts!), I still think it can be improved by more use-case-driven documentation, including fully working snippets (not only parts of the yaml schema where you have a hard time finding out where to put it into |
At the moment there are various supported ways how to use messaging. It would be nice if you could add mqtt as well. This would allow to easy integrate with other software that could just subscribe to a topic.
The text was updated successfully, but these errors were encountered: