Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- sudo apt-get install -y nodejs
- sudo apt-get install libavahi-compat-libdnssd-dev
- sudo apt-get install libudev-dev
- sudo npm i --global --unsafe-perm room-assistant
- mkdir room-assistant
- cd room-assistant
- mkdir config
- cd config
- nano local.yaml
- put the text between the lines in the file
- to save: ctrl-x -> y -> enter
- edit mqttUrl to your server ip (keep the :1883 port at the end)
- edit your mqtt username and password
- add your bluetooth address
- -----------------------------------------
- global:
- instanceName: Living Room
- integrations:
- - homeAssistant
- - bluetoothClassic
- homeAssistant:
- mqttUrl: mqtt://mqtt-server-ip:1883
- mqttOptions:
- username: mqtt-username
- password: mqtt-password
- bluetoothClassic:
- minRssi: -20
- addresses:
- - 'Bluetooh Mac Address'
- -----------------------------------------
- sudo nano /etc/systemd/system/room-assistant.service
- put the text between the lines in the file
- to save: ctrl-x -> y -> enter
- -----------------------------------------
- [Unit]
- Description=room-assistant service
- [Service]
- ExecStart=/usr/bin/room-assistant
- WorkingDirectory=/home/pi/room-assistant
- Restart=always
- RestartSec=10
- [Install]
- WantedBy=multi-user.target
- -----------------------------------------
- sudo systemctl enable room-assistant.service
- sudo systemctl start room-assistant.service
- device tracker automations
- add these to your automation file in home assistant
- -----------------------------------------
- - alias: Bluetooth Home
- trigger:
- - platform: state
- entity_id: sensor.sensorname
- from: not_home
- action:
- - service: device_tracker.see
- data:
- dev_id: sensorname
- location_name: home
- - alias: Bluetooth Not Home
- trigger:
- - platform: state
- entity_id: sensor.sensorname
- to: not_home
- action:
- - service: device_tracker.see
- data:
- dev_id: sensorname
- location_name: not_home
- ----------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement