-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ethernet Data Logger (DLS-L) Support #5
Comments
Hi @LDossche, That error likely indicates that two frames are being concatenated. I have seen this issue myself on my own device. You may have some success by enabling
Regards, |
Hi Jon Thx for the response. I added the error correction, but this gives me an error
What is strange: a random serial number for the logger gives me the same output. Nevertheless I checked the number several times with the one on the soliscloud site and on the stick itself. the stick is a wired one: the umodbus library is 1.0.4 Kind regards |
I've just discovered this :) I got an error with struct.error: unpack requires a buffer of 2 bytes
|
I'm going to tack on to this issue, because I have the same error as the OP: The serial number of my logger starts with 19xxxxxxxx The scan.py correctly discovers my logger when ran from the same subnet:
The firmware reported by the html status page is: ME_0C_0501_5.08 When I run the basic client I get the following error:
Essentially the first 5 bytes are an echo of the input. The When I intercept the data that gets sent to the solarman platform, the data does seem to follow the format from other solarmanv5 loggers. My intuition tells me some of the 'signing' or 'preamble' of the messages the 8899 server expects are slightly different. Because it does respond to the discovery messages, I'm guessing the changes will be rather small. |
Hi @wdullaer, I have documented the protocol as best as I understand it here. The response frame frame should start with I am really not sure what is going on with the response you have received because it makes no sense. Even if the frame length matched the reported payload length, the control code field is also wrong. I suspect the issue is with the data logger version. My data logger is running firmware As for the scan utility, this is a feature of the HF-A11 SOC used by Solarman data loggers. I first came across it here. Regards, |
Thanks for the links. |
@wdullaer Are you using a DLS-W (WiFi) or DLS-L (ethernet)? |
I have a DLS-L (ethernet). |
@wdullaer Might be worthwhile chasing Solis for an updated firmware so. StephanJoubert/home_assistant_solarman#87 seems to indicate that it is possible to use the DLS-L with the Solarman V5 protocol. ME-121001-V1.0.6(202109061500) appears to be available on the Solis support portal, but no sign of the version that is mention in the linked issue. |
I got a new LAN stick (DLS-L) Working mode Data collection A small check brewed from jmccrohan's code:
gives me bottom line the same error:
So I must agree with @wdullaer than the frame we send is invalid. |
That's the same firmware version my stick is currently running. |
Is there any chance that the DLS-L doesn't actually require Solarman V5 encapsulation at all? Have you tried querying the device on port 8899 using Modbus TCP? @drsmarsden Seemed to get pysolarmanv5 working on his DLS-L. See issue #7 |
Hi I monitored the traffic using Wireshark and found that the DLS-L would send the server unsolicited messages (some short) on a regular basis. I think one is a keep alive and one a status message I think what you are seeing is one of those which will not decode. I just ignored short messages , you then get the reply to the request which does decode. The problem I then had was deciphering the data, some values where correct other garbage. Ginlong will not release the packet definitions, so I gave up. I switched to using https://github.com/hultenvp/solis-sensor which talks to soliscloud.com I have fixed a couple of issues with that code (in my copy) , but they have not been integrated back yet. The HA guys are now working on a version of Solis support for /core. I have just looked, I did not keep the DLS-L frig that I did Stuart |
Do you have any more info on this? |
This did it, thx!
So I can get the timestamp from the inverter. This does not match an address table I have, but now I can go further... |
Found an address list: https://www.scss.tcd.ie/Brian.Coghlan/Elios4you/RS485_MODBUS-Hybrid-BACoghlan-201811228-1854.pdf |
I just wanted to confirm that my logger also works with modbus-tcp. No wrapping of the frames necessary. I'd like to thank everyone here for there suggestions, it was all invaluable in figuring this out. As for the register index: the values from this file are working for my Solis hybrid inverter: https://github.com/StephanJoubert/home_assistant_solarman/blob/main/custom_components/solarman/inverter_definitions/solis_hybrid.yaml |
@LDossche @wdullaer Thanks for this. I'll update the documentation referencing this issue. |
Thanks for all the hard work done here I was wondering if there is a way to set/send the settings to the inverter? Funny how HA works well with the Ethernet connector and has trouble with the WiFi version. I have HA to read all settings from my Solis hybrid inverter & I can also SET thing like battery start & end charge times but I would like to do all this from python. Manage to get python to read from the inverter thanks to the above code, not tested too much as really need to set the values. CFG_IP = '192.168.2.240' #43143 to 43146 start hour & mins & end hour & mins address + lengthMSG_ADDR = 43143 Enable values to be signed (default is False).conf.SIGNED_VALUES = True Return a message or Application Data Unit (ADU) specific for doing Modbus TCP/IP.message = tcp.read_holding_registers(slave_id=1, starting_address=MSG_ADDR, quantity=MSG_LEN) response = tcp.send_message(message, sock) [3, 1, 5, 58, 0, 0, 0, 0, 0, 0]start 3:10 & end 5:58 - get some odd results if I shorten the msg-len but investigate latersock.close()` |
Hi
When trying the register_scan.py I get following error (verbose=1):
RECD: a5 17 00 10 45 03 00 XX XX
frame_len does not match payload_len.
I played a bit with the code line:
modbus = PySolarmanV5("192.168.xxx.xxx", 1XXXXXXXXX, port=8899, mb_slave_id=1, verbose=1)
Changing IP address and port number gives me other errors, so I presume these are OK.
Modifying serial number (added one) only changes the second last byte in the response
Modifying mb_slave_id doesn't change anything
Kind regards
LDos
The text was updated successfully, but these errors were encountered: