Coder Social home page Coder Social logo

mkerix / room-assistant Goto Github PK

View Code? Open in Web Editor NEW
1.2K 34.0 124.0 18.58 MB

Presence tracking and more for automation on the room-level

Home Page: https://www.room-assistant.io

License: MIT License

JavaScript 0.41% Dockerfile 0.64% TypeScript 98.90% Shell 0.05%
home-automation smart-home home-assistant bluetooth thermopile nodejs docker hassio presence presence-detection

room-assistant's Introduction

room-assistant

Automation on the Room-Level

npm code coverage semantic-release

room-assistant brings your home automation onto the next level: room automation. It is capable of tracking room occupancy and your location around the house with great accuracy, plus any other sensors you may want to attach. You can pick and choose the parts you need from our flexible software to get all the data you need for writing awesome new automations - room-assistant easily integrates them with your favorite home automation suite.

Imagine it: You can turn lights and heating on only in the rooms where people are actually there. You can accurately know if someone is there even when you are just chilling on your couch, situations where a motion sensor would fail and leave you in the dark. And you can even go a step further and configure your personal thermostat preferences or turn on your favorite TV channels depending on who is in the room!

Documentation

Find out how to install and configure room-assistant and much more on our official documentation site: room-assistant.io!

room-assistant's People

Contributors

abmantis avatar alan-strohm avatar alfiegerner avatar apocrathia avatar chrishirsch avatar dependabot[bot] avatar domoritz avatar einstweilenhier avatar elwing00 avatar fmartinou avatar gouldner avatar hudeven avatar ikbensuper avatar kdanthony avatar marrold avatar mearman avatar michaelpotter avatar mkerix avatar paxswill avatar peteba avatar readeral avatar semantic-release-bot avatar snyk-bot avatar usul0184 avatar wilkie1020 avatar zikeji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

room-assistant's Issues

Feature request: extending mqtt output with timestamp, raw data, major, minor, MAC+UUID

Hello Heiko,

First of all: Great work, thanks!

I want to use it to for presence detection in my house and maybe indoor tracking, also for occasional visitors. I have now set it up on a rpi3 for the 'ble' tracker, because I think that will catch the most devices (iBeacons, ble tags, Eddystone, whatever ...)

However, to be able to better do what I want to achieve I could really need some additional information in the mqtt messages:
-id: I would like to always have the mac address here (and this is how I now configured room-assistant)
-raw data: don't know what I want to do with this yet, but I think it can be very useful
-timestamp: timestamp of moment of reception of the signal (epoch format)
-iBeacon uuid: could you please add this as a separate property?
-iBeacon major/minor: don't know what I want to do with this yet, but I think it can be very useful
-Eddystone namespace: don't know what I want to do with this yet, but I think it can be very useful
-Eddystone instance_id: don't know what I want to do with this yet, but I think it can be very useful

Would it be possible to add these properties in a next release please?

Much appreciated!

Mi Band 3

Does it work? I have a mac address in the app settings, tried it. Nothing. I've a ble scanner on my phone. Tried it, can't find the mi band 3. Can find the old mi band 2 though. Also, what's the correct setup for this (both in the add on config and in configuration.yaml). Some say with : other without, what's the device id in the mqtt room sensor? there's no such variable in the romm assistant add-on setup. Would love it if I could get this to work, but tried multiple times now and failed miserably.

Identifying devices

Hi!

I got this code to work for me and it seems like some awesome data is picked up - my problem is I can't tell which devices are being tracked :(

I'd love to know how you Identify the devices you want to track if there is a simple trick for that...

Installing on OSMC

I know that it's not directly supported but when installing get the following error

root:/home/osmc/room-assistant# sudo npm install --unsafe-perm
[email protected] /home/osmc/room-assistant
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└── [email protected]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@~0.1.4 (node_modules/noble/node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN enoent ENOENT: no such file or directory, open '/home/osmc/room-assistant/node_modules/node-hid/node_modules/abbrev/package.json'

Other sensors

Any change we could get more Sensors added. Eg Temp?

SHT3x
code here: https://github.com/alwint3r/sht31-node

Would love to get rid of my ESP32/8266 etc.

im thinking 1 Rasp pi zero per room for bluetooth and hopefully temp, light , CO2 tracking

TypeError: whitelist.includes is not a function

When starting app with whitelist added I get following:

> [email protected] start /home/pi/room-assistant
> node index.js

                                            Starting Room Assistant...
                                            Connected to MQTT server
                                            Started console publisher
BLE scanner was initialized
/home/pi/room-assistant/components/ble.js:57
    if ((whitelist.length > 0 && whitelist.includes(id))
                                           ^

TypeError: whitelist.includes is not a function
    at BLEScanner._handlePacket (/home/pi/room-assistant/components/ble.js:57:44)
    at emitOne (events.js:77:13)
    at Noble.emit (events.js:169:7)
    at Noble.onDiscover (/home/pi/room-assistant/node_modules/noble/lib/noble.js:174:10)
    at emitMany (events.js:108:13)
    at emit (events.js:182:7)
    at NobleBindings.onDiscover (/home/pi/room-assistant/node_modules/noble/lib/hci-socket/bindings.js:174:10)
    at emitMany (events.js:108:13)
    at emit (events.js:182:7)
    at Gap.onHciLeAdvertisingReport (/home/pi/room-assistant/node_modules/noble/lib/hci-socket/gap.js:256:10)

npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the room-assistant package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls room-assistant
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.9.70-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! cwd /home/pi/room-assistant
npm ERR! node -v v4.8.2
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/room-assistant/npm-debug.log
npm ERR! not ok code 0

Config:

{
  "app": {
    "unsafe": false
  },
  "mqtt": {
    "enabled": true,
    "url": "mqtt://localhost",
    "username": "someusername",
    "password": "somepassword",
    "reject_unauthorized": true,
    "topic": "salon"
  },
  "console": {
    "enabled": true
  },
  "ble": {
    "enabled": true,
    "channel": "room_presence",
    "max_distance": 0,
    "blacklist": [],
    "whitelist": ["e69964bad240"],
    "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
  }
}

Room-assistant reports these values

{
"id":"fda50693a4e24fb1afcfc6eb07647826-10065-26049",
"uuid":"fda50693a4e24fb1afcfc6eb07647826",
"major":10065,
"minor":26049,
"rssi":-72,
"distance":215547485467.13068,
"accuracy":1.7051123055198094e+37,
"measuredpower":-3,
"proximity":"far"
}

How should I read distance? Why is it so high? Why "proximity" is "far"? As far as I know rssi=-72 is about 2 meters distance.

I guess I need to play around with system_noise and measurement_noise values?

Mac Adress from BLE Device

Just a quick question concerning room assistant.
Is it possible to track a devices bluetooth MAC-Adress?
This would be really helpful for tracking devices such as an iPhone.
At the moment I'm facing the problem that the iPhone doesn't have a static UUID so that it can't get tracked in a reliable way.
Cheers.

Supported BLE beacon hardware?

I'm considering going this route for room presence tracking. Do you know what hardware is supported with this package?

It might be helpful to list a few of the supported/tested hardware combinations on the README.

~~As a quick test, I downloaded the "Estimote" iOS app which has a virtual ibeacon functionality but room-assistant never picked it up.

Any idea why?~~

Got the above to work. I was just subscribing on the wrong topic in MQTT.

Disable logs.

Hello
How can i disable making logs in logs/{year}/{month} folder?

UUID is incorrectly read; always set as the mac for BLE scanner

I have a raspberry pi zero W with the following in local.json:

  "ble": {
    "enabled": true,
    "channel": "room_presence",
    "max_distance": 30,
    "whitelist": [],
    "use_mac": false,
    "system_noise": 0.01,
    "measurement_noise": 3,
    "update_frequency": 0
  }
}

But I always get the mac as ID, and never the UUID:

{"id":"f69e2d86fe4a","name":"MI Band 2","rssi":-74,"distance":13.58329930223587}

I really need to get the UUID and not the (ever changing) MAC. What am I doing wrong?

Incompatible with plant sensors on Hass IO

I have Hass IO installed on a Raspberry Pi 3, and I'm running room assistant on two Raspberry Pi Zero Ws. The system works really well, but when I try to use the room assistant add-on in combination with Hass IO, I can't get my Mi Flora sensor readings.

The miflora plant platform is a component that uses ble to read sensor data..

Any chance that these two components could play nicely together? Alternatively, any chance of reporting the GATT characteristics to the relevant mqtt topics in place of the mi flora component?

How to make room-assistant send all the detected devices to home-assistant in each response?

Hi,
Firstly, thanks a lot for the wonderful library.

I want to detect all BLE devices in the raspberry pi's range and analyse it's signal strength.

  1. Unfortunately room-assistant is publishing only the latest device, as a result, I am able to see only one device in home-assistant's panel. Is there a way to send all the devices info as Json objects in the response each time?

  2. How to tap the response that room-assistant sends to the home-assistant, programmatically, so that I could deploy automated scripts for some computation?

And the location is a public place, so I don't know about the MAC address of the devices that may come in.

[Feature] Triangulation possible?

Is it technically possible to set 3 room-assistant instances in and they triangulate based on distance to get a better idea where the person is?

set scan interval

Hey great tool! I was wondering, if you can set the timeinterval for the scans manually. For example just check every 20 seconds if the ibeacon is present.

Thanks!

[Feature] C.H.I.P. support

Hi,

I guess that C.H.I.P computer is perfect target for this because lowcost, size and BT + Wifi integrated.

I've tried to install but fails when run with:

root@chip:~/room-assistant# npm start

> [email protected] start /root/room-assistant
> node index.js

module.js:457
    throw err;
    ^

Error: Cannot find module '../build/Release/binding.node'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/root/room-assistant/node_modules/bluetooth-hci-socket/lib/native.js:3:15)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)

npm ERR! Linux 4.4.11-ntc
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'node index.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 room-assistant package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs room-assistant
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls room-assistant
npm ERR! There is likely additional logging output above.

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

Maybe because arch armv7l

forever-service fails due to swig no longer available.....

Hi,

everything went well until the last step of the setup about making it a service. the forever service app install seemed to say it wasn't valid anymore and then the final step won't work.... Im no linux expert, I can follow instructions but could do with some advice on how to finalise the install (and maybe the instructions need revising too for others) thanks :)Hi,

npm WARN deprecated [email protected]: This package is no longer maintained

No reporting when device is not moving

Have set it up for mi bands. Works fine. But when mi band is just laying flat - no reports are sent. Is room assistant stopping reporting when no distance change?

room-assistant runs for a while but then stops

Trying room-assistant for presence tracking in HA. I have an Radius Networks Red Beacon Dot, and a TrackR Bravo. Neither is paired, and both show in room-assistant output when I start it, and I've whitelisted their ID's to block out all the other BT signals from nearyby stuff. After about an hour though, the room-assistant output stops. Nothing really in the logs to give any clue that something is wrong. When I restart room-assistant they show back up.

If item not on white list and black list not in use item still gets reported.

Based on the logic of how white list and black list are handled. The white list seems useless to me.
Here is my use case. I simply want to add ids of ble tokens I want to detect.
So I populated white list with 2 ble token ids.
Blacklist is left empty...I have a ton of devices in my home which send ble messages. So I don't want to have to black list them all and they when a new id walks into my house I don't want that reported either.

However the code says

if ((whitelist.length > 0 && whitelist.includes(id))
    || !(blacklist.length > 0 && blacklist.includes(id))) {
Send logic....
}

So as soon as black list is empty the second part of the or condition is always met.
!(blacklist.length > 0 && blacklist.includes(id)) = always true because blacklist.length = 0

This essentially disables the white list.
Even if I add a fake id to blacklist I get same result because the && condition looks for the token in the black list and it isn't found which returns false which in negated to = true (always) again.

Honestly I don't think it makes sense to have whitelist and blacklist. I would think you either use one or the other. Not sure what it should mean to have both.

So maybe a better approach would be to have two parameters
use_list:{blacklist,whitelist,none}
list:{{id},{id},...}

So if using whitelist it means send only ids found on list. If using blacklist then it means send ids not found on list.

Add Bluetooth Support

Home Assistant's bluetooth tracker component allows you to use bluetooth devices for presence detection. Being as the range of bluetooth can be limited, I was wondering if Room Assistant can optionally report back on all bluetooth devices it sees, not just beacons.

New Simple function

Hello.
Generaly room-assistant runs flawless and make presence detection simple.
But is any possibilities to add a simple function to scan every x second for ble devices and send it presence or not to mqtt broker.
I use now iTAG with my and my wife keys for presence in home.
But when i leave my keys on my desk, room-assistant send only change of distance.
in time this distance not change, then home-assistant receive not_home via mqtt.

Can you explain the calculation for ble distance?

I just received a BLE USB dongle which I plan to place in my car for presence.

While testing with a maxDistance of 15 feet I wasn't getting any output so I added some debug statements and found the following values for distance.

BLE id=db81700e73f3..,rssi=-60,txPower=4, distance=576650390625

The 576650390625 comes from the code
ratio = rssi * 1 / txPower ; // Which is -15
return Math.pow(ratio, 10); // Math.pow(-15, 10); which is 576650390625

The dongle was about 2ft from my computer so I think I need to adjust this formula.

Can you explain the formula used for distance?

Using "not_home" rather than "away" in mqtt_room

Heiko, I have a small question about your mqtt_room component. I was wondering if there was a particular reason for using "away" rather than "not_home" in mqtt_room. I think it would be great to see closer alignment with the device_trackers particularly for multi-device presence detection. I have made local changes to do this by exposing "away_state" as a config option and was thinking of submitting as a PR on the HA github. Would that make sense ? Appreciate your thoughts and thanks again for a great solution. Pete

Optionally add transmission power to whitelist

Hi!

Would be great if I could add transmission power per device, linked to ID in the whitelist. Not all devices are broadcasting that info, and it's not too hard to manually get an estimate (e.g. standing close to scanner and seeing what value comes out). In those cases a workaround would be welcome right?
Especially for fitness trackers that broadcast lower than current working assumption (-70 vs -5x).

Don't think it is a mayor change right? Currently changing directly in the code for miband myself.
Cheers

Unit of measurement? feet, inches, cm, m

What are the units of measurements, specifically under iBeacons?
max_distance - maximum distance where the scanner will still send the data to a publisher, 0 means unlimited

"update_frequency": 600

Seems the update_frequency is not obeyed
Even setting it to 10000 gets the values updated to mqtt server several time per second

  "ble": {
    "enabled": true,
    "channel": "room_presence",
    "max_distance": 0,
    "whitelist": [],
    "use_mac": false,
    "system_noise": 0.01,
    "measurement_noise": 3,
    "update_frequency": 10000
  },

gyp: Undefined variable openssl_config_path in binding.gyp while trying to load binding.gyp

When trying to install room-assistant on odroid c2 debian stretch(arm64), i ran into this, no idea how to fix it, happens with version 0.8 and 0.9

oot@domodroid:/opt/room-assistant# npm install

[email protected] install /opt/room-assistant/node_modules/bignum
node-gyp configure build

gyp: Undefined variable openssl_config_path in binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.14.79-odroidc2
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /opt/room-assistant/node_modules/bignum
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Any ideas?

No mqtt updates

I've got room assistant installed and running on a pi zero w. It looks like everything is working properly on the zero, the console logs look as expected, it's picking up the beacons I've got, and so on.

However, I'm not seeing anything get published to my mqtt server. I've input the credentials into the config json file, and the log says it's connect to the mqtt broker, but I don't have any topics associated with room assistant showing up in my mosquitto broker.

{ "app": { "unsafe": false, "logging": false }, "mqtt": { "enabled": true, "url": "192.169.1.13:1883", "username": "[redacted]", "password": "[redacted]", "reject_unauthorized": true, "topic": "pi-zero-b" }, "console": { "enabled": true }, "ble": { "enabled": true, "channel": "room_presence", "max_distance": 3, "blacklist": [], "whitelist": [], "use_mac": false, "system_noise": 0.01, "measurement_noise": 3, "update_frequency": 5000 }, "ibeacon": { "enabled": true, "channel": "room_presence", "max_distance": 5, "blacklist": [], "whitelist": [], "system_noise": 0.01, "measurement_noise": 3, "major_mask": "0xFFFF", "minor_mask": "0xFFFF", "update_frequency": 5000 }, "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 } }

The console outputs the following
Starting Room Assistant... Connected to MQTT server Started console publisher BLE scanner was initialized [room_presence] { [room_presence] "id": "0457fc79888e", [room_presence] "rssi": -53, [room_presence] "distance": 0.3421673604634194 [room_presence] }

But when I subscribe to all topics from my mqtt broker, nothing is updating as relates to room assistant. I was expecting to see a few topics get updated regularly as room assistant scanned my devices.

What am I doing wrong?

how to get started

i can't seem to connect all the dots to figure this out. i have home assistant and an mqtt server running.

i have cell phones and a stack of Bluetooth beacons.

do i configure each cell phone in home assistant as an mqtt_room sensor?

then room-assistant's instructions say to have a user/password for each client/room. do you duplicate the mqtt config section for each user? if not, how do you configure multiple users? similarly do you duplicate the ble section for each room and is the whitelist the list of uuid's for beacons in each room? if not, how do you configure multiple rooms?

then, how does association of the phone with a beacon cause an mqtt message to be sent? is there another client required on the phone?

i'd like to try this solution, but i can't seem to figure out how all of the components will work together.

ble issue

Hi all,
I'm trying to setup room assistant but I've one issue.

If I set ble to true in the config file I get this error.

> [email protected] start /home/room-assistant
> node index.js "index.js"

module.js:471
    throw err;
    ^

Error: Cannot find module '../build/Release/binding.node'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/room-assistant/node_modules/bluetooth-hci-socket/lib/native.js:3:15)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js "index.js"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-03-10T15_17_56_852Z-debug.log

If I disable ble (set to false) room assistant starts fine but obviously it is useless

this is how I've setup the ble part in the config file:

  "ble": {
    "enabled": true,
    "channel": "room_presence",
    "max_distance": 3,
    "blacklist": [],
    "whitelist": ["6708eda4278d"],
    "use_mac": true,
    "system_noise": 0.01,
    "measurement_noise": 3,
    "update_frequency": 5000
  },

Any hint? What am I doing wrong?
Thanks.

Running on ESP32

Hi, thanks for sharing. Can a room assistant use ESP32+2.4 GHz Wi-Fi and Bluetooth dual mode chips?
tb2jv 1fdxybenkhfrdxxciuvxa_ 2675241364
tb2lv ofycybunkhfccxxchtvxa_ 2675241364

BLE Crashes

When using BLE, sometimes it crashes (randomly?), with the following:

buffer.js:817
    throw new RangeError('Index out of range');
    ^

RangeError: Index out of range
    at checkOffset (buffer.js:817:11)
    at Buffer.readInt8 (buffer.js:943:5)
    at Hci.processLeAdvertisingReport (/room-assistant/node_modules/noble/lib/hci-socket/hci.js:643:21)
    at Hci.processLeMetaEvent (/room-assistant/node_modules/noble/lib/hci-socket/hci.js:608:10)
    at Hci.onSocketData (/room-assistant/node_modules/noble/lib/hci-socket/hci.js:479:12)
    at emitOne (events.js:96:13)
    at BluetoothHciSocket.emit (events.js:188:7)

No devices being detected

I have installed on rpi 3 with Jessie image (9.2.1 node-js) and rpi 0w with stretch image (6.11.5 node-js) and it was able to start without any issue using root account. However, it cannot detect any devices after initializing. THe logs doesn't help either. WHat's odd is that on the console, the text color "BLE scanner was initialized" is only on white compared to the rest of the display (starting... started.. and iBeacon scanner was initialized). I'm not sure if that means something.
I'm not sure what else am I missing.

Documentation Update

For "distance" it's not documented if that is in meters or feet. I'm curious as what is being reported by home assistant from readings "looks" like feet. But the parameter in room-assistant doesn't specify. I know it's not 10 meters from one side of my room to the other where the rpi is sitting :)

Airplay speakers disappear

I've been seeing an issue occur repeatedly, where forked-daapd will lose awareness of an airplay speaker. Happens when playing music or sitting idle. Once the speakers are "lost," the only way to get them back is to restart the service.

[2018-08-01 17:41:41] [  LOG]    cache: Beginning DAAP cache update
[2018-08-01 17:41:41] [  LOG]    cache: DAAP cache updated
[2018-08-01 17:41:54] [  LOG]     mdns: Avahi Resolver failure: service '0011240B67CB@BedroomAE' type '_raop._tcp' proto 0: Timeout reached

Apple Watch detection possible?

Since i have my iWatch on me all the time..is it possible to use that via BLE protocol? I know Apple randomizes the UUID...is anyone using Apple Watch to track room presence?

How to setup (newbie)

Hello @mKeRix ,

Thanks for your app, and please not an issue but just need clarification on setup.

I have installed the app on a Pi 3 running Jessie lite on node.js 9.x. I have done all setup following the readme.md file and trying to use the on-board Bluetooth, but I seem not to be able to get it to work. There is no output anywhere for me to read what's going on, and yes I have the console set to "true" in the local.json file.

Please am I supposed to view a log of what is going on, when the system is running? How can I know when its connected to the mqtt server? When can I know when its found something?

I am using the Locate app by Radius Networks on an iPhone 6S, is it compatible? If not what app do you recommended as you didn't specify.

Please help as I would really like to get this running. Also based on this link,, though not mentioned, will it also support RPi zero W?

Regards

[Query] No update if device out of range

Love the tool and just set it up with HomeAssistant,one thing I noticed is when the device is out of range of the beacon, it long longer sends any update on the MQTT...so HomeAssistant keeps the last known value instead of 0. Is there a way to set it to 0 if device is out of range?

How have you setup the room based automation rules? Would be great if you share some.

Thanks.

DHT11/22

Hey,

Thank you for this great project, i'm one step closer to integrating my rPI-Zero in my house ;-).

Could you tell me how i would add the DHT11 sensor value from the gpio pin into play?
The motion sensor works perfectly and i'm looking to extend some basic temperature/humidity sensing ;-). As i've already got the DHT11 working (with a basic python script) i'm thinking to add it to the node ;-). Any suggestions (besides using a script and pushing the data that way)?

Unable to detect Tile when in range if iPhone

So I have this installed and working with a Tile Mate fine, as long as I have the bluetooth off on my phone. However as soon as I turn the bluetooth back on on my phone, the Tile disappears and the scanner can no longer see it.

I'm guessing this is because the device goes into some kind of other mode when it's connected to my phone?

Is there anything I can do to make it show up all the time?

Thanks

Gareth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.