Hey,
i’m trying to use a shell sensor. I need to put a variable from pimatic at the end of the command string. Is this possible at the moment? Like this:
command: /usr/local/bin/dreambox_status.sh $dreambox_ip
Regards daice
Use variables in Shell Sensor command string
Hey,
i’m trying to use a shell sensor. I need to put a variable from pimatic at the end of the command string. Is this possible at the moment? Like this:
command: /usr/local/bin/dreambox_status.sh $dreambox_ip
Regards daice
@daice No, this is currently not supported. It might be added as an option, e.g. an additional option to indicate whether or not the command string should be evaluated as an expression. I’ll move this topic to feature requests
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@Heizelmann Thanks for the reference. I didn’t find it right away
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
/usr/local/bin/dreambox_status.sh & curl -s http://username:password@192.168.X.X/api/variables/dreambox_ip | jq '.variable.value'
Output would be(i dont know your script ofc):
Online 192.168.178.10
Please note the “&”, this is to execute at the same time. Replace with your details and dont forget to install jq