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

DomoticzOutput Fails #21

Closed buijsp closed 5 years ago

buijsp commented 5 years ago

Using Domoticz 4.9700 I try to get the values from my Omnik 3000TL inverter Console output seems to work But writing the values to Domoticz fails Tried in both ways with the same result python InverterExport.py or python InverterServer.py Raspi with Python 2.9.7

What I am missing????

config.cfg ################

Settings

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

[general]

General:enabled_plugins

Choose which outputs to use

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

enabled_plugins = DomoticzOutput, ConsoleOutput

choose one of these

use temperature of inverter for output to pvoutput/mqtt

use_temperature = true

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

[server]

InverterServer parameters

listen_address = 192.168.100.45 listen_port = 10004

[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.100.21,603158013

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-NLDN3020135H6180] host = 192.168.100.45 port = 8080 path = /json.htm

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

Electric_meter_idx = 00082006

comment out below values which are not needed

Temp_idx = 0001405F E_today_idx = 00082017 E_total_idx = 00082018 E_total_c_idx = 00082020

H_total_idx = idx

DC input

PV1 = 00082007 PV1_current_idx = 00082009

use below when you have multiple PVs on your inverter

PV2_voltage_idx = 00082008 PV2_current_idx = 00082010

PV3_voltage_idx = idx

PV3_current_idx = idx

PV123_voltage_idx = idx

PV123_current_idx = idx

AC output

AC1_voltage_idx = 00082011 AC1_current_idx = 00082012 AC1_power_idx = 00082013 AC1_frequency_idx = 00082014

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

AC3_power_idx = idx

AC3_frequency_idx = idx

AC123_voltage_idx = idx

AC123_current_idx = idx

AC123_power_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 topic = omnik/solar

[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,file

Log:level

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

level = debug

Log:filename

Output file for file logger

filename = inverter-export.log

2018-10-16 09:53:05,668 DEBUG connection from: ('192.168.100.21', 31856) 2018-10-16 09:53:06,497 DEBUG RAW received Packet (len=139): 68:7d:41:b0:fd:75:f3:23:fd:75:f3:23:81:02:01:4e:4c:44:4e:33:30:32:30:31:33:35:48:36:31:38:30:01:0d:0c:26:0c:28:ff:ff:00:0a:00:09:ff:ff:00:13:ff:ff:ff:ff:09:42:ff:ff:ff:ff:13:8e:01:dd:ff:ff:ff:ff:ff:ff:ff:ff:00:13:00:02:18:ea:00:00:52:96:00:01:00:00:00:00:ff:ff:00:00:00:00:00:00:00:00:00:00:4e:4c:31:2d:56:31:2e:30:2d:30:30:35:38:2d:34:00:00:00:00:00:56:32:2e:30:2d:30:30:32:34:00:00:00:00:00:00:00:00:00:00:00:02:16 h}Au#u#NLDN3020135H6180&(BRNL1-V1.0-0058-4V2.0-0024 2018-10-16 09:53:06,498 DEBUG DATA len=125: 2018-10-16 09:53:06,499 INFO Inverter ID: NLDN3020135H6180 2018-10-16 09:53:06,499 INFO RUN State: 1 2018-10-16 09:53:06,500 DEBUG Run pluginDomoticzOutput 2018-10-16 09:53:06,501 INFO Uploading data from inverter with ID: NLDN3020135H6180 to Domoticz 2018-10-16 09:53:06,502 DEBUG url: http://192.168.100.45:8080/json.htm 2018-10-16 09:53:06,503 DEBUG Temperature : 26.9 degrees celcius 2018-10-16 09:53:06,504 DEBUG PV1 voltage : 311.0 Volt 2018-10-16 09:53:06,504 DEBUG AC1 voltage : 237.0 Volt 2018-10-16 09:53:06,505 DEBUG AC total power: 477 Watt 2018-10-16 09:53:06,506 DEBUG e_today : 0.19 kWh 2018-10-16 09:53:06,506 DEBUG msg.e_total : 13745.0 kWh 2018-10-16 09:53:06,507 DEBUG e_total : 13745.09 kWh 2018-10-16 09:53:06,508 DEBUG H_total not defined: 21142 hours 2018-10-16 09:53:06,509 DEBUG PV3 current out of range, or not defined: -0.1 Ampere 2018-10-16 09:53:06,510 DEBUG PV1/2/3 current not defined: 1.0/0.9/-0.1 Ampere 2018-10-16 09:53:06,511 DEBUG PV1 voltage out of range, or not defined: 311.0 Volts 2018-10-16 09:53:06,512 DEBUG PV3 voltage out of range, or not defined: -0.1 Volts 2018-10-16 09:53:06,513 DEBUG PV1/2/3 voltage not defined: 311.0/311.2/-0.1 Volts 2018-10-16 09:53:06,514 DEBUG AC2 current out of range, or not defined: -0.1 Ampere 2018-10-16 09:53:06,515 DEBUG AC3 current out of range, or not defined: -0.1 Ampere 2018-10-16 09:53:06,516 DEBUG AC1/2/3 current not defined: 1.9/-0.1/-0.1 Ampere 2018-10-16 09:53:06,517 DEBUG AC2 voltage out of range, or not defined: -0.1 Volt 2018-10-16 09:53:06,517 DEBUG AC3 voltage out of range, or not defined: -0.1 Volt 2018-10-16 09:53:06,518 DEBUG AC1/2/3 voltage not defined: 237.0/-0.1/-0.1 Volts 2018-10-16 09:53:06,519 DEBUG AC2 power out of range, or not defined: -1 Watt 2018-10-16 09:53:06,520 DEBUG AC3 power out of range, or not defined: -1 Watt 2018-10-16 09:53:06,521 DEBUG AC123 power not defined: 477 Watt 2018-10-16 09:53:06,522 DEBUG AC2 frequency out of range, or not defined: -0.01 Hertz 2018-10-16 09:53:06,523 DEBUG AC3 frequency out of range, or not defined: -0.01 Hertz 2018-10-16 09:53:06,523 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=26.9&idx=0001405F&param=udevice&nvalue=0 2018-10-16 09:53:06,528 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,529 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=13745.09&idx=00082018&param=udevice&nvalue=0 2018-10-16 09:53:06,533 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,534 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=237.0&idx=00082011&param=udevice&nvalue=0 2018-10-16 09:53:06,539 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,540 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=0.9&idx=00082010&param=udevice&nvalue=0 2018-10-16 09:53:06,544 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,546 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=477&idx=00082013&param=udevice&nvalue=0 2018-10-16 09:53:06,550 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,551 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=1.9&idx=00082012&param=udevice&nvalue=0 2018-10-16 09:53:06,556 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,557 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=13745090.0&idx=00082020&param=udevice&nvalue=0 2018-10-16 09:53:06,561 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,563 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=0.19&idx=00082017&param=udevice&nvalue=0 2018-10-16 09:53:06,567 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,568 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=50.06&idx=00082014&param=udevice&nvalue=0 2018-10-16 09:53:06,573 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,574 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=477%3B13745090.0&idx=00082006&param=udevice&nvalue=0 2018-10-16 09:53:06,578 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,579 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=311.2&idx=00082008&param=udevice&nvalue=0 2018-10-16 09:53:06,584 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,585 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=1.0&idx=00082009&param=udevice&nvalue=0 2018-10-16 09:53:06,589 DEBUG { "status" : "ERR" }

2018-10-16 09:53:06,591 DEBUG Run pluginConsoleOutput Inverter ID: NLDN3020135H6180 E Today : 0.19 Total: 13745.09 H Total : 21142 Temp : 26.9 errorMsg: 0 PV1 V: 311.0 I: 1.0 PV2 V: 311.2 I: 0.9 PV3 V: -0.1 I: -0.1 L1 P: 477 V: 237.0 I: 1.9 F: 50.06 L2 P: -1 V: -0.1 I: -0.1 F: -0.01 L3 P: -1 V: -0.1 I: -0.1 F: -0.01 2018-10-16 09:53:06,592 DEBUG RAW received Packet (len=31): 68:11:41:f0:fd:75:f3:23:fd:75:f3:23:44:41:54:41:20:53:45:4e:44:20:49:53:20:4f:4b:0d:0a:91:16 hAu#u#DATA SEND IS OK 2018-10-16 09:53:06,593 DEBUG DATA len=17: 2018-10-16 09:53:06,593 DEBUG Exit Status: DATA SEND IS OK

2018-10-16 09:53:06,594 DEBUG waiting for a connection. 2018-10-16 09:58:30,511 DEBUG connection from: ('192.168.100.21', 28723) 2018-10-16 09:58:31,360 DEBUG RAW received Packet (len=139): 68:7d:41:b0:fd:75:f3:23:fd:75:f3:23:81:02:01:4e:4c:44:4e:33:30:32:30:31:33:35:48:36:31:38:30:01:11:0c:18:0c:1b:ff:ff:00:0c:00:0b:ff:ff:00:1a:ff:ff:ff:ff:09:2a:ff:ff:ff:ff:13:8e:02:76:ff:ff:ff:ff:ff:ff:ff:ff:00:18:00:02:18:ea:00:00:52:97:00:01:00:00:00:00:ff:ff:00:00:00:00:00:00:00:00:00:00:4e:4c:31:2d:56:31:2e:30:2d:30:30:35:38:2d:34:00:00:00:00:00:56:32:2e:30:2d:30:30:32:34:00:00:00:00:00:00:00:00:00:00:00:7e:16 h}Au#u#NLDN3020135H6180*vRNL1-V1.0-0058-4V2.0-0024~ 2018-10-16 09:58:31,361 DEBUG DATA len=125: 2018-10-16 09:58:31,362 INFO Inverter ID: NLDN3020135H6180 2018-10-16 09:58:31,363 INFO RUN State: 1 2018-10-16 09:58:31,364 DEBUG Run pluginDomoticzOutput 2018-10-16 09:58:31,365 INFO Uploading data from inverter with ID: NLDN3020135H6180 to Domoticz 2018-10-16 09:58:31,366 DEBUG url: http://192.168.100.45:8080/json.htm 2018-10-16 09:58:31,366 DEBUG Temperature : 27.3 degrees celcius 2018-10-16 09:58:31,367 DEBUG PV1 voltage : 309.6 Volt 2018-10-16 09:58:31,368 DEBUG AC1 voltage : 234.6 Volt 2018-10-16 09:58:31,368 DEBUG AC total power: 630 Watt 2018-10-16 09:58:31,369 DEBUG e_today : 0.24 kWh 2018-10-16 09:58:31,370 DEBUG msg.e_total : 13745.0 kWh 2018-10-16 09:58:31,370 DEBUG e_total : 13745.04 kWh 2018-10-16 09:58:31,372 DEBUG H_total not defined: 21143 hours 2018-10-16 09:58:31,373 DEBUG PV3 current out of range, or not defined: -0.1 Ampere 2018-10-16 09:58:31,374 DEBUG PV1/2/3 current not defined: 1.2/1.1/-0.1 Ampere 2018-10-16 09:58:31,375 DEBUG PV1 voltage out of range, or not defined: 309.6 Volts 2018-10-16 09:58:31,376 DEBUG PV3 voltage out of range, or not defined: -0.1 Volts 2018-10-16 09:58:31,376 DEBUG PV1/2/3 voltage not defined: 309.6/309.9/-0.1 Volts 2018-10-16 09:58:31,377 DEBUG AC2 current out of range, or not defined: -0.1 Ampere 2018-10-16 09:58:31,378 DEBUG AC3 current out of range, or not defined: -0.1 Ampere 2018-10-16 09:58:31,379 DEBUG AC1/2/3 current not defined: 2.6/-0.1/-0.1 Ampere 2018-10-16 09:58:31,380 DEBUG AC2 voltage out of range, or not defined: -0.1 Volt 2018-10-16 09:58:31,381 DEBUG AC3 voltage out of range, or not defined: -0.1 Volt 2018-10-16 09:58:31,382 DEBUG AC1/2/3 voltage not defined: 234.6/-0.1/-0.1 Volts 2018-10-16 09:58:31,383 DEBUG AC2 power out of range, or not defined: -1 Watt 2018-10-16 09:58:31,384 DEBUG AC3 power out of range, or not defined: -1 Watt 2018-10-16 09:58:31,384 DEBUG AC123 power not defined: 630 Watt 2018-10-16 09:58:31,385 DEBUG AC2 frequency out of range, or not defined: -0.01 Hertz 2018-10-16 09:58:31,386 DEBUG AC3 frequency out of range, or not defined: -0.01 Hertz 2018-10-16 09:58:31,387 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=27.3&idx=0001405F&param=udevice&nvalue=0 2018-10-16 09:58:31,391 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,393 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=13745.04&idx=00082018&param=udevice&nvalue=0 2018-10-16 09:58:31,397 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,398 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=234.6&idx=00082011&param=udevice&nvalue=0 2018-10-16 09:58:31,403 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,404 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=1.1&idx=00082010&param=udevice&nvalue=0 2018-10-16 09:58:31,408 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,409 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=630&idx=00082013&param=udevice&nvalue=0 2018-10-16 09:58:31,414 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,416 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=2.6&idx=00082012&param=udevice&nvalue=0 2018-10-16 09:58:31,420 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,421 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=13745040.0&idx=00082020&param=udevice&nvalue=0 2018-10-16 09:58:31,426 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,428 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=0.24&idx=00082017&param=udevice&nvalue=0 2018-10-16 09:58:31,432 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,434 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=50.06&idx=00082014&param=udevice&nvalue=0 2018-10-16 09:58:31,438 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,440 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=630%3B13745040.0&idx=00082006&param=udevice&nvalue=0 2018-10-16 09:58:31,445 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,446 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=309.9&idx=00082008&param=udevice&nvalue=0 2018-10-16 09:58:31,450 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,452 DEBUG http://192.168.100.45:8080/json.htm?type=command&svalue=1.2&idx=00082009&param=udevice&nvalue=0 2018-10-16 09:58:31,456 DEBUG { "status" : "ERR" }

2018-10-16 09:58:31,458 DEBUG Run pluginConsoleOutput Inverter ID: NLDN3020135H6180 E Today : 0.24 Total: 13745.04 H Total : 21143 Temp : 27.3 errorMsg: 0 PV1 V: 309.6 I: 1.2 PV2 V: 309.9 I: 1.1 PV3 V: -0.1 I: -0.1 L1 P: 630 V: 234.6 I: 2.6 F: 50.06 L2 P: -1 V: -0.1 I: -0.1 F: -0.01 L3 P: -1 V: -0.1 I: -0.1 F: -0.01 2018-10-16 09:58:31,460 DEBUG RAW received Packet (len=31): 68:11:41:f0:fd:75:f3:23:fd:75:f3:23:44:41:54:41:20:53:45:4e:44:20:49:53:20:4f:4b:0d:0a:7c:16 hAu#u#DATA SEND IS OK| 2018-10-16 09:58:31,461 DEBUG DATA len=17: 2018-10-16 09:58:31,462 DEBUG Exit Status: DATA SEND IS OK

2018-10-16 09:58:31,463 DEBUG waiting for a connection.

buijsp commented 5 years ago

No worries (except for myselves) I mixed up Domoticz ID and IDX Now that I entered the IDX number everything works Sorry to have bothered you

XtheOne commented 5 years ago

I just saw this issue. Yep the IDXes look a bit long. Great that you solved it.