Most recent activity
-
-
Sorry for my late response. I tried your advice to remove the naming, but the output is identical.
Config loaded MQTT Connected <HTTPProxy> Bleno State poweredOn <HTTPProxy> Bleno.startAdvertising Success <HTTPProxy> Bleno.setServices Success Scanning started... MQTT>/ble/write/c9:88:f0:97:da:57/nus/nus_tx => "LED1.set();\\n" Service 6e400001b5a3f393e0a9e50e24dcca9e Characteristic 6e400002b5a3f393e0a9e50e24dcca9e <Connect> Error Connecting Tue Dec 13 2016 19:30:16 GMT+0100 (CET) 5a:8b:0c:72:57:56 - ? (RSSI -66) 68:d9:3c:8e:46:b3 - ? (RSSI -43) c9:88:f0:97:da:57 - Puck.js da57 (RSSI -84) 1809 => {"temp":102}
-
Note:
I wonder how to "control" the puck in some way. I tried your advice at https://www.espruino.com/Puck.js+Node-RED.So I published
{"payload": "LED1.set();\n"}
(and alsoLED1.set();\n
) to/ble/write/puck1/nus/nus_tx
But all I get is:MQTT>/ble/write/puck1/nus/nus_tx => "{\"payload\": \"LED1.set();\\n\"}" Service 6e400001b5a3f393e0a9e50e24dcca9e Characteristic 6e400002b5a3f393e0a9e50e24dcca9e <Connect> Error Connecting
Am I missing some advertising?
-
-
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 requestrequire("ble_http").httpRequest(device, "myItem/state", function(d) {})
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 -
Hi,
I setup the Espruino Hub on my raspberry pi (2) and all seems to work very well. I can successfully run
NRF.requestDevice({ filters: [{ services: ['1823'] }] }).then(function(device) { console.log(device) })
and get the hubs bluetooth dongle as result. But if I run the full example from https://www.espruino.com/Puck.js+HTTP+Proxy I just get
WARNING: Module "ble_http" not found
.I updated my puck to 1.89, what Im missing? :)
Thanks!
-
Hi,
after my post I re-read the docs to verify that the LSM9DS0 is capable of block reading. Yes it is, but I overlooked something. The MSB of the register to read must be 1 for auto incrementing the address. I will give this a try later and add another post. :)
Thank you.
Edit: hehe you were faster :D
Sorry no chance to get this working :/
The other way works great. I'm able to advertise arbitrary data via BLE and get messages back :)