Hello,
I have several ON/OFF switches, launching the same (bash) action script when turning on.
Question: What can I do, in the script, to identify the switch which triggered it ??
Take care,
Olivier
Device identification in script
Moderators: leecollings, remb0
-
- Posts: 73
- Joined: Wednesday 16 September 2015 22:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Paris area, France
- Contact:
Device identification in script
Paris area
Raspberry Pi 4 - RFXComm 433 - IrTrans - Zwave
Raspberry Pi 4 - RFXComm 433 - IrTrans - Zwave
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Device identification in script
Assuming you use the On action field of the devices for this; set it to something like
script:///<full qualified scriptName> <name of your device>
and in the bash script use something like
Code: Select all
parm=${1:-empty}
echo $parm >> /usr/local/domotica/data/parmTest.log
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 73
- Joined: Wednesday 16 September 2015 22:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Paris area, France
- Contact:
Re: Device identification in script
Thank you, that would do it ! I will try this first thing in the morning tomorrow !
Edit: Saturday, noon: That indeed works!
Edit: Saturday, noon: That indeed works!
Paris area
Raspberry Pi 4 - RFXComm 433 - IrTrans - Zwave
Raspberry Pi 4 - RFXComm 433 - IrTrans - Zwave
Who is online
Users browsing this forum: Google [Bot] and 1 guest