question

mopatops avatar image
mopatops asked

Node Red controlling Energenie ENER314-RT add-on board on Raspberry Pi running VenusOS Large

Hi

I've been trying to get an ENER314-RT add-on board working on my Raspberry Pi 3B running VenusOS Large and control it via Node-Red. This board is able to wirelessly control the Energenie remote controlled sockets, and I thought this would be perfect for switching loads on and off on the output of my inverter using Node-Red, when certain conditions are met.

There is a plug-in under Manage Palette in Node-Red called "node-red-contrib-energenie-ener314rt" and this loads fine on VenusOS, but errors saying it "cannot communicate with device" when I try using it.

I have tried the exact same Raspberry Pi running Debian with Node-Red installed, and the board works perfectly.

This board plugs in to the GPIO header on pins 1-26, and according to other posts on here, the relay out and IO in ports used by VenusOS are on later GPIO header pins. The board uses GPIO (not header pin numbers) 27,22,10,9,11,25 and 07 according to the datasheet.

Unless I'm missing something, this add-on board is not very popular with Pi users, and I've not seen it mentioned anywhere running on VenusOS, but any ideas to help get this working would be appreciated.

Steve

https://energenie4u.co.uk/res/pdfs/ENER314-RT%20User%20Guide%20V2.pdf


Raspberry PiNode-RED
2 |3000

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

3 Answers
mopatops avatar image
mopatops answered ·

I've been doing a bit more investigation, and it looks like the module won't run with hardware SPI enabled. This is normally disabled on the Pi using raspi-config, which VenusOS doesn't have, or dtparam command line, again VenusOS doesn't have that command. I'm not sure what the SPI is used for in VenusOS, but I did come across someone who had a BMS running through it, so I'm guessing it's for external sensors. I'm only connecting USB for the VE.direct ports of the Victron kit, so I don't know if I did manage to disable SPI whether it would affect the running of VenusOS.

If anyone has any ideas on how to disable SPI in VenusOS, please let me know. I'm running it on a spare Raspberry Pi while I mess around with stuff, so I'll try anything. [EDIT: Now know how to disable SPI - see below]

Thanks

Steve


2 |3000

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

mopatops avatar image
mopatops answered ·

I'll add what I'm finding here, even though it may be no use.

I made a mistake saying dtparam doesn't work, it's in the /u-boot/config.txt file, and set to on. I've set this to off, rebooted the Pi, and sure enough SPI has now disappeared from the dev folder. It's made no difference though, it's still not working.

I have run a debug program for the Energenie board

https://github.com/Achronite/ener314rt-debug

Running this suggests it's not communicating with the board, so obviously it wasn't SPI conflicting with it, or if it was, there's something else as well. I'm not really sure why SPI needs disabling, because it looks like that's how the Energenie board communicates???

I'm starting to think it's actually the Venus software probing the port that's causing the Energenie module to fail. This may never be able to run along side VenusOS, which is a shame.

Steve

2 |3000

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

mopatops avatar image
mopatops answered ·

Final update.

I have not been able to get the ENER314-RT board working with VenusOS. I've tried installing various drivers, reconfiguring the GPIO settings, and messing around until I brick the OS and have to reinstall (quite a number of times.) I may be missing something but am a bit worried that even if I could get it working, it may be wiped out with a firmware update, or even disrupt the operation of the Venus software.

I found an old Pi B I had lying around and installed Raspian and Node-red on it. I can control sockets just fine on this Pi using the ENER314 plugin, and I can connect to this Pi from VenusOS using MQTT in Node Red. I have Mosquitto running as a broker for MQTT on a different server, but I expect it would run on the Pi B.

It's not ideal, but I'm more confident it will hold up after firmware updates.

I've had this running a couple of days now, just switching a socket on and off when there's excess solar, and it seems stable enough. As a bonus I've found a use for an old Pi B that had no use for anything else.

Steve

2 |3000

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