-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hassio addon #76
Hassio addon #76
Conversation
Thanks! There is something I'm not understanding though: why won't usb PLM's work? Aren't serial and usb basically both /dev devices? Wouldn't that be the same for both serial and usb devices? And don't people have to edit the config.yaml to point at their devices anyway? It might help if there were a set of instructions for hassio users for how to go about setting this up. I'd prefer to not have these files at the top level. Having config.yaml and config.json in the same dir is going to be confusing. Perhaps a 'hassio' sub-directory? You can leave them as is for now - I can move them after merging. Another question: Why copy from from /opt/insteon-mqtt to /config/insteon-mqtt in entrypoint.sh? Does that have any implication for the log and data file paths in config.yaml? |
I should have said I'm not sure if they'll work - it really depends on if the OS detects them as UART devices. I have the
So that might just work (especially if the USB PLMs are detected as ttyUSBx), however I can't verify that. I'll write up some instructions for setting this up and add them in. For the file locations - I moved the config.json and entrypoint.sh, however the Dockerfile has to stay at the root because the context has to include the entire repo, otherwise I cannot copy it into the image. Hassio uses |
I've got this running with an Insteon PLM (2413U) in hassio. Only issue I ran into was the mqtt broker. New to hassio and wasn't obvious that the broker ip is 172.17.0.1 for the add-on. Now to make it do things. I'll let you know if I find anything else. |
I have this working on hassio and a 2413U, so far so good. |
@lnr0626 what's the best way to remove the your user name from the docker file? I'm not a docker user so I could use some help. I'm guess I need to build those images and upload them myself every time I update the version number? |
It should be decently straightforward. Do you have an account on dockerhub? And do you have docker installed on the machine you use for development? Once you have those, you'll need to create 4 repositories in dockerhub (sorry, didn't know of a good way to automate this), the names are:
With that, you should be able to update this line and this line with your dockerhub username, log into dockerhub on your machine ( Let me know if you run into any issues, I'm happy to help. |
Thanks. I installed docker-ce, created an account on dockerhub, built the 4 repos (https://hub.docker.com/u/td22057/), docker login worked, and then I tried to run the create script. When I do, I get these errors. Any ideas?
|
I found the experimental tag on the server and got past that. Now I'm getting this error:
|
I've not seen that error before. I just double checked and the only setting I've customized is the experimental features (sorry about forgetting to mention that). My first thought would be to try updating pip - to do that, update the run command in the Dockerfile to:
What OS are you working on? My second thought is it's something OS specific. |
Thanks - no luck. Same error. I'm running Ubuntu 16.04LTS. I tried w/ my local insteon-mqtt venv active and without it active. I also tried running as su, removing my local /opt/insteon-mqtt, still get the same error. |
Here is the whole output in case that helps:
|
I'll spin up a VM and see if i can reproduce that error tomorrow. The things I'm seeing that it might be are if you're on a VM and using a shared folder (but it sounds like this isn't the case), or something with storage. To help figure out what's going on, you can run this command in the insteaon-mqtt directory and it'll give you a shell into a container so you can run the commands interactively:
One flag to add to the pip commands that might (but probably won't help) is the If that doesn't work, a possible workaround to try would be to switch to the vfs storage driver (steps are here: https://docs.docker.com/storage/storagedriver/vfs-driver/). |
I tried the shell. I can create a venv, install the dependencies manually (pip install ...). But the moment I try to install insteon-mqtt, I get the same python3 error. Errno 95 is a socket endpoint error so I thought the VFS option might help but it doesn't change the result. Same error. |
What version of docker are you running? |
I'm not able to reproduce it in a vm :-( |
Docker version 18.06.1-ce, build e68fc7a
Thanks for the attempt. I'm going to go back to the HA add on build instructions and try starting from scratch with those and see what happens. |
I believe that this will work for serial PLMs, but not usb PLMs as is - hassio requires all mapped devices to be present, and so if users do not use a USB plm and we specify that /dev/ttyUSB0 (or w/e the device path is) should be mapped, the docker container will fail to start.
I added a script to build and push the docker containers, however we'll have to change the image repositories to something that makes sense.
To use it currently, users would have to copy the config.json into /addons/insteon-mqtt/config.json, add any device mappings the need (such as /dev/ttyUSB0), and install it from the local repo. Once the pip publishing/packaging stuff is done it would probably make sense to try to move this into the hassio community addons repo.