I am trying to get this new node working on data coming from a bluetooth pressure sensor. I cant seem to get at the nested data correctly.
Here is the data for the first value.
3/18/2021, 10:29:25 AMnode: 3880141e.2cbf04
msg : Object
object
payload: object
uuid: "0081f9974020"
characteristics: object
2a07: buffer[1]
0: 0xa
_msgid: "5c78a7a7.e92c18"
Here is the testing flow.
[{"id":"c0d5dea4.880a9","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"ea7a7199.23adb","type":"inject","z":"c0d5dea4.880a9","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"835ab4c051e411e3a5bd0002a5d5c51b","payloadType":"str","x":300,"y":360,"wires":[["6c40fa5c.0c67c4"]]},{"id":"ad0b93de.c385f","type":"inject","z":"c0d5dea4.880a9","name":"Connect","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"connect","payloadType":"str","x":400,"y":440,"wires":[["6c40fa5c.0c67c4"]]},{"id":"a65a7d65.34f43","type":"inject","z":"c0d5dea4.880a9","name":"Disconnect","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"disconnect","x":400,"y":480,"wires":[["6c40fa5c.0c67c4"]]},{"id":"3880141e.2cbf04","type":"debug","z":"c0d5dea4.880a9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1230,"y":140,"wires":[]},{"id":"33480316.ff149c","type":"inject","z":"c0d5dea4.880a9","name":"Subscribe","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"notify\":true,\"period\":0}","payloadType":"json","x":400,"y":520,"wires":[["6c40fa5c.0c67c4"]]},{"id":"6c40fa5c.0c67c4","type":"Generic BLE in","z":"c0d5dea4.880a9","name":"91087","genericBle":"9078f63b.0dc458","useString":false,"notification":true,"x":910,"y":140,"wires":[["dd81fdd0.ff58e8","3880141e.2cbf04"]]},{"id":"97906e53.8d662","type":"inject","z":"c0d5dea4.880a9","name":"Temperature Measurement","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"2a1c","payloadType":"str","x":350,"y":320,"wires":[["6c40fa5c.0c67c4"]]},{"id":"8b4f2471.4be59","type":"inject","z":"c0d5dea4.880a9","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"8cd67da0da9b11e390870002a5d5c51b","x":300,"y":400,"wires":[["6c40fa5c.0c67c4"]]},{"id":"9ba2bc2d.00f108","type":"inject","z":"c0d5dea4.880a9","name":"Measurement Interval","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"2a21","payloadType":"str","x":360,"y":280,"wires":[["6c40fa5c.0c67c4"]]},{"id":"f83805b4.357a28","type":"inject","z":"c0d5dea4.880a9","name":"Model Number String","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"2a24","payloadType":"str","x":360,"y":200,"wires":[["6c40fa5c.0c67c4"]]},{"id":"388476a2.477302","type":"inject","z":"c0d5dea4.880a9","name":"<Unnamed>","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"2aff","payloadType":"str","x":390,"y":240,"wires":[["6c40fa5c.0c67c4"]]},{"id":"d6d0ad88.2c0918","type":"inject","z":"c0d5dea4.880a9","name":"Serial Number String","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"2a25","payloadType":"str","x":370,"y":160,"wires":[["6c40fa5c.0c67c4"]]},{"id":"501297f9.7c5b9","type":"inject","z":"c0d5dea4.880a9","name":"Tx Power Level","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"2a07","x":380,"y":40,"wires":[["6c40fa5c.0c67c4"]]},{"id":"bc0b41.65bcbcc","type":"inject","z":"c0d5dea4.880a9","name":"Firmware Revision String","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"2a26","payloadType":"str","x":350,"y":120,"wires":[["6c40fa5c.0c67c4"]]},{"id":"b3e31ee5.6fbaa8","type":"inject","z":"c0d5dea4.880a9","name":"Manufacturer Name String","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"2a29","payloadType":"str","x":350,"y":80,"wires":[["6c40fa5c.0c67c4"]]},{"id":"dd81fdd0.ff58e8","type":"buffer-parser","z":"c0d5dea4.880a9","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int8","name":"2a07","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Manufacturer Name","offset":0,"length":22,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Firmware Revision","offset":0,"length":7,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Serial Number","offset":0,"length":5,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Model Number","offset":0,"length":20,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"<Unnamed>","offset":0,"length":12,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"Measurement Interval","offset":0,"length":2,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"Temperature Measurement","offset":0,"length":5,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"item9","offset":0,"length":5,"offsetbit":0,"scale":"1","mask":""},{"type":"floatle","name":"item10","offset":0,"length":5,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"object","resultTypeType":"output","multipleResult":true,"fanOutMultipleResult":true,"setTopic":true,"outputs":10,"x":1070,"y":320,"wires":[["3880141e.2cbf04"],[],[],[],[],[],[],[],[],[]]},{"id":"9078f63b.0dc458","type":"Generic BLE","localName":"91087 ","address":"00:81:f9:97:40:20","uuid":"0081f9974020","characteristics":[{"uuid":"2a07","name":"Tx Power Level","type":"org.bluetooth.characteristic.tx_power_level","notifiable":false,"readable":true,"writable":false,"writeWithoutResponse":false},{"uuid":"2a29","name":"Manufacturer Name String","type":"org.bluetooth.characteristic.manufacturer_name_string","notifiable":false,"readable":true,"writable":false,"writeWithoutResponse":false},{"uuid":"2a26","name":"Firmware Revision String","type":"org.bluetooth.characteristic.firmware_revision_string","notifiable":false,"readable":true,"writable":false,"writeWithoutResponse":false},{"uuid":"2a25","name":"Serial Number String","type":"org.bluetooth.characteristic.serial_number_string","notifiable":false,"readable":true,"writable":false,"writeWithoutResponse":false},{"uuid":"2a24","name":"Model Number String","type":"org.bluetooth.characteristic.model_number_string","notifiable":false,"readable":true,"writable":false,"writeWithoutResponse":false},{"uuid":"2aff","name":"<Unnamed>","type":"(Custom Type)","notifiable":false,"readable":true,"writable":false,"writeWithoutResponse":false},{"uuid":"2a21","name":"Measurement Interval","type":"org.bluetooth.characteristic.measurement_interval","notifiable":false,"readable":true,"writable":true,"writeWithoutResponse":false},{"uuid":"2a1c","name":"Temperature Measurement","type":"org.bluetooth.characteristic.temperature_measurement","notifiable":true,"readable":true,"writable":false,"writeWithoutResponse":false},{"uuid":"8cd67da0da9b11e390870002a5d5c51b","name":"<Unnamed>","type":"(Custom Type)","notifiable":false,"readable":true,"writable":true,"writeWithoutResponse":false},{"uuid":"835ab4c051e411e3a5bd0002a5d5c51b","name":"<Unnamed>","type":"(Custom Type)","notifiable":true,"readable":true,"writable":false,"writeWithoutResponse":false}]}]
I stringified the bluetooth output to this, and still cant seem to get it retrieved.
3/18/2021, 11:05:15 AMnode: 3880141e.2cbf04
msg : Object
object
payload: "{"uuid":"0081f9974020","characteristics":{"2a29":{"type":"Buffer","data":[84,114,97,110,115,100,117,99,101,114,115,32,68,105,114,101,99,116,32,76,76,67]}}}"
_msgid: "6f68c25.88fb13c"
I should mention that the payload has 2 items of interest.
- Characteristics key
- Data
The sensor returns all of the following.
Tx Power Level (2a07)Read
org.bluetooth.characteristic.tx_power_level
Manufacturer Name String (2a29)Read
org.bluetooth.characteristic.manufacturer_name_string
Firmware Revision String (2a26)Read
org.bluetooth.characteristic.firmware_revision_string
Serial Number String (2a25)Read
org.bluetooth.characteristic.serial_number_string
Model Number String (2a24)Read
org.bluetooth.characteristic.model_number_string
<Unnamed> (2aff)Read
(Custom Type)
Measurement Interval (2a21)ReadWrite
org.bluetooth.characteristic.measurement_interval
Temperature Measurement (2a1c)ReadNotify
org.bluetooth.characteristic.temperature_measurement
<Unnamed> (8cd67da0da9b11e390870002a5d5c51b)ReadWrite
(Custom Type)
<Unnamed> (835ab4c051e411e3a5bd0002a5d5c51b)ReadNotify
(Custom Type)