Anyone using HA on Unraid? Need help with the dockers

I’ve officially switched my Home Assistant over to a docker container running on my Unraid server and have been having an impossible time trying to get an amazon dash docker set up to work with my Home Assistant. I’m not new to HA but I am new to Unraid and from what I can tell node.js isn’t running.

ANY help is much appreciated.

Your docker container handles the nodejs part. Your unraid host shouldn’t run anything but Docker for it.

1 Like

Are you using Unraid? I have the dasher docker running and the config set up the same way as i had it set up on my hass.io instance but it doesn’t seem to recognize the buttons push

docker is docker. I don’t run unraid, but the host shouldn’t matter.

did you bridge your ports? net=host? what settings did you use?

I’ve run HASS on Unraid Docker, I’ve run HASS on UnraidUbuntuVM. Both work fine, but trust me, making the move to RPI3 with HASS.IO was the best move I made.

It was always frustrating when Unraid did a parity check and stopped my house from functioning :slight_smile:

In addition to the network settings, did you check the config file from the docker instance to make sure it is correct? I’m running HA on Unraid but I’m not using the DashBtn docker. I’ll try to help as best as I can.

1 Like

I actually switched over from an Rpi3 to my Unraid server. I kept getting the timer out of sync error and my automations were running very slow and since I’ve made the switch I haven’t ran into a single timer error and my automations trigger and run instantly now. (Especially after setting up the docker to run off of my ssd cache drive)

I haven’t had my Home Assistant shut down yet during a parity check either

I tried setting up the DashBtn docker but wasn’t able to figure that one out.
I’ve been trying to get the dasher-docker working that I got from Hub Docker.

This is what I’ve been getting in the log.

root@Ghost:~# docker container logs dasher-docker

[email protected] start /root/dasher
node app.js

[2018-03-03T00:48:27.879Z] Doorbell added.
[2018-03-03T00:48:27.913Z] Power added.
[2018-03-03T00:48:27.942Z] Party added.
[2018-03-03T00:48:27.964Z] Gain added.
[2018-03-03T00:48:27.981Z] Cliff added.

[email protected] start /root/dasher
node app.js

warning: SIOCGIFADDR: ethX: No such device - this may not actually work
[Error: ethX: SIOCETHTOOL(ETHTOOL_GET_TS_INFO) ioctl failed: No such device]
Failed to create pcap session: couldn’t find devices to listen on.
Try running with elevated privileges via ‘sudo’
/root/dasher/node_modules/node-dash-button/index.js:28
throw new Error(‘Error: No devices to listen’);
^

Error: Error: No devices to listen
at create_session (/root/dasher/node_modules/node-dash-button/index.js:28:15)
at register (/root/dasher/node_modules/node-dash-button/index.js:47:24)
at new DasherButton (/root/dasher/lib/dasher.js:14:21)
at Object. (/root/dasher/app.js:8:16)
at Module._compile (module.js:410:26)
at Object.Module._extensions…js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)

npm ERR! Linux 4.14.16-unRAID
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “run” “start”
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script ‘node app.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the dasher package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs dasher
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls dasher
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/dasher/npm-debug.log

[email protected] start /root/dasher
node app.js

module.js:428
throw err;
^

SyntaxError: /root/dasher/config/config.json: Unexpected token #
at Object.parse (native)
at Object.Module._extensions…json (module.js:425:27)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/root/dasher/app.js:2:14)
at Module._compile (module.js:410:26)
at Object.Module._extensions…js (module.js:417:10)
at Module.load (module.js:344:32)

npm ERR! Linux 4.14.16-unRAID
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “run” “start”
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script ‘node app.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the dasher package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs dasher
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls dasher
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/dasher/npm-debug.log

[email protected] start /root/dasher
node app.js

[2018-03-03T00:51:49.084Z] Doorbell added.
[2018-03-03T00:51:49.511Z] Power added.
[2018-03-03T00:51:49.942Z] Party added.
[2018-03-03T00:51:50.351Z] Gain added.
[2018-03-03T00:51:50.766Z] Cliff added.

Check the interface configurations in your config.json, the warning message is complaining about

The network interfaces on your server should be labeled eth(some number), i.e. eth0 or eth1.

1 Like

Alright I didn’t realize it but I was using an old config.json file. I switched it with the correct one but still not able to get anything to work. Here’s the log file now.

root@Ghost:~# docker container logs dasher-docker

> [email protected] start /root/dasher
> node app.js

[2018-03-18T03:35:39.295Z] Doorbell added.
[2018-03-18T03:35:39.350Z] Power added.
[2018-03-18T03:35:39.387Z] Party added.
[2018-03-18T03:35:39.416Z] Gain added.
[2018-03-18T03:35:39.488Z] Cliff added.

Doesn’t show any errors coming up but doesn’t show any sign of the button being heard either.

So after hours of testing things the only thing I can get working is the dashbtn docker but I can’t for the life of me figure out how to get a dash button to send a command to home assistant using their methods. Can you help me out with this one?

Could you post your config.json file? If you connect to the docker container and run the “find_button” script, is your container seeing arp requests on your network?

Why did your containers stop during parity check? I’ve never had this problem.

2 Likes

I can’t find any documentation at all on how to set up a config for the DashBtn Docker. I tried using my config from the Dasher Docker but it didn’t work. Here’s the config that I tried though.

{"buttons":[
  {
    "name": "Doorbell",
    "address": "mac_address",
    "interface": "eth0",
    "url": "https://mydomain.duckdns.org/api/services/input_boolean/turn_on",
    "headers": "{\"x-ha-access\": \"mypassword\"}",
    "body": "{\"entity_id\": \"input_boolean.doorbell\"}"
  },
  {
    "name": "Power",
    "address": "mac_address",
    "interface": "eth0",
    "url": "https://mydomain.duckdns.org/api/services/input_boolean/turn_on",
    "headers": "{\"x-ha-access\": \"mypassword\"}",
    "body": "{\"entity_id\": \"input_boolean.power\"}"
  }
]}

Have you tried putting the IP address instead of the DDNS domain in the URL in your config for Dasher?

The DashBtn container has directions for setting it up in the container configuration page. DashBtn utilizes scripts, where Dasher can use HTTP services and scripts. It might be more work for you to switch now.

1 Like

Alright I’ll try switching out the domain name for the IP address. I still feel like the node.js isn’t running in Dasher though

If you want to be sure node.js is running, you can log in the container and run ps aux and top to verify. The dockerfile tells docker to take care of the node.js part like flamingm0e said. If you have not done so while you are in the container I would run the find_button script to make sure your docker container is hearing the buttons on the network.

Ok so I tried everything and this was the results

when I run script/find_button nothing comes up when I push the dash button. I tried it on five different ones and even tried resetting them all and reconnecting to the network. I’m able to get the mac address for the buttons by connecting to their network and then opening the ip address in a browser on my iphone so I know I have the right mac addresses. But judging by the find_button script it’s not even seeing the button presses let alone anything else.

This is what I’ve switched a couple of buttons out with in the config.json file

  {
    "name": "Gain",
    "address": "buttons_mac_address",
    "interface": "eth0",
    "url": "http://192.168.1.9:8123/api/services/light/toggle",
    "method": "POST",
    "headers": {"authorization": "mypassword"},
    "json": true,
    "body": {"entity_id": "light.tv_lamps"}
  },
  {
    "name": "Cliff",
    "address": "buttons_mac_address",
    "interface": "eth0",
    "debug": true
  },

Hmmm what do you have set for the network type in the container settings? It should be set as host, bridge will not work in this case. You should be at least seeing arp requests from other devices on the network, if nothing from the button.

1 Like

ahhhhh! I’ve been running it in bridge mode this whole time because that’s what it was set to initially and all of the little bit of documentation I’ve been able to find showed it as bridge. I’ll switch and try it out right now thank you!