question

dariusdiy avatar image
dariusdiy asked

Node-RED Daily Power Import & Export for dumpload trigger

Hi,

I am trying to start a water boiler dumpLoad, via node red, when 3 conditions are met:

  1. SoC >99%
  2. L1 - Power <= -2000W
  3. Today's Energy to grid > Today's Energy from grid

1 and 2 are very simple using:

1686228878211.png1686228897947.png






With 3, aka getting the Today's Energy to grid and from, I'm having a very hard time to get without having to store yesterday's value and subtract it from today's value.

Is there any way to get this value (that the VRM shows in the "Historical data" section) without storing yesterday's kWh value?


As for the system I'm using: EasySolar-II 5000VA + ET340 + SmartShunt + PV Inverter on AC-In (connected to L2 of the ET340)

Any help is very appreciated.

Node-RED
5 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 ·

I had a look in modbus tcp registers to try spot something.

I thought it would exist, but the ones I can find are forever rather today so you'd need to store yesterdays in a global node red variable (which wouldn't be that hard). ie at 00.00 update the global variable.



1 Like 1 ·
janieronen avatar image janieronen matt1309 commented ·

There is possibility to query specific time slot data in API, but have not used it. There is one discussion about the accessing VRM API to begin with. I will make some testing at weekend if not resolved before that. https://flows.nodered.org/node/victron-dynamic-ess

0 Likes 0 ·
dariusdiy avatar image dariusdiy matt1309 commented ·

For the moment I store the value at 23:59 both in global and in a file in case of a system reboot. I have attached the flows.json. I know it is not pretty but it works, I would love to know how to get the value from VRM API but this is above my skill set flows.zip

0 Likes 0 ·
flows.zip (2.6 KiB)
matt1309 avatar image matt1309 dariusdiy commented ·

This one might be useful. Someone written out an api request for python however the detail is probably enough to use as a working example of getting the api data.


There's probably flows to help do this via gui but if not will be as simple as converting the python to js.

VRM API python example - Victron Community (victronenergy.com)

Sure you've already seen the official doc:

VRM API documentation (victronenergy.com)

Tbh i find the python easier as it's show exactly how it's done.


Ngl I personally prefer your solution as it's cloudless/not dependent on the external VRM data. Hence will work if VRM goes down, but i understand it's less clean.

1 Like 1 ·
janieronen avatar image janieronen commented ·
There is a way get figures from VRM-portal but I have different approach.


As anywise I need to make more complex energy-calculations for other systems as well I am running small home assistant instance to collect power from various sources and calculate energy. There is ready integration between HA and NR so HA can send message to NR when some energy calculations AND solar forecast conditions are met. That way you can keep NR simple PLC logic which is a lot more robust that higher level systems like HA. Other benefit is that you will have HA graphs/database available even your internet is down.

0 Likes 0 ·
0 Answers