esm
Solar Newcomer
Posts: 7
|
Post by esm on Dec 12, 2019 0:40:05 GMT
Howdy All - I've been having some fun experimenting with a 10A wanderer and modbus.
I can successfully turn the load on and off via a write to register 0x010A (so I believe my modbus implementation is correct,) but the wanderer seems to ignore writes to the "load mode" 0xE01D register.
For example, I can write 0x08 to it (which i expect it to go into "load goes off after 8 hours" mode,) but if I then re-read the register the value is still 0x0F, and the menu on the device shows mode 15 (corresponding to "manual" mode.)
Is the load mode a different register on the wanderer vs the rover, or is this function simply not supported on the wanderer?
Thanks!
|
|
|
Post by retrodaredevil on Dec 12, 2019 12:43:40 GMT
The same thing happens with a Rover when I test it. It seems that even when you follow the protocol correctly, some things just don't work.
My guess to why is that Renogy put some proprietary logic into their protocol to allow for stuff like passwords. I believe that the protocol they have on the modbus document isn't fully complete.
I could be wrong. If you get writes like that to work, let me know. I want to do some. There are some other values that won't change when you write to them and some values that will change, but does nothing when written to.
|
|
raydas
Solar Devotee
Posts: 166
|
Post by raydas on Dec 12, 2019 17:14:22 GMT
I just downloaded the MODBUS document, and was looking at the commands, interesting.
What are you using to send the commands, a terminal program or some other setup. Would like to see an example or snippet of code lines, maybe to reset the unit to factory settings.
I just plugged the cable into my one faulty Rover and my Linux desktop. So, I guess, maybe some python code would be a good start, I think.
|
|
esm
Solar Newcomer
Posts: 7
|
Post by esm on Dec 13, 2019 1:19:45 GMT
I forked corbinbs' python solarshed project on github: github.com/2bitoperations/solarshed/tree/add_load_controlSee set_load_mode in renogy_rover.py: def set_load_mode(self, load_mode: LoadMode): print("setting load mode to: ", load_mode.value) self.write_register(registeraddress=0xE01D, value=load_mode.value, functioncode=0x06)
The wanderer accepts the write, but then remains in "manual" mode: if __name__ == "__main__": rover = RenogyRover('/dev/ttyUSB0', 1) rover.set_load_mode(load_mode=LoadMode.ALWAYS_ON) rover.set_load_mode(load_mode=LoadMode.ALWAYS_ON) rover.set_load_mode(load_mode=LoadMode.ALWAYS_ON) print('Load Mode: ', rover.load_mode())
setting load mode to: 17 setting load mode to: 17 setting load mode to: 17 Load Mode: LoadMode.MANUAL
|
|
esm
Solar Newcomer
Posts: 7
|
Post by esm on Dec 13, 2019 1:35:03 GMT
|
|
esm
Solar Newcomer
Posts: 7
|
Post by esm on Dec 13, 2019 2:04:18 GMT
python minimalmodbus library has a helpful debug mode:
MinimalModbus debug mode. Writing to instrument (expecting 8 bytes back): '\x01\x06à\x1d\x00\x08/Ê' (01 06 E0 1D 00 08 2F CA) MinimalModbus debug mode. No sleep required before write. Time since previous read: 1576202525616.6 ms, minimum silent period: 4.01 ms. MinimalModbus debug mode. Response from instrument: '\x01\x06à\x1d\x00\x08/Ê' (01 06 E0 1D 00 08 2F CA) (8 bytes), roundtrip time: 38.3 ms. Timeout setting: 500.0 ms.
I'm sending exactly the command listed in the renogy spec doc, and the wanderer is responding with exactly the expected response, but nothing actually changes???
|
|
esm
Solar Newcomer
Posts: 7
|
Post by esm on Dec 13, 2019 2:29:54 GMT
I just ordered the BT-1 bluetooth dongle thing.
I'll slap a serial sniffer between it and the wanderer and try to figure out what we're doing wrong.
|
|
|
Post by retrodaredevil on Dec 13, 2019 4:11:10 GMT
I just ordered the BT-1 bluetooth dongle thing. I'll slap a serial sniffer between it and the wanderer and try to figure out what we're doing wrong. That would be awesome. It would be really nice to be able to set some of the settings without a Bluetooth module. I'd be interested to hear what you find out.
|
|
raydas
Solar Devotee
Posts: 166
|
Post by raydas on Dec 13, 2019 12:54:34 GMT
Thanks esm for the example code. I just started to look into this MODBUS thing. I would like to have another tool, besides the Solar Station Monitor program, for getting access to the CC. I also like the idea of data logging, But I want to be able to choose what data I will need, and how it is saved.
I to would like to see your results from that serial sniffer experiment, that you will be setting up.
|
|
|
Post by playersz28 on Dec 13, 2019 15:32:29 GMT
I just ordered the BT-1 bluetooth dongle thing. I'll slap a serial sniffer between it and the wanderer and try to figure out what we're doing wrong. I tried sniffing the data between the BT1 and the Android app. I was thinking I'd use the BT interface for my own code but in the end I just stuck with the Pi via the RJ11. I don't use the load connection though for anything.
|
|
|
Post by retrodaredevil on Dec 13, 2019 15:48:06 GMT
The wanderer accepts the write, but then remains in "manual" mode Hmm, that's interesting. Like you said above I was able to turn on load using the LoadWorkingMode/LoadMode. It was one of the few things I was able to write that actually affected something. However, as mentioned in renogy.boards.net/thread/559/setting-voltage-values-working-program (you linked above), I had problems setting other values and got the same problem as you: The rover accepted the write, but then it didn't actually change when I tried to read it. And sometimes I'll get the opposite problem: I'll write to something and it goes through, and requesting the data shows the new value, but that new value won't do anything... I have no idea why it's like this. Hopefully sniffing the data from a BT module will help. Also, don't try to do a factory reset of the rover. When I did that it reset my serial number to 100 which is inconvenient for me because I was and am going to use the serial number to differentiate between data if I get more Rovers.
|
|
esm
Solar Newcomer
Posts: 7
|
Post by esm on Dec 18, 2019 1:35:24 GMT
Well, I received the BT1, and initial results are incredibly unsatisfying.
The bluetooth app has the same limitations as me sending modbus commands - I can turn the load on/off fine, but the wanderer still refuses to switch modes. It accepts the save on that screen, but values don't change.
Given this, I don't see much point in sniffing the protocol - it seems like the problem is a bug in the device itself.
Wonder how I go about reporting a hardware/firmware bug to Renogy?
|
|
|
Post by tattoo on Dec 18, 2019 2:20:42 GMT
Wonder how I go about reporting a hardware/firmware bug to Renogy? A phone call is a good starting point..............
|
|
jw
Solar Newcomer
Posts: 1
|
Post by jw on Dec 22, 2019 4:03:24 GMT
Hi guys, i've been playing with the 10A wanderer also. it seems this unit doesn't support many commands, i'm using an arduino to publish info to an mqtt server.
i'm only interested in reading info and the following is all i can get out of it. i can confirm the charge and load current doesn't work.
PDU addr - response
01 00 - 0 62 battery capacity 01 01 - 0 124 battery voltage
01 02 - 0 0 charge current (never changes from 0) ??
01 03 - 32 25 temps: controller - battery
01 04 - 0 124 load voltage
01 05 - 0 0 load current (never changes from 0) ??
01 07 - 0 128 PV voltage
01 0B - 0 130 doesn't appear to be min voltage 01 0C - 0 124 doesn't appear to be max voltage
01 15 - 0 21 days operating
01 20 - 128 4 status: (bit 7) load on/off : charging state
|
|
bbloom
Solar Newcomer
Posts: 1
|
Post by bbloom on Feb 10, 2020 20:57:46 GMT
Quick question - does anyone have the pin out and baud rate readily available for the wanderer 10a. Thanks...
|
|