For a switch I configured a script action including some fixed values.
In my case I defined the tags " -a -b -c " are used in a Bash script. I can set those tags with a fixed value, for example " -a1 -b2 -c3 ".
So the result in the action line will be: script://test.sh -a1 -b2 -c3 (this works perfect)
My question is, how to change the fixed values 1, 2, 3 in a variable of an anther switch within Domoticz linked on the IDX of that switch. I tried several options but none worked. See for tag "c" below.
So the result in the action line will be script://test.sh -a1 -b2 -c${Idx45} this does not work ;-(
Idx45 is could be a value of a temperature setting.
Enyone who know how to solve this?
Including parameters in script action
Moderator: leecollings
- waltervl
- Posts: 5902
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Including parameters in script action
You cannot with action scripts. With dzvents you can run external commands like bash scripts with the executeShellCommand() function, see wiki page
https://www.domoticz.com/wiki/DzVents:_ ... _execution
https://www.domoticz.com/wiki/DzVents:_ ... _execution
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