sbernhard / node-red-contrib-bt-presence

Node-RED node to scan for available bluetooth devices using l2ping
https://bernhard-suttner.de
Apache License 2.0
1 stars 4 forks source link

Set msg.payload to boolean instead of present/not-present #2

Closed johnwalicki closed 6 years ago

johnwalicki commented 6 years ago

I like the node-red-contrib-bt-presence idea. I had been using a flow wrapped around node-red-contrib-noble and the npm noble package to detect the presence of a Bluetooth device. This node is much easier and doesn't drag in the complexity of the noble install.

Instead of setting msg.payload to strings "present" / "not-present", it would be easier to program for a msg.payload boolean flag.

pastukhov commented 6 years ago

or maybe msg.present with bool type

johnwalicki commented 6 years ago

@sbernhard - If I write a quick node-red-contrib-bt-presense patch to change "present" / "not-present" to boolean true / false, would you accept it upstream?

sbernhard commented 6 years ago

Sure. Every PR is welcomed.

---- John Walicki schrieb ----

@sbernhardhttps://github.com/sbernhard - If I write a quick node-red-contrib-bt-presense patch to change "present" / "not-present" to boolean true / false, would you accept it upstream?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/sbernhard/node-red-contrib-bt-presence/issues/2#issuecomment-389371985, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYTiFSIVdiPCAmikVJXnGtGMxZWsnFqbks5ty4pHgaJpZM4RJ3gk.

sbernhard commented 6 years ago

@johnwalicki and @pastukhov Fixed in version 1.1.3 (available on npm)

msg.payload = true is set on presence. Otherwise false.