Hass.io Add-on: room-assistant

hassio-addon
Tags: #<Tag:0x00007fd078bb7538>

#1

Hey all,

version 1.0 of room-assistant is finally out! :tada: And with it comes support for Hassio. I hope you’ll find it useful - if you run into issues either let me know here or create a new ticket on GitHub.

Find all the details on the GitHub page: https://github.com/mKeRix/room-assistant

What is room-assistant?

room-assistant is a simple Node.js server for tracking presence and other things on a per-room basis. You can use it to track Bluetooth beacons moving around your house together with the mqtt_room component, or to get GPIO or shell command output from other hosts into Home Assistant.

It is the ideal little helper for bringing your automations down to a room by room level!

Running room-assistant

You can run room-assistant on every machine that supports NodeJS or Docker - this includes all Raspberry Pis. We provide detailed instruction for running it directly with NodeJS, Docker and Hassio on GitHub.


#3

Can i put this on a raspberry pi w? How does it detect and how fast does it respond?


#4

Yes, you can! In theory anything that can run Node.js can also run room-assistant. Only thing you need to watch out for is making sure to install a current version of Node on the Pi W, there are a few guides online on how to get this done.

Detection can be done in multiple ways… e.g. I use PIR motion sensors via GPIO and bluetooth beacons at my home currently, but am in the process of trying D6T thermal sensors as replacement for carrying beacons. Really depends on what exactly what you want to achieve. Reaction speed depends on what you configure, for Bluetooth you can calculate with about a second for most setups (but can be quicker), PIR and D6T should be under a second.


#6

warning wanring…incoming NOOB alert. :smiley:
okay so I have hassio addon installed. up and running.
I have a sensor setup in my config

  • platform: mqtt_room
    device_id: Living_room
    away_timeout: 30
    name: “Living_Room_Presence”

now the next question… how do I figure out what devices are in the living room. for example I always have my iphone on me or my garmin watch. do I need to do something to them to get them to send data to the room?. will they show up as a sensor in the system?

my addon config is as follows

{
“services”: [
“mqtt”,
“ble”
],
“room”: “living-room”,
“mqtt”: {
“url”: “mqtt://10.0.1.44”,
“username”: “Admin”,
“password”: “XXXXX!”,
“rejectUnauthorized”: true
},
“ble”: {
“channel”: “room_presence”,
“useAddress”: false,
“whitelist”: [],
“maxDistance”: 10,
“updateFrequency”: 0,
“processIBeacon”: true,
“onlyIBeacon”: false,
“majorMask”: “0xFFFF”,
“minorMask”: “0xFFFF”
},
“gpio”: [],
“shell”: [],
“autoDiscovery”: true
}


#7

Hey,

If this could work on an ESP32 it would be ace, plus the esp32 has BT and wifi plus a whole ton of gpio.

Just an idea.


#8

agreed. then i could buy a heap of them :slight_smile:


#9

I am having a heck of a time getting Room Assistant to send to my hassio MQTT server. My MQTT server is at 192.168.1.100 and has SSL turned on. Many things already connect and send things to it successfully. I’ve installed Room Assistant on a Raspberry Pi Zero W and set it all up, but it’s not sending anything to the MQTT server. Here is my config at ~/room-assistant/config/local.json (I’ve also tried mqtt: instead of mqtts: with the same results. Nothing ever appears to be sent. I thought adding the “console” service would display debugging information to the SSH console, but nothing is seen at all. What am I missing? A status gives this:

[email protected]:~/room-assistant $ systemctl status room-assistant.service
room-assistant.service - Room Assistant service
Loaded: loaded (/etc/systemd/system/room-assistant.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) since Tue 2019-01-22 23:44:49 GMT; 4s ago
Process: 1993 ExecStart=/usr/bin/npm start (code=exited, status=0/SUCCESS)
Main PID: 1993 (code=exited, status=0/SUCCESS)

Here is the config/local.json:

{
  "services": ["console", "mqtt", "ble"],
  "room": "living-room",
  "autoDiscovery": true,
  "mqtt": {
    "url": "mqtts://192.168.1.100",
    "username": {redacted username},
    "password":{redacted password},
    "rejectUnauthorized": false
  },
  "ble": {
    "channel": "room_presence",
    "useAddress": true,
    "whitelist": [],
    "whitelistRegex": false,
    "txPowerOverride": {},
    "maxDistance": 0,
    "updateFrequency": 0,
    "processIBeacon": true,
    "onlyIBeacon": false,
    "majorMask": "0xFFFF",
    "minorMask": "0xFFFF"
  },
  "d6t": [],
  "gpio": [],
  "shell": [],
  "prometheus": []
}

#10

Okay, several questions:

  1. can you get esp32 integration yet through espyaml?

  2. has anyone made their iPhone into a beacon? I saw a video on how but access to the Xcode section on dev requires $99/yr. I’m not sure I would pay that and not have it work.

  3. are more pi’s better for this setup? How does it do with multiple floor detection?

Thanks!