RemoteGPIO v4.0.0 release ** Beta for now **

*************************
**                     **
** MAJOR UPDATE v4.0.5 **
**                     **
*************************

The driver has been completely re-architected to be modular with support of other brands of Digital Inputs and Relays modules, through an API.
RemoteGPIO API.pdf (30,6 Ko)

The DigitalInputs are handled at kernel level with no polling process (better CPU footprint) and exposed like any embedded DI of a Cerbo GX.

Version 4.0 brings several changes:
1/ The communication with Dingtian Module is now using MQTT
This is much more efficient with lower CPU footprint
It allows also higher number of Relays and Digital Inputs (limit currently not identified)

2/ Supports Venus OS GUI v2
It means that this version requires Venus OS 3.6.x minimal version to work
It also means there are no more dependencies with GUIMODS

3/ Supports Interrupt based DigitalInputs
In the past RemoteGPIO was relying on a regular polling for updating the DI status
With interrupt support, ePoll is enabled in Venus OS and is much more efficient

4/ Zero configuration
Dingtian module is automatically discovered, with numbers of Relays and Inputs, assuming Dingtian module is correctly configured: See DingtianConfiguration.png (put exact same configuration, except IP address that needs to be the Venus OS one)

5/ Bi-directionnal relay status
If user configure his Dingtian with Input Link Relay configurtion, or if relay position is modified by external process, the correct actual state is repported in Venus GUI

6/ RemoteGPIO becomes modular with the possibility for third party modules to add support for other Relays and Digital Inputs vendors. Currently only Dingtian is supported, but an API documentation is here for third party integration.

7/ For enabling or disabling various communication modules, a virtual switch call SETUP is included and services can be turned ON or OFF

8/ The driver is native DBUS. No needs to run Large image with Node-Red, but Node-Red can play nicely with the additional DI and Relays


*** IMPORTANT NOTES ***
RemoteGPIO is currently only available as beta version and supports only Venus OS version 3.63
For the user of previous RemoteGPIO version, and using USB link, hold on as I have to develop the Dingtian/Modbus module communication.

So far I have tested with CerboGX and only one Dingtian module. Multiple Dingtian modules should work fine.
And I don’t see why i would not work with Raspberry Pi.
Your feedback is welcome!


*** SETUP ****
First, install, if not already done, PackageManager : GitHub - kwindrem/SetupHelper: Helper functions to simplify writing setup scripts that modify VenusOs functionality. The package includes automatic reinstallation of the package after a VenusOs update.

From there there are 2 options:
1/ Setup using the GUI

You need to configure Venus OS to default to GUI V1
Install RemoteGPIO
a: Go to settings > package manager > inactive packages.
b: Find RemoteGPIO in the list (at the bottom)
hit space so you can change the branch from main to Beta (!! Beta not beta!!)
add it to active packages.
c: Go to Active packages, seleect RemoteGPIO, download and install version 4.x
You then can revert your default setup to GUI VĂ© and enjoy the new switch interface

2/ setup from the CLI
You need to have root access and ssh to your VenusOS
cd /data
wget https://github.com/Lucifer06/RemoteGPIO/archive/refs/tags/v4.0.9.tar.gz
tar -xvf v4.0.9.tar.gz
mv RemoteGPIO-4.0.9 RemoteGPIO
rm v4.0.9.tar.gz
cd /data/RemoteGPIO
./setup # and select install (i)

For unistalling:
Either from GUI, or from the CLI, issue /data/RemoteGPIO/setup # and select unistall (u)

1 Like

Good news first user reverted back that it is working for him.
He mentionne to be careful when changing the GitHub branch to observe the CAPITAL B of Beta. Not beta.

I just released version 4.0.3 that fixes the relays showing randomly at reboot.

v4.0.7 is hopefully fixing the no show after reboot.
Communication modules configured and active at the moment of the reboot are now automatically back to life after the reboot :+1:

v4.0.9 released
Change log:
Venus OS 3.64 support
Ekrano support

v4.0.11 released
Change log:
Venus OS 3.65 and 3.66 support

Hi Brise,

thank you for your great work.

I’ve made a test environment on a raspberry Pi 4.

There are 2 things i noticed:
1st: the latest Beta doesn’t run without 4.0.0 first being installed. (nothing shows, neither in V1 and V2)
2nd: Somehow the 4.0.12 doesn’t work on GUI V2 on the Pi. (It does show up in the V1)

I’ve tested with Pi versions: 3.65 3.66 and 3.67 (latest was not supported, I noticed)

Then I double checked on my Cerbo: No problems…
The Cerbo is running now on 3.64 and there doesn’t seem to be any problems.

My goal is to drive a ESP-12F Relay X8 board via Node-Red.

Still in the communication fase, but i still had a couple of these boards lying around.

Your step to MQTT helps…

Maybe you could try on a Raspberry too?
I always like to test my stuff in a “Safe” environment…

Cheers!

I sam, I haven’t tested myself a rPI with RemoteGPIO.

AFAIK, the only integration point that may differ is in the way Digital Inputs may be managed. It is kernel dependant.

When installing RemoteGPIO, do you see any error reported?

Can you issue this command and report the result:

ps | grep rgpio

Also I’m a bit puzzled with the second part of your message. Can you confirm you are trying to build a RemoteGPIO driver for using your ESP-12F relay boards?

At least you should see the SETUP relay section (as shown on point 7/ in the first message) and it will required to be adapted so we can enable/disable your driver.

Let me know.

Hi Brise,

No, there are no error reports:

root@raspberrypi4:~# ps | grep rgpio
1349 root 1768 S supervise rgpio_monitor
1351 root 1768 S supervise rgpio_driver
3853 root 1912 S multilog t s25000 n4 /var/log/rgpio_driver
3892 root 1912 S multilog t s25000 n4 /var/log/rgpio_monitor
3914 root 3064 SN {rgpio_monitor} /bin/sh /data/RemoteGPIO/rgpio_monit
4737 root 1768 S supervise dbus-rgpio
4740 root 1912 S multilog t s25000 n4 /var/log/dbus-rgpio
4996 root 1768 S supervise setup_rgpio
4998 root 35520 S python3 /data/RemoteGPIO/modules/setup_rgpio.py
4999 root 1912 S multilog t s25000 n4 /var/log/setup_rgpio
30608 root 22404 R python3 /data/RemoteGPIO/dbus-rgpio.py
30616 root 2704 S grep rgpio

Yes want do get a driver for the ESP-12F board.

SETUP relay never shows on the Raps. It does on the Cerbo.

Next step will be to make a driver for the ESP-12F.

(Trying to figure it out with AI)

OK strange because the services are running.

Try to restart the services (both while monitoring the logs (/var/log/setup_rgpio/current and /var/log/dbus-rgpio/current).

Also you need to stop and remove the old version of RemoteGPIO, as I see there is still process/service running with rgpio_driver & rgpio_monitor

For this you need to run the following:

svc -d /service/rgpio_driver

svc -d /service/rgpio_monitor

rm -R /service/rgpio_driver

rm -R /var/log/rgpio_driver/

rm -R /service/rgpio_monitor

rm -R /var/log/rgpio_monitor

The RemoteGPIO 4.x service names are now dbus-rgpio and setup_rgpio

You should see only these services:

ps | grep rgpio

1160 root 1768 S supervise setup_rgpio

1164 root 1912 S multilog t s25000 n4 /var/log/setup_rgpio

1175 root 35616 S python3 /data/RemoteGPIO/modules/setup_rgpio.py

1226 root 1768 S supervise dbus-rgpio

1245 root 1912 S multilog t s25000 n4 /var/log/dbus-rgpio

5111 root 37604 S python3 /data/RemoteGPIO/dbus-rgpio.py

Yes,

I’m not continuing with this project.

Way easier to get a Pi and get Home Assistant running on it.
There everything is integrated. Unfortunately an additional device…

But Keep up the good work!

estuve siguiendo los pasos y lo conecté a un modulo digtian de 16 reles. Este repositorio contiene la documentación, configuración y archivos necesarios para integrar un módulo Dingtian DT-R016 (16 relés + 16 entradas) con una Raspberry Pi con Venus OS, utilizando MQTT y el servicio external-devices.

Excellent, all is working as expected?

If you check the repository, all the screenshots show that everything was working correctly.
The video “PI4 MQTT 2 - Compressed.mp4” also shows the system running as expected.

However, after restarting the Raspberry Pi, the configuration was lost.
I assume this happens because Venus OS reverts to its original state after a reboot, or something similar.

I haven’t had much more time to continue testing, as I’m currently focusing on learning Node-RED in order to integrate all the home automation in my camper van:
sensors, lights, cameras, relays, etc.