question

ivan avatar image
ivan asked

Linux DBus remote control of Cerbo GX

Hi,

I'm trying to connect to Cerbo GX via the DBus (on Linux) so I could set the ESS -> Scheduled Charging. Idea is to make an automatic schedule maker, depending on the time's list I receive daily.

Is it possible? Maybe there is a guide or any examples with something that could be useful?


When I try to use velib_python example files from the tutorial(https://github.com/victronenergy/velib_python ) I'm stuck on the second step (creating a second dbus session in a new cmd window with "dbus" or "dbus -y" commands) - the reply is "command not found".


I've never worked with DBus before, so if this question is silly please don't blame.

Thank you!

Ivan

Venus OSlinux
2 |3000

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

1 Answer
Ole Saether avatar image
Ole Saether answered ·

The example you referred to is meant to be executed on your local machine.
I don't think you can control Venus remotely via the Dbus. I would recomment either using Modbus or MQTT. That is what I do. I have shared a couple of examples here:
https://github.com/osaether/code-snippets/tree/master/victronenergy/modbus
https://github.com/osaether/code-snippets/tree/master/victronenergy/mqtt


4 comments
2 |3000

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

ivan avatar image ivan commented ·

Thank you, osaether!

I'll try Modbus and MQTT.

Do I understand correctly - I can connect to my Venus via the internet if I'm not connected to the same network?

Have you figured out how to set up the schedule via MQTT (https://community.victronenergy.com/questions/44144/activateset-schduled-charging-via-modbus.html )?

Where can I find these links with ID's of my devices:

  • N/*/system/0/Relay/0/State
  • N/*/system/0/Control/ScheduledCharge,0
  • etc
0 Likes 0 ·
Ole Saether avatar image Ole Saether ivan commented ·

Yes, you can connect to your Venus over the Internet. For Modbus you need to add port-forwarding to port 502 (default Modbus port) in the router that connects your Venus to the Internet. For MQTT you don't need any port-forwarding.

For MQTT the ID's of your device is the VRM portal ID. You can find it under Settings->VRM online portal in the remote console and under Settings->General on the VRM portal.


The MQTT paths after the "N/*" are the same as the d-bus paths. Check the Venus D-bus documentation for more info.

0 Likes 0 ·
ivan avatar image ivan Ole Saether commented ·

I can only get a response from N/*/system/0/Serial

Other paths don't work. Where can be a problem?

0 Likes 0 ·
Ole Saether avatar image Ole Saether ivan commented ·

Yes, this is a common new user error. Please search for "MQTT serial" on this forum. Here is a start:
https://community.victronenergy.com/questions/6553/mqtt-only-see-system0serial.html

0 Likes 0 ·

Related Resources

Victron Venus OS Open Source intro page

Venus OS GitHub (please do not post to this)

Additional resources still need to be added for this topic