-
-
Notifications
You must be signed in to change notification settings - Fork 670
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? |
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: