You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simple Python3 script to copy latest (normally once per 5 minutes) SolisCloud portal inverter update to PVOutput portal, Domoticz, and/or MQTT Broker (e.g. HomeAssistant, ioBroker).
16
17
17
18
The soliscloud_to_pvoutput.py script will get the station id via the configured soliscloud_station_index (default the first station) with the secrets of SolisCloud (see next section). Thereafter it will get the inverter id and serial number via the configured soliscloud_inverter_index (default the first inverter). Then in an endless loop the inverter details are fetched and the following information is used:
18
19
* timestamp
@@ -66,8 +67,13 @@ If you want to know how to configure in Domoticz your inverter, see [this discus
An MQTT broker is a server that receives all messages from the clients and then routes the messages to the appropriate destination clients. Information is organized in a hierarchy of topics. When SolisCloud2PVOutput has a new item of data to distribute, it sends a control message with the data to the connected broker. The broker then distributes the information to any clients that have subscribed to that topic. The SolisCloud2PVOutput does not need to have any data on the number or locations of subscribers, and subscribers, in turn, do not have to be configured with any data about the publishers.
72
+
73
+
If you want to know how to configure your inverter to send information to a MQTT Broker, see [this discussion](https://github.com/ZuinigeRijder/SolisCloud2PVOutput/discussions/30).
74
+
69
75
# Configuration
70
-
Change in soliscloud_to_pvoutput.cfg the following lines with your above obtained secrets and domoticz configuration, including if you want to send to PVOutput, Domoticzor both. By default only output is send to PVOutput:
76
+
Change in soliscloud_to_pvoutput.cfg the following lines with your above obtained secrets, domoticz configuration, mqtt configuration, including if you want to send information to PVOutput, Domoticz, MQTT or a combination of those. By default only output is send to PVOutput:
71
77
````
72
78
[api_secrets]
73
79
soliscloud_api_id = 1300386381123456789
@@ -99,6 +105,25 @@ domot_batterypower_id = 0
99
105
domot_gridpower_id = 0
100
106
domot_familyloadpower_id = 0
101
107
domot_homeconsumption_id = 0
108
+
109
+
[MQTT]
110
+
send_to_mqtt = False
111
+
mqtt_broker_hostname = localhost
112
+
mqtt_broker_port = 1883
113
+
mqtt_broker_username =
114
+
mqtt_broker_password =
115
+
mqtt_main_topic = SolisCloud2PVOutput
116
+
mqtt_last_update_id = last_update
117
+
mqtt_power_generated_id = power_generated
118
+
mqtt_ac_volt_id = ac_volt
119
+
mqtt_inverter_temp_id = inverter_temp
120
+
mqtt_volt_id = volt
121
+
mqtt_solarpower_id = solarpower
122
+
mqtt_energygeneration_id = energygeneration
123
+
mqtt_batterypower_id = batterypower
124
+
mqtt_gridpower_id = gridpower
125
+
mqtt_familyloadpower_id = familyloadpower
126
+
mqtt_homeconsumption_id = homeconsumption
102
127
````
103
128
104
129
Because I see some forks or local adaptions for people wanting a slightly different behavior, I made some adaptions to the SolisCloud2PVOutput solution and configuration to capture (some of) those variations.
@@ -113,7 +138,7 @@ Note 1: for the last bullet, you need to have a [Solis Consumption Monitoring so
113
138
114
139
Note 2: make sure that you move send_to_pvoutput setting to the [PVOutput] section, if you have an already existing configuration.
115
140
116
-
141
+
Note 3: mqtt_broker_username and mqtt_broker_password are optional
117
142
118
143
# Usage: Windows 10
119
144
Make sure to go to the directory where soliscloud_to_pvoutput.py and soliscloud_to_pvoutput.cfg is located.
0 commit comments