nmakel / solaredge_meterproxy

Modbus proxy for SolarEdge inverters and unsupported kWh meters
MIT License
30 stars 20 forks source link

semp-tcp.py integer error for port number #5

Closed Maikel-K closed 3 years ago

Maikel-K commented 3 years ago

Hi Niels,

I know you made this semp-tcp version for my request and couldnt test it yourself. I recieved the gateways and am testing it now.

The Meter is working via ModbusTCP, i have run the script with semp.rtu.py fine for the last couple of days.

I get this error with the script:

pi@raspberrypi4:~/eastronsolaredgetcp $ python3 semp-tcp.py 2020-12-14 14:43:59 INFO: Created <Thread(t_update_2, initial)>: meter1 sdm630 SDM630(192.168.1.108:8899, connectionType.TCP: timeout=1, retries=3, unit=0x1) 2020-12-14 14:44:00 INFO: Starting <Thread(t_update_2, started 3053270112)> Traceback (most recent call last): File "semp-tcp.py", line 251, in confparser["server"].get("port", fallback=default_config["server"]["port"]) File "/home/pi/.local/lib/python3.7/site-packages/pymodbus/server/sync.py", line 616, in StartTcpServer server = ModbusTcpServer(context, framer, identity, address, **kwargs) File "/home/pi/.local/lib/python3.7/site-packages/pymodbus/server/sync.py", line 339, in init self.handler) File "/usr/lib/python3.7/socketserver.py", line 452, in init self.server_bind() File "/usr/lib/python3.7/socketserver.py", line 466, in server_bind self.socket.bind(self.server_address) TypeError: an integer is required (got type str)

nmakel commented 3 years ago

Okay that's clear, in multi device mode it's a client not a server.

Mmm than I really need to find out WHY it's not working. I need to see if I can make some kind of test setup which will reply what I send to it.

Maybe any tips on that?

Not much I can do to help. Either I need one of those units to experiment with or someone else needs to share their experiences with a different type of gateway.

Maikel-K commented 3 years ago

Would it have samenhing to do with the following?

1.9.1. UART Free-Frame The converter support UART Free-Frame function, which will check the intervals between any two bytes when receiving UART data. If the interval time exceed the set value, it will register it as the end of one frame, or it will receive data utill the internal buffer is full, (Default: 512, the largest 1400 bytes), then transfer to Socket Channel. The default UART Free-Frame interval time is 50ms, it will be packaged into another frame if received UART data interval time is greater than 50ms. The user can also set this interval time to minimum 10ms through Cli command and webpage. If interval time is set to 10ms and customer MCU can’t send next byte within 10ms, the serial data will be break into two frame.

nmakel commented 3 years ago

Would it have samenhing to do with the following?

Maybe? Is it on? Have you tried turning it off?

Maikel-K commented 3 years ago

Buffer and gap size is always on. Any idea what those should be? Maybe that causes the unwanted data?

image

nmakel commented 3 years ago

You could try setting the buffer size in smaller or larger halves (e.g., 256, 128, or 1024, 2048), and the gap time in 10s of ms (e.g., 40, 30, 60, 70). Run the test script and see if you get better results.

Maikel-K commented 3 years ago

Will play with that and otherwise I will connect my other SDM unit to the gateway and take the usb-rs485 dongle of that for the inverter. That worked like a charm 😛

Maikel-K commented 3 years ago

Maybe a bit much to ask but could you hook your rs485 converter that you use for the SDM to the meter to check which settings you need on yours?

nmakel commented 3 years ago

Maybe a bit much to ask but could you hook your rs485 converter that you use for the SDM to the meter to check which settings you need on yours?

It's not readily accessible. I may get another tgw715 for the inverter to try it out, but it's not on my to-do for a while.

Maikel-K commented 3 years ago

I understand, for you it's working okay and I just want it to connect to tcp but that's just for ease of mind that if the rpi reboots I don't have to check which USB port is what again because the usb converter doesn't have any unique info to do persistent names to it.

Anyhow, can you once more tell me how the data should look like when using the test script? Then I can try and start to play around more with those buffersize settings etc.

nmakel commented 3 years ago

Anyhow, can you once more tell me how the data should look like when using the test script? Then I can try and start to play around more with those buffersize settings etc.

2020-12-14 17:00:28 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6
2020-12-14 17:00:28 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3]
2020-12-14 17:00:28 DEBUG: Frame advanced, resetting header!!
2020-12-14 17:00:28 DEBUG: validate: fc-[3] address-1011: count-6
2020-12-14 17:00:28 DEBUG: getValues fc-[3] address-1011: count-6
2020-12-14 17:00:28 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c999a439000000000000000008deb'
Maikel-K commented 3 years ago

Well I tried a lot with the settings but it didn't work as hoped..

I dont think I will spend more money on another rs485 gateway and hook it up to usb Instead.

Thanks for the help!

nmakel commented 3 years ago

It was worth a shot. Hopefully someone else with another gateway will come along and help out. Otherwise, when I get another gateway I can do more experimenting on my own. Thanks for trying!

nmakel commented 3 years ago

Quick update.

I ordered a second tGW-715 recently to try this myself, and I have it running sucessfully.

My semp-tcp.conf:

[server]
address = 10.0.0.1
port = 1502
log_level = DEBUG
meters = sdm120

[sdm120]
src_address=1
dst_address=2
type=sdm120
host=10.0.0.2
port=502
ct_current=50

After setting everything up I see the following requests from the inverter:

2020-12-28 16:04:03 DEBUG: Handling data: 0x2 0x3 0x0 0x0 0x0 0x6 0x2 0x3 0x3 0xf2 0x0 0x6
2020-12-28 16:04:03 DEBUG: Processing: 0x2 0x3 0x0 0x0 0x0 0x6 0x2 0x3 0x3 0xf2 0x0 0x6
2020-12-28 16:04:03 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3]
2020-12-28 16:04:03 DEBUG: validate: fc-[3] address-1011: count-6
2020-12-28 16:04:03 DEBUG: getValues fc-[3] address-1011: count-6
2020-12-28 16:04:03 DEBUG: send: [ReadRegisterResponse (6)]- b'02030000000f02030c6666438e0000000000000000'

When running the test.py script, you will see this:

2020-12-28 16:12:23 DEBUG: Handling data: 0x2 0x3 0x0 0x0 0x0 0x6 0x2 0x3 0x6 0x40 0x0 0x17
2020-12-28 16:12:23 DEBUG: Processing: 0x2 0x3 0x0 0x0 0x0 0x6 0x2 0x3 0x6 0x40 0x0 0x17
2020-12-28 16:12:23 DEBUG: Not a valid unit id - 2, ignoring!!

To clear things up a bit: in this configuration your PC running semp-tcp.py is a Modbus slave with regard to the inverter, and TCP server to the tGW-715. The tGW-715 Modbus gateway is transparent in the Modbus context but will connect as TCP client to your PC. The inverter is a Modbus master, and will talk Modbus RTU to the tGW-715. This is distinctly different from the Sunspec (Non-SE Logger) mode, where the inverter is a Modbus slave.

Maikel-K commented 3 years ago

inverter (rtu master) <--> ethernet module (rtu slave? and tcp client?) <--> semp.tcp.py (tcp server)

Your are running transparent transmission mode so no real Modbus RTU-TCP conversion is running on the gateway right?

Is that the same as your are describing? How do the modbus settings and tcp client settings look like in your device?

nmakel commented 3 years ago

Almost. The gateway is not a Modbus master or slave, it is not involved other than translating Modbus RTU to TCP and vice versa. The gateway is however a TCP client, connecting to the TCP server provided by semp-tcp.py, which is a Modbus slave.

Some settings from the gateway:

9600,8N1 No flow control Modbus RTU Slave timeout 300ms Character timeout 4 bytes No tagging or other complex functionality is enabled.

Maikel-K commented 3 years ago

so it wraps the modbus RTU to TCP but isnt running a ModbusRTU to ModbusTCP conversion?

A: MODBUS over TCP means a MODBUS RTU packet wrapped in a TCP packet. B: MODBUS TCP means a MODBUS TCP packet wrapped in a TCP packet. A and B are not compatible. They transfer like data but have different structures.

nmakel commented 3 years ago

so it wraps the modbus RTU to TCP but isnt running a ModbusRTU to ModbusTCP conversion?

The gateway translates between Modbus RTU frames and Modbus TCP packets. The packets arriving at semp-tcp.py do so without any RTU checksums, and are therefore Modbus TCP, not Modbus RTU over TCP.

Maikel-K commented 3 years ago

So it's a real translator from Modbus RTU to ModbusTCP. Good to know. Now we(or i) can try and see if we can make the server read modbusrtu over tcp..

Because I think my gateway(again not your problem) is not working as a real modbusrtu to ModbusTCP translator.

Although when it's running as server for the non-Solaredge logger protocolits working fine, that's what I don't understand.

nmakel commented 3 years ago

Because I think my gateway(again not your problem) is not working as a real modbusrtu to ModbusTCP translator.

Although when it's running as server for the non-Solaredge logger protocolits working fine, that's what I don't understand.

I believe it is, otherwise you wouldn't be able to use solaredge_modbus to talk to your inverter via the EW-11.

All of your screenshots are from the web interface. Have you tried using the application they recommend in their documentation, IOTService? Download it here.

Download the Elfin user guide, and have a look at page 30. There you see how the EW-11 needs to be configured:

System Should be set to your preferences. Not sure what other options Network Mode offers, but that shouldn't matter.

UART Baudrate: 9600 Data bits: 8 Stop bits: 1 Parity: None Flow control: can't see the options, but needs to be off, none, or similar Buffer size: unsure, but leave as is

LANN and WiFi Set to your preference.

SOCKET Delete any existing socket, and start with a new one, name it whatever you want. Protocol: TCP-CLIENT Server addr: the IP of the machine running semp-tcp.py Server port: the port configured in semp-tcp.conf Local port: not important, 8899 is fine Keep alive: 60 is fine Time out: unsure, 0 might be fine Rout: uart Buffer size: same as uart buffer size Security: disable Connect mode: always Heartbeat: disable Register mode: unsure what the other options are, try link?

Confirm the settings. You should then see a Device Status page which shows the connection status and RX/TX details.

Try this while running semp-tcp.py, not the test script, and let me know whether you see messages like this:

2020-12-28 16:04:03 DEBUG: Handling data: 0x2 0x3 0x0 0x0 0x0 0x6 0x2 0x3 0x3 0xf2 0x0 0x6
2020-12-28 16:04:03 DEBUG: Processing: 0x2 0x3 0x0 0x0 0x0 0x6 0x2 0x3 0x3 0xf2 0x0 0x6
2020-12-28 16:04:03 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3]
2020-12-28 16:04:03 DEBUG: validate: fc-[3] address-1011: count-6
2020-12-28 16:04:03 DEBUG: getValues fc-[3] address-1011: count-6
2020-12-28 16:04:03 DEBUG: send: [ReadRegisterResponse (6)]- b'02030000000f02030c6666438e0000000000000000
Maikel-K commented 3 years ago

tried again playing around with the settings and getting this now: (BTW i cant get this data into the embedded field you are posting. Code doesnt seem to work for that!?)

2020-12-29 20:44:54 DEBUG: Running transaction 14 2020-12-29 20:44:54 DEBUG: SEND: 0x0 0xe 0x0 0x0 0x0 0x6 0x1 0x4 0x0 0x50 0x0 0x1c 2020-12-29 20:44:54 DEBUG: New Transaction state 'SENDING' 2020-12-29 20:44:54 DEBUG: Changing transaction state from 'SENDING' to 'WAITING FOR REPLY' 2020-12-29 20:44:54 DEBUG: Handling data: 0x2 0x3 0x6 0x40 0x0 0x17 0x4 0xab 2020-12-29 20:44:54 DEBUG: Processing: 0x2 0x3 0x6 0x40 0x0 0x17 0x4 0xab 2020-12-29 20:44:54 DEBUG: Frame check failed, ignoring!! 2020-12-29 20:44:54 DEBUG: Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY' 2020-12-29 20:44:54 DEBUG: RECV: 0x0 0xe 0x0 0x0 0x0 0x3b 0x1 0x4 0x38 0x44 0x51 0x28 0xbb 0x45 0x83 0x86 0xeb 0x44 0xb6 0x72 0x24 0x45 0x73 0x93 0xc2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x44 0xb6 0x9e 0x3d 0x45 0x73 0xd8 0x2b 0x40 0x4a 0x1c 0xd3 0x41 0x1 c 0xbf 0x47 2020-12-29 20:44:54 DEBUG: Processing: 0x0 0xe 0x0 0x0 0x0 0x3b 0x1 0x4 0x38 0x44 0x51 0x28 0xbb 0x45 0x8 3 0x86 0xeb 0x44 0xb6 0x72 0x24 0x45 0x73 0x93 0xc2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0 x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x44 0xb6 0x9e 0x3d 0x45 0x73 0xd8 0x2b 0x40 0x4a 0x1c 0xd3 0x 41 0x1c 0xbf 0x47 2020-12-29 20:44:54 DEBUG: Factory Response[ReadInputRegistersResponse: 4] 2020-12-29 20:44:54 DEBUG: Adding transaction 14 2020-12-29 20:44:54 DEBUG: Getting transaction 14 2020-12-29 20:44:54 DEBUG: Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE' 2020-12-29 20:44:54 DEBUG: [17489, 10427, 17795, 34539, 17590, 29220, 17779, 37826, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17590, 40509, 17779, 55339, 16458, 7379, 16668, 48967] 2020-12-29 20:44:54 DEBUG: [b'DQ', b'(\xbb'] 2020-12-29 20:44:54 DEBUG: [b'E\x83', b'\x86\xeb'] 2020-12-29 20:44:54 DEBUG: [b'D\xb6', b'r$'] 2020-12-29 20:44:54 DEBUG: [b'Es', b'\x93\xc2'] 2020-12-29 20:44:54 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 20:44:54 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 20:44:54 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 20:44:54 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 20:44:54 DEBUG: [b'D\xb6', b'\x9e='] 2020-12-29 20:44:54 DEBUG: [b'Es', b'\xd8+'] 2020-12-29 20:44:54 DEBUG: [b'@J', b'\x1c\xd3'] 2020-12-29 20:44:54 DEBUG: [b'A\x1c', b'\xbfG'] 2020-12-29 20:44:54 DEBUG: Current transaction state - TRANSACTION_COMPLETE

Maikel-K commented 3 years ago

i increased the buffer size to 1024 in the socket and uart settings:

2020-12-29 20:57:50 DEBUG: Running transaction 6 2020-12-29 20:57:50 DEBUG: SEND: 0x0 0x6 0x0 0x0 0x0 0x6 0x1 0x4 0x0 0x50 0x0 0x1c 2020-12-29 20:57:50 DEBUG: New Transaction state 'SENDING' 2020-12-29 20:57:50 DEBUG: Changing transaction state from 'SENDING' to 'WAITING FOR REPLY' 2020-12-29 20:57:50 DEBUG: Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY' 2020-12-29 20:57:50 DEBUG: RECV: 0x0 0x6 0x0 0x0 0x0 0x3b 0x1 0x4 0x38 0x44 0x51 0x49 0x9e 0x45 0x83 0x99 0x2c 0x44 0xd4 0x10 0x47 0x45 0x73 0x93 0xc2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x44 0xd4 0x40 0x50 0x45 0x73 0xd8 0x2b 0x40 0x7f 0xc6 0x6 0x41 0x1c 0xbf 0x47 2020-12-29 20:57:50 DEBUG: Processing: 0x0 0x6 0x0 0x0 0x0 0x3b 0x1 0x4 0x38 0x44 0x51 0x49 0x9e 0x45 0x83 0x99 0x2c 0x44 0xd4 0x10 0x47 0x45 0x73 0x93 0xc2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x44 0xd4 0x40 0x50 0x45 0x73 0xd8 0x2b 0x40 0x7f 0xc6 0x6 0x41 0x1c 0xbf 0x47 2020-12-29 20:57:50 DEBUG: Factory Response[ReadInputRegistersResponse: 4] 2020-12-29 20:57:50 DEBUG: Adding transaction 6 2020-12-29 20:57:50 DEBUG: Getting transaction 6 2020-12-29 20:57:50 DEBUG: Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE' 2020-12-29 20:57:50 DEBUG: [17489, 18846, 17795, 39212, 17620, 4167, 17779, 37826, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17620, 16464, 17779, 55339, 16511, 50694, 16668, 48967] 2020-12-29 20:57:50 DEBUG: [b'DQ', b'I\x9e'] 2020-12-29 20:57:50 DEBUG: [b'E\x83', b'\x99,'] 2020-12-29 20:57:50 DEBUG: [b'D\xd4', b'\x10G'] 2020-12-29 20:57:50 DEBUG: [b'Es', b'\x93\xc2'] 2020-12-29 20:57:50 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 20:57:50 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 20:57:50 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 20:57:50 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 20:57:50 DEBUG: [b'D\xd4', b'@P'] 2020-12-29 20:57:50 DEBUG: [b'Es', b'\xd8+'] 2020-12-29 20:57:50 DEBUG: [b'@\x7f', b'\xc6\x06'] 2020-12-29 20:57:50 DEBUG: [b'A\x1c', b'\xbfG'] 2020-12-29 20:57:50 DEBUG: Current transaction state - TRANSACTION_COMPLETE

Maikel-K commented 3 years ago

i got it running now!!!

in the import section of the TCP script already you had: from pymodbus.transaction import ModbusRtuFramer

I added in the StartTCPServer part: framer=ModbusRtuFramer, see below

    StartTcpServer(
        server_ctx,
        identity=identity,
        framer=ModbusRtuFramer,
        address=(
            confparser["server"].get("address", fallback=default_config["server"]["address"]),
            confparser["server"].getint("port", fallback=default_config["server"]["port"])
        )

2020-12-29 21:22:55 DEBUG: Running transaction 180 2020-12-29 21:22:55 DEBUG: SEND: 0x0 0xb4 0x0 0x0 0x0 0x6 0x1 0x4 0x1 0x4e 0x0 0xc 2020-12-29 21:22:55 DEBUG: New Transaction state 'SENDING' 2020-12-29 21:22:55 DEBUG: Changing transaction state from 'SENDING' to 'WAITING FOR REPLY' 2020-12-29 21:22:55 DEBUG: Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY' 2020-12-29 21:22:55 DEBUG: RECV: 0x0 0xb4 0x0 0x0 0x0 0x1b 0x1 0x4 0x18 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x44 0x45 0xe9 0xeb 0x43 0x88 0xa6 0xa7 2020-12-29 21:22:55 DEBUG: Processing: 0x0 0xb4 0x0 0x0 0x0 0x1b 0x1 0x4 0x18 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x44 0x45 0xe9 0xeb 0x43 0x88 0xa6 0xa7 2020-12-29 21:22:55 DEBUG: Factory Response[ReadInputRegistersResponse: 4] 2020-12-29 21:22:55 DEBUG: Adding transaction 180 2020-12-29 21:22:55 DEBUG: Getting transaction 180 2020-12-29 21:22:55 DEBUG: Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE' 2020-12-29 21:22:55 DEBUG: [0, 0, 0, 0, 0, 0, 0, 0, 17477, 59883, 17288, 42663] 2020-12-29 21:22:55 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 21:22:55 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 21:22:55 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 21:22:55 DEBUG: [b'\x00\x00', b'\x00\x00'] 2020-12-29 21:22:55 DEBUG: [b'DE', b'\xe9\xeb'] 2020-12-29 21:22:55 DEBUG: [b'C\x88', b'\xa6\xa7'] 2020-12-29 21:22:55 DEBUG: values: {'p1_voltage': 230.71917724609375, 'p2_voltage': 233.32305908203125, 'p3_voltage': 234.05166625976562, 'p1_current': 0.8751770257949829, 'p2_current': 1.647802472114563, 'p3_current': 1.0481089353561401, 'p1_power_active': 192.59971618652344, 'p2_power_active': 360.3411560058594, 'p3_power_active': 210.72030639648438, 'p1_power_apparent': 201.9201202392578, 'p2_power_apparent': 384.4703063964844, 'p3_power_apparent': 245.3116455078125, 'p1_power_reactive': 60.638999938964844, 'p2_power_reactive': -134.05853271484375, 'p3_power_reactive': 125.59760284423828, 'p1_power_factor': 0.9538410902023315, 'p2_power_factor': 0.9372404217720032, 'p3_power_factor': 0.8589901924133301, 'p1_phase_angle': 17.56395721435547, 'p2_phase_angle': -20.375337600708008, 'p3_phase_angle': 30.83072280883789, 'voltage_ln': 232.68853759765625, 'current_ln': 1.1902320384979248, 'total_line_current': 3.5706961154937744, 'total_power_active': 763.416748046875, 'total_power_apparent': 765.2447509765625, 'total_power_reactive': 52.86372375488281, 'total_power_factor': 0.9976110458374023, 'total_phase_angle': 3.961453676223755, 'frequency': 49.95524978637695, 'import_energy_active': 720.8849487304688, 'export_energy_active': 70.7699966430664, 'import_energy_reactive': 98.72599792480469, 'export_energy_reactive': 174.57598876953125, 'total_energy_apparent': 837.5031127929688, 'total_current': 4212.615234375, 'total_import_demand_power_active': 1396.60791015625, 'maximum_import_demand_power_apparent': 3897.23486328125, 'import_demand_power_active': 0.0, 'maximum_import_demand_power_active': 0.0, 'export_demand_power_active': 0.0, 'maximum_export_demand_power_active': 0.0, 'total_demand_power_apparent': 1399.0272216796875, 'maximum_demand_power_apparent': 3901.510498046875, 'neutral_demand_current': 2.963193655014038, 'maximum_neutral_demand_current': 9.796698570251465, 'p12_voltage': 401.87774658203125, 'p23_voltage': 404.76812744140625, 'p31_voltage': 402.4165344238281, 'voltage_ll': 403.0208435058594, 'neutral_current': 0.7040486931800842, 'p1n_voltage_thd': 2.8283157348632812, 'p2n_voltage_thd': 3.215496301651001, 'p3n_voltage_thd': 3.058105230331421, 'p1_current_thd': 45.962562561035156, 'p2_current_thd': 25.842485427856445, 'p3_current_thd': 24.97124671936035, 'voltage_ln_thd': 3.0339725017547607, 'current_thd': 32.258766174316406, 'p1_demand_current': 3.7208807468414307, 'p2_demand_current': 1.6791492700576782, 'p3_demand_current': 0.9461794495582581, 'maximum_p1_demand_current': 7.094491958618164, 'maximum_p2_demand_current': 6.433717250823975, 'maximum_p3_demand_current': 10.638463020324707, 'p12_voltage_thd': 0.0, 'p23_voltage_thd': 0.0, 'p31_voltage_thd': 0.0, 'voltage_ll_thd': 0.0, 'total_energy_active': 791.6549682617188, 'total_energy_reactive': 273.3019714355469} 2020-12-29 21:22:55 DEBUG: [59883, 17477, 14499, 17460, 59883, 17477, 14499, 17460, 55980, 17470, 39303, 17216, 11179, 17332, 47206, 17234, 45124, 17256, 47132, 17254, 21172, 17257, 3386, 17258, 33451, 17353, 61530, 17352, 25170, 17354, 13649, 17353, 53805, 16967] 2020-12-29 21:22:55 DEBUG: setValues[3] 1001:34 2020-12-29 21:22:55 DEBUG: [59883, 17477, 0, 0, 0, 0, 14499, 17460, 0, 0, 0, 0, 35389, 17037, 35389, 17037, 35389, 17037, 0, 0, 0, 0, 42663, 17288, 42663, 17288, 0, 0, 0, 0, 24627, 17489, 24627, 17489, 0, 0, 0, 0, 25456, 16255, 12014, 16244, 61181, 16239, 59080, 16219, 29812, 16979, 36438, 17010, 3836, 49926, 12793, 17147, 20394, 17471, 60301, 17225, 15411, 17344, 20424, 17269, 2970, 16224, 60209, 16338, 10351, 16262, 37748, 17582, 0, 0, 0, 0, 57567, 17582, 40608, 17494, 58466, 17347, 29811, 17245] 2020-12-29 21:22:55 DEBUG: setValues[3] 1101:82 2020-12-29 21:22:55 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:55 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:55 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:55 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:55 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:55 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:55 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:55 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:55 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:55 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:55 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:55 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:55 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:55 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:55 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:55 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:55 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:55 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:55 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:55 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:55 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:55 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:55 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:55 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:55 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:55 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:55 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:55 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:55 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:55 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:55 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:55 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:55 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:55 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:55 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:56 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:56 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:56 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:56 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:56 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:56 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:56 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:56 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:56 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:56 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:56 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:56 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:56 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:56 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:56 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:56 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:56 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:56 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:56 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:56 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:56 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:56 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:56 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:56 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:56 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:56 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:56 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:56 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:56 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:56 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:56 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:57 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:57 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:57 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:57 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:57 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:57 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:57 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:57 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:57 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:57 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:57 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:57 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:57 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:57 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:57 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:57 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:57 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:57 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:57 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:57 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:57 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:57 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:57 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:57 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:57 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:57 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:57 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:57 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:57 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:57 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:57 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:58 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:58 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:58 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:58 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:58 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:58 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:58 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:58 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:58 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:58 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:58 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:58 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:58 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:58 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:58 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:58 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:58 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:58 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:58 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:58 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:58 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:58 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:58 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:58 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:58 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:58 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:58 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:58 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:58 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:58 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:58 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:59 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:59 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:59 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:59 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:59 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:59 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:59 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:59 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:59 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:59 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:59 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:59 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:59 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:59 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:59 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:59 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:59 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:59 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:59 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:59 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:59 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:59 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:59 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:59 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:59 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:22:59 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:22:59 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:22:59 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:22:59 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:22:59 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:22:59 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:23:00 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:23:00 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:23:00 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:23:00 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:23:00 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:23:00 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:23:00 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:23:00 DEBUG: device: SDM630(192.168.1.108:8899, connectionType.TCP: timeout=1, retries=3, unit=0x1) 2020-12-29 21:23:00 DEBUG: Current transaction state - TRANSACTION_COMPLETE 2020-12-29 21:23:00 DEBUG: Running transaction 181 2020-12-29 21:23:00 DEBUG: SEND: 0x0 0xb5 0x0 0x0 0x0 0x6 0x1 0x4 0x0 0x0 0x0 0x50 2020-12-29 21:23:00 DEBUG: New Transaction state 'SENDING' 2020-12-29 21:23:00 DEBUG: Changing transaction state from 'SENDING' to 'WAITING FOR REPLY' 2020-12-29 21:23:00 DEBUG: Handling data: 0x2 0x3 0x3 0xf2 0x0 0x6 0x64 0x4c 2020-12-29 21:23:00 DEBUG: Getting Frame - 0x3 0x3 0xf2 0x0 0x6 2020-12-29 21:23:00 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:23:00 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:23:00 DEBUG: validate: fc-[3] address-1011: count-6 2020-12-29 21:23:00 DEBUG: getValues fc-[3] address-1011: count-6 2020-12-29 21:23:00 DEBUG: send: [ReadRegisterResponse (6)]- b'02030c998743402bab43b4b8664352ecb8' 2020-12-29 21:23:00 DEBUG: Handling data: 0x2 0x3 0x6 0xa4 0x0 0x17 0x44 0x9c 2020-12-29 21:23:00 DEBUG: Getting Frame - 0x3 0x6 0xa4 0x0 0x17 2020-12-29 21:23:00 DEBUG: Factory Request[ReadHoldingRegistersRequest: 3] 2020-12-29 21:23:00 DEBUG: Frame advanced, resetting header!! 2020-12-29 21:23:00 DEBUG: validate: fc-[3] address-1701: count-23 2020-12-29 21:23:00 DEBUG: getValues fc-[3] address-1701: count-23 2020-12-29 21:23:00 DEBUG: send: [ReadRegisterResponse (23)]- b'02032e1206000f0000000000000000000000190000000000000000000000000000000000000000000000000000000000004ae0' 2020-12-29 21:23:00 DEBUG: Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY' 2020-12-29 21:23:00 DEBUG: RECV: 0x0 0xb5 0x0 0x0 0x0 0xa3 0x1 0x4 0xa0 0x43 0x66 0xa0 0xc4 0x43 0x69 0x39 0xe 0x43 0x69 0xc6 0xb0 0x3f 0x5e 0xde 0xf5 0x3f 0xd3 0x94 0x42 0x3f 0x7c 0x5e 0x9a 0x43 0x3f 0x86 0x0 0x43 0xb5 0xf 0xfe 0x43 0x40 0x85 0x40 0x43 0x48 0xc8 0x47 0x43 0xc0 0xc1 0x18 0x43 0x66 0x75 0xfa 0x42 0x71 0x13 0x33 0xc3 0x4 0x38 0x93 0x42 0xfd 0x5c 0xa3 0x3f 0x74 0x31 0xdd 0x3f 0x70 0x78 0xcf 0x3f 0x55 0xda 0xee 0x41 0x8b 0xc0 0xaa 0xc1 0xa0 0x7a 0xac 0x42 0x4 0xe7 0xb4 0x43 0x68 0x91 0x2d 0x0 0x0 0x0 0x0 0x3f 0x95 0xae 0xc0 0x40 0x60 0x86 0x20 0x0 0x0 0x0 0x0 0x44 0x3a 0x86 0x5a 0x0 0x0 0x0 0x0 0x44 0x3b 0x4 0x67 0x0 0x0 0x0 0x0 0x42 0x58 0xfe 0xb4 0x3f 0x7f 0x53 0x72 0x0 0x0 0x0 0x0 0x40 0x85 0x16 0x7c 0x0 0x0 0x0 0x0 0x42 0x47 0xc0 0x3f 0x44 0x34 0x38 0xb4 0x42 0x8d 0x8a 0x3d 0x42 0xc5 0x74 0x39 0x43 0x2e 0x93 0x74 2020-12-29 21:23:00 DEBUG: Processing: 0x0 0xb5 0x0 0x0 0x0 0xa3 0x1 0x4 0xa0 0x43 0x66 0xa0 0xc4 0x43 0x69 0x39 0xe 0x43 0x69 0xc6 0xb0 0x3f 0x5e 0xde 0xf5 0x3f 0xd3 0x94 0x42 0x3f 0x7c 0x5e 0x9a 0x43 0x3f 0x86 0x0 0x43 0xb5 0xf 0xfe 0x43 0x40 0x85 0x40 0x43 0x48 0xc8 0x47 0x43 0xc0 0xc1 0x18 0x43 0x66 0x75 0xfa 0x42 0x71 0x13 0x33 0xc3 0x4 0x38 0x93 0x42 0xfd 0x5c 0xa3 0x3f 0x74 0x31 0xdd 0x3f 0x70 0x78 0xcf 0x3f 0x55 0xda 0xee 0x41 0x8b 0xc0 0xaa 0xc1 0xa0 0x7a 0xac 0x42 0x4 0xe7 0xb4 0x43 0x68 0x91 0x2d 0x0 0x0 0x0 0x0 0x3f 0x95 0xae 0xc0 0x40 0x60 0x86 0x20 0x0 0x0 0x0 0x0 0x44 0x3a 0x86 0x5a 0x0 0x0 0x0 0x0 0x44 0x3b 0x4 0x67 0x0 0x0 0x0 0x0 0x42 0x58 0xfe 0xb4 0x3f 0x7f 0x53 0x72 0x0 0x0 0x0 0x0 0x40 0x85 0x16 0x7c 0x0 0x0 0x0 0x0 0x42 0x47 0xc0 0x3f 0x44 0x34 0x38 0xb4 0x42 0x8d 0x8a 0x3d 0x42 0xc5 0x74 0x39 0x43 0x2e 0x93 0x74 2020-12-29 21:23:00 DEBUG: Factory Response[ReadInputRegistersResponse: 4] 2020-12-29 21:23:00 DEBUG: Adding transaction 181 2020-12-29 21:23:00 DEBUG: Getting transaction 181 2020-12-29 21:23:00 DEBUG: Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE' 2020-12-29 21:23:00 DEBUG: [17254, 41156, 17257, 14606, 17257, 50864, 16222, 57077, 16339, 37954, 16252, 24218, 17215, 34304, 17333, 4094, 17216, 34112, 17224, 51271, 17344, 49432, 17254, 30202, 17009, 4915, 49924, 14483, 17149, 23715, 16244, 12765, 16240, 30927, 16213, 56046, 16779, 49322, 49568, 31404, 16900, 59316, 17256, 37165, 0, 0, 16277, 44736, 16480, 34336, 0, 0, 17466, 34394, 0, 0, 17467, 1127, 0, 0, 16984, 65204, 16255, 21362, 0, 0, 16517, 5756, 0, 0, 16967, 49215, 17460, 14516, 17037, 35389, 17093, 29753, 17198, 37748] 2020-12-29 21:23:00 DEBUG: [b'Cf', b'\xa0\xc4'] 2020-12-29 21:23:00 DEBUG: [b'Ci', b'9\x0e'] 2020-12-29 21:23:00 DEBUG: [b'Ci', b'\xc6\xb0'] 2020-12-29 21:23:00 DEBUG: [b'?^', b'\xde\xf5'] 2020-12-29 21:23:00 DEBUG: [b'?\xd3', b'\x94B'] 2020-12-29 21:23:00 DEBUG: [b'?|', b'^\x9a'] 2020-12-29 21:23:00 DEBUG: [b'C?', b'\x86\x00'] 2020-12-29 21:23:00 DEBUG: [b'C\xb5', b'\x0f\xfe'] 2020-12-29 21:23:00 DEBUG: [b'C@', b'\x85@'] 2020-12-29 21:23:00 DEBUG: [b'CH', b'\xc8G'] 2020-12-29 21:23:00 DEBUG: [b'C\xc0', b'\xc1\x18'] 2020-12-29 21:23:00 DEBUG: [b'Cf', b'u\xfa'] 2020-12-29 21:23:00 DEBUG: [b'Bq', b'\x133'] 2020-12-29 21:23:00 DEBUG: [b'\xc3\x04', b'8\x93'] 2020-12-29 21:23:00 DEBUG: [b'B\xfd', b'\\xa3'] 2020-12-29 21:23:00 DEBUG: [b'?t', b'1\xdd'] 2020-12-29 21:23:00 DEBUG: [b'?p', b'x\xcf'] 2020-12-29 21:23:00 DEBUG: [b'?U', b'\xda\xee'] 2020-12-29 21:23:00 DEBUG: [b'A\x8b', b'\xc0\xaa'] 2020-12-29 21:23:00 DEBUG: [b'\xc1\xa0', b'z\xac'] 2020-12-29 21:23:00 DEBUG: [b'B\x04', b'\xe7\xb4'] 2020-12-29 21:23:00 DEBUG: [b'Ch', b'\x91-'] 2020-12-29 21:23:00 DEBUG: [b'?\x95', b'\xae\xc0'] 2020-12-29 21:23:00 DEBUG: [b'@`', b'\x86 '] 2020-12-29 21:23:00 DEBUG: [b'D:', b'\x86Z'] 2020-12-29 21:23:00 DEBUG: [b'D;', b'\x04g'] 2020-12-29 21:23:00 DEBUG: [b'BX', b'\xfe\xb4'] 2020-12-29 21:23:00 DEBUG: [b'?\x7f', b'Sr'] 2020-12-29 21:23:00 DEBUG: [b'@\x85', b'\x16|'] 2020-12-29 21:23:00 DEBUG: [b'BG', b'\xc0?'] 2020-12-29 21:23:00 DEBUG: [b'D4', b'8\xb4'] 2020-12-29 21:23:00 DEBUG: [b'B\x8d', b'\x8a='] 2020-12-29 21:23:00 DEBUG: [b'B\xc5', b't9'] 2020-12-29 21:23:00 DEBUG: [b'C.', b'\x93t'] 2020-12-29 21:23:00 DEBUG: Current transaction state - TRANSACTION_COMPLETE

nmakel commented 3 years ago

i got it running now!!!

in the import section of the TCP script already you had: from pymodbus.transaction import ModbusRtuFramer

I added in the StartTCPServer part: framer=ModbusRtuFramer, see below

Great news! I will add the functionality as an option in the configuration file.

Maikel-K commented 3 years ago

Yeah! Thanks for the help, sorry that you had to buy another not so cheap unit to confirm your scripting!

Btw: in semp-tcp.conf instead of Port you have still baud in the server part.

Here are the final settings I have configured in the Elfin EE-11. You could put that info in the readme to!

image image

nmakel commented 3 years ago

Thanks, I've made the changes.

I see you've set protocol to None. Does setting it to Modbus cause the frame errors to return?

Maikel-K commented 3 years ago

Hi, just checked. I changed the setting to modbus and the data to the Solaredge stopped.

nmakel commented 3 years ago

Ok, weird. Closing this issue now that your situation is working.

fkemps commented 8 months ago

Hello gents, (hallo nmakel),

Based on this posting I was able to connect my SE-5000H via EW11A to my home automation (OpenHab) running sem-tcp.py. It took me a long while and setting Protocol to 'None' instead of ModBus was the trick (weird IMNHO).

Need to figure out if my data from MQTT (taken from dsmr binding and converted) is correct. Thus far while it's dark outside and no solar energy is generated.

2023-12-27 19:50:00 DEBUG: MQTT message received:
{
"import_energy_active": 617.000,
"export_energy_active": 0,
"energy_active": 617.000,
"l1_power_active": 361.000,
"l2_power_active": 233.000,
"l3_power_active": 24.000,
"power_active": 618.000,
"l1n_voltage": 230,
"l2n_voltage": 231.7,
"l3n_voltage": 231.1,
"voltage_ln": 231.1,
"l1_current": 1,
"l2_current": 1,
"l3_current": 0,
"frequency": 50
}
2023-12-27 19:50:06 DEBUG: [0, 17433, 0, 17433, 0, 17433, 0, 17433, 16384, 17433, 32768, 17331, 0, 17254, 0, 16832, 6554, 17255, 45875, 17253, 0, 17255, 6554, 17255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16968]
2023-12-27 19:50:06 DEBUG: setValues[3] 1001:34
2023-12-27 19:50:06 DEBUG: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16256, 0, 16256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2023-12-27 19:50:06 DEBUG: setValues[3] 1101:82

I saw the L1, L2, L3 in the SetApp and arrow/values in SolarEdge app shortly and disappearing/showing now. Maybe I need to publish faster then every 30 seconds into MQTT.

Thanks both for spending the time!! Ferry

Maikel-K commented 8 months ago

Can you share your MQTT info? How did you get this working?

fkemps commented 8 months ago

Hi Maikel-K, Retrieving the smartmeter values from P1 port via USB-FT232 on OpenHab with DSMR binding. Converting and calculating values before publishing on MQTT in JSON format.

{
"import_energy_active": 0.453, 
"export_energy_active": 0,
"energy_active": 0.453,
"l1_power_active": 208.000, 
"l2_power_active": 229.000, 
"l3_power_active": 16.000, 
"power_active": 0.45300000, 
"l1n_voltage": 233.2, 
"l2n_voltage": 233.9, 
"l3n_voltage": 234.7,
"voltage_ln": 234.7,
"l1_current": 1, 
"l2_current": 1, 
"l3_current": 0,
"frequency": 50
}

Not sure yet if those values are correct because my consumption (Verbruik) of 3.34 MHh was very high. Had power_active in order of 453 and divided now by 1000. Still testing to find out what the actual input values should be (W or kWh).