question

Thomas Manthey avatar image
Thomas Manthey asked

How can I access VenusO's system trigger to read consistent data?

I want to include a virtual battery with Agregate Battery in my system.
https://github.com/arrow1800/Victron-VirtualBattery
As far as I have seen, this calculation also only accesses the D-Bus data pool asynchronously in a grid of 1s, in which all processes store their data.
Since data acquisition is not trivial in such a distributed system with various measurement points, signal delays due to bus systems, etc., I would like to be able to provide the ESS assistants running on the multis with as "clean" a value as possible by calculating the totals and mean values whenever a value has been updated by the SmartShuts. This is before the ESS Wizard uses the value.
Are there system triggers in VenusOs that indicate that a measurement has just been updated?

Venus OSSmartShunt
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.

matt1309 avatar image matt1309 commented ·

So what you're aiming to do is the same as what VirtualBattery does but reduce the overhead/time of data getting into the system/manipulated by node red and then sent via MQTT into Virtual Battery? Have i understood?

This is above my python/venus os knowledge/experience to give actual code example but I think you can monitor dbus directly for change either on a short loop or there may be built in event based method (I think onChange method does exist) to alert when dbus has been updated. Then as long as you have dummydevice driver setup for battery you could write data directly to the virtualbattery via dbus rather than MQTT.

This might help: velib_python/vedbus.py at master · victronenergy/velib_python · GitHub

You may get better/more detailed responses if you move this to modifications space on here

0 Likes 0 ·
kevgermany avatar image kevgermany ♦♦ matt1309 commented ·
@Thomas Manthey

@matt1309

Moved to modifications as per suggestion

0 Likes 0 ·
Show more comments
0 Answers