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
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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 far