For a small project I want to switch a 230V pump with Raspberry-Pi and 3-5 temperature sensors. I got the DS18B20 but gut stuck with the address ID problem viewtopic.php?t=39559 (please do not respond here)
For the switching of the pump I want to use a small 2-way relais board with USB.
The USB-Relay-2 board is described at GitHub https://github.com/pavel-a/usb-relay-hid and with the V-USB Wiki page.
i have no programming skills but got so far that I can switch them off / on from the cmd prompt
Can someone help me with a way I can switch them on/off from Domoticz, with a script etc? or maybe from a dummy switch, who calls a script ?
I got some extra info from this location, including drivers https://github.com/bbqkees/Domoticz-Pi- ... -solutions But I can't get step 2 to work.
All help and info is much appreciated!!
USB-Relay-2 programming
Moderator: leecollings
-
njlammerts
- Posts: 153
- Joined: Wednesday 12 August 2020 17:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Fryslan
- Contact:
- waltervl
- Posts: 6689
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: USB-Relay-2 programming
You can make a virtual switch per relay and put this commands in a bash script that you can use in action script. But for that you need to make rise commands run without sudo to be sure it will run from Domoticz (depends on your Domoticz install).
For that you need those udev rules.....
So summary.
1. Set udev rules
2. Make bash scripts to use in Domoticz https://www.domoticz.com/wiki/Scripting ... ua_Scripts
3. Make virtual switches on Domoticz https://www.domoticz.com/wiki/Dummy_for ... l_Switches
4. Link switches to bash scripts. Edit device and please on and of script link in the on and off action field.
For that you need those udev rules.....
So summary.
1. Set udev rules
2. Make bash scripts to use in Domoticz https://www.domoticz.com/wiki/Scripting ... ua_Scripts
3. Make virtual switches on Domoticz https://www.domoticz.com/wiki/Dummy_for ... l_Switches
4. Link switches to bash scripts. Edit device and please on and of script link in the on and off action field.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest