diebietse / invertergui

A simple Go based monitoring tool for Victron Multiplus devices
BSD 3-Clause "New" or "Revised" License
42 stars 10 forks source link

IP (NS) protection log access #38

Open DurvalMenezes opened 1 year ago

DurvalMenezes commented 1 year ago

Is there a way (or is it possible to add one) for invertergui to read events from a Victron inverter "NS protection log" (please see attached screen).

victron_inverter_NS_Protection_Log

This is available on VEConfig3 under the "Grid" tab by pressing the "Show IP (NS) protection log", and is very very useful to diagnose why the heck the inverter turned its mains input off (usually because it went out of acceptable voltage and/or frequency range). I use it all the time while I'm tuning my new generator and the inverter config to work smoothly with each other, and it's a PITA to take the cable out of my RPi4 (where I run invertergui) and plug it into my PC where I have VEConfig3 installed.

It would be great if invertergui could monitor this log either periodically (like once a minute) or on demand, and dump any new events either to stdout or (even better) log it to syslog and/or MQTT.

Please let me know if I can be of any help, for example capturing traffic on the MK3 USB port when the button is pressed in VEConfig3.

ncthompson commented 1 year ago

I had a quick look at the docs. It looks like there is a section on alarms raised, but I am not sure if this is generated the same way. It could help if you can capture the traffic. I am mostly interested in the serial comms over USB.

DurvalMenezes commented 1 year ago

Thanks for the prompt response. I run VEConfig3 inside a VirtualBox VM, which can be set to capture all USB traffic to a pcap-formatted file which can then be decoded with Wireshark. I'm pretty confident that Wireshark will allow me to extract the embedded serial comms data.

I will give it a try the next time I have the MK3 interface plugged to my PC, and then post the results here.

DurvalMenezes commented 1 year ago

I will give it a try the next time I have the MK3 interface plugged to my PC, and then post the results here.

Just did it, and I have good news and bad news:

lsusb | grep 0403:6015
    Bus 001 Device 025: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)

Please let me know if I can be of any more help, or if there's a better way to capture and/or decode the traffic.

xQwexx commented 1 year ago

I am not sure it is helpful but I found this project which has some low voltage status output I think based on the led status

DurvalMenezes commented 1 year ago

I am not sure it is helpful but I found this project which has some low voltage status output I think based on the led status

Just had a look and unfortunately this code doesn't have any functionality for accessing the IP (NS) protection log -- and the only voltage condition it mentions is related to the battery, not to AC mains :-/ But anyway, thanks for trying to help.

EDIT: I just sent a similar request to the author of that code, let's see what he/she responds.