Introducing Hass.io

This is exactly what I’m looking for. I want to run home assistant in a alpine container on my pi zero w with zwave configured. Specifically alpine because it so much of a smaller foot print.

This looks fantastic. I installed it on a separate SD card on my Pi and everything seems to be running smoothly, but I can’t really use it yet because I need to figure out how to get the SmartThings MQTT bridge running. All my physical Z-wave and Zigbee devices are bound to my SmartThings hub, which sends events to the ST-MQTT bridge which in turn sends them to the MQTT broker. Sounds convoluted but it works great, and a lot of ex-SmartThings people use this setup.

I’m not very familiar with Resin or Docker, but if I get some time I may try to hack away at it. Would be great to hear if someone’s already working on this :slight_smile:

Just finished today SmartThings setup https://github.com/vkorn/hassio-addons/tree/master/smartthings

2 Likes

My hero!

Will try it tonight.

How the heck do I see the HA logs if HA won’t start? I made a change to my configs and now I can’t access the web UI. I’m SSH’d into my server (fortunately I had installed the SSH add-on), but I can’t find where HA is. “docker” isn’t a command recognized by the shell.

Help?

EDIT: Never mind I found the logs in /config. Didn’t realize I was SSH’d into the docker container.

So I think I fixed the problem, but how do I manually start HA from within the docker container?

I tried adding your repo path to the Add-On Repositories field in the Hass.io add-ons panel, but nothing happens when I click Save.

Because they’re not prebuilt, as it mentioned there :wink: Just clone repo, put smarthings addon into /addons folder of your hassio and you’ll see “Local addons” after.

Oops :blush: I didn’t go up to your repo root and check the README.

I thought I got it installed but actually it isn’t working…I do see it now and am presented with the Install button, but after clicking the button and the button spinning for a few seconds, it turns red and then reverts back to the blue “Install”. In the end, the add-ons panel says SmartThings MQTT Bridge is not installed. I’m looking through my logs but haven’t found anything helpful yet.

Btw, if you’re reconfiguring your SmartThings hub, it might be the case that you will see it working only 1 way: HASS was receiving everything but couldn’t set anything. I had to simply re-save SmartApp in ST IDE. Seems that it’s a common issue, at least many people were reporting it on ST forum.

1 Like

If it’s only few seconds before turning red – you should see something in Supervisor logs. If it’s more than minute, than it’s just building (should take around 5-6 minutes).

It’s only a few seconds. Here’s what i see in the Supervisor logs:

17-06-30 01:10:56 INFO (Thread-1) [hassio.dock.addon] Start build local/armhf-addon-smartthings:0.0.2 on /data/addons/build/local_smartthings
17-06-30 01:11:02 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 417, in start
    resp = yield from self._request_handler(request)
  File "/usr/lib/python3.5/site-packages/aiohttp/web.py", line 289, in _handle
    resp = yield from handler(request)
  File "/usr/lib/python3.5/site-packages/hassio/api/util.py", line 30, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/lib/python3.5/site-packages/hassio/api/addons.py", line 98, in install
    self.addons.install(addon, version), loop=self.loop)
  File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/usr/lib/python3.5/site-packages/hassio/addons/__init__.py", line 128, in install
    if not await addon_docker.install(version):
  File "/usr/lib/python3.5/site-packages/hassio/dock/__init__.py", line 57, in install
    return await self.loop.run_in_executor(None, self._install, tag)
  File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.5/site-packages/hassio/dock/addon.py", line 138, in _install
    return self._build(tag)
  File "/usr/lib/python3.5/site-packages/hassio/dock/addon.py", line 181, in _build
    path=str(build_dir), tag=build_tag, pull=True)
  File "/usr/lib/python3.5/site-packages/docker/models/images.py", line 172, in build
    raise BuildError(chunk['error'])
docker.errors.BuildError: The command '/bin/sh -c apk add --no-cache jq nodejs nodejs-npm 	&& npm install -g smartthings-mqtt-bridge mustache' returned a non-zero code: 1

Do you have ssh access to host machine? Not through SSH addon but directly?

No, but I was just trying to figure that out. I’m new to ResinOS. It responds to a request on Resin’s default SSH port (22222) but it asks for a password, and I never set one. I’ve been digging around on what the default might be but I can’t find it. One part of their docs indicate you can SSH in, but don’t tell you the default password. And then their FAQ says you can’t SSH to the host OS at all.

Here is details about configuration https://home-assistant.io/hassio/debugging/

I’ll try to build images today to make it easier, but only thing I could think of is that maybe you’re not using latest Supervisor?

I wasn’t using the latest Supervisor, somehow, even though I just installed all of this yesterday. Got that updated, but now the Smartthings add-on is in a weird installed/not-installed state. On the add-ons list, it says it’s “uninstalled”. But when I click into it, I see this:

Clicking Uninstall has no effect; neither does Start or Update. The Supervisor logs simply show “Addon is not installed”.

I tried deleting it and re-uploading it (via Samba) to the add-ons folder, no change.

Thanks for the link on the host OS SSH access, I’ll work on that.

This happens with recent version due to caching. Just bump manually version in config.json and re-upload on Samba.

P.S. I’m working on docker build. Will be ready today maybe.

Ok, I’ve done building ST docker, you can use repo https://github.com/vkorn/hassio-addons now. Other addons are not ready yet, will finish today, if you’re interested in any )

Thanks so much for your quick responses! I’m back at work and heading out of town soon, but I will give it a try as soon as I can. Really looking forward to getting my setup migrated to Hass.io.

Got it successfully installed and running, thanks.

I can’t get SmartThings and HA talking to each other though. Mosquitto is running, and I see in its logs that the home-assistant client is connecting to it.

The SmartThings Bridge is running, it appears to successfully connect to MQTT as well (info: Connecting to MQTT at mqtt://172.17.0.1:1883). The Bridge is successfully receiving messages from SmartThings – I see all the activity in Bridge logs.

However, Home Assistant is not responding to those events, and I don’t see the messages in the Mosquitto logs (should I?). If I turn on a light from my SmartThings iOS app, I see the message in the Bridge, but Home Assistant UI doesn’t reflect that the light is turned on. Similarly, if I turn on the light from Home Assistant UI, nothing happens at all.

It seems like my Mosquitto might be the problem, but I don’t see anything wrong in the logs. It’s running anonymous/unsecure for now until I can get everything talking. I also tried setting a username/password in Mosquitto config, and in the Bridge config, but I get the same behavior.

Any ideas?

EDIT: Aaaand it just started working after some more random restarting of services. :grin:

It’s indeed required to restart HA for some reason. Glad it works now :slight_smile: