Hello there,
I have a python script that I have used before 3 years ago. based on this thread. I have placed the script into the folder and it appears in my developer tools. My question is how do I pass on arguments to it. Below are what I want to pass. I am using the yaml service data under developer tools. Essentially I want to run my script like this foscam2mqtt.py -N casita -H 192.168.100.100 -p 88 -u admin -w camera pass -M mqtt host -P 1883 -U mqttuser -W mqttpass
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("-N", "--name", help="foscam camera name")
parser.add_argument("-H", "--host", help="foscam camera host/ip")
parser.add_argument("-p", "--port", help="foscam camera port", type=int)
parser.add_argument("-u", "--username", help="foscam camera username")
parser.add_argument("-w", "--password", help="foscam camera password")
parser.add_argument("-M", "--mqtthost", help="mqtt host")
parser.add_argument("-P", "--mqttport", help="mqtt port", type=int)
parser.add_argument("-U", "--mqttusername", help="mqtt camera username")
parser.add_argument("-W", "--mqttpassword", help="mqtt camera password")
parser.add_argument("-v", "--verbose", action="store_true",
help="increase output verbosity")
return parser.parse_args()
Thoroughly. And I used the script three years ago. I am trying to run the script with arguments. Before I did this in the configuration.yaml now I am trying to do it in developer tools. I am not sure how to pass the arguments from the yaml service data in developer tools to the script. I also cannot find documentation on how to run a script with arguments from the config.yaml. And I cannot remember how I did it before.
I am running supervised. What was hassio. In a virtual machine. What is the path for the config folder EDIT THIS IS FOUND ON THE INFO PAGE OF THE CONFIGURATION TAB.