question

elvis avatar image
elvis asked

My attempt at playing with Python Modbus & MQTT

I am new to python, modbus & mqtt.

Having all this cool Victron equipment I thought I would give it a try.

AFAIK it works only on a *nix system console.

https://github.com/optio50/Victron_Modbus_TCP

modbus-2022-02-19-14-19-07.png


pyqt5-example.png


victronsolar-singlemppt.png

Multiplus-IIESSModbus TCPMQTTlinux
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

4 Answers
Jan Novak avatar image
Jan Novak answered ·

Hi elvis,

looks like a very cool solution.

But i get no output after modifying the example with IP and ID datas.

I had debugged your code and can print values stored in the variables (eg. "BatteryWatts").
But no screen output from your code.

Bfo

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Jan Novak avatar image
Jan Novak answered ·

OK, find the problem. I have no SolarChargerID, because the PV is from another system, going through et340 to multiplus-II GX device (a Kostal Piko 20 and a second Piko 7).

With comented out this Solar* section (and ouputs) - it runs.

Can you update your script to also poll devices like em24 device?


Bfo

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

elvis avatar image
elvis answered ·

@Jan Novak

Sorry, I am not familiar with those devices.

The script only communicates with VEbus modbus devices.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

vanupied avatar image
vanupied answered ·

capture.pngHello, just tested it today and it work like a charm !
I found your project while trying to find a way to use teleinformation provided from Linky (french Linky electric meter ) as an energy meter (In place of ET112 Victron Module for example). I'd like to send it to VenusGX in order to adjust injected power in grid.
I'm totally new to programming, modbus, and would really appreciate any help :)


capture.png (46.4 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.