toggio / PhpSerialModbus

A very easy-to-use implementation of the Modbus RTU serial protocol in PHP
GNU General Public License v2.0
61 stars 28 forks source link

load output #1

Open lzahradil opened 7 years ago

lzahradil commented 7 years ago

Hello, How can I use this script to enable or disable the output load?

The description according to the protocol specification to me it does not work :( https://github.com/kasbert/epsolar-tracer/blob/master/archive/ControllerProtocolV2.3.pdf

50percentDave commented 7 years ago

I've had some success with my 30A tracer A using the following commands

//manually turn on sendRawQuery("\x01\x05\x00\x02\xff\x00\x2d\xfa", false);

//manually turn off sendRawQuery("\x01\x05\x00\x02\x00\x00\x6c\x0a", false);

I got these by using wireshark for packet capture

This works well, mostly, but my setup (a RPi dashboard) stops working at night if I use these commands (the load toggle still works, but my pi stops being able to pull the device current status, turning the tracer on and off again and reconnecting fixes this - but this doesn't happen during the day when it works flawlessly. Still working on this issue.

theveng commented 6 years ago

Hi, Did you manage to solve the night issue ? Thank you

50percentDave commented 6 years ago

No, never did, sorry. It could be that these codes need changing. Someone posted that it all works fine when the PV voltage is 14V or higher, but below that it stops - so it may be a power issue as that person also couldn't get data back at night with the output turned off, but turning it on manually with the front button, allowed him to get eg battery voltages - so no I never did.

I actually very rarely need this functionality, but a workaround is to use something like a sonoffsv with the load permanently on, and the sonoff could be toggled using eg mqtt commands.