question

fguiot avatar image
fguiot asked

RemoteGPIO (ex venus_rgpio) now released in v3.2.1

******* UPDATE Version 3.3.0 ****************

No more reboot required after configuration change, just ise restart RemoteGPIO services.

CPU resources optimisations: Overall cpu usage can be reduced by up to 75% depending on number of modules and options selected.

Several settings menu enhancements. Added option to enable/disable digital inputs per module. Added option to 'Restart RemoteGPIO' from the menu.

Thanks to Derrick (drtinaz)



******* UPDATE Version 3.2.2 ****************

Relays confirm to work with RaspBerry, but Digital Input won't. It will require additional work for making Digital Inputs working with RaspBerry.



******* UPDATE Version 3.2.1 ****************

Removed option for 16x relay module. It will require different driver version

Added support for reading relays status and updating GUI. This option is set to default off in RemoteGPIO settings.


****** UPDATE Version 3.2 **********

Support for 2, 4, 8, and 16x relais modules.

Support up to 3x units.

Thanks to Derrick for adding the above

As we don't have all the units here to test, thanks in advance to report here your experience with the 16x relai version.




****** UPDATE Version 3.0 ************


I am happy to announce here that version 3.0 is finally released with many changes.

Configuration is done from the Venus OS graphical interface, no more file editing is required.

The big change is how RemoteGPIO is integrated into Venus OS: it is now natively integrated at the D-Bus level, allowing the use of relays and GUI digital inputs straight from the GUI.

RemoteGPIO runs as a service in VenuOS without the need to run NodeRed with Venus OS Large. NodeRed is still supported for advanced integration.

I encourage you to upgrade to version 3.0.

capture-decran-2024-03-16-a-120338.pngcapture-decran-2024-03-16-a-120417.pngcapture-decran-2024-03-16-a-120426.pngcapture-decran-2024-03-16-a-120704.pngcapture-decran-2024-03-16-a-120753.png

As of today up to 18 additional relays and digital inputs are supported with two 8x relay Dingtian units. Both TCP and RS485 models are supported. I will add support for different Dingtian size models soon.

The latest GuiMods version must be installed. A big THANK YOU to Kevin Windrem for updating GuiMods and PackageManager in order to cooperate nicely with RemoteGPIO.

Thanks to the contribution from Thomas, RemoteGPIO is now version independent, starting with Venus OS 2.92 or later required.


For the boating community, I have some cool stuff coming up on top of RemoteGPIO, which I'll be launching soon!


Specific setup for USB-RS485 adapters to work sine with no conflicts with other adapters such the ones used for various BMS:

I propose here a solution to better handle USB to RS485 interface with RemoteGPIO, making sure there will be no more conflicts with other services requiring the same model of USB to RS485 adapter.

The solution I Propose is to purchase an adapter based on FTDI chipset, in particular FT232R based. These are still inexpensive and have the advantage to be reprogrammed on demand.

Follow this procedure:

1/ Download FT_Prog - EEPROM Programming Utility from https://ftdichip.com/utilities/

As of 7th March the version is 3.12.46.653

and install it on Windows (I tried Windows 7 successfully)

2/ Connect the USB to RS485 you wish to reprogram and select the driver you just downloaded

3/ Let Windows to search on internet the right driver

4/ Run FT_Prog

5/ Press F5 to scan the USB bus (go to menu DEVICES and select Scan and Parse

It should display a device in the Device Tree

Capture d’écran 2024-03-07 à 15.51.29.png

6/ Select USB String Descriptors in the Device Tree and update the Product Description with « RemoteGPIO » (original value is « FT232R USB UART »

7/ Select Program in DEVICES menu

Hit Program button

8/ Hit F5 to scan again and confirm RemoteGPIO is now the correct Product Description in the USB String Descriptors



Note:

Note: The previous version is still available, you just need to change the branch (or tag) to "old" in PackageManager. The latest version is v2.4.2 and supports Venus OS from v2.92 to v3.22.


*************************************************

I'm glad to announce that finally I made available the USB Relay Gateway compatible with SetupHelper Package Manager.

All Venus releases from v2.92 up to currently latest v3.12 are supported and tested. And thanks to SetupHelper it will be fairly easy to maintain and support next Venus releases.

capture-decran-2023-11-28-a-014622.png

This package is mainly targeting Cerbo GX users that wants to extend Digital Inputs and Relays on their system.

Please note that there is a conflict with Kwindrem's RpiGpioSetup that is targeting Raspberry pi users


In order to have a reliable direct attached interface to the relay, I selected a Modbus/RTU based relai from Dingtian that attaches on the USB port of the Cerbo GX.

There are many solutions for attaching relays via Ethernet, but I didn't the relays to rely on an external Ethernet network switch.


This Dingtian box provide 8x relays, that can be controlled with Modbus Serial, but also over IP and with various additional protocols: https://fr.aliexpress.com/item/4000999069820.html

They have variants of 4 or 8 relays.

A USB to RS 485 adapter will be required.

I selected this one as this is coming with a USB cable and can fit nicely on the Cerbo GX: https://fr.aliexpress.com/item/1005004778767986.html

The RS485 must be connected on the first USB port of the Cerbo GX


SETUP:

=====

The setup is now fully automated, no more requirement to issue shell commands! :-)

It runs only with VenusOS Large with minimum version 2.92


1/ Configure the Relay Module

The Dingtian IOT Relay module needs to be configured so Modbus RTU works:

Connect the ethernet interface of the module and access to its configuration page (192.168.1.100 and admin/admin by default).

Configure the RS485 with Protocol Modbus-RTU and set address to 1 (for the first unit).

For TCP control, configure the TCP Server with ModBus-RTU over TCP

Example configuration for 1st Dingtian unit

capture-decran-2024-04-08-a-153915.png


Example configuration for 2nd Dingtian Unit. Addr in RS485 needs to be set regardless control is RS485 or TCP

capture-decran-2024-04-08-a-153931.png

2/ VenusOS Large

Install the desired VenusOS Large version (minimum v2.92)

Optional: Enable Node-RED (Settings/Venus OS Large features)


3/ Install RemoteGPIO

Make sure SetupHelper from Kwindrem is installed. If not follow instructions from https://github.com/kwindrem/SetupHelper

Add RemoteGPIO repo if not already listed in the inactive packages RemoteGPIO Lucifer06:main

capture-decran-2023-11-27-a-224738.png

Download and install the package

capture-decran-2023-11-27-a-224906.png

BE PATIENT during the Installation of the package, it can takes few minutes as it downloads few Node-RED palettes

Reboot will be required for the USB to be not anymore preempted by VenusOS services



Using RemoteGPIO:

=================

1/ RemoteGPIO can be used from VenusOS GUI to control 4x additional relays.

It is required to install Kwindrem's GuiMods package (https://github.com/kwindrem/GuiMods)

Go to Settings/Relay there are 4x additional relays to be enabled and then use the dedicated Relay page that should display the additional relays


2/ RemoteGPIO can also be used with Node-RED

With Node-Red it is possible to use all 8x relays as well as the 8x digital inputs

During the installation of the package, the following Node-RED palettes are automatically installed:

— node-red-dashboard

— node-red-contrib-buffer-parser

— node-red-contrib-debounce

If there was no flows yet running the RemoteGPIO flow got installed

If a flow was already installed, in order to not break anything RemoteGPIO will need to be manually imported from the local library (Menu Import / Local / RemoteGPIO.json)

The RemoteGPIO flow is also adding a Node-RED dashboard for controlling the Relays and monitoring the Digital Inputs

capture-decran-2023-11-28-a-014327.png

RemoteGPIO v2.x is backward compatible with previous venus_rgpio (https://community.victronenergy.com/questions/166784/solution-adding-external-relays-to-cerbo-gx-using.html).



Troubleshooting:

================

Any questions or suggestions about RemoteGPIO are welcome here


Most of the issues are coming from USBtoRS485 adapter been trapped by the wrong VenusOS service.

In order to make it working with default configuration file, it is important to attach it to the first USB port.

*IMPORTANT* If a different adpater is used, or if a different USB port is used (or connected behind a USB hub) the file /etc/udev/rules.d/serial-starter.rules will required to be tweaked accordingly so the USB-RS485 adpater is always accesible with /dev/ttyUSB0


Toubleshooting from command line with dbus

List of all dbus relays and their status:

dbus -y com.victronenergy.system /Relay GetValue

Close Relay 3:

dbus -y com.victronenergy.system /Relay/3/State SetValue %1


Toubleshooting from command line with modbus

Read Digital Inputs:

/data/rgpio/modpoll/arm-linux-gnueabihf/modpoll -m rtu -b 115200 -p none -d 8 -r 11 -s 1 -c 1 /dev/ttyUSB0

Close Relay 1:

/data/rgpio/modpoll/arm-linux-gnueabihf/modpoll -m rtu -b 115200 -p none -d 8 -1 -r 3 -s 1 -c 1 /dev/ttyUSB0 257

Open Relay 1:

/data/rgpio/modpoll/arm-linux-gnueabihf/modpoll -m rtu -b 115200 -p none -d 8 -1 -r 3 -s 1 -c 1 /dev/ttyUSB0 256


Check that no process are talking to USB0:

ps | grep USB0

Should return only rgpio services. If not, it may be required to reboot VenusOS for the serial-starter.rules to apply


Prevent USB0 to be used by another service:

/opt/victronenergy/serial-starter/stop-tty.sh ttyUSB0

cerbo gxVenus OSgateway relay
2 |3000

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

45 Answers
derrick thomas avatar image
derrick thomas answered ·

@fguiot are you planning on keeping up with the beta releases as well, or only the main releases? There is no file set available for 3.20~30 so I went back to 3.12.

2 |3000

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

fguiot avatar image
fguiot answered ·

@derrick thomas I will install the beta on my dev Cerbo and will update the repo. Stay tuned..

2 |3000

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

fguiot avatar image
fguiot answered ·

3.13~1 is the latest one proposed by Venus GUI. I can't download the v 3.20~30 and test it, but I believe this should work as seems the mod files remained the same.

3.13~1 and3.20~30 are now supported. Please let me know if all good.

8 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.

derrick thomas avatar image derrick thomas commented ·
Still getting same no file set for 3.20~30.

I wouldn't worry about it. Just wait for the next beta release. Victron will most likely make 3.20~30 available again when they are finished testing the current one.

0 Likes 0 ·
tschini avatar image tschini commented ·

Also getting the error "no file set for v3.13" after firmware upgrade from 3.12 to 3.13.


0 Likes 0 ·
derrick thomas avatar image derrick thomas tschini commented ·

There are no .orig files in the FileSets so currently the package is not capable of building new FileSets on its own. There is a change in the services.json file from 3.12 to 3.13 (I might not remember correctly, maybe the change is in v3.20~33). I have the FileSets for v3.13 and v3.20~33 (I have also added the .orig files for better functionality) but I am on my way to work right now. It is currently night for @fguiot so an update probably won't come right away. When I get home if fguiot has not updated yet, I can submit a pull request with the FileSets.

0 Likes 0 ·
fguiot avatar image fguiot derrick thomas commented ·
@derrick thomas I could invite you as Github collaborator, so you could you add those in Github? I'm a beginner with Github collaborative work, but I guess I will have to commit your updates. How can I found you in GitHub?


0 Likes 0 ·
derrick thomas avatar image derrick thomas fguiot commented ·
thomasinaz41213

I have also moved RemoteGPIO.json to the FileSets folder, as it is not version dependant and this does not need to be included in every FileSets version folder.

0 Likes 0 ·
fguiot avatar image fguiot derrick thomas commented ·
@derrick thomas not true. it is version dependant as the Nod-red got updated by Victron at some point. don't recall which exact version, but you can see that there is a change at some point
0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem fguiot commented ·
Check out updateFileSets (included in the SetupHelper directory) to manage file sets. It works off a database of stock files and fills in the .orig files automatically. It also uses symbolic links between replacement files for versions with matching stock files so it's much easier to determine which file set contains a changed file.

When a new Venus OS version is added to the database, updateFileSets will mark missing replacement files so you can fill them in as needed rather than checking each file manually for changes.

updateFileSets runs on your development computer not the target GX device.
0 Likes 0 ·
derrick thomas avatar image derrick thomas fguiot commented ·
You can disregard my comment, I was thinking of another file in another package. I've got a few different things going on and sometimes the lines get blurred.
0 Likes 0 ·
derrick thomas avatar image
derrick thomas answered ·

@fguiot I have to remove your added lines from serial starter rules or it knocks off my bms and my system goes into fault and disabled charging and discharging. Any chance on making that part of the setup to have it's own entry in setup helper? I use 3 dingtian relay boxes via tcpip over WiFi so I don't need the changes to serial starter rules, and my bms uses uart so the added lines interfere. It wouldn't bother me except that any time you push an update to your repository, or Venus os updates, then serial starter rules gets changed again.

Edit to add: Alternatively, I'm curious if it's possible for me to just remove remotergpio from setuphelper after installation without uninstalling it? I know I can disable automatic updates but I think that disables updates to all installed mods and I cannot select individual ones?

Maybe @Kevin Windrem has a suggestion?

9 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.

fguiot avatar image fguiot commented ·
@derrick thomas I'm not sure we can have an interactive install with the GUI.

Alternative could be you create a post installation action (node-red dashboard button for ex) that invoke a restore of the serial started rule file.

Check the setup file in the desinstall section. If you need I'll provide the shell script you need to invoke.

0 Likes 0 ·
fguiot avatar image fguiot fguiot commented ·
@derrick thomas thinking about it while driving to the airport this morning, I believe I have a much better idea:

At the end of the setup, I can automatically execute a post-install script if exist. That script would be customozid for you to restore the serial starter rule file. You can then keep automatic download and install in setuphelper.

It wil' open any other users to make any other required configuration.

What do you think?

0 Likes 0 ·
derrick thomas avatar image derrick thomas fguiot commented ·
@fguiot what would you think about a separate entry in the packages list of setuphelper just for the serial starter rules script? That may be beneficial to others who might also require different rules, and would facilitate installing/removing the additional rules directly from the gui without the need for ssh. Separate the starter rules from the rest of the remotergpio setup?
0 Likes 0 ·
fguiot avatar image fguiot derrick thomas commented ·
@derrick thomas I'm not sure it's a good idea to propose multiple package. Also it will require more work from my side to maintain 2x packages for every release.

BTW my proposed post-install script doesn't require to SSH for every install. Only first time to add this script.

@Kevin Windrem is there a way in SetupHelper to ask for a variant setup within the same package. Something like an argument? How would you handle the situation where the setup would need to behave differently based on users expectation or user input?

Is there a way to ask for an option during the setup and display the choice on the GUI?


0 Likes 0 ·
derrick thomas avatar image derrick thomas fguiot commented ·
Yes you are correct, if it's going to add difficulty as far as maintaining the repositories then it would not be an idea. I am certainly open to the idea of adding a script. Whatever is the simplest solution. Thanks for your consideration and help in this.
0 Likes 0 ·
fguiot avatar image fguiot derrick thomas commented ·
Ok, I believe I will go with the following strategy:

1/ Single distribution that will install the basic. No modification of the serial.starter rules.

2/ For very first installation, requirement to configure the way remoteGPIO will be used: TCP or RS485, and also number of Relay modules, and IP adresses. It will create a configuration file that will be checked during RemoteGPIO updates

3/ The RemoteGPIO setup will check if config file exists, and will complete the setup based on it.

It will allow us to display some warning statements about risks related with incompatibilities and address Kevin's remarks.


I may also require that RS485 adapter requires mandatory unique serial number or will tweak the VID and PID so we can make it working with no conflicts (basically dropping the support of CH340 chipsets that are all with same serial numbers).

0 Likes 0 ·
derrick thomas avatar image derrick thomas fguiot commented ·
That sounds great. I am currently running a fork in which I have removed the serial-starter.rules and also removed the node-red install process. The package installs in a mere few seconds.


Is there a way you could also set a flag so that the install script only attempts node red install during the initial installation and not during subsequent os updates?

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem fguiot commented ·
SetupHelper provides storage for flag and option/config files and also a flag that indicates the configuration options have been set.

The storage is in /data/setupOptions/<package name>

The flag that indicates you've completed the command-line configuration is /data/setupOptions/RemoteGPIO/optionsSet in your case.

An additional flag optionsRequired in your package tells SetupHelper not to run the install unless the optionsSet flag file exists.

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem commented ·

Package Manager does have a way to prevent auto installs on specific packages. If /data/setupOptions/<package name>/DO_NOT_AUTO_INSTALL is present, Package Manager won't install the package even if auto install is turned on.


However reinstallMods script that runs at boot does not check for the flag that prevents auto installs.

When a package is installed, it adds a call to its setup script to reinstallScriptsList. reinstallMods installs packages that are included in reinstallScriptsList. So you could manually eliminate that line to prevent reinstall at boot.

I need to think about the impact testing DO_NOT_AUTO_INSTALL in reinstallMods but I think that might be possible.

0 Likes 0 ·
Kevin Windrem avatar image
Kevin Windrem answered ·

It is not possible for PackageManager to be interactive or offer install options.

I have a few packages that require input from the person installing them and these must be installed from the command line. The selected options are then stored in the /data/setupOptions/<package name> directory. Future installs are then possible from PackageManager or reinstall after a Venus OS update. Changing the options requires running the script from the command line again.

Look at my RpiDisplaySetup package for an example of how to setup options.


From my perspective, it would seem that ethernet/WiFi would be a better default for the relay extension. You can use static IP addresses and run the relay expansion point-to-point with the GX device if you don't have a local network. Cerbo and some other GX devices also have a WiFi access point that could be used.

6 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.

derrick thomas avatar image derrick thomas commented ·
@Kevin Windrem @fguiot Kevin I have multiple modules connected via the cerbos ap. This way even if my wifi goes offline for any reason the modules remain connected all the time. Initially I had the modules connected thru the Wi-Fi network/router but I was getting an occasional communication error. Connecting to the cerbos access point eliminated the errors. Been working like a champ. And as an added bonus I have been able to install modules into existing wiring in various locations where running new cabling just is not an option.
0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem derrick thomas commented ·
That's good news.

Not sure why, but the GX access point doesn't work on Raspberry PI. Otherwise it could be a very good generic solution.

The router and Cerbo are on opposite corners of my travel trailer and there's no hidden path to run an ethernet cable from the router to Cerbo. So I've been using WiFi from the router to Cerbo and that works fine. I guess relay expansion could go on either network but using the GX's access point provides some isolation and doesn't rely on the router being operational. I could also use point-to-point ethernet as the relay expansion would go right next to Cerbo.

It will be interesting to see what direction Victron takes for their relay and digital input expansion.

0 Likes 0 ·
fguiot avatar image fguiot Kevin Windrem commented ·

Actually the reason why I went with USB attached relay expansion was to not have to rely on wi-fi or network switch. I found this more reliable and I would not be surprised if Victron's native solution will also use USB attached relay.

Regarding the default Package of RemoteGPIO, in my view this should install for USB attached. this is its value added. I will add a post-installation script, probably to be installed in /data/setupOptions/<package name> directory

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem fguiot commented ·
nothing in /data/setupOptions gets executed. It's probably not the place to put a script. The best place is in the package directory. I still believe the best way to do this is require command line install the first time, or to run setup from the command line if you want to switch from the default connection.


If the default is to install USB then you run the risk of shutting down critical components in an existing system. There is simply not enough notification in PackageManager to tell someone that simply installing your package will take over the first USB port. I predict this will lead to bug reports to Victron that their PV charger or battery monitor suddenly disappeared. They will not correlate this to installing your package.

0 Likes 0 ·
fguiot avatar image fguiot Kevin Windrem commented ·

@Kevin Windrem you are right. Thinking more about this, the very right solution would be to have a better RS485-USB adapter that could be program so it shows up with a dedicated naming and we would not have to mess around with the serial starter file.

Mean while I think I have to put a big disclaimer with the risk behind this package. Will create a dedicate folder in /data for the post-installation script. I don't want to keep it on RemoteGPIO folder because in case the package is de-installed the user will loose the customisation.

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem fguiot commented ·

My experience is that some people won't read documentation. I've had several people complain they can't install VeCanSetup because it needs to be run from the command line once to set the configurations. The message even says run from command line.

Having to manually run a separate script to modify the installation to use ethernet instead of USB means that a Venus OS update will once again cause a USB port to not function as expected, requiring digging into documentation or posting on the forum. It is far better to set the USB/Ethernet option when the setup script is run the first time as I mentioned above. That way, when the setup script is run again after a Venus OS firmware update, the correct configuration changes are made based on that option. Another justification to keeping the option in the main setup script is that running an uninstall needs to handle both USB and ethernet configurations cleanly. Having to run yet a second script to finish the uninstall could leave the system in a non-funcitonal state.

As far as where to store a script to manually run -- it really doesn't matter but keep in mind that uninstalling a package does not delete its package directory in /data. If the package directory is deleted, there are more serious problems such as you can no longer revert the modified files to their stock contents.

If the default setup is for the USB solution, I don't think I am willing to add your package to the default packages list. This will minimize the unintended installation of a "mystery" package. If they need to read your documentation to get the user/branch info to add the package to PackageManager, it is more likely they will see you caution.

0 Likes 0 ·
stefan-verbiest avatar image
stefan-verbiest answered ·

Hi all,

A bit newbie here.
I have installed the usb to modbus module on the Cerbo and the Dingtian relay module.
Used the install like described and all works but when I press a relay it takes about 5 seconds for the relay really switches.
Is this normal for modbus or not?

Also I read that some have made the relay module working on wifi or ethernet.
I have wired network al over the boat so what do I need to do to make this work?
Is it as simple as setting TCP client on the Dingtian module with the IP of the cerbo and turning Modbus/TCP on on the Cerbo?

Hope you can help me out here, thank you in advance.

Stefan

1 comment
2 |3000

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

derrick thomas avatar image derrick thomas commented ·

I had ran into the same issue with the delay of the relay switching before, never did figure it out and fguiot was not able to reproduce it. That was several versions ago and I haven't seen the issue reappear for some time.


The relay can be used with WiFi and Ethernet but requires a little bit of a different setup process. Fguiot is currently working on revamping the setup process to make it easier. In the meantime you can look at my fork which I have modified for tcpip. It also requires different node red flows than the USB modbus.


https://github.com/thomasinaz41213/RemoteGPIO_tcpip

0 Likes 0 ·
weedave avatar image
weedave answered ·

Hello, I have v2.3 downloaded and when i try to install I get "unknown error 255" and "incompatible ???". Tried re-booting and updating all other software packages.

Cerbo GX with OSLarge v3.14
GuiMods v9.2 and SetupHelperv6.3

Also not got far enough to try yet, can I use one of these MODBUS relay boards (Amazon MODBUS 16 channel relay board)
Anything funky to do differently?

Thank you!

9 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.

calin-maxim avatar image calin-maxim commented ·

Hello,


I have the same issue whit you. "unknown error 255" and "incompatible ???"
Setup helper is at v6.3
RemoteGPIO v2.3
Venus OS 3.12 downgraded from 3.14. Also I have try whit 3.01


Maybe somebody whit more experience can help us to fix the issue.


BR

Calin.

0 Likes 0 ·
weedave avatar image weedave calin-maxim commented ·

@derrick thomas @fguiot any idea on the error 255 and incompatible? Thank you!!

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem calin-maxim commented ·

I see two problems with RemoteGPIO v2.3:

First, there are no file sets for v3.14 (or recent v3.20 beta releases also). There are no .orig files in the File sets so SetupHelepr can't attempt to create the missing file set. So the setup script will fail and should report a file set error.

Second, the setup script includes an installService call, but there are no services in the package directory. This is most likely the reson SetupHelper reports error 255 rather than a file set error.

These are both issues the package author needs to fix.

Versions prior to v6.0 may in fact have allowed the install to proceed even though there were errors. Starting with SetupHelper v6.0, partial installs are not permitted. The first failure results in no more file modifications and also results in a full uninstall. A partial install could result in extremely bad system behavior including something that is unrecoverable from the GUI.

0 Likes 0 ·
derrick thomas avatar image derrick thomas Kevin Windrem commented ·
Kevin I did include some of the .orig files in a few of the more recent filesets but didn't realize at that time that the way the installation is currently being done, setup helper will probably never be able to automatically create new filesets for future updates. The file RemoteGPIO.json has no original file being replaced and currently requires being manually placed in each versions fileset folder. As fguiot mentioned in a previous conversation, future changes to node red can change the way that the flow needs to be put together, so he has elected not to put the file into the main filesets folder. I had not run into this issue with my fork of RemoteGPIO_tcpip becuase I removed the portion of the setup script that installs node red components. Perhaps this issue further stresses the need to possibly separate any node red components installation from the package. It certainly would further automate the update process. @fguiot I'll add filesets for v3.14 and the latest beta and submit a PR.
0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem derrick thomas commented ·
SetupHelper provides two mechanisms for files that don't have an original:


Version independent files are installed for all versions of the firmware. They have their own folder (VersionIndependent) and their own file list (fileListVersionIndependent).

Alternate originals can identify which firmware versions can share the same replacement file. It takes some time to identify an alternate original that changes when the replacement file needs to and in some cases results in replacements that are identical between versions but it's better than hand editing file sets.

Code can be added to the setup script to check for the firmware version and call updateActiveFile with different sources based on version. In this case, the replacement file would not appear in either fileList.

If there are no changes to the .json file now, I'd simply treat it as version independent as described above and address any version dependencies when they come up in the future.

0 Likes 0 ·
derrick thomas avatar image derrick thomas calin-maxim commented ·
@weedave @Kevin Windrem give me a little time and I will fix the setup script and update the FileSets and issue a PR back to @fguiot
0 Likes 0 ·
derrick thomas avatar image derrick thomas derrick thomas commented ·
I have issued a pull request with the changes to fix the install error and added support for v3.14, v3.20-45 and v3.20-47. It might take a few days for fguiot to merge the PR. In the interim if anyone wants they can install the updated version thru my GitHub using the following: RemoteGPIO/thomasinaz41213/latest


If using tcpip then I would recommend using RemoteGPIO_tcpip/thomasinaz41213/latest. This package also removes the node red components installation process which GREATLY reduces the install time from a couple minutes to just a few seconds.

If using either one of my packages first remove fguiots package or your system might explode and wipe out your entire city. Just kidding, but seriously do remove it first or your system might have a mind of it's own.

0 Likes 0 ·
fguiot avatar image fguiot derrick thomas commented ·
@derrick thomas Thanks for the fix! A version 2.4 is now released.
0 Likes 0 ·
derrick thomas avatar image derrick thomas fguiot commented ·
Happy to help!
0 Likes 0 ·
simon-gent avatar image
simon-gent answered ·

Is there a possibilty to use the 16 relay variant of the Dingtian box?

You can buy it on Alibaba but not on Aliexpress.

https://www.alibaba.com/product-detail/Smart-Home-Digital-Input-CANbus-RS485_1600513863638.html?spm=a2700.shop_index.89.11.4fe7127aTnBjCr

2 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.

fguiot avatar image fguiot johnny-brusevold commented ·

Seems this is using the same API, so it should work with a small adjustment.

But if I was you would go with the 8x channel unit that is with its enclosure. Take x2 and then you have some more resiliency in case of failure. BTW today's RemoteGPIO implementation supports 2x units !

0 Likes 0 ·
calin-maxim avatar image
calin-maxim answered ·

Hello All,


I have manage to install the latest version of RemoteGPIO but when I am trying to use it from GUI interface of my Cerbo do not make anything.

I have try to run the troubleshooting steps and I have this outputs:

root@einstein:~# dbus -y com.victronenergy.system /Relay GetValue

{'0/State': 0,

'1/State': 0,

'2/State': 0,

'3/State': 0,

'4/State': 0,

'5/State': 0}


root@einstein:~# dbus -y com.victronenergy.system /Relay/3/State SetValue %1

0

it run, but relay is not closing

if I change the relay number whit on of the factory relarys (those who are inside of cerbo) it is working.

root@einstein:~# dbus -y com.victronenergy.system /Relay GetValue

{'0/State': 0,

'1/State': 0,

'2/State': 0,

'3/State': 1,

'4/State': 0,

'5/State': 0}


root@einstein:~# /data/rgpio/modpoll/arm-linux-gnueabihf/modpoll -m rtu -b 115200 -p none -d 8 -r 11 -s 1 -c 1 /dev/ttyUSB0

modpoll 3.10 - FieldTalk(tm) Modbus(R) Master Simulator

Copyright (c) 2002-2021 proconX Pty Ltd

Visit https://www.modbusdriver.com for Modbus libraries and tools.


Protocol configuration: Modbus RTU, FC3

Slave configuration...: address = 1, start reference = 11, count = 1

Communication.........: /dev/ttyUSB0, 115200, 8, 1, none, t/o 1.00 s, poll rate 1000 ms

Data type.............: 16-bit register, output (holding) register table


-- Polling slave... (Ctrl-C to stop)

[11]: 255

-- Polling slave... (Ctrl-C to stop)

[11]: 255

-- Polling slave... (Ctrl-C to stop)

[11]: 255

-- Polling slave... (Ctrl-C to stop)

[11]: 255

-- Polling slave... (Ctrl-C to stop)

[11]: 255

-- Polling slave... (Ctrl-C to stop)

[11]: 255

-- Polling slave... (Ctrl-C to stop)


when I am checking if relay is closing using this command:
/data/rgpio/modpoll/arm-linux-gnueabihf/modpoll -m rtu -b 115200 -p none -d 8 -1 -r 3 -s 1 -c 1 /dev/ttyUSB0 257

it is working, I can see the green light and also I can hear it closing.


this process are using my USB port:

root@einstein:~# ps | grep USB0

5432 root 1608 S supervise gps-dbus.ttyUSB0

5454 root 1620 S multilog t s25000 n4 /var/log/gps-dbus.ttyUSB0

12013 root 2688 S grep USB0


also I have try to trick the recommended file

#! /bin/sh


. $(dirname $0)/functions.sh


for tty; do

tty=$(basename $(realpath /dev/$(basename $tty)))


test -c "/dev/$tty" || continue


# hide tty from serial-starter

rm -f "/dev/serial-starter/$tty"


# stop any running services

svc -d /service/*."$tty"


# if lock_tty fails, serial-starter may be about to start the service

# delay and bring it down again until lock_tty succeeds

while ! lock_tty "$tty"; do

sleep 1

svc -d /service/*."$tty"

done


unlock_tty "$tty"

done


but I do not manage to understand what line I need to modify.

My usb to RS485 is connected in the second USB port of cerbo GX


Somebody who know better then me please help me to fix it.


BR.

Calin

2 |3000

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

fguiot avatar image
fguiot answered ·

@Calin, so if I understand correctly, theUSB communication is working fine.

For having it to work with the Venus GUI, you need to have Node-red installed. and you will see the first 4x external relays in addition to the 2x internal ones of the Cerbo GX. This is also requiring GuiMods from kwindrem.

Or you may wait a bit, I'm finalising the new version 3 that is 100% dbus native (no more Node-red) with improved GUI for supporting up to 18x relays (3x pages each with 6x relays).

I hope to release this soon.

4 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.

calin-maxim avatar image calin-maxim commented ·

Hey Fguiot,


thx for you answer.

To clarify better what I have in this moment.

- my relay bord is the model whit 8 relays

- I have installed the large version of Venus os

- in relay page I can see the 4 extra relays, but when I want to control them manually when I am activating one of the 4 extra relays it is not working. is the same situation when I am running this unix command: dbus -y com.victronenergy.system /Relay/3/State SetValue %1 in OS show it have send the command to relay bord, but it do not receive the command.

Also I can wait until you will finish your new version.

BR

Calin

0 Likes 0 ·
derrick thomas avatar image derrick thomas calin-maxim commented ·
Have you verified that the flow for the external relay module has in fact been installed in node red? And that any missing node modules have been installed?
0 Likes 0 ·
fguiot avatar image fguiot derrick thomas commented ·

Thomas is probably right. Most often you need to update the flow as Victron is updating the node-red librairies.

I'm very close to publish my first native D-Bus release. You will not have anymore to deal with Node-red. I have also additional Relay Overview pages in Venus OS.


0 Likes 0 ·
derrick thomas avatar image derrick thomas fguiot commented ·

@fguiot I am using 3 modules, some have external manual switches which trigger the relays via the digital inputs. When using external switches to enable/disable a relay, the gui relay page is updated accordingly. Works great. Will this work the same with your new package? Will I still be able to use external switches and have the gui reflect the changes correctly?

0 Likes 0 ·
fguiot avatar image
fguiot answered ·

@derrick thomas yes, definitively! The package to be released will initially supports 2x modules but I'm counting on you to update and contribute to the V3.0. ;-)

You will see, I have added few interesting mechanisms such as watchdog, driver running as a service, configuration from GUI, ...

At a second stage, I'm planning to also add also native Ethernet support and give the choice between USB and Ethernet.

capture-decran-2024-02-24-a-153708.pngcapture-decran-2024-02-24-a-153715.png

capture-decran-2024-02-24-a-161826.png


6 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.

derrick thomas avatar image derrick thomas commented ·
Absolutely willing to help any way that I can. Will you be able to set custom names for the relays?
0 Likes 0 ·
fguiot avatar image fguiot derrick thomas commented ·
yep, and for all the relays. that's the beauty of using dbus
0 Likes 0 ·
fguiot avatar image fguiot fguiot commented ·

You can change the names from /Settings/Relay like the other relays

capture-decran-2024-02-24-a-172228.png
0 Likes 0 ·
derrick thomas avatar image derrick thomas fguiot commented ·
What are the chances of being able to assign a custom name to each of the gui relay overview pages? For example have a page labeled "lights", and another page labeled "appliances"?
0 Likes 0 ·
fguiot avatar image fguiot derrick thomas commented ·

That's technically possible I believe.

Need to put in place the logics to configure name in dbus and retrieve it for displaying it in the .qml:

title: qsTr("Unit 1 Configuration")

0 Likes 0 ·
fguiot avatar image fguiot fguiot commented ·

The number of relays is also dynamic against the configured number of DTWonder units

capture-decran-2024-02-24-a-173329.png

0 Likes 0 ·
fguiot avatar image
fguiot answered ·

I have forked a branch, called beta-3.0

the setup is still manual as I need now to redo the integration with PackageManager.

Unless I'm told this is a bad idea, I plan to support Venus OS 3.21 and onward....

2 |3000

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

sergio68 avatar image
sergio68 answered ·

Thanks, but today the issued the release v3.22 and now remoteGPIO 2.4.1 does't work to have te 4 relays more

3 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.

Kevin Windrem avatar image Kevin Windrem commented ·
File sets in RemoteGPIO do not have reference .orig files so SetupHelper can't build missing file sets from those currently in the package. This is not always possible but often (as is the case here, SetupHelper could build a file set for v3.22 from v3.21.


0 Likes 0 ·
derrick thomas avatar image derrick thomas Kevin Windrem commented ·
Kevin this will likely remain an issue until fguiot is finished with the upgrade to dbus, eliminating the need for node red. RemoteGPIO.json currently has to be placed in each fileset as there is no .orig file for it. I understand that RemoteGPIO.json can be placed in an alternate location but that was decided against because of the possibility of the flow needing to be changed between versions.
0 Likes 0 ·
sergio68 avatar image sergio68 derrick thomas commented ·

Isn't there a way to revert to the previous revision v3.21 so that I can use the additional relays?

thanks

sergio

0 Likes 0 ·
Kevin Windrem avatar image
Kevin Windrem answered ·

You may find v3.21 in the stored firmware menu. If so, just select it and the system will reboot.

To avoid future updates to v3.22, disable automatic firmware updates BEFORE switching to v3.21.

Otherwise, you can download previous versions here:

http://updates.victronenergy.com/feeds/venus/

and put them on a USB stick. When you plug the USB stick into the GX device it will prompt for the install.

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.

sergio68 avatar image sergio68 commented ·

like this one?

venus-swu-large-cerbosgx-20240216163909-v3.21.swu

but is there a need to rename the file to make it read to the Cerbo?

example: 20240216163909-v3.21.swu

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem sergio68 commented ·
No need to rename.


The file you referenced above is for the large version however. That will work but there should be another .swu file that doesn't include 'large' in the name.
0 Likes 0 ·
sergio68 avatar image sergio68 Kevin Windrem commented ·

I tried but it doesn't see the file, it gives me files not found.

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem sergio68 commented ·
Make sure you are selecting the right platform. Files for Cerbo GX are different the Cerbo S GX, etc. Somewhere in the Victron firmware update documentation is a table of platform vs firmware name. For example, Cerbo GX is Einstein.
0 Likes 0 ·
sergio68 avatar image sergio68 Kevin Windrem commented ·

Thanks a lot Kevin, to see the 4 more relays at finaly I installed the file venus-swu-large-einstein-20240216163909-v3.21.swu

now the next step is to make the Cerbo communicate with the external relay board

0 Likes 0 ·
sergio68 avatar image
sergio68 answered ·

How do I get remote GPIO in I/O as below?

thanks


2 |3000

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

fguiot avatar image
fguiot answered ·

@sergio this screenshot is for the new coming v3 fo RemoteGPIO that will be natively integrated with D-Bus and Victron GUI. For now you have to stick with the setup guidelines at the beginning of the thread and it is requiring to runVenus_OS large with Node-Red enabled.

2 |3000

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

sergio68 avatar image
sergio68 answered ·

immagine-whatsapp-2024-02-29-ore-083938-e347b2ca1.jpg

I followed the whole procedure and now I'm at this point, the relays don't activate and I have two errors on the node-red, see Read Relays and Write Relay.

on the RS485 a USB converter the red led is blinking, so maybe there is comunication between cerbo and relay board, but I'm not sure

but there is not a procedure much more easy to command these 4 relays more?


thanks a lot for help


2 |3000

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

fguiot avatar image
fguiot answered ·

@Sergio68 please check the following commands is ssh terminal:

Close Relay 1:

/data/rgpio/modpoll/arm-linux-gnueabihf/modpoll -m rtu -b 115200 -p none -d 8 -1 -r 3 -s 1 -c 1 /dev/ttyUSB0 257

Open Relay 1:

/data/rgpio/modpoll/arm-linux-gnueabihf/modpoll -m rtu -b 115200 -p none -d 8 -1 -r 3 -s 1 -c 1 /dev/ttyUSB0 256

With this we will know If the communication with the Digital relay module is broken. Then it will be more likely related with USB0 interface not been exclusive with RemoteGPIO. BTW, do you have other devices attached to USB ports? have you connected the Relay interface of the rely to the far external USB port of the Cerbo GX?


1 comment
2 |3000

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

sergio68 avatar image sergio68 commented ·

Thanks a lot for your help, now is work, was a wiring problem between Relay board and RS485 a USB converter

0 Likes 0 ·
sergio68 avatar image
sergio68 answered ·

immagine-whatsapp-2024-03-02-ore-190324-a0326e52.jpg

Thanks a lot for your help, my project is ongoing..now is time to "push" inside my boat


1 comment
2 |3000

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

hussl1 avatar image hussl1 commented ·
That looks great!!!
0 Likes 0 ·
hussl1 avatar image
hussl1 answered ·

Looking forward to your v3 of your remoteGPIO. Keep up the great work! Glad you found a way to make it futureproof with the new GUI-integration. Your chosen relaysboard seems very powerful, but also on the hungry side, since it has a lot of components installed that one does not need. I am opting for this board:
https://www.ebay.de/itm/403876604917?

and the USB485-STIXL from https://hjelmslund.eu/ (Victron-supported + isolated - just had some bad experiences with a nonisolated BMS Can...)

Do you see any problems with this choice?

Will v3 also include Inputs? How can i make use of them?

Matthias

37 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.

fguiot avatar image fguiot commented ·

@hussl1 Right now RemoteGPIO only supports the Dingtian IOT Relay board with 8x Digital Inputs and 8x Relays. On the todo list, I have to support over variations from Dingtian (they offer various sizes, including 2x, 4x, 8x, 16 and 32 IO).

Digital_Input is supported. Venus GUI seems to be limited to a total of 9x inputs, so with the 4x inputs already included in the Cerbo GX, this adds only 5x inputs in the GUI. But I'm planing to add a way to support all the additional inputs from Node-Red.

Regarding the support of other relay boards such as the one you listed on eBay, this for sure require another driver as the protocol will be for sure different. Yes this is RS485, the the Modbus registers are not normalized. I could add some more customisation in the setting page, but for now I would recommend you go with the Dingtian, or you could participate with the project and add the support for other devices.


0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem fguiot commented ·
Regarding limiting to 9 remote digital inputs: Remember that Raspberry PI will have ZERO digital inputs and relays when using RemoteGPIO (RpiGpioSetup conflicts with RemoteGPIO). If you incorporate the digital inputs on GPIO pins then there are 5 of them on the PI but I'd recommend just sticking with those on your module. just my 2 cents.
1 Like 1 ·
Stan avatar image Stan fguiot commented ·

So it means that Dingtian IOT Relay board with 4x relays is not supported? I have some issues with 4x relay board even if I followed your steps.

0 Likes 0 ·
fguiot avatar image fguiot Stan commented ·

@Stan Only 8x relay board is supported as of today.

I will soon try to add the various versions (there are 2, 4, 8, 16 and 32 relays).

But it may work with the first 4 relays in your case.

Can you confirm the communication is OK, this command line (reading the number of relays in the board) should return 4 in your case:


                      
  1. /data/rgpio/modpoll/arm-linux-gnueabihf/modpoll -m rtu -b 115200 -p none -d 8 -1 -r 1 -s 1 -c 1 /dev/ttyUSB0



1 Like 1 ·
Stan avatar image Stan fguiot commented ·

It is working now, thank you.
I dont know why but I noticed that NodeRed Dashboard is not installed, so I reinstall RemoteGPIO and suddenly everything is working.

But there is a long delay between the switching the relay in dashboard and real click of the relay. What is causing this delay? Is it possible to decrease it?

Thanks again for your work.

0 Likes 0 ·
fguiot avatar image fguiot Stan commented ·

delay should be around 1 sec. If more it's probably because there are multiple services trying to identify /dev/ttyUSB0. f that's the case it will also generate communication instability.

The best way to identify if this is the case is to issue the following commande and post here the results:

                        
  1. ps | grep USB


0 Likes 0 ·
Stan avatar image Stan fguiot commented ·

When I tried to switch on relays one by one, the delay on relay no. 4 was around 3-4s.

Here is the picture of command linesnimka3.jpg

0 Likes 0 ·
snimka3.jpg (59.3 KiB)
fguiot avatar image fguiot Stan commented ·

The delay you see is indeed related with all these process trying to identify the device behind ttyUSB0.

Provide the results of

cat /etc/udev/rules.d/serial-starter.rules

and

udevadm info --query=property --name=/dev/ttyUSB0





You need to follow the instructions I gave in the setup for trying to prevent ttyUSB0 to be polled by these process:

Most of the issues are coming from USBtoRS485 adapter been trapped by the wrong VenusOS service.

In order to make it working with default configuration file, it is important to attach it to the first USB port.

*IMPORTANT* If a different adpater is used, or if a different USB port is used (or connected behind a USB hub) the file /etc/udev/rules.d/serial-starter.rules will required to be tweaked accordingly so the USB-RS485 adpater is always accesible with /dev/ttyUSB0

6/ Make serial-starter to ignore the USB-RS485 interface

identify ID_MODEL of the interface

udevadm info --query=property --name=/dev/ttyUSB0

With CH341 chipset, ID_VENDOR is USB_Serial

As they don’t put any unique serial number there is an issue when multiple Serial interfaces are using the same CH341 chipset.

This is the case for example with the USB interface to connect the DALI BMS.

Unfortunately I haven’t found a way to program a serial number, so the solution is to track the position of the RGPIO interface:

Always connect the USB-RS485 interface to the first USB interface.


Identify the value of ID_PATH_TAG of the RS485 interface connected as USB0:

udevadm info --query=property --name=/dev/ttyUSB0


Add the following lines at the beginning of /etc/udev/rules.d/serial-starter.rules

# ** RGPIO **
#Serial-starter to ignore the USB-RS485 (ID_MODEL=USB_Serial) so USB interface for RGPIO works
#ACTION=="add", ENV{ID_BUS}=="usb", ENV{ID_MODEL}=="USB_Serial", ENV{VE_SERVICE}="ignore"
#Serial-starter to ignore the USB-RS485 converter attached to the first USB port so USB interface for RGPIO works
ACTION=="add", ENV{ID_BUS}=="usb", ENV{ID_PATH_TAG}=="platform-1c14400_usb-usb-0_1_1_0", ENV{VE_SERVICE}="ignore"
# ** RGPIO **


Also comment the line that reference VENDOR_ID==« 1a86 » as it conflicts with the RGPIO serial RS485 adapter


Alternatively, run

/opt/victronenergy/serial-starter/stop-tty.sh ttyUSB0




1 Like 1 ·
Stan avatar image Stan fguiot commented ·

Here you have the results:

first command

snimka6.jpg

Second command

snimka5.jpg

I followed your instruction as much as I understood them. Those lines for starter rules I didnt understand at all :D

0 Likes 0 ·
snimka6.jpg (208.2 KiB)
snimka5.jpg (103.6 KiB)
fguiot avatar image fguiot Stan commented ·

Ok, I see you have a fT232 USB adapter.

I have to fix RemoteGPIO to deal with this adapter. Be patient I don't know how long it will take...

Meanwhile you can try to comment the line that reference FT232R_USB_UART "rs485:default" in /etc/udev/rules.d/serial-starter.rules

Then reboot and check

ps | grep USB

1 Like 1 ·
fguiot avatar image fguiot fguiot commented ·
@Stan , have a look at the bottom of this thread, I just published a way to make it reliably stable with no more conflicts. It will require you to re-program the USB to RS485 interface. not a big deal you will see.
1 Like 1 ·
hussl1 avatar image hussl1 fguiot commented ·
Thank you for your reply. Since i am new in this kind of tech I'll better stick with the supported model. Let's hope it'll be back in stock soon. Currently it is not available.

Since you're now supporting ethernet, i will discard the USB-Adapter and save some bucks here.
Hopefully, I can contribute something to this project as well, as soon as i get going. I'm a computer scientist but am completely new in the Venus OS and hardware world.

If it is worth your time I could instead buy the board from Ebay. But i would definitely need your support to get started.

0 Likes 0 ·
fguiot avatar image fguiot hussl1 commented ·

@hussl1 you are welcome enhancing the RemoteGPIO project.

You can go with TCP only version, I'm about to release version 3.0 that brings support for TCP and some more features such as configuration from the menu, native D-Bus support and Digital Input support.

I was not aware the modules are sold out. You may give a try on their official Alibaba store, they do not show as sold out. Have you contacted them?

Here is their web site: https://www.dingtian-tech.com/en_us/relay8.html

Moving forward, its possible that we will have to support additional brands, and this for sure where this community will be helpful.

0 Likes 0 ·
fguiot avatar image fguiot fguiot commented ·
@hussl1 I had a chat with Dingtian. They have inventory on Alibaba, but with a minimum or quantity order. The situation with Aliexpress is temporary and will return to normal next week (this is due to new enforced rules with Ali apparently).
0 Likes 0 ·
hussl1 avatar image hussl1 fguiot commented ·

Thanks a lot! I contacted them as well and will order next week. I am looking forward to it.

0 Likes 0 ·
thebelcherman avatar image thebelcherman fguiot commented ·
@fguiot

Can you speak more on the topic of TCP support. In the lab, I'm trying to get this DT-R008 configured to utilize it. Not having much luck.

Installed v3.1.7. Installer threw a fit, that it didn't find my RS485 adapter.

Been trying to find anything on the topic of getting it configured.

Can you point me in the right direction? Or does this version not have it implemented yet?

Thanks


0 Likes 0 ·
fguiot avatar image fguiot thebelcherman commented ·

@TheBelcherMan , TCP si implemented and supported.

On VenusOS side, you need to configure its IP address and select control via TCP (instead of RS485/USB).


On the Dingtian DT-XX unit, you need to make sure there are no automatic action such as closure of a relay based on an input state. You also need to configure the Modbus address to 1, assuming you are using only one unit. Finally you need to configure TCP Server with protocol Modbus RTU Over TCP


capture-decran-2024-04-08-a-153915.png


0 Likes 0 ·
derrick thomas avatar image derrick thomas fguiot commented ·

You also need to configure TCP Server with protocol Modbus RTU Over TCP

0 Likes 0 ·
thebelcherman avatar image thebelcherman fguiot commented ·
Crazy day, just getting around to get back in the lab. First, thanks to both of you for your response. @fguiot @Kevin Windrem


Do I need to deal with setup script, expecting to find my USB-RS485 adaptor by hand? You could tell during the install with all the DBus errors trying to set the signature to "v" on an interface that didn't exist.

Works like a champ with the RS485 dongle installed, not so happy when it's not.

Thoughts/Suggestions?

0 Likes 0 ·
thebelcherman avatar image thebelcherman thebelcherman commented ·

@derrick thomas

Sorry Derrick, thought was Kevin.

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem thebelcherman commented ·
I'd say yes you need to check for it's existence so dozens of errors aren't output during install.


Is the missing 485 adapter fatal or will the system recover after it's plugged in? That is, does the setup script need to run again? (hopefully the answer is the system will come up after running the setup script without the usb adapter).

As I understand it there is also the option to connect via TCP so this needs to be considered as well.

0 Likes 0 ·
thebelcherman avatar image thebelcherman Kevin Windrem commented ·

oh ya, dozens is an understatement. They are/where everywhere, I had to uninstall it.

From:

/data/log/rgpio_driver/current - can't open relay x

/data/log/messages, dmesg.

Have to look through my console output, I save everything. There was one log, that captured RemoteGPIO trying to start, it did show disabled in my Remote Console, it throw a bunch of error's about relays wait they try again. Never stopped.

In the back of my head I was expecting the setup script to prompt me to select either TCP or use my RS485 adapter. Think adding that option, would solve this real quick.

Let's wait for @fguiot, see what he thinks. In the meantime I'll try @derrick thomas fork. He's already stripped out the code that's giving me hard time.

Thanks, all.



0 Likes 0 ·
derrick thomas avatar image derrick thomas thebelcherman commented ·
My fork that you refer to is the old version that uses an external driver invoked thru node red, it is not dbus and will not work on the RPi.


The newer dbus version 3.xx does require some setup after the package is installed. Go to menu settings/IO/RemoteGPIO and enable RemoteGPIO. Once enabled you then select number of relays modules, and the protocol used. In order for the changes to implement you MUST REBOOT Venus. Have you done all these steps?

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem thebelcherman commented ·
Requiring a 485/TCP selection when running the setup script means you can't install from PackageManager


0 Likes 0 ·
thebelcherman avatar image thebelcherman Kevin Windrem commented ·
Kevin, I installed it from the CLI. And @derrick thomas, can you point me some documentation? No didn't do anything, though I was at the page and saw RemoteGPIO disabled, never attempted to enable it, just thought I'd dig a deeper hole.


I'll give it a shot in the morning.

Update to follow.


0 Likes 0 ·
derrick thomas avatar image derrick thomas thebelcherman commented ·
See the first post in this thread, with pictures.
0 Likes 0 ·
thebelcherman avatar image thebelcherman Kevin Windrem commented ·
Make sense, so there goes that idea.
0 Likes 0 ·
fguiot avatar image fguiot thebelcherman commented ·

@TheBelcherMan , have you managed to make it working?

The only dependency is GuiMods to be installed. As Thomas pointed out you need to configure RemoteGPIO from the menu, then reboot.

RemoteGPIO version 3.2 was just released. go with latest version.

This should be straight forward.

0 Likes 0 ·
thebelcherman avatar image thebelcherman fguiot commented ·
Been dealing with some family issues. Can confirm that v3.1.8 is working like a champ. Haven't determined if it was 3.1.8 or the fact that I followed your instructions, probably the later?


During the installation still threw that same DBus errors, but this time I Enabled RemoteGPIO, rebooted. Off to relay page and all 8 relays were displayed. Activated relay 4 and heard this glorious click from the Dington DT-R008. Success, super responsive 10-20ms max? message and dmesg logs are clean, no more entries about missing RS485 adapter.


Think we can call that a big old win!

Going to start will a fresh build and replicate my steps and then I'll have a play with v3.2.

Thanks @fguiot, @Kevin Windrem @derrick thomas


0 Likes 0 ·
Show more comments
fguiot avatar image
fguiot answered ·

I'm releasing a first beta, currently v3.0.5

It requires GuiMods version 10.6 to be installed and Venus OS 3.22

If you want to test, you need to update the PackageManager with GitHub branch or tag = "beta-3.0" you can always return to "main" for the normal support through Node-Red.

It supports up to 2x Dingtian 8 relay modules. Control is configurable either via USB or Ethernet

2 |3000

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

fguiot avatar image
fguiot answered ·

Beta v3.0.14 is now supporting all the Digital_Inputs at D-Bus level! :-)

They are all listed in the main page. The last remaining limitation is the Digital Input Setting page that shows only the first nine. @Kevin Windrem any ideas why?

1 comment
2 |3000

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

Kevin Windrem avatar image Kevin Windrem commented ·

There is code in PageSettingsIo.qml that may be limiting the list to a single digit but not sure if that's true or how to fix it:

    VeQItemSortTableModel {
        id: digitalModel
        filterRegExp: "/[1-9]$"
        model: VeQItemTableModel {
            uids: [Utils.path(settingsService, "/Settings/DigitalInput")]
            flags: VeQItemTableModel.AddChildren |
                   VeQItemTableModel.AddNonLeaves |
                   VeQItemTableModel.DontAddItem
        }
    }


I'd also check to make sure the settings for relays past 9 are in Settings since the above code is based on /Settings/DigitalInput/...

Anyone else???

0 Likes 0 ·
fguiot avatar image
fguiot answered ·

Easy fix seems to remove the line:

                  
  1.         filterRegExp: "/[1-9]$"

I have implemented the change on RemoteGPIO side as I anyway have to add the sub-Menu for RemoteGPIO in this qml page.

2 |3000

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

fguiot avatar image
fguiot answered ·

Beta v3.0.15 just released.

All Digital Inputs and Relays are now managed vis D-Bus with no limitations on GUl nor access via Node-Red.

I'm now waiting for users feedback before releasing as main stream and ask Kevin Windrem to add RemoteGPIO to the repository list of PackageManager.

Next step will be to support the various sizes of these relay units

2 |3000

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

fguiot avatar image
fguiot answered ·

I propose here a solution to better handle USB to RS485 interface with RemoteGPIO, making sure there will be no more conflicts with other services requiring the same model of USB to RS485 adapter.

The solution I Propose is to purchase an adapter based on FTDI chipset, in particular FT232R based. These are still inexpensive and have the advantage to be reprogrammed on demand.

Follow this procedure:

1/ Download FT_Prog - EEPROM Programming Utility from https://ftdichip.com/utilities/

As of 7th March the version is 3.12.46.653

and install it on Windows (I tried Windows 7 successfully)

2/ Connect the USB to RS485 you wish to reprogram and select the driver you just downloaded

3/ Let Windows to search on internet the right driver

4/ Run FT_Prog

5/ Press F5 to scan the USB bus (go to menu DEVICES and select Scan and Parse

It should display a device in the Device Tree

Capture d’écran 2024-03-07 à 15.51.29.png

6/ Select USB String Descriptors in the Device Tree and update the Product Description with « RemoteGPIO » (original value is « FT232R USB UART »

7/ Select Program in DEVICES menu

Hit Program button

8/ Hit F5 to scan again and confirm RemoteGPIO is now the correct Product Description in the USB String Descriptors


Then add the following lines at the beginning of /etc/udev/rules.d/serial-starter.rules :

# ** RemoteGPIO **
#Serial-starter to ignore the USB-RS485 (ID_MODEL=USB_Serial) so USB interface for RGPIO works
#ACTION=="add", ENV{ID_BUS}=="usb", ENV{ID_MODEL}=="USB_Serial", ENV{VE_SERVICE}="ignore"
#Serial-starter to ignore the USB-RS485 converter attached to the first USB port so USB interface for RGPIO works
ACTION=="add", ENV{ID_BUS}=="usb", ENV{ID_PATH_TAG}=="platform-1c14400_usb-usb-0_1_1_0", ENV{VE_SERVICE}="ignore"
ACTION=="add", ENV{ID_BUS}=="usb", ENV{ID_MODEL}=="RemoteGPIO", ENV{VE_SERVICE}="ignore"
# ** RemoteGPIO **


Finally reboot, and you are good to go.

I will add the new /etc/udev/rules.d/serial-starter.rules in the coming version 3.0 of RemoteGPIO that I'm very close to make public access.


1709824392185.png (112.5 KiB)
2 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.

thebelcherman avatar image thebelcherman commented ·

Confirming success with Waveshare's isolated USB to RS485 adapter, works like a champ. It's using the RL variant of the FTDI IC (EOL coming 6/2024). I've used it in all my designs for years, just feels like home. Looks like the RNL is replacing it, for the 28-pin SSOP.

Waveshare ASIN: B081NBCJRS

$15.99 on Amazon. WS did a good job with their isolation design. I have a confirmed direct lightning strike, stopped it dead in its tracks. It didn't survive, but the $50,000 device it was connected to did. Won't ever catch me using a non-isolated adapter.

0 Likes 0 ·
fguiot avatar image fguiot thebelcherman commented ·
Excellent, thanks for sharing


0 Likes 0 ·
fguiot avatar image
fguiot answered ·

Version 3.0 is released!

2 |3000

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

sergio68 avatar image
sergio68 answered ·

I update my Cerbo GX with v3.22 and RGpio 3.1, I can open the menu of the 10 added relays on my Cerbo inside the Relays menu, but there is no communication between Cerbo and the USB to RS 485 adapter, only sometimes there are some flashes on it (only one of the 2 led).

On menu I/O RemoteGpio is request to put the Unit 1 IP adress, wich adress I should put inside, see below?

also it will be possible to see thw config of all signals on Node-Red by Venus_OS as before I use it to make some logics between I/O signals DI/AI/DO.

thanks for helpimmagine-whatsapp-2024-03-17-ore-222252-0b398cec.jpg


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.

sergio68 avatar image sergio68 commented ·

I put USB0 and now it works, on the IP address of unit 1 I put 192.168.1.9, often the activation is slow.

The relays 7 to 10 are not displayed on Relay Overview.

I tried again to see if I can get the configurations on Node-Red, but nothing, it would be very good to have it back to be able to configure the logics

thanks

sergio

0 Likes 0 ·
derrick thomas avatar image derrick thomas sergio68 commented ·
We're still ironing out a few kinks. There should be another update tomorrow, I'm fixing a couple of files. For now try going back to v3.0.25
0 Likes 0 ·
fguiot avatar image fguiot derrick thomas commented ·
When the unit is controlled via USB/RS485, the IP address is optional, but useful only if you wan to be able to reset it (it obviously requires to be reachable in your network).
0 Likes 0 ·
sergio68 avatar image sergio68 fguiot commented ·

So can I leave it blank?

0 Likes 0 ·
fguiot avatar image fguiot sergio68 commented ·
yes
-1 Like -1 ·
fguiot avatar image
fguiot answered ·

v3.1.2 released and should fix the issue introduced in 3.1

Sorry have no time today to run deep tests, but initial tests shows it's working fine on my side

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.

sergio68 avatar image sergio68 commented ·

I'm also testing on my end, what I see is much slower than before in responding to the activation of the On and Off relays. I don't know now if this is due to an incorrect IP address I put on Unit 1.

I confirm that all relays are also visible on Relay Overview.

It should be nice to have all the setup on the Node-Red

sergio


0 Likes 0 ·
fguiot avatar image fguiot sergio68 commented ·
Node-red is supported and should show you the additional Digital Inputs and Relays.

For the slowness, can you check you don't have multiple services trying to talk to the USB0? Issue the following command and post the result:

ps | grep USB0
0 Likes 0 ·
derrick thomas avatar image derrick thomas sergio68 commented ·

@Sergio68 I have opened an issue report on the GitHub I would suggest putting your 2 cents in there as well and anybody else that has issues. That way issues can be tracked and solutions not get lost in the mud.


https://github.com/Lucifer06/RemoteGPIO

0 Likes 0 ·
sergio68 avatar image sergio68 commented ·

I installed v3.1.4 but I can see only 2 relay, I/O RemoteGPIO is configurated as before

thanks

0 Likes 0 ·
sergio68 avatar image sergio68 sergio68 commented ·

thanks for the v3.1.5 now is work



0 Likes 0 ·
fguiot avatar image
fguiot answered ·

Version 3.1.6 just released. This is fixing the latency issue reported by some of you.

Now the additional relays are reacting as fast as the embedded ones in the Cerbo.


2 |3000

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

richard-6 avatar image
richard-6 answered ·

Hello and thank you for your great work.

I have installed RemoteGPIO v3.1.7 on RPI4 venusOS v3.3: all relays work fine, but none of the Digital Inputs configured as "pulsmeter" or as "Generic I/O" count the pulses of my dingtian 4 modules. Maybe I missed something!

Any idea?

Richard

1 comment
2 |3000

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

fguiot avatar image fguiot commented ·
Have you tried to confirm a stable state is correctly measured?

You can simply jump the GND to one of the inputs (Dingtian is with Pull-ups), and confirm the state has changed. If so then I'm afraid the pulses may be to shorts...

Also confirm the inputs are correctly reported in Dingtian GUI (http).

0 Likes 0 ·
Richard Rubens avatar image
Richard Rubens answered ·

I use Modbus via TCP protocol

1710952113165.png

1710952131202.png


1710952113165.png (29.9 KiB)
1710952131202.png (19.6 KiB)
2 |3000

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

Richard Rubens avatar image
Richard Rubens answered ·

This is when I jumped the GND to input_3

2 |3000

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

fguiot avatar image
fguiot answered ·

While your input 3 is jumped to GND, can you issue the following command:

cat /dev/gpio/digital_input_7/value

It should return a 0 if Input3 is grounded.

Also Careful, the first 4x Digital Inputs are the ones embedded in CerboGX, so DigitalInput1 of the Dingtian device is DigitalInput5 in Venus OS.

2 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.

Richard Rubens avatar image Richard Rubens commented ·

- When digtian input 3 (i.e digital input_7) is jumped to GND

cat /dev/gpio/digital_input_7/value

returns 0
- Otherwise
it returns 1

- But

dbus -y

com.victronenergy.settings /Settings/DigitalInput/7/Count com.victronenergy.BusItem.GetValue
returns always 0

Maybe because Dingtian is with Pull-ups?

0 Likes 0 ·
Richard Rubens avatar image Richard Rubens Richard Rubens commented ·

I remember that with the "gpiozero" python library, GPIO13 on my RPI4 was in pull-down mode with the command

"state = Button(13, pull_up=False)".

So "state.value" is 0 or 1 depending on the state of GPIO13.

How to do the same thing with RemoteGPIO?

0 Likes 0 ·
sergio68 avatar image
sergio68 answered ·

I've see that they issued rev. v3.30 for Cerbo GX, is the rev. 3.1.7 of remote GPIO compatibile or is better to wait to install v.3.30?

thanks

2 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.

derrick thomas avatar image derrick thomas commented ·
Fully compatible. Barring any major os changes RemoteGPIO should be forward compatible for future firmware updates.
0 Likes 0 ·
fguiot avatar image fguiot commented ·
3.30 is supported and proven to work, at list with my setup.
0 Likes 0 ·
thebelcherman avatar image
thebelcherman answered ·

Playing around in the lab. Goal: get my DT-R008 connected over Ethernet vs my production via WaveShare Isolated, RS485 USB dongle.

Duplicating my production environment:

Pi 4B

WaveShare Dual Isolated CAN Hat.

Running 3.40~1 Large, None-Red: Disabled

Kevin's:

SetupHelper: v7.10

VeCanSetup: v3.12

ShutdownMonitor: v3.1

GuiMods: v10.17

Then TimD's: RpiTemperature: v1.2

All working like a champ, both can8 to a JK-PB series BMS, can9 to my to a SmartSolar MPPT VE.Can charge controller, then a SmartShunt via USB to VE.Direct dongle.


Now, when I try to getting my Digntian DT-R008 in the mix, things start to go sideways.

Installed @fguiot RemoteGPIO, Active packages show's "patch errors" under RemoteGPIO and obviously --, for installed version. Stored is v3.1.7.

/data/RemoteGPIO/patchErrors, has "patch unsuccesful for gpio_list" Typo "unsuccessful"

Haven't spent any time really digging in and see what's going on. Don't know if it's 3.40 code or what at this point.

Anyone have any idea's would be appreciated. But, I'll find it and keep you posted.

Cheers.



3 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.

Kevin Windrem avatar image Kevin Windrem commented ·
We should have made RemoteGPIO and RpiGpioSetup mutually exclusive but might have missed something.

You will not be able to use the PI's GPIO pins and the remote relay/digital input box, at least right now. SetupHelper replaces existing files, so the two packages can't modify the same file. This might change in the future but even if it does, I'm not sure the way the PI version of the firmware in dealing with GPIO pins will be compatible with the way RemoteGPIO does things.


BTW, I do not thing this is the source of the patch error since RpiGpioSetup would need to be uninstalled before the install for RemoteGPIO could proceed.

0 Likes 0 ·
thebelcherman avatar image thebelcherman Kevin Windrem commented ·

Trying to decipher what you're saying. I don't have RpiGpioSetup installed. I see RemoteGPIO's packageDependencies make sure RpiGpioSetup is "uninstalled". Are you trying to possibly tell me, the CAN hat is the conflict? Or this device just flat out won't work on a RPi? I'll go get a Cerbo GX tomorrow, last I checked they didn't have a MK2 in stock. Won't be buying an old MK1 :)


Thanks Kevin!

0 Likes 0 ·
thebelcherman avatar image thebelcherman commented ·

So far I see it's either Kevin's SetupHelper CommonResources or his Packagemanager.py python scripts. I'm a hardware engineer, software side of things not really my bag.

See if I can muddle my way through this :)


0 Likes 0 ·
derrick thomas avatar image
derrick thomas answered ·

Working fine on my test system. It's a cerbo though not a RPi

2 |3000

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

thebelcherman avatar image
thebelcherman answered ·

Found the next line out output:

"ERROR: could not patch gpio_list - can't continue with install"

It's in /data/RemoteGPIO/HelperResources/CommonResources

1383 if ! patch "$patchedFiles/$baseName" "$patchFile" &> /dev/null ; then

1384 setInstallFailed $EXIT_FILE_SET_ERROR "ERROR: could not patch $baseName - can't continue with install"

1385 endScript

1386 fi

You guru's know this code like the back of your hands, what the heck is it not happy with?



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.

derrick thomas avatar image derrick thomas commented ·
It means when trying to apply the patch, an exact match in the orig file could not be found, and therefore it cannot apply the patch, as it does not know where to insert it.


The issue is within gpio_list. For whatever reason it does not currently match the OS original file and cannot be patched. Possibly one of your other mods has altered it. If not, try reflashing the firmware and then install RemoteGPIO and guimods without any other mods first. If that is successful then try installing the others one at a time.


0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem commented ·

It means the .patch file could not modify the original. patch looks for code fragments specified in the .patch file and if these can't be found in the original file, the patch can not be applied.


This is not a problem in SetupHelper, but rather the original gpio_list file itself.

The PI's gpio_list file is EMPTY by default. On Cerbo, it has lines with unspecified devices:

- in  digital_input_1
- in  digital_input_2
- in  digital_input_3
- in  digital_input_4
- out relay_1
- out relay_2
- out mkx_rst
- out vebus_standby


gpio_list.patchfile is attempting to add lines AFTER the

- in  digital_input_4

and

- out relay_2

lines

But since these don't exist on the PI, the patch fails. I'm not certain what happens to this file as the system boots and configures things but it might be best just to use a replacement file rather than trying to patch it.

-1 Like -1 ·
thebelcherman avatar image thebelcherman Kevin Windrem commented ·
That's what I was looking for! Thanks man! Keep everyone posted.
0 Likes 0 ·
thebelcherman avatar image thebelcherman thebelcherman commented ·

Just like you said, added the lines you listed to gpio_list.

Ran RemoteGPIO setup script, and no more wining about its inability to patch gpio_list.

I'm sitting at "Available actions:"


That fix is going in my little black book!

Thanks Kevin! Have a Patreon site or something, so I can really say thank you?




0 Likes 0 ·
derrick thomas avatar image derrick thomas Kevin Windrem commented ·

@Kevin Windrem in pondering a fix for this issue, if the gpio_list.patch is removed from the fileListPatched and an edited version of gpio_list added to the version independant list, would gpio_list simply get overwritten without storing the orig for regression? Or would setuphelper still be able to restore gpio_list on uninstall? Trying to stay away from having to have a version specific FileSet for every single version.

0 Likes 0 ·
Kevin Windrem avatar image
Kevin Windrem answered ·

All replacements backup an existing file (even an empty one) to .orig. If there is no existing file, a .NO_ORIG file is created instead.

On restore the .orig file is moved back into the active location. If there is no .orig but a .NO_ORIG exists, the active file is removed, leaving nothing in that file name, but that's the way the system was before the install.

2 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.

derrick thomas avatar image derrick thomas commented ·
Good to know. I'll get the changes made and added to the open PR.
0 Likes 0 ·
fguiot avatar image fguiot commented ·

Thomas seems to have found the root cause of the issue reported by thebelcberman that impacting only the rpi users.

I have some commit to approve on github and will release a new.version as soon as I'm online with my computer. Stay tuned...

0 Likes 0 ·
fguiot avatar image
fguiot answered ·

Have just release version v3.1.8 (thx to @derrick thomas ) with support for rPI and ol d venus versions up to 2.92.

I'm away this week and have way to test it. Ping me if this is not working or breaking something

2 |3000

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

fguiot avatar image
fguiot answered ·

****** UPDATE Version 3.2 **********

Support for 2, 4, 8, and 16x relais modules.

Support up to 3x units.

Thanks to Thomas for adding the above

As we don't have all the units here to test, thanks in advance to report here your experience with the 16x relai version.

2 |3000

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

fguiot avatar image
fguiot answered ·

UPDATE Version 3.2.1 released

Removed option for 16x relay module. It will require different driver version

Added support for reading relays status and updating GUI. This option is set to default off in RemoteGPIO settings.


Thanks to @derrick thomas for his implication in the project!

2 |3000

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

Paul B avatar image
Paul B answered ·

Hi I have tried to install Remote GPIO

1. I added Remote GPIO in package manager from the inactive packages selection.

2. it has now been added to Active Packages however there seems to be some form of conflict with my 123SmartBMS-Venus package as per picture.

3. I have then tried to uninstalled the Remote GPIO but it seems to want to uninstall the 123smart package and not remote GPIO

Any suggestions ???


1712716689988.png


1712716689988.png (127.6 KiB)
1 comment
2 |3000

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

Kevin Windrem avatar image Kevin Windrem commented ·

The conflict is most likely /etc/udev/rules.d/serial-starter.rules.

Both packages are installing their own modifications to it hence the conflict.

The "resolve conflicts" action will uninstall the conflicting package so "this" package can proceed. I think that's probably what you are seeing since RemoteGPIO is not yet installed.

I think it may be possible for both packages to move your udev rules additions to a separate rules file so you don't need to modify the existing file.

Opened an issue for 123SmartBMS:

https://github.com/123electric/123SmartBMS-Venus/issues/26

and referenced this issue. The authors should discuss the solution directly.


0 Likes 0 ·
mosquito52 avatar image
mosquito52 answered ·
Good morning,
I proceeded with the "Blind" installation of "shetupHelper" as described in "setup", then in "inactive packages" I downloaded and installed "RemoteGPIO Lucifer06:main", but something went wrong as you can see in the photo.
I can't do anything at the moment, can someone please help?
thanks in advancescreenshot-2024-04-12-101959.jpg

4 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.

derrick thomas avatar image derrick thomas commented ·
After installing setuphelper, you must install Guimods. After that you will be able to install RemoteGPIO
0 Likes 0 ·
mosquito52 avatar image mosquito52 derrick thomas commented ·

Dear Derrick Thomas,

Thank You for Your help, the problem is when I try to install Guimods I got this, please see image attached! and no insttalation,screenshot-2024-04-12-184326.jpg

0 Likes 0 ·
derrick thomas avatar image derrick thomas mosquito52 commented ·
Make sure auto download and auto install are both enabled in the main package manager menus, then restart package manager and it should install.
0 Likes 0 ·
mosquito52 avatar image mosquito52 derrick thomas commented ·
Thanks again for the help, both are "on" and when restart package manager, will stay forever, is there a way to start from fresh?
0 Likes 0 ·
thebelcherman avatar image
thebelcherman answered ·

@fguiot

I know Fredrick has been globe hopping, but I've got Digital Input issue working on a RPi.

Running Venus 3.40~2

SetupHelper: v7.15

GuiMods: v10.20

ShutdownMonitor: v3.1

RemoteGPIO: v3.2.2

I'm a EE, that whores himself out to design whatever my clients need. Don't code for a living but I can make my way around. Saw what the issue was, and kludged it until the master makes it back home. Unless anyone wants to know, I won't even post how I fixed it. But certainly willing to do so. Love to be able to fix properly, but just don't possess the skills required.

Here's a pic of Active Packages

actpkgdigiputsworking.png


Here's a pic of the Digital inputs showing up in the console.

digitalinputsworking.png

Now off to play with them, being so new to this I don't even know what they're capable of :)


2 |3000

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

dkspringer avatar image
dkspringer answered ·

Thanks for all the work here folks. It really opens up some exciting opportunities for those of us who are less programming savvy.

Can anyone provide guidance on the specific relay box required? Is the Dingtian the only option? For example, is this Waveshare Modbus RTU box compatible with RemoteGPIO? How would I confirm or test? https://www.waveshare.com/modbus-rtu-relay.htm

I'm not clear how much of the setup is expected to be "plug and play", vs. needing to be configured in a certain way.

1 comment
2 |3000

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

fguiot avatar image fguiot commented ·

@DKSpringer only Dingtian modules are supported today. We will look at adding other brands at a later stage, and if it makes sense.

The aim is to provide a plug and play solution, with a small configuration prerequisite to do with the Dingtian graphical interface.


0 Likes 0 ·

Related Resources