bathnm avatar image
bathnm asked

Temperature Control of Relays and BMS Digital Inputs


I have modified both the GUI and also created a dBus service to control a relay based on temperature. The temperature information can come from either an analogue sensor configured as a temperature probe or a temperature probe connected to a battery monitor.

I have also modified the digital inputs to allow BMS signals to be picked up. When the signal goes low, the digital input will alarm. The alarm will flow through to VRM. VRM however will nots how the function of the digital input, just it's input type of:

11 - BMS Allow to Charge

12 - BMS Allow to Discharge

13 - BMS Pre Alarm

I have tested it on a Cerbo and Raspberry PI, both running v2.60 and Beta v2.62~7. The temperature switch can be applied to either relay 0 or 1.

I am not able to provide major support for this, so if you do not have some unix experience and ability to install an opkq package then please do not ask for help. If once installed you have problems then I'll look into issues, but only as time permits. If you want to take this and develop further than please do so.

I have developed these capabilities as I need to trigger heat mats under my Lithium batteries (they are hovering around 5oC) and also get the BMS signal information when remote.









Venus OSRelay
2 |3000

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

VRM View of Digital Inputs.


0 Likes 0 ·
1609697868411.png (371.4 KiB)

VenusOS Notification of BMS event


0 Likes 0 ·
1609697915198.png (59.6 KiB)
1609697941879.png (103.8 KiB)
1 Answer
Stefanie avatar image
Stefanie answered ·

Excellent work!!

2 |3000

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

Thank you, needs must and all that. Like you my sailing yacht is renewables and need the Lithium batteries chargeable and knowledge of the BMS state ;)

0 Likes 0 ·

I would install and try it out. Really impressive!

But have found another reliable solution, which works perfect for my installation.

0 Likes 0 ·

@Stefanie, please do share.

0 Likes 0 ·

Well, I have a couple of different NMEA 2000 Yacht Devices aboard our sailing vessel. One of them is the YDCC-04, a digital switching device and a YDHS-01, which is a Humidity and Temperatur sensor.

The good thing is that the YDHS-01 can turn on/off specified channels of the YDCC-04 by either temperature, relative humidity or dew point temperature.

I have a fan heater sitting quite close to the ventilation area of the battery cabinet. The heater, switched on/off by the YDCC-04, is blowing warm air into the cabinet. The cabinet itself has two temperature sensors attached to two of the 4 batteries and connected to the Cerbo.

Every 20-25 minutes the heater will switch on, depending on the YDHS-01 temperature sensor (attached in the saloon area) and after about 3 or 4 minutes goes off. It required some testing to get the temperature right. For now the heater will switch on at 8°C and goes off at 9.5°C. This will result in a battery cabinet temperature between 12°C and 14°C. Finally this will keep the batteries internal temperature at about 10°C.

I could lower this even more, but for now it works pretty well and another plus is that this keeps the boat dry inside. Relative Humidity is 60%.






1 Like 1 ·

Great solution. Do you know if you can get the data out of the yacht devices for remote viewing. One of the issues I have is the boat lives on a swinging mooring and there're remote access for monitoring is important to me.

0 Likes 0 ·

Absolutely. I have full remote access to everything in the N2K network and occasionally change settings, turn lights or other devices on/off, start the diesel heater. This all coming together through SignalK. And if that fails for some reason, there is a yacht devices ydwd-02 n2k wifi gateway, that connects to the router and is giving me full access.

0 Likes 0 ·

Wow, thumb up!

And thank you for sharing.

Controlling a relay via temperature can be done in NodeRED. I do so ;o)


Venus OS Large image: Signal K and Node-RED [Victron Energy]

0 Likes 0 ·
nodered-li.jpg (1.4 MiB)

Neat solution using NodeRED. I have not spent much time exploring NodeRED and its capabilities. Maybe it's time too. I am aware of the large image and waiting for it to become prime time on the Cerbo, so I don't have to run yet another monitoring device on the boat when I am away from it! I hope that the GUI for NodeRed might be accessible via VRM just as the remote console is, as that would allow changes to be made remotely!

0 Likes 0 ·

I hope that the GUI for NodeRed might be accessible via VRM just as the remote console is, as that would allow changes to be made remotely!”

It actually is!
see 6.) in

0 Likes 0 ·

I had Node-Red in mind too (actually that's what i did last year). But since my devices gave me a much easier way to set up things and get them going, I decided for the easy path.

0 Likes 0 ·

Node RED is an easy path too. Especially when you use the Large image it is super easy. I think it is even absolutely fine to use both if you need/want.

I am a programming noob but I was up and running controlling my RGB LED and temp controlled relay in 30 minutes

I have to smile when I read what things you have realized in your boat. It is so amazing.

0 Likes 0 ·

Yes, I know and I use NR for some other things as well. It is all the little helpers (tiny neat devices) that brings so much joy to our world. Especially in boating where everything else still seems to be stuck in the last century. And thanks to all the DIYers and Developers 'round the world, so many things are possible today.

I much loved your new Cabinet. Awesome job and so clean installation!

0 Likes 0 ·

In springtime I have to do a installation on a friends boat, pretty similar to yours. I am sure I have some questions then. I am looking very much forward to do that. And I am glad, I know you, with your skills, to ask. :o)

Thank you.

1 Like 1 ·

Any time :-)

0 Likes 0 ·

Thenk you. Thats new, since I last looked at the large image,.

0 Likes 0 ·