SofarSolar inverter integration

netstat -anlp | grep 10000

Powyższa komenda powinna wskazać proces który zajmuje ten port. W sumie to dziwne, że przestało działać i port jest zajęty. Zrestaruj hosta jak nie próbowałeś, bo sam restart HA nie ubije procesu jeżeli coś zajmujesz.

Udało się uruchomić.
Poniżej przesyłam log od uruchomienia. W logu 2 fragmenty ponieważ po refresh w logach nie pokazuje całości.

2020-12-28 08:31:35,081 DEBUG [Inverter] Config: {'fakedns': {'initial_domain': u'data2.solarmanpv.com',
             'target_ip': u'192.168.0.95'},
 'inverter': {'idle_time': 660,
              'manufacturer': u'SofarSolar',
              'model': u'SF4ES008',
              'name': u'Inverter',
              'sn': u'SF4ES008L3S279'},
 'log': {'log_filename': '', 'log_level': u'DEBUG'},
 'mqtt': {'mqtt_enabled': 'true',
          'mqtt_host': u'192.168.0.95',
          'mqtt_password': u'************',
          'mqtt_port': 1883,
          'mqtt_qos': 0,
          'mqtt_retain': False,
          'mqtt_topic': u'SofarSolar',
          'mqtt_username': u'HA-dom'},
 'proxy': {'bind_ip': '0.0.0.0', 'bind_port': '10000', 'max_connection': '1'}}
2020-12-28 08:31:35,081 INFO [FakeDNS] Entry:: dom.query. 60 IN A 192.168.0.95
2020-12-28 08:31:35,092 INFO [MqttClient] Connected with result code 0
2020-12-28 08:31:35,092 INFO [MqttClient] Configuring Home Assistant
2020-12-28 08:31:35,093 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "W", "name": "SF4ES008L3S279_power", "value_template": "{{ value_json.power }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_power"}
2020-12-28 08:31:35,094 INFO [TcpProxy] Server started [0.0.0.0:10000]
2020-12-28 08:31:35,195 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "°C", "name": "SF4ES008L3S279_temp", "value_template": "{{ value_json.temp }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_temp"}
2020-12-28 08:31:35,298 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "kWh", "name": "SF4ES008L3S279_e_total", "value_template": "{{ value_json.e_total }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "unique_id": "SF4ES008L3S279_e_total"}
2020-12-28 08:31:35,401 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "kWh", "name": "SF4ES008L3S279_e_today", "value_template": "{{ value_json.e_today }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "unique_id": "SF4ES008L3S279_e_today"}
2020-12-28 08:31:35,503 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "SF4ES008L3S279_i_pv2", "value_template": "{{ value_json.i_pv2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_pv2"}
2020-12-28 08:31:35,605 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "SF4ES008L3S279_i_pv1", "value_template": "{{ value_json.i_pv1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_pv1"}
2020-12-28 08:31:35,706 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "SF4ES008L3S279_v_ac2", "value_template": "{{ value_json.v_ac2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_ac2"}
2020-12-28 08:31:35,808 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "SF4ES008L3S279_v_ac3", "value_template": "{{ value_json.v_ac3 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_ac3"}
2020-12-28 08:31:35,910 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "SF4ES008L3S279_v_ac1", "value_template": "{{ value_json.v_ac1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_ac1"}
2020-12-28 08:31:36,012 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "SF4ES008L3S279_i_ac1", "value_template": "{{ value_json.i_ac1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_ac1"}
2020-12-28 08:31:36,114 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "SF4ES008L3S279_i_ac3", "value_template": "{{ value_json.i_ac3 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_ac3"}
2020-12-28 08:31:36,216 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "SF4ES008L3S279_i_ac2", "value_template": "{{ value_json.i_ac2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_ac2"}
2020-12-28 08:31:36,318 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "SF4ES008L3S279_v_pv1", "value_template": "{{ value_json.v_pv1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_pv1"}
2020-12-28 08:31:36,419 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "SF4ES008L3S279_v_pv2", "value_template": "{{ value_json.v_pv2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_pv2"}
2020-12-28 08:31:36,521 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "Hz", "name": "SF4ES008L3S279_f_ac", "value_template": "{{ value_json.f_ac }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_f_ac"}
2020-12-28 08:31:36,622 INFO [MqttClient] Configuring Home Assistant
2020-12-28 08:31:36,624 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "W", "name": "power", "value_template": "{{ value_json.power }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_power"}
2020-12-28 08:31:36,726 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "°C", "name": "temp", "value_template": "{{ value_json.temp }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_temp"}
2020-12-28 08:31:36,827 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "kWh", "name": "e_total", "value_template": "{{ value_json.e_total }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "unique_id": "SF4ES008L3S279_e_total"}
2020-12-28 08:31:36,929 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "kWh", "name": "e_today", "value_template": "{{ value_json.e_today }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "unique_id": "SF4ES008L3S279_e_today"}
2020-12-28 08:31:37,031 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "i_pv2", "value_template": "{{ value_json.i_pv2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_pv2"}
2020-12-28 08:31:37,133 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "i_pv1", "value_template": "{{ value_json.i_pv1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_pv1"}
2020-12-28 08:31:37,234 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "v_ac2", "value_template": "{{ value_json.v_ac2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_ac2"}
2020-12-28 08:31:37,336 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "v_ac3", "value_template": "{{ value_json.v_ac3 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_ac3"}
2020-12-28 08:31:37,437 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "v_ac1", "value_template": "{{ value_json.v_ac1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_ac1"}
2020-12-28 08:31:37,539 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "i_ac1", "value_template": "{{ value_json.i_ac1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_ac1"}
2020-12-28 08:31:37,640 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "i_ac3", "value_template": "{{ value_json.i_ac3 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_ac3"}
2020-12-28 08:31:37,742 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "i_ac2", "value_template": "{{ value_json.i_ac2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_ac2"}
2020-12-28 08:31:37,844 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "v_pv1", "value_template": "{{ value_json.v_pv1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_pv1"}
2020-12-28 08:31:37,945 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "v_pv2", "value_template": "{{ value_json.v_pv2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_pv2"}
2020-12-28 08:31:38,047 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "Hz", "name": "f_ac", "value_template": "{{ value_json.f_ac }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_f_ac"}
2020-12-28 08:31:51,143 INFO [FakeDNS] Response: data2.solarmanpv.com. -> 192.168.0.95
2020-12-28 08:32:26,497 INFO [FakeDNS] Response: data1.solarmanpv.com. -> 192.168.0.95
2020-12-28 08:32:38,323 INFO [FakeDNS] Response: data2.solarmanpv.com. -> 192.168.0.95
2020-12-28 08:32:41,270 INFO [TcpProxy] Connect to [0.0.0.0:10000] to get the content of [data2.solarmanpv.com.:10000]
2020-12-28 08:32:41,271 INFO [TcpProxy] Detect connection from [192.168.0.51:57298]
2020-12-28 08:32:41,271 INFO [TcpProxy] Trying to connect the REMOTE server [data2.solarmanpv.com.:10000]
2020-12-28 08:32:42,619 INFO [TcpProxy] Tunnel connected! Tranfering data...
2020-12-28 08:32:44,893 DEBUG [TcpProxy] 172.30.33.5:10000 >>> 172.30.33.5:53926 [99]
2020-12-28 08:32:44,894 DEBUG a5:56:00:10:41:00:01:ae:e1:bc:66:02:9e:cf:5b:00:20:00:00:00:00:00:00:00:05:3c:78:02:5a:01:4c:53:57:33:5f:31:34:5f:46:46:46:46:5f:31:2e:30:2e:33:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:98:d8:63:d0:16:80:31:39:32:2e:31:36:38:2e:30:2e:35:31:00:00:00:00:0e:00:01:01:27:07:15
2020-12-28 08:32:45,199 DEBUG [TcpProxy] 172.30.33.5:10000 <<< 172.30.33.5:53926 [23]
2020-12-28 08:32:45,200 DEBUG a5:0a:00:10:11:b6:01:ae:e1:bc:66:02:01:1d:8a:e9:5f:3c:00:00:00:c1:15
2020-12-28 08:32:46,532 DEBUG [TcpProxy] 172.30.33.5:10000 >>> 172.30.33.5:53926 [164]
2020-12-28 08:32:46,534 DEBUG a5:97:00:10:42:b6:02:ae:e1:bc:66:01:01:27:a0:cf:5b:00:22:00:00:00:7f:ba:8d:5f:01:00:fc:00:00:00:53:46:34:45:53:30:30:38:4c:33:53:32:37:39:20:20:ae:01:25:0c:5e:0f:00:00:00:00:08:00:09:00:09:00:59:09:5c:09:54:09:84:13:32:00:00:00:00:00:00:00:aa:6e:00:00:77:06:00:00:02:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:56:32:31:30:56:31:30:30:1a:00:70:19:1a:0c:55:0f:3c:00:01:00:57:05:43:0a:41:08:0c:00:00:00:00:00:07:00:ea:03:e8:03:e1:03:00:00:00:00:00:00:00:00:14:0c:1c:08:20:16:02:00:03:00:9f:15
2020-12-28 08:32:46,549 DEBUG [Inverter] Publishing to mqtt: {'e_today': 0.0,
 'e_total': 2833.0,
 'f_ac': 49.96,
 'i_ac1': 0.8,
 'i_ac2': 0.9,
 'i_ac3': 0.9,
 'i_pv1': 0.0,
 'i_pv2': 0.0,
 'id': u'SF4ES008L3S279',
 'power': 50,
 'temp': 43.0,
 'v_ac1': 239.3,
 'v_ac2': 239.6,
 'v_ac3': 238.8,
 'v_pv1': 310.9,
 'v_pv2': 393.4}
2020-12-28 08:32:46,549 INFO [MqttClient] Sending device connected message
2020-12-28 08:32:46,860 DEBUG [TcpProxy] 172.30.33.5:10000 <<< 172.30.33.5:53926 [23]
2020-12-28 08:32:46,860 DEBUG a5:0a:00:10:12:b7:02:ae:e1:bc:66:01:01:1e:8a:e9:5f:3c:00:00:00:c4:15
2020-12-28 08:32:48,246 DEBUG [TcpProxy] 172.30.33.5:10000 <<< 172.30.33.5:53926 [42]
2020-12-28 08:32:48,247 DEBUG a5:1d:00:10:45:01:01:ae:e1:bc:66:02:00:00:00:00:00:00:00:00:00:00:1f:8a:e9:5f:88:02:50:00:00:03:52:30:08:28:12:20:7e:fc:53:15
2020-12-28 08:32:50,668 DEBUG [TcpProxy] 172.30.33.5:10000 >>> 172.30.33.5:53926 [29]
2020-12-28 08:32:50,669 DEBUG a5:10:00:10:15:01:03:ae:e1:bc:66:02:01:a4:cf:5b:00:26:00:00:00:7d:ba:8d:5f:05:00:09:15
2020-12-28 08:33:06,972 INFO [FakeDNS] Response: data1.solarmanpv.com. -> 192.168.0.95

//// kolejny fragment ////

2020-12-28 08:35:27,380 DEBUG [TcpProxy] 172.30.33.5:10000 <<< 172.30.33.5:53976 [23]
2020-12-28 08:35:27,381 DEBUG a5:0a:00:10:12:c0:02:ae:e1:bc:66:01:01:bf:8a:e9:5f:3c:00:00:00:6e:15
2020-12-28 08:35:45,230 INFO [FakeDNS] Response: data1.solarmanpv.com. -> 192.168.0.95
2020-12-28 08:35:57,139 INFO [FakeDNS] Response: data2.solarmanpv.com. -> 192.168.0.95
2020-12-28 08:35:57,141 INFO [FakeDNS] Response: data2.solarmanpv.com. -> 192.168.0.95
2020-12-28 08:36:00,220 INFO [TcpProxy] Connect to [0.0.0.0:10000] to get the content of [data2.solarmanpv.com.:10000]
2020-12-28 08:36:00,221 INFO [TcpProxy] Detect connection from [192.168.0.51:52038]
2020-12-28 08:36:00,221 INFO [TcpProxy] Trying to connect the REMOTE server [data2.solarmanpv.com.:10000]
2020-12-28 08:36:00,557 INFO [TcpProxy] Tunnel connected! Tranfering data...
2020-12-28 08:36:03,709 DEBUG [TcpProxy] 172.30.33.5:10000 >>> 172.30.33.5:54018 [99]
2020-12-28 08:36:03,710 DEBUG a5:56:00:10:41:00:01:ae:e1:bc:66:02:9e:cf:5b:00:20:00:00:00:00:00:00:00:05:3c:78:02:5a:01:4c:53:57:33:5f:31:34:5f:46:46:46:46:5f:31:2e:30:2e:33:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:98:d8:63:d0:16:80:31:39:32:2e:31:36:38:2e:30:2e:35:31:00:00:00:00:0e:00:01:01:27:07:15
2020-12-28 08:36:04,900 DEBUG [TcpProxy] 172.30.33.5:10000 <<< 172.30.33.5:54018 [23]
2020-12-28 08:36:04,900 DEBUG a5:0a:00:10:11:c1:01:ae:e1:bc:66:02:01:e4:8a:e9:5f:3c:00:00:00:93:15
2020-12-28 08:36:06,228 DEBUG [TcpProxy] 172.30.33.5:10000 >>> 172.30.33.5:54018 [164]
2020-12-28 08:36:06,229 DEBUG a5:97:00:10:42:c1:02:ae:e1:bc:66:01:01:27:a0:cf:5b:00:23:00:00:00:45:bb:8d:5f:01:00:fc:00:00:00:53:46:34:45:53:30:30:38:4c:33:53:32:37:39:20:20:b8:01:a6:0c:57:0d:00:00:01:00:09:00:09:00:09:00:54:09:5a:09:56:09:86:13:32:00:00:00:00:00:00:00:aa:6e:00:00:77:06:00:00:02:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:56:32:31:30:56:31:30:30:1a:00:67:19:9a:0c:4f:0d:3c:00:01:00:57:05:43:0a:41:08:0c:00:00:00:00:00:07:00:e0:03:e8:03:ea:03:00:00:00:00:00:00:00:00:14:0c:1c:08:23:29:02:00:03:00:77:15
2020-12-28 08:36:06,232 DEBUG [Inverter] Publishing to mqtt: {'e_today': 0.0,
 'e_total': 2833.0,
 'f_ac': 49.98,
 'i_ac1': 0.9,
 'i_ac2': 0.9,
 'i_ac3': 0.9,
 'i_pv1': 0.0,
 'i_pv2': 0.1,
 'id': u'SF4ES008L3S279',
 'power': 50,
 'temp': 44.0,
 'v_ac1': 238.8,
 'v_ac2': 239.4,
 'v_ac3': 239.0,
 'v_pv1': 323.8,
 'v_pv2': 341.5}
2020-12-28 08:36:06,551 DEBUG [TcpProxy] 172.30.33.5:10000 <<< 172.30.33.5:54018 [23]
2020-12-28 08:36:06,551 DEBUG a5:0a:00:10:12:c2:02:ae:e1:bc:66:01:01:e6:8a:e9:5f:3c:00:00:00:97:15
2020-12-28 08:36:24,751 INFO [FakeDNS] Response: data1.solarmanpv.com. -> 192.168.0.95
2020-12-28 08:36:36,538 INFO [FakeDNS] Response: data2.solarmanpv.com. -> 192.168.0.95
2020-12-28 08:36:39,426 INFO [TcpProxy] Connect to [0.0.0.0:10000] to get the content of [data2.solarmanpv.com.:10000]
2020-12-28 08:36:39,427 INFO [TcpProxy] Detect connection from [192.168.0.51:60698]
2020-12-28 08:36:39,427 INFO [TcpProxy] Trying to connect the REMOTE server [data2.solarmanpv.com.:10000]
2020-12-28 08:36:39,689 INFO [TcpProxy] Tunnel connected! Tranfering data...
2020-12-28 08:36:43,109 DEBUG [TcpProxy] 172.30.33.5:10000 >>> 172.30.33.5:54028 [99]
2020-12-28 08:36:43,110 DEBUG a5:56:00:10:41:00:01:ae:e1:bc:66:02:9e:cf:5b:00:21:00:00:00:00:00:00:00:05:3c:78:02:5a:01:4c:53:57:33:5f:31:34:5f:46:46:46:46:5f:31:2e:30:2e:33:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:98:d8:63:d0:16:80:31:39:32:2e:31:36:38:2e:30:2e:35:31:00:00:00:00:0e:00:01:01:27:08:15
2020-12-28 08:36:43,370 DEBUG [TcpProxy] 172.30.33.5:10000 <<< 172.30.33.5:54028 [23]
2020-12-28 08:36:43,370 DEBUG a5:0a:00:10:11:c3:01:ae:e1:bc:66:02:01:0b:8b:e9:5f:3c:00:00:00:bd:15
2020-12-28 08:36:44,638 DEBUG [TcpProxy] 172.30.33.5:10000 >>> 172.30.33.5:54028 [164]
2020-12-28 08:36:44,639 DEBUG a5:97:00:10:42:c3:02:ae:e1:bc:66:01:01:27:9f:cf:5b:00:22:00:00:00:6d:bb:8d:5f:01:00:fc:00:00:00:53:46:34:45:53:30:30:38:4c:33:53:32:37:39:20:20:b8:01:cc:0f:fd:0c:00:00:01:00:09:00:09:00:09:00:5b:09:5d:09:57:09:85:13:3c:00:00:00:01:00:00:00:aa:6e:00:00:77:06:00:00:02:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:56:32:31:30:56:31:30:30:1a:00:6f:19:c1:0f:f5:0c:3c:00:01:00:57:05:43:0a:41:08:0c:00:00:00:00:00:07:00:eb:03:ea:03:dc:03:00:00:00:00:00:00:00:00:14:0c:1c:08:24:14:02:00:03:00:44:15
2020-12-28 08:36:44,642 DEBUG [Inverter] Publishing to mqtt: {'e_today': 0.01,
 'e_total': 2833.0,
 'f_ac': 49.97,
 'i_ac1': 0.9,
 'i_ac2': 0.9,
 'i_ac3': 0.9,
 'i_pv1': 0.0,
 'i_pv2': 0.1,
 'id': u'SF4ES008L3S279',
 'power': 60,
 'temp': 44.0,
 'v_ac1': 239.5,
 'v_ac2': 239.7,
 'v_ac3': 239.1,
 'v_pv1': 404.4,
 'v_pv2': 332.5}
2020-12-28 08:36:44,888 DEBUG [TcpProxy] 172.30.33.5:10000 <<< 172.30.33.5:54028 [23]
2020-12-28 08:36:44,889 DEBUG a5:0a:00:10:12:c4:02:ae:e1:bc:66:01:01:0c:8b:e9:5f:3c:00:00:00:c0:15
2020-12-28 08:37:03,001 INFO [FakeDNS] Response: data1.solarmanpv.com. -> 192.168.0.95
2020-12-28 08:37:14,978 INFO [FakeDNS] Response: data2.solarmanpv.com. -> 192.168.0.95

Przed chwilą sprawdziłem… Dodatek zaczął logować dane z falownika :). Dziękuje za zainteresowanie tematem. Mam nadzieję że wszystko będzie ok.

Jest jednak problem z tym dodatkiem.
Nie startuje samoczynnie. Codziennie muszę restartować dodatek aby zaczął zaczytywać dane z inwertera. Czasami dopiero za drugim razem zaczyta dane do encji. Zamieszczam poniżej log ze startu.
Rozważam podpięcie przez RS485. Z którego rozwiązania korzystasz?

2020-12-31 14:55:23,405 DEBUG [Inverter] Config: {'fakedns': {'initial_domain': u'data2.solarmanpv.com',
             'target_ip': u'192.168.0.95'},
 'inverter': {'idle_time': 660,
              'manufacturer': u'SofarSolar',
              'model': u'SF4ES008',
              'name': u'Inverter',
              'sn': u'SF4ES008L3S279'},
 'log': {'log_filename': '', 'log_level': u'DEBUG'},
 'mqtt': {'mqtt_enabled': 'true',
          'mqtt_host': u'192.168.0.95',
          'mqtt_password': u'********',
          'mqtt_port': 1883,
          'mqtt_qos': 0,
          'mqtt_retain': False,
          'mqtt_topic': u'SofarSolar',
          'mqtt_username': u'HA-dom'},
 'proxy': {'bind_ip': '0.0.0.0', 'bind_port': '10000', 'max_connection': '1'}}
2020-12-31 14:55:23,405 INFO [FakeDNS] Entry:: dom.query. 60 IN A 192.168.0.95
2020-12-31 14:55:23,416 INFO [MqttClient] Connected with result code 0
2020-12-31 14:55:23,417 INFO [TcpProxy] Server started [0.0.0.0:10000]
2020-12-31 14:55:23,417 INFO [MqttClient] Configuring Home Assistant
2020-12-31 14:55:23,418 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "W", "name": "SF4ES008L3S279_power", "value_template": "{{ value_json.power }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_power"}
2020-12-31 14:55:23,519 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "°C", "name": "SF4ES008L3S279_temp", "value_template": "{{ value_json.temp }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_temp"}
2020-12-31 14:55:23,621 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "kWh", "name": "SF4ES008L3S279_e_total", "value_template": "{{ value_json.e_total }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "unique_id": "SF4ES008L3S279_e_total"}
2020-12-31 14:55:23,724 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "kWh", "name": "SF4ES008L3S279_e_today", "value_template": "{{ value_json.e_today }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "unique_id": "SF4ES008L3S279_e_today"}
2020-12-31 14:55:23,826 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "SF4ES008L3S279_i_pv2", "value_template": "{{ value_json.i_pv2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_pv2"}
2020-12-31 14:55:23,928 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "SF4ES008L3S279_i_pv1", "value_template": "{{ value_json.i_pv1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_pv1"}
2020-12-31 14:55:24,031 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "SF4ES008L3S279_v_ac2", "value_template": "{{ value_json.v_ac2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_ac2"}
2020-12-31 14:55:24,133 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "SF4ES008L3S279_v_ac3", "value_template": "{{ value_json.v_ac3 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_ac3"}
2020-12-31 14:55:24,236 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "SF4ES008L3S279_v_ac1", "value_template": "{{ value_json.v_ac1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_ac1"}
2020-12-31 14:55:24,338 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "SF4ES008L3S279_i_ac1", "value_template": "{{ value_json.i_ac1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_ac1"}
2020-12-31 14:55:24,440 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "SF4ES008L3S279_i_ac3", "value_template": "{{ value_json.i_ac3 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_ac3"}
2020-12-31 14:55:24,541 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "A", "name": "SF4ES008L3S279_i_ac2", "value_template": "{{ value_json.i_ac2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_i_ac2"}
2020-12-31 14:55:24,643 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "SF4ES008L3S279_v_pv1", "value_template": "{{ value_json.v_pv1 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_pv1"}
2020-12-31 14:55:24,745 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "V", "name": "SF4ES008L3S279_v_pv2", "value_template": "{{ value_json.v_pv2 }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_v_pv2"}
2020-12-31 14:55:24,848 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "Hz", "name": "SF4ES008L3S279_f_ac", "value_template": "{{ value_json.f_ac }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_f_ac"}
2020-12-31 14:55:24,949 INFO [MqttClient] Configuring Home Assistant
2020-12-31 14:55:24,951 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "W", "name": "power", "value_template": "{{ value_json.power }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_power"}
2020-12-31 14:55:25,053 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "°C", "name": "temp", "value_template": "{{ value_json.temp }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "availability_topic": "SofarSolar/SF4ES008L3S279/availability", "unique_id": "SF4ES008L3S279_temp"}
2020-12-31 14:55:25,155 DEBUG [MqttClient] Sensor config message to HA: {"unit_of_measurement": "kWh", "name": "e_total", "value_template": "{{ value_json.e_total }}", "state_topic": "SofarSolar/SF4ES008L3S279/state", "device": {"model": "SF4ES008", "identifiers": "SF4ES008L3S279", "name": "Inverter", "manufacturer": "SofarSolar"}, "unique_id": "SF4ES008L3S279_e_total"}

[For English readers too ;-)]I turn off sensor availability feature in 1.1 version of addon. I face an issue with this sensor availability when I played a lot of rs485 solution, so I don’t see value for it right now. I did blind changes, because I have no way to test it in 3-4 weeks. For 98% it should work ;-), please check.

For RS485 interface I’m using my solution https://github.com/pawelka/sofarsolar_esp_rs485_logger :wink:

The main difference between solutions (addon vs rs485) is:

  • addon requires internet to work
  • addon doesn’t have a control on refresh period
  • in my version of wifi dongle I cannot hide SSID, that was also argument for me to build rs485 solution
  • rs485 doesn’t need addon :wink: it integrates over mqtt

Hello Paweł,
We have some issues with the latest HA build. Details were posted within your github repo…


Thanks for your great work!
Cheers,

Hi Pawel,
Can we expect a new build for your addon?
Thank you very much for your work.

Hey! What do you mean by turn off the availability feature in 1.1? I literally had this addon working for a week then from 1.1 boom no more, really keen to get the addon working especially if there is some setting somewhere I am overlooking :slight_smile:
Thanks for any help you may be able to provide!!

Hey, I’ve created a little function in Node-RED that may be helpfull. Just scrapping with “curl”.
It downloads inverter webpage and scraps data about current production, daily, and total.
You need to input IP address of the inverter commnunication module and your password.

[{"id":"2cd4cf1f.bf5dd","type":"tab","label":"PV","disabled":false,"info":""},{"id":"d26054e6.5954b8","type":"function","z":"2cd4cf1f.bf5dd","name":"","func":"msg.payload = Number(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1240,"y":140,"wires":[[]]},{"id":"73b50441.c06b2c","type":"change","z":"2cd4cf1f.bf5dd","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"var webdata_now_p","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"\"","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":" ","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"=","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"↵","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":140,"wires":[["d26054e6.5954b8"]]},{"id":"aaa9be17.4ed2c","type":"switch","z":"2cd4cf1f.bf5dd","name":"Now","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"var webdata_now_p = ","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":910,"y":140,"wires":[["73b50441.c06b2c"]]},{"id":"c1e33aa.f9ac7c8","type":"split","z":"2cd4cf1f.bf5dd","name":"","splt":";","spltType":"str","arraySplt":"20","arraySpltType":"len","stream":false,"addname":"","x":770,"y":60,"wires":[["1b0cf7ea.730528","9dafc0cb.5033c","aaa9be17.4ed2c"]]},{"id":"e3d5ba8a.e0f318","type":"exec","z":"2cd4cf1f.bf5dd","command":"curl -s -o - --user admin:admin http://192.168.0.100/status.html","addpay":true,"append":"","useSpawn":"false","timer":"15","oldrc":false,"name":"","x":430,"y":80,"wires":[["c1e33aa.f9ac7c8"],[],[]]},{"id":"1b0cf7ea.730528","type":"switch","z":"2cd4cf1f.bf5dd","name":"Total","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"var webdata_total_e = ","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":910,"y":60,"wires":[["39605c7.e5931a4"]]},{"id":"9dafc0cb.5033c","type":"switch","z":"2cd4cf1f.bf5dd","name":"Today","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"var webdata_today_e = ","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":910,"y":100,"wires":[["9cf84dc4.a9b4e"]]},{"id":"7d4d21f8.5f5e2","type":"inject","z":"2cd4cf1f.bf5dd","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":110,"y":80,"wires":[["e3d5ba8a.e0f318"]]},{"id":"39605c7.e5931a4","type":"change","z":"2cd4cf1f.bf5dd","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"var webdata_total_e","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"\"","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":" ","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"=","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"↵","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":60,"wires":[["dec4e883.771938"]]},{"id":"9cf84dc4.a9b4e","type":"change","z":"2cd4cf1f.bf5dd","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"var webdata_today_e","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"\"","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":" ","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"=","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"↵","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":100,"wires":[["e5987b4f.6465c8"]]},{"id":"dec4e883.771938","type":"function","z":"2cd4cf1f.bf5dd","name":"","func":"msg.payload = Number(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1240,"y":60,"wires":[[]]},{"id":"e5987b4f.6465c8","type":"function","z":"2cd4cf1f.bf5dd","name":"","func":"msg.payload = Number(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1240,"y":100,"wires":[[]]},{"id":"32382a91.a98b26","type":"comment","z":"2cd4cf1f.bf5dd","name":"PV Inverter data","info":"","x":120,"y":20,"wires":[]}]
1 Like

Hi @sztof

any tip/suggestion…

image

asking the site gives me just the normal site, but with/ status.html it gives me:

Hello, could you please further ellaborate how can we integrate this function. Maybe with some example in a node-red flow. Yes, I’m a node-red newbie.
Thanks a lot.

I have the same result on the browser, it is correct. To make sure it works you can save the curl output as file, and check the values inside.

Ok here is a little howto:

  1. Install “Variable” addon from HACS
  2. Add three new variables to HA by IDE with these names:
var:
var_pv_e_total
var_pv_e_today
var_pv_power
  1. Open node-red and import this code:
[{"id":"627b7e92.84eb6","type":"tab","label":"test","disabled":false,"info":""},{"id":"3ad61702.eb9198","type":"exec","z":"627b7e92.84eb6","command":"curl -s -o - --user admin:admin http://192.168.0.100/status.html","addpay":true,"append":"","useSpawn":"false","timer":"15","oldrc":false,"name":"","x":450,"y":80,"wires":[["6c0381cb.76f88"],[],[]]},{"id":"6c0381cb.76f88","type":"split","z":"627b7e92.84eb6","name":"","splt":";","spltType":"str","arraySplt":"20","arraySpltType":"len","stream":false,"addname":"","x":790,"y":60,"wires":[["1b1ca859.c59ba8","aa50a3d4.9c3ab","cfee5efd.742d9"]]},{"id":"5b6f6e1c.1a37d","type":"inject","z":"627b7e92.84eb6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"120","crontab":"","once":false,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":130,"y":80,"wires":[["3ad61702.eb9198"]]},{"id":"1b1ca859.c59ba8","type":"switch","z":"627b7e92.84eb6","name":"Total","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"var webdata_total_e = ","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":930,"y":60,"wires":[["f1a57d28.45c05"]]},{"id":"aa50a3d4.9c3ab","type":"switch","z":"627b7e92.84eb6","name":"Today","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"var webdata_today_e = ","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":930,"y":100,"wires":[["92799f58.d2cd8"]]},{"id":"cfee5efd.742d9","type":"switch","z":"627b7e92.84eb6","name":"Now","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"var webdata_now_p = ","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":930,"y":140,"wires":[["a31f1f81.e4795"]]},{"id":"f1a57d28.45c05","type":"change","z":"627b7e92.84eb6","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"var webdata_total_e","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"\"","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":" ","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"=","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"↵","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1080,"y":60,"wires":[["728cc488.622cbc"]]},{"id":"92799f58.d2cd8","type":"change","z":"627b7e92.84eb6","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"var webdata_today_e","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"\"","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":" ","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"=","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"↵","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1080,"y":100,"wires":[["6a0acf77.c8ee7"]]},{"id":"a31f1f81.e4795","type":"change","z":"627b7e92.84eb6","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"var webdata_now_p","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"\"","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":" ","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"=","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"↵","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1080,"y":140,"wires":[["27711480.c6b68c"]]},{"id":"728cc488.622cbc","type":"function","z":"627b7e92.84eb6","name":"","func":"msg.payload = Number(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":60,"wires":[["f27b9f7e.0e49e"]]},{"id":"6a0acf77.c8ee7","type":"function","z":"627b7e92.84eb6","name":"","func":"msg.payload = Number(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":100,"wires":[["74ca4d44.0c8fa4"]]},{"id":"27711480.c6b68c","type":"function","z":"627b7e92.84eb6","name":"","func":"msg.payload = Number(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":140,"wires":[["fd7d88f7.9ab588"]]},{"id":"f27b9f7e.0e49e","type":"switch","z":"627b7e92.84eb6","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1430,"y":60,"wires":[["468511c.bb383f"]]},{"id":"74ca4d44.0c8fa4","type":"switch","z":"627b7e92.84eb6","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1430,"y":100,"wires":[["44d23f7c.4a61f"]]},{"id":"fd7d88f7.9ab588","type":"switch","z":"627b7e92.84eb6","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1430,"y":140,"wires":[["ede089d.b9af578"]]},{"id":"468511c.bb383f","type":"smooth","z":"627b7e92.84eb6","name":"","property":"payload","action":"mean","count":"3","round":"2","mult":"single","reduce":false,"x":1580,"y":60,"wires":[["bbd0b7e3.fd7948"]]},{"id":"44d23f7c.4a61f","type":"smooth","z":"627b7e92.84eb6","name":"","property":"payload","action":"mean","count":"3","round":"2","mult":"single","reduce":false,"x":1580,"y":100,"wires":[["267b2527.c506ba"]]},{"id":"ede089d.b9af578","type":"smooth","z":"627b7e92.84eb6","name":"","property":"payload","action":"mean","count":"3","round":"2","mult":"single","reduce":false,"x":1580,"y":140,"wires":[["1fbbdb05.005255"]]},{"id":"bbd0b7e3.fd7948","type":"function","z":"627b7e92.84eb6","name":"ToYAML","func":"msg.payload = { \"data\" : {   \"entity_id\" : \"var.var_pv_e_total\",   \"value\": msg.payload }}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1740,"y":60,"wires":[["b724ef1e.10f6c"]]},{"id":"267b2527.c506ba","type":"function","z":"627b7e92.84eb6","name":"ToYAML","func":"msg.payload = { \"data\" : {   \"entity_id\" : \"var.var_pv_e_today\",   \"value\": msg.payload }}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1740,"y":100,"wires":[["746629ba.7e2d58"]]},{"id":"1fbbdb05.005255","type":"function","z":"627b7e92.84eb6","name":"ToYAML","func":"msg.payload = { \"data\" : {   \"entity_id\" : \"var.var_pv_power\",   \"value\": msg.payload }}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1740,"y":140,"wires":[["d78be029.bb028"]]},{"id":"b724ef1e.10f6c","type":"api-call-service","z":"627b7e92.84eb6","name":"var.var_pv_e_total","server":"377a9ac7.f75a26","version":1,"debugenabled":false,"service_domain":"var","service":"set","entityId":"","data":"{}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1910,"y":60,"wires":[[]]},{"id":"746629ba.7e2d58","type":"api-call-service","z":"627b7e92.84eb6","name":"var.var_pv_e_today","server":"377a9ac7.f75a26","version":1,"debugenabled":false,"service_domain":"var","service":"set","entityId":"","data":"{}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1910,"y":100,"wires":[[]]},{"id":"d78be029.bb028","type":"api-call-service","z":"627b7e92.84eb6","name":"var.var_pv_power","server":"377a9ac7.f75a26","version":1,"debugenabled":false,"service_domain":"var","service":"set","entityId":"","data":"{}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1910,"y":140,"wires":[[]]},{"id":"377a9ac7.f75a26","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]

// UPDATE:
3a) In “Service call node” (the last one) change “Server” to your Home Assistant instance

  1. Change the IP address of inverter comm module in CURL command fill login and password. In case of problems you can check if the /status.html page of the inverter works, and by checking its source you are able to scrap the values. This is how mine looks http://192.168.0.100/status.html:

  1. Set the IP address of the communication module to static

How would I do this?
CTRL-u did it I can see the values but they are not coming in via node red…

keep getting:
image

Can you show me debug info after “function” ? :slight_smile:
Also check if status.html has the same variable names as in my example:

webdata_now_p, webdata_today_e, webdata_total_e

On curl I also have error 6, but it downloads the page so you are still able to process it.
There was a bug in the code , please import the node-red flow again

Yes they have:
image

debug after function of the “e_today”

{"topic":"","payload":0.8,"rc":{"code":6,"message":"Command failed: curl -s -o - --user admin:pass http://192.168.2.8/status.html 1614590280568\n"},"parts":{"id":"60bd8a36.bc6174","type":"string","ch":";","index":71,"count":158},"_msgid":"19afc57.79dfa3b"}

It works now…

thanks

edit: be sure to mention people “change” their home assistant nod in the enitites else it will give an API error!

1 Like

Thank you so much.
It works perfectly.

I have a problem with log 485.
I have assembled and programmed the device in accordance with the article on the website https://github.com/pawelka/sofarsolar_esp_rs485_logger, however, the logger does not send messages to the HA. It does not send messages at all (I checked on MQTTlens). Do I have to change anything in the inverter to activate the 485 interface?
I am working with the Mosquitto Broker in HA.

For me not work too. In serial port monitor i see sended every interval /U string on TX pin, nothing more not happen. Telnet not give any additional info. In sources i see Gpio4 and gpio5 is used, but in compiled firmware this pins are silent. Can You update Readme file to make more detailed info? Any config in inverter? A log from correctly working device? Info about phisical pins to be used? Sources is not match to final file…