Dear HA community,
I’m using shell command to send RPC commands (https://community.shelly.cloud/topic/1793-walldisplay-list-for-useful-rpc-commands/) to my Shelly WallDisplay. In order to store my passwords in secrets.yaml, the only option was to include the whole command in secrets.yaml.
This is what worked so far for the RPC command http://IP_WD/rpc/Ui.Tap?x=300&y=600
:
configuration.yaml:
shell_command:
walldisplay_windfang_wakeup: !secret walldisplay_windfang_wakeup
secrets.yaml:
walldisplay_windfang_wakeup: "curl --digest -u admin:XXX 'http://192.168.XXX.XXX/rpc/Ui.Tap?x=1&y=1'"
However, I cannot handle the RPC command http://IP_WD/rpc/Ui.Screen.Set?params={"on":true}
due to the additional “quotes”. All tried versions did not work:
secrets.yaml:
walldisplay_windfang_screen_on: 'curl --digest -u admin:XXX ''http://192.168.XXX.XXX/rpc/Ui.Screen.Set?params={"on":true}'''
walldisplay_windfang_screen_on2: "curl --digest -u admin:XXX 'http://192.168.XXX.XXX/rpc/Ui.Screen.Set?params={\"on\":true}'"
walldisplay_windfang_screen_on3: "curl --digest -u admin:XXX 'http://192.168.XXX.XXX/rpc/Ui.Screen.Set?params={''on'':true}'"
Feedback is
stdout: >-
{"code":401,"message":"{\"auth_type\":\"digest\",\"nonce\":XXXXXXXXXX,\"nc\":\"1\",\"realm\":\"ShellyWallDisplay-XXXXXXXXXX\",\"algorithm\":\"SHA-256\"}"}
stderr: "% Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\r100 156 100 156 0 0 2823 0 --:--:-- --:--:-- --:--:-- 2836\n\r100 156 100 156 0 0 907 0 --:--:-- --:--:-- --:--:-- 907"
returncode: 0
for version 1 and
stdout: >-
{"code":-103,"message":"Method Ui.Screen.Set failed: Missing required argument
`on'!"}
stderr: "% Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\r100 156 100 156 0 0 4973 0 --:--:-- --:--:-- --:--:-- 5032\n\r100 86 100 86 0 0 824 0 --:--:-- --:--:-- --:--:-- 824"
returncode: 0
for versions 2 and 3.
Any ideas?
Thank you, a lot, in advance for helping me!