Support MQTT #30
Replies: 8 comments 10 replies
-
I assume you want to run a MQTT broker on Raspberry Pi or another server. Question of course, which MQTT Broker should be used. I found this article: Getting started with MQTT on Raspberry Pi using Python. The following questions arise:
Any other ideas? |
Beta Was this translation helpful? Give feedback.
-
I have played around locally in python to be possible to send data to a MQTT broker.
And the output when running:
Not sure how the MQTT topic should be for HomeAssistent or ioBroker. And of course mqtt_broker_hostname will be probably localhost, but now used a test MQTT Broker server. |
Beta Was this translation helpful? Give feedback.
-
If you have multiple inverters, then you want to distinguish them, so I added the soliscloud inverter serial number as subtopic. Example output:
Tested with MQTT-explorer and the ouput there:
To add the new data to Home Assistant, new MQTT sensors should be added to the configuration.yaml, e.g.:
I do not have a Home Assistant installation, so not actually tested. |
Beta Was this translation helpful? Give feedback.
-
Anyone interested in the code and willing to test it with HomeAssistant and/or another MQTT aware implementation. |
Beta Was this translation helpful? Give feedback.
-
Works ! But i had to change the MQTT-Topic from random to fixed: // f"{MQTT_MAIN_TOPIC}-{SOLISCLOUD_INVERTER_SN}-{random.randint(0, 1000)}" The object-name must be fixed. If we add a random number, it creates every start a new device name, that's uncommon. I grab now some data from the MQTT and forward them into a SQL database, tomorrow we know more how it runs. I think it will run perfect ... |
Beta Was this translation helpful? Give feedback.
-
Ok, makes sense to remove the random number, especially because the inverter serial number is unique. |
Beta Was this translation helpful? Give feedback.
-
@playbackandrewind I removed the random number, see this release R3.15.1 |
Beta Was this translation helpful? Give feedback.
-
Thanks for the grade work, I'm using SolisCloud2PVOutput for 2 months now. I currently need one more parameter this is "batteryCapacitySoc" (SOC). I'm not a programmer so I don't know how to implement can you please implement this? ChriWo |
Beta Was this translation helpful? Give feedback.
-
@playbackandrewind asked a question:
You're supporting Domoticz, which is not so common here.
Is there a chance to see an MQTT connector or similar to store the data in a SQL Database (Homeassistant, ioBroker etc)?
Currently I do not have experience with implementing MQTT, but of course I can figure out the best way to support this. Therefore this discussion topic is opened.
Beta Was this translation helpful? Give feedback.
All reactions