Skip to content

Instantly share code, notes, and snippets.

View hansvanlin's full-sized avatar

Hans van Lin hansvanlin

  • Thermo Fisher Scientific
  • Eindhoven
  • 00:29 (UTC -12:00)
View GitHub Profile
@hansvanlin
hansvanlin / README.md
Last active June 22, 2026 06:42
Marstek venus A --- Simple UI to control the schedule modes (modbus schedule registers) .

Node-red script with UI to control the Marstek venus A (Tested up to firmware 149)

Simple UI to control the schedule modes (modbus schedule registers) without diging deep into marstek app to toggle the options. The flow is easy to adapt to your needs. For now the script is using software ranges the target soc registers don't react yet on the values stored. Maybe in the future with different firmware it is different. If the limit is reached the mode is changed to manual. If in the morning enough solar is detected it switches back to self mode for charging and back to manual if not enough is generated and back to self if it does. Started to implement Price based mode, using enever (zonneplan) day ahead prices looking for the cheap and expensive hours. Default is 4 cheapest hours to charge and 1 hour for the expensive hours to discharge max power and save some capacity for self mode. The flow makes use of the "node-red-contrib-modbus" nodes. Adapt the marstek Ip number to your "your Ip number" with port ":502"

@hansvanlin
hansvanlin / README.md
Last active July 5, 2024 06:47
Energy Price Selection

For an other (project) I needed a node that could select the current energy price from an array.
I used the energy zero node (anwb) from dirkjanfaber as input to get the current price.

I created a subflow that has several outputs that you can expand to get more prices in the next hours.

Result of selection of the current hour: image

@hansvanlin
hansvanlin / README.md
Last active May 6, 2026 04:19
SMA-Tripower-5.0---Active-Power-Control

This flow "SMA Settings" can be used as a starting point to reduce the generated power of your inverter. It makes use of the inverters modbus. You should enable the TCP modbus first en also external control. For manual control the slider can be use to set the powerlevel in %, or active control depending on the energy used, for this you need to measure or calculated the current use and feed that as input. Marge can be used to create a little feedback to the grid so that batteries can start charging and control antifeed.

In Case you want to control more than one Inverter add the Sum of the Inverter Power in the config node. Enable and set correct Ip adress in the modbus write/read node.

Added a Dashboard2.0 version;

Check for the last version on github: