Help bash script return status

Hello to you
I’m sorry I’m French, and no English uses a translator.
uses domoticz I intend to switch to hassio definitely the only problem is that I can’t run a bash script to query my freebox player .
Domoticz no problem with the same script.

thank you for your help

#!/bin/bash
# BONNE NUIT
status=`curl -s 'http://192.168.0.10:54243/device.xml' | grep -oP '(?<=<modelDescription>).*?(?=</modelDescription>)'`
if [ "$status" = "Freebox UPnP Renderer" ]
then
current_Status="On"
else
current_Status="Off"
fi
if [ $current_Status = 'On' ]
then
curl "http://192.168.0.17/remote2.htm?button001"
curl "http://hd1.freebox.fr/pub/remote_control?code=12345678&key=power"
else
curl "http://192.168.0.17/remote2.htm?button001"

fi

Reading through your script, it looks like you may want the command line switch component. Take a look at this, see if it fits your needs:

Hello
thank you very much for your help thanks to you I have understood how I had to adapt my code so that it works I share it in case or someone wants to use it.
Thank you again and has soon.

:smile: