DZMM Posted September 29, 2017 Share Posted September 29, 2017 I've tried and I've tried to run this file, but I can't get it to work: https://home-assistant.io/docs/ecosystem/hass-configurator/ Quote Copy configurator.py to your Home Assistant configuration directory (e.g /home/homeassistant/.homeassistant) Make it executable: sudo chmod 755 configurator.py (Optional) Set the GIT variable in configurator.py to True if GitPython is installed on your system. This is required if you want to make use of the Git integration. Execute it: sudo ./configurator.py To terminate the process do the usual CTRL+C, maybe once or twice When I try to do this I get: root@Highlander:/mnt/user/appdata/home-assistant# sudo chmod 755 configurator.py root@Highlander:/mnt/user/appdata/home-assistant# sudo ./configurator.py sudo: unable to execute ./configurator.py: No such file or directory What am I doing wrong? Thanks Quote Link to comment
MowMdown Posted September 30, 2017 Share Posted September 30, 2017 Are you running this inside the docker? Quote Link to comment
unevent Posted September 30, 2017 Share Posted September 30, 2017 That script is requiring python3 (first line, #!/usr/bin/python3). Not installed on unRAID by default and need to use the Nerd Pack to get it. This part of a plugin or Docker? Quote Link to comment
DZMM Posted September 30, 2017 Author Share Posted September 30, 2017 I'm trying to do this within putty. Thanks for the python3 heads up. I've just added this via need tools but it still doesn't work Quote Link to comment
CHBMB Posted September 30, 2017 Share Posted September 30, 2017 Sudo doesn't apply with Unraid, you're already logged in as root so no need to escalate privileges with sudo. Quote Link to comment
DZMM Posted October 4, 2017 Author Share Posted October 4, 2017 On 9/30/2017 at 8:48 AM, CHBMB said: Sudo doesn't apply with Unraid, you're already logged in as root so no need to escalate privileges with sudo. hmm still can't get it to work. I'm parking for now Quote Link to comment
BobPhoenix Posted October 4, 2017 Share Posted October 4, 2017 (edited) In your post above you have appdata in the directory path. Is your HomeAssistant in a docker container? If so you need to be at a bash prompt in the docker container when you type in your commands and the sudo may or may not be needed there. So enter the following to get to a bash prompt in your container: "docker exec -it <docker name> /bin/bash" Edited October 4, 2017 by BobPhoenix Quote Link to comment
DZMM Posted October 5, 2017 Author Share Posted October 5, 2017 11 hours ago, BobPhoenix said: In your post above you have appdata in the directory path. Is your HomeAssistant in a docker container? If so you need to be at a bash prompt in the docker container when you type in your commands and the sudo may or may not be needed there. So enter the following to get to a bash prompt in your container: "docker exec -it <docker name> /bin/bash" Not sure if I'm doing this right: root@Highlander:~# docker exec -it home-assistant /bin/bash ‘configurator.py’ /bin/bash: ‘configurator.py’: No such file or directory root@Highlander:~# docker exec -it home-assistant /bin/bash -c 'configurator.py' /bin/bash: configurator.py: command not found root@Highlander:~# docker exec -it home-assistant /bin/bash 'configurator.py' /bin/bash: configurator.py: No such file or directory root@Highlander:~# docker exec -it home-assistant /bin/bash root@Highlander:/usr/src/app# sudo configurator.py bash: sudo: command not found root@Highlander:/usr/src/app# configurator.py bash: configurator.py: command not found root@Highlander:/usr/src/app# ./configurator.py bash: ./configurator.py: No such file or directory root@Highlander:/usr/src/app# Quote Link to comment
BobPhoenix Posted October 5, 2017 Share Posted October 5, 2017 (edited) You first get into the docker with the "docker exec -it home-assistant /bin/bash". Then go looking with ls command and find your configurator.py command file. Then copy it to the correct location by looking for the path they want you to put it in. Then setup permissions correctly. SO: root@Highlander:~# docker exec -it home-assistant /bin/bash <-- has colored prompt for me root@Highlander:~# <find your py file here> <-- has all WHITE prompt if in putty after connecting above (let you know if you connected correctly) root@Highlander:~# <find your path to copy to here> <-- has all WHITE prompt blah blah blah root@Highlander:~# cp <your py file> <path> <-- has all WHITE prompt blah blah blah root@Highlander:~# <set file permissions here> <-- has all WHITE prompt blah blah blah root@Highlander:~# exit <-- has all WHITE prompt until you type exit and press enter root@Highlander:~# <--now back to color prompt If you can't find your py file it means it isn't inside your docker file space you might need to download it inside the docker or use Docker GUI in unraid to map a path to where the file IS. Then copy it. To download I believe you can use WGET. Edited October 5, 2017 by BobPhoenix Quote Link to comment
DZMM Posted October 6, 2017 Author Share Posted October 6, 2017 I don't think it's in the docker container - the configurator.py file is in the appdata folder. I've just tried the following and it still doesn't work: root@Highlander:/mnt/user/appdata/home-assistant# python ./configurator.py File "./configurator.py", line 1 !/usr/bin/python ^ SyntaxError: invalid syntax Quote Link to comment
Squid Posted October 6, 2017 Share Posted October 6, 2017 18 minutes ago, DZMM said: I don't think it's in the docker container - the configurator.py file is in the appdata folder. I've just tried the following and it still doesn't work: root@Highlander:/mnt/user/appdata/home-assistant# python ./configurator.py File "./configurator.py", line 1 !/usr/bin/python ^ SyntaxError: invalid syntax Are you sure you're not missing the # as the first character in the script? Quote Link to comment
unevent Posted October 6, 2017 Share Posted October 6, 2017 17 minutes ago, DZMM said: I don't think it's in the docker container - the configurator.py file is in the appdata folder. I've just tried the following and it still doesn't work: root@Highlander:/mnt/user/appdata/home-assistant# python ./configurator.py File "./configurator.py", line 1 !/usr/bin/python ^ SyntaxError: invalid syntax Let's rewind this a bit. Can you explain what you are trying to accomplish? This script, is it part of a Docker? If so which one? Explain what you are trying to accomplish and the forum will be able to better help you. What I have seen so far is you are trying to run a python script 'in the open' on unRAID. This is bad. Quote Link to comment
DZMM Posted October 6, 2017 Author Share Posted October 6, 2017 6 minutes ago, unevent said: Let's rewind this a bit. Can you explain what you are trying to accomplish? This script, is it part of a Docker? If so which one? Explain what you are trying to accomplish and the forum will be able to better help you. What I have seen so far is you are trying to run a python script 'in the open' on unRAID. This is bad. What I'm trying to achieve is in my original post - I've copied a file configurator.py to my appdata folder which is supposed to add new functionality to the home-assistant docker. If running it is a bad idea, I'll leave it alone. Using Unraid is my only real experience of running Linux (I've worked in the internet space for nearly 20 years, but I run products & P&Ls and don't code at all for a living) so this is all new to me. configurator.py Quote Link to comment
unevent Posted October 6, 2017 Share Posted October 6, 2017 32 minutes ago, DZMM said: What I'm trying to achieve is in my original post - I've copied a file configurator.py to my appdata folder which is supposed to add new functionality to the home-assistant docker. If running it is a bad idea, I'll leave it alone. Using Unraid is my only real experience of running Linux (I've worked in the internet space for nearly 20 years, but I run products & P&Ls and don't code at all for a living) so this is all new to me. configurator.py Reading up on this script it seems it provides a web-based interface to the configuration. Will need to know what Docker you are using to determine if you can use this script. Quote Link to comment
DZMM Posted October 6, 2017 Author Share Posted October 6, 2017 Just now, unevent said: Reading up on this script it seems it provides a web-based interface to the configuration. Will need to know what Docker you are using to determine if you can use this script. thanks for persevering! I'm using the official docker - https://hub.docker.com/r/homeassistant/home-assistant/ Quote Link to comment
unevent Posted October 6, 2017 Share Posted October 6, 2017 You will need to be in the Docker container to execute this script. Copy the 'configurator.py' script to your appdata config directory for the home assistant Docker. Before moving forward, you need to use a Linux text editor to edit the script and configure for your environment. Using 'mc' Midnight Commander on unRAID via Telnet/SSH is one way. Telnet/SSH to unRAID and issue the command below replacing 'container_name' with the name of the container as seen on the Docker tab in unRAID GUI: docker exec -ti container_name /bin/bash Assuming your folder map for config is '/config', verify the existence of the configurator.py script in the config folder: ls /config/conf*.py After verifying/locating the file, make the script executable: chmod +x /config/configurator.py Execute the script: cd /config ./configurator.py Follow the instructions from the Hass.io site. Quote Link to comment
benflux Posted November 10, 2018 Share Posted November 10, 2018 @DZMM did you ever get this working? Quote Link to comment
DZMM Posted November 10, 2018 Author Share Posted November 10, 2018 Nope can't remember why though Quote Link to comment
benflux Posted November 10, 2018 Share Posted November 10, 2018 I think you should have been getting the .py file into the docker itself (not the place where configuration.yaml exists in the appdata location) by going into the console relevant to the HA docker image, then pulling the file in there with a wget, but as far as executing it, I'm stuck there. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.