How do you connect your pucks to the world? #1730
Replies: 10 comments
-
Posted at 2016-12-10 by @gfwilliams Yes - pushing via HTTP is more difficult. I think EspruinoHub currently ignores the headers and body characteristics when sending, but if it used it could give you a bit more space.
You'd have to first expose it using However I've just been doing:
Then EspruinoHub picks up the advertising automatically and creates MQTT events. You can use a 16 bit temperature too if you want to. I guess another option is to add a ... of course eventually I'll be adding IPv6 to the Puck itself, so that'll make everything a bit easier. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-10 by otbe I guess I got it now :) Thank you. ! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-10 by otbe Note: So I published
Am I missing some advertising? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-12 by @gfwilliams Hmm. You should definitely just be sending only Can you try removing the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-12 by @gfwilliams I missed this one:
Yes, it's possible, but you'd get in trouble if you shipped a product that did it. It's not going to interfere with anything, but there is some small possibility that some other software might try and 'claim' your Puck. I definitely wouldn't lose any sleep over doing it in my own house though :) There's also a 16 bit UUID for 'custom data' or something (I can't remember the exact name) - but I'm pretty sure you could just dump whatever you wanted in there. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-13 by otbe Sorry for my late response. I tried your advice to remove the naming, but the output is identical.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by @gfwilliams Try updating now. I make it work with names and/or addresses. Having said that, for some reason I don't understand it looks like Noble has broken. It just hangs when trying to get the list of services - but it may work on yours as mine definitely gets past where you were. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by otbe Same problem after There is a new error (after a fresh successfully npm i) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by @gfwilliams Have you tried doing an If you updated node you'd need to re-run the setcap thing as well or it wouldn't have permissions. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by otbe Sorry no chance to get this working :/ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-12-10 by otbe
Hi,
these days I received my puck and I wonder how you connect your pucks to some REST/mqtt services.
For example: I have a openhab automated "smart home" and I want to push some data from the puck to the REST API of openhab (btn click, temp, light, mag etc).
First I tried to use the fantastic EspruinoHub project, but BLE4 HTTP Proxy seems a bit limited with only 20bytes payload (and yes uri's are payload too :D). I hacked a bit the sources and get it working by "encoding" some requests, for example the request
will be made to
http://openhab:8080/rest/items/myItem/state
. This can be a direction to go, but it needs some work.Another way would be the MQTT feature of EspruinoHub, but I didnt get it working (especially with custom data).
What are you guys using for connecting your pucks to the world?
Btw:
Whats the proper way to ask for temperature via mqtt?
Tried
/ble/read/puck1/1809/2A1C
so farBeta Was this translation helpful? Give feedback.
All reactions