On the pi node-red flow I have very simple mqtt receivers and debug statements.
The battery and temp are coming through just fine but I cannot get the presses 0x1811 to work.
At first I subscribed to /ble/advertise/e9:1d:0b:37:51:d3/1811 which was not working.
Then I read more closely in the instructions which said
/ble/advertise/DEVICE/SERVICE - Raw service data (as a JSON Array of
bytes) (if mqtt_advertise_service_data=true in config.json)
So maybe my config.json had that turned off, which it did. I also saw in the config the ability to name services so I tried to put a name to 0x1811 but might be doing that wrong.
I set these two changes from the default config.json.
.
.
"// We can add our own custom advertising UUIDs here with names to help decode them":0,
"advertised_services" : {
"1811" : {
"presses" : "level"
}
},
.
.
"// Send /ble/advertise/ad:dr:es:ss/uuid raw service data":0,
"mqtt_advertise_service_data": true,
I know I am doing something stupid wrong and I used to have this all working fine.
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.
I had much of this working a while back but am starting a new project from scratch.
To start back at step 0, I am just trying to advertise a couple of puck metrics and pick them up in Node-Red.
Here is the puck code...
On the pi node-red flow I have very simple mqtt receivers and debug statements.
The battery and temp are coming through just fine but I cannot get the presses 0x1811 to work.
At first I subscribed to /ble/advertise/e9:1d:0b:37:51:d3/1811 which was not working.
Then I read more closely in the instructions which said
So maybe my config.json had that turned off, which it did. I also saw in the config the ability to name services so I tried to put a name to 0x1811 but might be doing that wrong.
I set these two changes from the default config.json.
I know I am doing something stupid wrong and I used to have this all working fine.
Can anyone spot my error?
Thanks