I was looking into doing some home automation in my small townhouse and I have a couple of question before purchasing all my planned equipment.
To give you a little background about me, I am located in Paris France, and have always be IT curious. Though I have not studied IT, I am capable of doing some basic system administration (I self-hosted myself for 5 years), and have some basinc programming capacity (in the old days, C & C++, now python).
I though about getting into home automation and I would start by simple project before going further. This includes (in planned order) :
Inside Light control (phillips& ikea mainly)
Integration with google home
Electrical radiator through pilot wire control with a thermostat
Outside light control with detectors
Automatic garden watering
At first, I was planning on going full zigbee as it seems to be the ramping tech today, but it seems there are a lot of product that are not compatible yet (pilot for radiators, gardening). So I guess I will have to add z-wave and maybe other tech as well. I did not see any dongle that are bother zigbee and zwave compatible in EU, so I guess I have to purchase two. For now, I was thinking of conBee II & Everspring SA413 as they seem rather well supported.
Also, I was thinking of using Hass.io with a RP4, but I have a couple of old laptops that could be recycled. Would it be a good idea to start with that ? Think what OS should I install ? I saw that Debian do not natively support the needed python version so maybe ubuntu is a better choice ?
Is it possible to integrated both W-wave and zibe ? That is controlling a zigbee light using a zwave switch through home assistant ?
I saw a lot of automation example, some using a king od graphic interface (I think there is a default one and also Node-RED was mentioned a lot) , other YAML config files. What is (if it exist) today’s standard ? Any recommendation ?
Thanks for you help, I look forward to starting !
Old laptops are excellent. They have a built in UPS if the battery is in reasonable condition.
A lot of folks go for ubuntu server LTS, but it’s not that important.
Yes it is. This is one of the main advantages of home assistant. It’s a hub for hubs. Plug in a zwave and zigbee usb stick and you can control one from the other.
Personal choice. I prefer YAML, some prefer NodeRed, some prefer the Automation UI. There’s also appdaemon.
There are countless of options if you check the installation docs, there’s no “best” method to install. Hass.io is often used by new users as it is easy to setup, but limited at some points. The “normal” docker method is a bit less limited and installing it in a VENV is “unlimited”.
Yes, you add the devices to home assistant and the automations in home assistant can combine devices from different manufacturers, protocols etc. it doesn’t care if it is a ZigBee Light or Z-Wave or WiFi or whatever.
There’s no standard, most beginners probably use the Home Assistant’s inbuild automations. Node-Red has a graphical approach to automations and is also very famous, but I never used it. Then there’s also AppDaemon, which is I would say for more advanced users and you do all the automations there in Python, I have a lot of experience with it and think it’s awesome once automations get a bit more complex and especially if you want reusable automations.
This is an excellent choice, using it for more than 2 years and had little to no issues.
Where did you see that? Everything I see about minimum Python requirements indicates that HA is fine with Python 3.7. The lastest stable Debian version (Debian 10, aka “Buster”) ships Python 3.7.
Thank you all for your answers, I guess I will look more into node-red and AppDeamon that looks very interesting.
True, Buster is Out now :-p. I also use Yunohost (an OS for automating some server things like app installation which is still on the previous version of debian). But I guess it will not evolve as fast as HA
Also, did anyone tried out enoceant ? they have a couple of batriless switches and radiator controller that looks neat.
Hi guys,
As my home server is under Stretch, I though using Docker would be the best option as I will be able to run the latest version without thinking of lib (python) compatibility.
The installation went smoothly and I can access the webapp though the local ip address of the server on port 8123.
Today I received my everspring controler (listed compatible in the HA doc) and found it was mapped om /dev/ttyACM0
I am not familiar with docker (using it for the first time, but learning ) and chose to use docker composer.
OK, I guess it is the config directory that is there. And then it kindda make sense to keep the docker-compose file close to the cofi directory.
Thanks again for the explanations !
Hi Again !
I did not intend post again this fast but… (I might not doing things properly), I am having trouble finding good documentation for home assistant. Everything seems to be be for HASS.io :-/
I connected my first Zigbee & Z-wave nodes and wanted to go through some basic automation tests.
After giving it a little thought, I was thinking of using node-red as my main automation tool.
but, with vanilla HA, there is no pluggin to install it.
So I went ahead and installed node-red (v 1.0.3) with docker-compose using this config file :
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2c5607db61ba nodered/node-red:latest "npm start -- --user…" 9 minutes ago Up 9 minutes 0.0.0.0:1880->1880/tcp node_r_node-red_1
5290a804caaf homeassistant/home-assistant:stable "/bin/entry.sh pytho…" 29 hours ago Up 3 hours home-assistant
eb8778a63570 hello-world
Now I have tzo problem. I tied updating the docker compose file for changing the TimeZone (TZ) but I have this message :
$ docker-compose up -d
Recreating 2c5607db61ba_node_r_node-red_1 ... error
ERROR: for 2c5607db61ba_node_r_node-red_1 Cannot create container for service node-red: invalid volume specification: '518bf848cf997c34c4f8722c60a9ee1e6a643fa3e3126af466f2a1458e5bbb1e:node-red-data:rw': invalid mount config for type "volume": invalid mount path: 'node-red-data' mount path must be absolute
ERROR: for node-red Cannot create container for service node-red: invalid volume specification: '518bf848cf997c34c4f8722c60a9ee1e6a643fa3e3126af466f2a1458e5bbb1e:node-red-data:rw': invalid mount config for type "volume": invalid mount path: 'node-red-data' mount path must be absolute
ERROR: Encountered errors while bringing up the project.
And, for the few seconds node was running, I could not see it in HA, is there a way to link them, I cannot find anything about it ?
EDIT : additional points :
I would prefer having the Volume (so I guess , the configuration) in the /opt/Docker/Node_R, but as there are two Volumes in the docker-compose file, I left the default config.
I saw in a forum post that to connect NR and HA, I need to install the HA palet in NR. And also allow a kind of iframe in HA (but I don’t know yet how to do this one).
I am going forward, I succeded on restarting my node red container and installink the long life tocken home assistant palet.
Now I would like tree things :
Secure my node red access (according to the doc I need to edit the setting.js file which is in my persistent volume
start some automation
get node red in the HA interface
1. Secure node red
i think my file in in my persistent volume that is weirdly called node_r_node-red-data
$ docker volume ls
DRIVER VOLUME NAME
local 299e9bbdc9d32b5cef7c0f998b4bf0c14811ea9b459b192bebb4bde26ca66208
local 518bf848cf997c34c4f8722c60a9ee1e6a643fa3e3126af466f2a1458e5bbb1e
local node_r_node-red-data
How to access it ? I found online that it should be in the /var/lib/docker/volumes/node_r_node-red-data folder but this one contains just a _data folder that is empty… how should I go forward ?
2. automation
I created an event:state node, tries to connect to my home assistant server (providing the IP address with the port and longlife token that was created using the web interface in home assistant)
But I then get the
cannot GET /undefinedhomeassistant/entities
error. I am not sure what is wrong here. I trie the fix that apparently works for HASS (deploying any flow), but it did not work in my case
3. NR in HA interface
I tried to google it but could find any interesting answer. I am not sure how to proceed
Like this the data from Home Assistant will be in /opt/Docker_img/HA/ and the data from node-red in /opt/Docker_img/Node-Red/. This post from @flamingm0e might be helpful for you.
thanks for the post.
So I should have installed node-red and home assistant altogether using a single file ?
Is it too late now ? I am so confuse by docker although I guess in understand your config file.
That’s the purpose of docker-compose, to run multiple containers
No, stop your docker containers, remove the node red containers then add the nodered part to the home assistant docker-compose file, start it again and done.
I suggest reading up on docker, docker-compose and then take a look at the post I linked to get a better understanding.
so now all persistent data should be in the /opt/Docker/* folders
did a docker-compose up -d but I got a :
/opt/Docker# docker-compose up -d
Creating home-assistant ... error
ERROR: for home-assistant Cannot create container for service homeassistant: Conflict. The container name "/home-assistant" is already in use by container "5290a804caafa47f4278061d5115f108aab7f9bffdc550807e89440e24164f7d". You have to remove (or rename) that container to be able to reuse that name.
ERROR: for homeassistant Cannot create container for service homeassistant: Conflict. The container name "/home-assistant" is already in use by container "5290a804caafa47f4278061d5115f108aab7f9bffdc550807e89440e24164f7d". You have to remove (or rename) that container to be able to reuse that name.
ERROR: Encountered errors while bringing up the project.
Of course I already have a homeassistant service from the container I stopped, but why cant I reload it with the new configuration ?
If I just do a
docker start home-assistant
It seems all my data is lost in the container (like if I had just created the container, no admin account yet). I guess it is normal since my directory names chaged a little but… Docker is confusing
Doesn’t look like you stopped the home assistant container. If you stop the docker-compose with docker-compose down and then do docker container ls, there should be no container showing up. Then do docker-compose up -d again.
If you did not configure anything yet in home assistant, I would suggest removing all containers, volumes, images and start from scratch with the docker-compose file you posted.
This is what I eventually did. (But I would ha like to avoid doing so to understand better what I was doing)
Once done though, since my config files were already used, I recover all my HA as I left it.
Actually, since I did it, I got additional hard shipped, (my zigbee gateway) which… needs an additional container (Deconz) to work.