Room-Assistant installation

Tried to install room assistant on Rpi3 running Raspbian Jessie without any luck, anyone installed this successfully and can give some tiips?

I assume you mean this. If so, what does wrong? Are you getting any errors?

yes indeed, getting to npm install then pi gives bash error, not sure if something is missing

Yes but thought its only for happy bubbles, so the presence software will work with rpi bluetooth to track devices and then send via mqtt to broker?

Thank you, I will try it like that

@Johan_Erasmus did you ever get room-assistant working?

I don’t see how the video helps because it is not installing room-assistant, it is installing the happy-bubbles presence software.

I have room-assistant installed on a pizerow and I can run it fine, the console says it is broadcasting to my mqtt but it isn’t. The software doesn’t really check the health of the mqtt connection because I entered garbage into the config and it still starts up and says “connected to MQTT server” which isn’t possible with the config. So I when I put what I think is the correct information I can’t really debug any issues.

This is my room-assistant config if anyone can share a working config I would appreciate it.

{
“app”: {
“unsafe”: false,
“logging”: false
},
“mqtt”: {
“enabled”: true,
“url”: “mqtt://192.168.1.91:1883”,
“username”: “”,
“password”: “”,
“reject_unauthorized”: true,
“topic”: “garage”
},
“console”: {
“enabled”: true
},
“ble”: {
“enabled”: true,
“channel”: “room_presence”,
“max_distance”: 5,
“blacklist”: ,
“whitelist”: ,
“use_mac”: false,
“system_noise”: 0.01,
“measurement_noise”: 3,
“update_frequency”: 5
},
“ibeacon”: {
“enabled”: false,
“channel”: “room_presence”,
“max_distance”: 0,
“blacklist”: ,
“whitelist”: ,
“system_noise”: 0.01,
“measurement_noise”: 3,
“major_mask”: “0xFFFF”,
“minor_mask”: “0xFFFF”
},
“temper”: {
“enabled”: false,
“channel”: “temper”,
“interval”: 60000,
“scale”: 1,
“offset”: 0
},
“gpio”: {
“enabled”: false,
“only_send_updates”: true,
“ports”: ,
“qos”: 0,
“retain”: false
},
“shell”: {
“enabled”: false,
“commands”: ,
“qos”: 0,
“retain”: false
}
}

When I run room assistant I get the following output
node index.js “index.js”

                                            Starting Room Assistant...
                                            Connected to MQTT server
                                            Started console publisher
BLE scanner was initialized
[room_presence]                             {
[room_presence]                               "id": "d9a176a8b65f",
[room_presence]                               "rssi": -71,
[room_presence]                               "distance": 3.860896990378023
[room_presence]                             }
[room_presence]                             {
[room_presence]                               "id": "2231e65f6132",
[room_presence]                               "rssi": -70,
[room_presence]                               "distance": 3.472448313889541
[room_presence]                             }
...

However when I run mosquitto_sub -h 192.168.1.91 -t room_presence
nothing is every published.

If I test with mosquitto_pub -h 192.168.1.91 -t room_presence -m “Test”
it works so I know mosquitto is working.

So I don’t think room-assistant is connecting to mosquitto and I can not figure out how to debug why it doesn’t work.

No sorry I couldn’t get it to work either

I actually got mine working. If you still want to get it working let me know.

Steps I took

  1. first get mosquitto working testing with mosquitto_pub and _sub
  2. I added console logging into the room-assistant code to figure out what it was sending. It sends messages with room_presence/garage in my case
  3. run mosquitto_sub -h {your mosquitto_host} -t room_presence/+
  4. start room-assistant…if you see messages in room_presence you have it working on the sending side
  5. configure hass

my config in the end was

 {
  "app": {
    "unsafe": false,
    "logging": false
  },
  "mqtt": {
    "enabled": true,
    "url": "mqtt://192.168.1.95",
    "username": "",
    "password": "",
    "reject_unauthorized": true,
    "topic": "garage"
  },
  "console": {
    "enabled": true
  },
  "ble": {
    "enabled": true,
    "channel": "room_presence",
    "max_distance": 5,
    "blacklist": [],
    "whitelist": ["2231e65f6132","d9a176a8b65f"],
    "use_mac": false,
    "system_noise": 0.11,
    "measurement_noise": 3,
    "update_frequency": 5000
  },
.
.
.
mqtt:
    broker: 192.168.1.95

sensor:
      - platform: mqtt_room
        device_id: 2231e65f6132
        name: "Mini"
        state_topic: 'room_presence'
        timeout: 5
      - platform: mqtt_room
        device_id: d9a176a8b65f
        name: "Mercedes"
        state_topic: 'room_presence'
        timeout: 5
1 Like

hi, i have been looking for a proper tutorial on how to config room assistant. i have a raspberry pi 3B+ which is running home assistant. after reading throught i thought of setting up a few raspberry pi zero w around the house. but i do not know to how to set it up.

Mostly i will be using an ios device to track around the house.

can someone please guide me in the right direction on where to start and how to setup.

thank you

Where did you get the device_id’s from?

If everything is setup correctly then they should be in your entity list as sensors.

Here is a screenshot of my ibeacons from room_assistant.

Trying to get room assistant working… Instructions are bit engineerish. My programming skills are fairly basic, let’s say.

What I’m trying to do, is to get multiple raspberries to check the bluetooth status of mobile phones. Well, 2 rasps. The master rasp’s BT coverage is bit weak to serve the whole house. So, I’d like to have slave rasp’s room assistant send mqtt’s to master, and the master send mqtt’s to itself, so that the phone’s presence can be detected from both of them. (And eventually use RA distance stuff to approximate locations & find out how many rasps I need more…)

  1. I assume the local.json username/password are the mqtt ones, not the raspberry’s pi-password?
  2. “smart” above says “start room-assistant” - how? “npm start” or normal systemctl start?
  3. where do you get those device id’s? Like the ones in config.yaml, “2231e65f6131”? I used my device’s BT MAC… I did get one additional entity called “sensor.room_sensor”, but I haven’t got a clue what that is and where did it get that name.
  4. In msg 6 in this discussion smart gets the following output possibly by running “node index.js “index.js””. Where did you get that?
  5. How do you add console logging? Could be good to troubleshooting.
  6. If I change something in e.g. local.json, what do I need to do to get the new config applied? systemctl restart room-assistant?

Sorry to dig up a semi old thread, but i feel like im missing something here.

So – i actually have RA working, on 2 different devices, and it does what i want it to do – report the “closest” one to Home Assistant.

However, ive got a weird issue.
When I run npm start either normally, or with nohup, it all works.
When i use systemctl, and run RA as a service, i get nothing.

The mosquitto log suggests that RA is connecting to mqtt, as does systemctl status, but i get no mqtt data. If i kill the service, and start it manually, it all comes back.

Have i missed some weird permissions somewhere ?

Hi,

I got room assistant working on a Raspberry Pi Zero W, and its basically plug and play.
However, trying to install it on my Raspberry Pi 3 that is running home assistant it just won’t work.
It throws an error that i should run it as root (which, I think I do)

Also the normal Bluetooth BLE device tracker (https://www.home-assistant.io/components/bluetooth_le_tracker/) just won’t work for me :frowning:

Room assistant is somewhat of a pain to get working, but if you have trouble try installing nodejs v10.x directly from the nodejs site (i found any other version does not build)…the github page really fails to mention this rather pressing issue.

Why do you want to install it on your main RPi 3, which is running home assistant?
I don’t think that this is a good idea, because as far as I know the BLE device tracking is quite a heavy task.

That is/was indeed the plan.
But I think I will keep it on a raspberry pi zero w.

Doesn’t seem to be very heavy lifting imo. On a PI3 A+ ra causes very little cpu and load. On a piZero W a bit more, but nothing too heavy.

1 Like

Been running room assistant on 6 pi zeros for several weeks now without reboot and it is running very solidly through to home assistant.

Great work !!

1 Like

I agree. I’ve started using room-assistant on a Pi Zero W with Bluetooth Classic to track when I enter a room (I always carry iPhone). So far fairly smooth. One time the Pi lost network and I didn’t know. So now I have it publish a heartbeat over mqtt so I can get an alert if the Pi gets disconnected again.

The hard part is putting Pi’s outside where there’s no power (outside front porch). So, I’m testing battery powered iBeacons (with OwnTracks) which should last >200 days on one coin battery.

If all goes well, I’ll use room-assistant for locations with power
and iBeacon+OwnTracks for locations without power.

1 Like