XtheOne / Inverter-Data-Logger

Data logger for Omnik/Hosola and other Solarman Wi-Fi kit powered Solar Inverters
GNU General Public License v3.0
116 stars 28 forks source link

Error in configuration file #17

Closed donhay closed 6 years ago

donhay commented 6 years ago

When I run python LiveStats.py I get the following reported. So it can see my inverter and it reports the values.

pi@raspberrypi:~/Inverter-Data-Logger $ python LiveStats.py 2018-03-24 16:50:18,228 DEBUG Importing output plugin ConsoleOutput 2018-03-24 16:50:18,230 INFO Connecting to logger with IP: 192.168.0.120 and SN 616039440 2018-03-24 16:50:18,231 INFO connecting to 192.168.0.120 port 8899 2018-03-24 16:50:18,822 DEBUG DATA len=89: 2018-03-24 16:50:18,823 INFO Inverter ID: S2821590450130 2018-03-24 16:50:18,824 INFO RUN State: 1 2018-03-24 16:50:18,824 DEBUG Run pluginConsoleOutput Inverter ID: S2821590450130 E Today : 1.8 Total: 2177.7 H Total : 5774 Temp : 18.0 errorMsg: 0 PV1 V: 233.4 I: 0.1 PV2 V: 0.7 I: 1.9 PV3 V: 0.0 I: 0.0 L1 P: 44 V: 238.2 I: 0.3 F: 50.05 L2 P: 0 V: 0.0 I: 0.0 F: 0.0 L3 P: 0 V: 0.0 I: 0.0 F: 0.0 2018-03-24 16:50:18,827 DEBUG DATA len=17: 2018-03-24 16:50:18,828 DEBUG Exit Status: DATA SEND IS OK

If I then manually run python InverterExport.py I get the following reported. It tells me there is an error in the config file with no section for my inverter ID.

pi@raspberrypi:~/Inverter-Data-Logger $ python InverterExport.py 2018-03-24 16:51:24,503 DEBUG Importing output plugin DomoticzOutput 2018-03-24 16:51:24,553 INFO Connecting to logger with IP: 192.168.0.120 and SN 616039440 2018-03-24 16:51:24,554 INFO connecting to 192.168.0.120 port 8899 2018-03-24 16:51:27,330 DEBUG DATA len=89: 2018-03-24 16:51:27,332 INFO Inverter ID: S2821590450130 2018-03-24 16:51:27,333 INFO RUN State: 1 2018-03-24 16:51:27,333 DEBUG Run pluginDomoticzOutput 2018-03-24 16:51:27,334 ERROR no section in configuration file for inverter with ID: S2821590450130, skipping. 2018-03-24 16:51:27,335 DEBUG DATA len=17: 2018-03-24 16:51:27,336 DEBUG Exit Status: DATA SEND IS OK

Here is my config file.

###############

Settings

################

[general]

General:enabled_plugins

Choose which outputs to use

Possible options: MysqlOutput,PostgreSQLOutput,PVoutputOutput,ConsoleOutput,CSVOutput,CSVOutput2File,DomoticzOutput,MQTTOutput

enabled_plugins = DomoticzOutput

choose one of these

use temperature of inverter for output to pvoutput/mqtt

use_temperature = false

do not use temperature of inverter for output to pvoutput/mqtt

use_temperature = false

Minimum Temperature for exporting. (a max. of 300 degrees is hardcoded)

Set to -32768 to always sent the temperature value.

Or set to a value so that the inverter internal temperature is only exported if equal or above this value.

min_temp = 5

Minimum Voltage of any sensor for exporting.

Set to 0 to always sent the sensor's voltage value.

Or set to a value so that the sensor voltage data is only exported if equal or above this value.

min_voltage = 0

Minimum grid Frequency for exporting.

Set to 0 to always sent the sensor's frequency value.

Or set to a value so that the grid Frequency is only exported if equal or above this value.

min_freq = 30

[logger]

ip,sn,ip,sn,ip,sn or auto

IP address of your inverter(s) data logger and S/N of the wifi kit(s)

gateways = 192.168.0.120,616039440

Automatically detect logger(s) on the local network

gateways = auto

Default for the Wifi module/logger/gateway

port = 8899

time to wait for inverter logger response

timeout = 3

repeat this for every inverter ID that must be logged to pvoutput

The apikey(s) and sysid(s) can be found at http://pvoutput.org/account.jsp

[pvout]

use apikey- in the apikey name

apikey-NLBN1234567A1234 = NOTAREALAPIKEY86e2258d4e29169fb79cf18b00

use sysid- in the sysid name

sysid-NLBN1234567A1234 = 12345

use domoticz- as section name

repeat this section for every inverter ID that must be logged to domoticz

Replace 'idx' with the Idx number of the corresponding virtual sensor device as defined in domoticz

comment out values which can or must be skipped

[domoticz-S2821590450130] host = 192.168.0.100 port = 8080 path = /json.htm

Replace 'idx' with the Idx number of the corresponding virtual sensor device as defined in domoticz

Electric_meter_idx =4

comment out below values which are not needed

Temp_idx = idx

E_today_idx = idx

E_total_idx = idx

E_total_c_idx = idx

H_total_idx = idx

DC input

PV1_voltage_idx =5 PV1_current_idx =6

use below when you have multiple PVs on your inverter

PV2_voltage_idx = idx

PV2_current_idx = idx

PV3_voltage_idx = idx

PV3_current_idx = idx

PV123_voltage_idx = idx

PV123_current_idx = idx

AC output

AC1_voltage_idx =7 AC1_current_idx =8 AC1_power_idx =9 AC1_frequency_idx =10

use below when you have a 3-phase inverter

AC2_voltage_idx = idx

AC2_current_idx = idx

AC2_power_idx = idx

AC2_frequency_idx = idx

AC3_voltage_idx = idx

AC3_current_idx = idx

[mysql]

Host where the mysql server is active

host = 127.0.0.1 user = pass = database =

[postgresql] connstr = host=10.0.0.1 dbname=inverter user=inverter password=example

[mqtt]

Host where the mqtt server is, including user/pass authentication

host = 127.0.0.1 port = 1883 user = username pass = password

[csv] daily_file = false disable_header = false csv_file_name = filename.csv

[log]

Log:Output

Possible options: none,console,file (combinations are possible)

Use none to disable logging

type = console

Log:level

Possible options: critical, error, warning, info, debug, notset

level = debug

Log:filename

Output file for file logger

filename = inverter-export.log

I don't see what is wrong so could someone please point me in the right direction. I feel I'm so close, but just don't understand the scripts.

XtheOne commented 6 years ago

I have to fix the data hex dump in debug mode... Can you check if the inverter ID is correct? it might be missing the last digits...

donhay commented 6 years ago

I have checked the label on the inverter itself and the ID is S2821590450130. This is the same as in my config file.

Do you need any more information from me?

Thank you for your help.

XtheOne commented 6 years ago

Can you pull the last change and repost a log with the raw data dump?

donhay commented 6 years ago

Sorry for being a noob, not sure what you mean by the raw data dump. If you need more than the following please let me know.

After running InverterExport.py I now get the following.

pi@raspberrypi:~/Inverter-Data-Logger $ python InverterExport.py 2018-04-04 09:00:17,653 DEBUG Importing output plugin DomoticzOutput 2018-04-04 09:00:17,702 INFO Connecting to logger with IP: 192.168.0.120 and SN 616039440 2018-04-04 09:00:17,703 INFO connecting to 192.168.0.120 port 8899 2018-04-04 09:00:17,710 DEBUG RAW sent Packet (len=16): 68:02:41:b1:10:04:b8:24:10:04:b8:24:01:00:d5:16 hA$$ 2018-04-04 09:00:18,316 DEBUG RAW received Packet (len=103): 68:59:51:b0:10:04:b8:24:10:04:b8:24:81:02:0a:20:20:53:32:38:32:31:35:39:30:34:35:30:31:33:30:00:aa:09:7c:00:07:00:00:00:06:00:19:00:00:00:07:00:00:00:00:09:85:00:00:00:00:13:86:00:8f:00:00:00:00:00:00:00:00:00:14:00:00:56:b4:00:00:17:08:00:01:00:00:00:00:07:97:0a:5b:00:00:00:01:00:00:00:00:00:00:00:00:46:16 hYQ$$ S2821590450130|V[F 2018-04-04 09:00:18,317 DEBUG DATA len=89: 2018-04-04 09:00:18,318 INFO Inverter ID: S2821590450130 2018-04-04 09:00:18,319 INFO RUN State: 1 2018-04-04 09:00:18,320 DEBUG Run pluginDomoticzOutput 2018-04-04 09:00:18,321 ERROR no section in configuration file for inverter with ID: S2821590450130, skipping. 2018-04-04 09:00:18,322 DEBUG RAW received Packet (len=31): 68:11:51:f0:10:04:b8:24:10:04:b8:24:44:41:54:41:20:53:45:4e:44:20:49:53:20:4f:4b:0d:0a:23:16 hQ$$DATA SEND IS OK# 2018-04-04 09:00:18,323 DEBUG DATA len=17: 2018-04-04 09:00:18,324 DEBUG Exit Status: DATA SEND IS OK

XtheOne commented 6 years ago

This is what I need. (DEBUG RAW received Packet (len=103): ) Will try to fix it by running it trough the test script. What type of inverter do you have?

XtheOne commented 6 years ago

I see, there are 2 spaces before the S/N starts. I see: " S2821590450130" as the SN. Just commited a fix.

donhay commented 6 years ago

My inverter is a Solax SL-TL2800 (Suntellite). It is a single phase, single string inverter so only has PV1. After the last pull I am now getting data into Domoticz. Below is the result of running InverterExport.py I am guessing the results are dependant on how my config file is set up. Does it look good to you? And thanks for your help.

pi@raspberrypi:~/Inverter-Data-Logger $ python InverterExport.py 2018-04-04 12:18:38,650 DEBUG Importing output plugin DomoticzOutput 2018-04-04 12:18:38,699 INFO Connecting to logger with IP: 192.168.0.120 and SN 616039440 2018-04-04 12:18:38,700 INFO connecting to 192.168.0.120 port 8899 2018-04-04 12:18:38,709 DEBUG RAW sent Packet (len=16): 68:02:41:b1:10:04:b8:24:10:04:b8:24:01:00:d5:16 hA$$ 2018-04-04 12:18:41,150 DEBUG RAW received Packet (len=103): 68:59:51:b0:10:04:b8:24:10:04:b8:24:81:02:0a:20:20:53:32:38:32:31:35:39:30:34:35:30:31:33:30:00:fa:09:92:00:0e:00:00:00:3e:00:49:00:00:00:3a:00:00:00:00:09:ad:00:00:00:00:13:84:05:91:00:00:00:00:00:00:00:00:00:aa:00:00:56:c3:00:00:17:0b:00:01:00:00:00:00:07:97:0a:5b:00:00:00:01:00:00:00:00:00:00:00:00:23:16 hYQ$$ S2821590450130>I:V[# 2018-04-04 12:18:41,151 DEBUG DATA len=89: 2018-04-04 12:18:41,152 INFO Inverter ID: S2821590450130 2018-04-04 12:18:41,153 INFO RUN State: 1 2018-04-04 12:18:41,154 DEBUG Run pluginDomoticzOutput 2018-04-04 12:18:41,155 INFO Uploading data from inverter with ID: S2821590450130 to Domoticz 2018-04-04 12:18:41,156 DEBUG url: http://192.168.0.100:8080/json.htm 2018-04-04 12:18:41,157 DEBUG Temperature : 25.0 degrees celcius 2018-04-04 12:18:41,157 DEBUG PV1 voltage : 245.0 Volt 2018-04-04 12:18:41,158 DEBUG AC1 voltage : 247.7 Volt 2018-04-04 12:18:41,159 DEBUG AC total power: 1425 Watt 2018-04-04 12:18:41,159 DEBUG e_today : 1.7 kWh 2018-04-04 12:18:41,160 DEBUG msg.e_total : 2221.1 kWh 2018-04-04 12:18:41,160 DEBUG e_total : 2221.1 kWh 2018-04-04 12:18:41,161 DEBUG Temperature out of range, or not defined: 25.0 degrees celcius 2018-04-04 12:18:41,163 DEBUG E_today not defined: 1.7 kWh 2018-04-04 12:18:41,163 DEBUG E_total not defined: 2221.1 kWh 2018-04-04 12:18:41,164 DEBUG E_total c_not defined: 2221.1 kWh 2018-04-04 12:18:41,165 DEBUG H_total not defined: 5899 hours 2018-04-04 12:18:41,167 DEBUG PV2 current out of range, or not defined: 7.3 Ampere 2018-04-04 12:18:41,168 DEBUG PV3 current out of range, or not defined: 0.0 Ampere 2018-04-04 12:18:41,168 DEBUG PV1/2/3 current not defined: 6.2/7.3/0.0 Ampere 2018-04-04 12:18:41,170 DEBUG PV2 voltage out of range, or not defined: 1.4 Volts 2018-04-04 12:18:41,170 DEBUG PV3 voltage out of range, or not defined: 0.0 Volts 2018-04-04 12:18:41,172 DEBUG PV1/2/3 voltage not defined: 245.0/1.4/0.0 Volts 2018-04-04 12:18:41,173 DEBUG AC2 current out of range, or not defined: 0.0 Ampere 2018-04-04 12:18:41,174 DEBUG AC3 current out of range, or not defined: 0.0 Ampere 2018-04-04 12:18:41,174 DEBUG AC1/2/3 current not defined: 5.8/0.0/0.0 Ampere 2018-04-04 12:18:41,175 DEBUG AC2 voltage out of range, or not defined: 0.0 Volt 2018-04-04 12:18:41,176 DEBUG AC3 voltage out of range, or not defined: 0.0 Volt 2018-04-04 12:18:41,177 DEBUG AC1/2/3 voltage not defined: 247.7/0.0/0.0 Volts 2018-04-04 12:18:41,178 DEBUG AC2 power out of range, or not defined: 0 Watt 2018-04-04 12:18:41,179 DEBUG AC3 power out of range, or not defined: 0 Watt 2018-04-04 12:18:41,180 DEBUG AC123 power not defined: 1425 Watt 2018-04-04 12:18:41,181 DEBUG AC2 frequency out of range, or not defined: 0.0 Hertz 2018-04-04 12:18:41,182 DEBUG AC3 frequency out of range, or not defined: 0.0 Hertz 2018-04-04 12:18:41,183 DEBUG http://192.168.0.100:8080/json.htm?type=command&svalue=49.96&idx=10&param=udevice&nvalue=0 2018-04-04 12:18:41,198 DEBUG { "status" : "OK", "title" : "Update Device" }

2018-04-04 12:18:41,199 DEBUG http://192.168.0.100:8080/json.htm?type=command&svalue=245.0&idx=5&param=udevice&nvalue=0 2018-04-04 12:18:41,205 DEBUG { "status" : "OK", "title" : "Update Device" }

2018-04-04 12:18:41,206 DEBUG http://192.168.0.100:8080/json.htm?type=command&svalue=1425%3B2221100.0&idx=4&param=udevice&nvalue=0 2018-04-04 12:18:41,212 DEBUG { "status" : "OK", "title" : "Update Device" }

2018-04-04 12:18:41,213 DEBUG http://192.168.0.100:8080/json.htm?type=command&svalue=247.7&idx=7&param=udevice&nvalue=0 2018-04-04 12:18:41,219 DEBUG { "status" : "OK", "title" : "Update Device" }

2018-04-04 12:18:41,220 DEBUG http://192.168.0.100:8080/json.htm?type=command&svalue=6.2&idx=6&param=udevice&nvalue=0 2018-04-04 12:18:41,229 DEBUG { "status" : "OK", "title" : "Update Device" }

2018-04-04 12:18:41,230 DEBUG http://192.168.0.100:8080/json.htm?type=command&svalue=1425&idx=9&param=udevice&nvalue=0 2018-04-04 12:18:41,239 DEBUG { "status" : "OK", "title" : "Update Device" }

2018-04-04 12:18:41,240 DEBUG http://192.168.0.100:8080/json.htm?type=command&svalue=5.8&idx=8&param=udevice&nvalue=0 2018-04-04 12:18:41,249 DEBUG { "status" : "OK", "title" : "Update Device" }

2018-04-04 12:18:41,250 DEBUG RAW received Packet (len=31): 68:11:51:f0:10:04:b8:24:10:04:b8:24:44:41:54:41:20:53:45:4e:44:20:49:53:20:4f:4b:0d:0a:23:16 hQ$$DATA SEND IS OK# 2018-04-04 12:18:41,251 DEBUG DATA len=17: 2018-04-04 12:18:41,252 DEBUG Exit Status: DATA SEND IS OK

XtheOne commented 6 years ago

This seems to be good now.