The Problem is that the EspruinoHub crashes after it receives the message:
<MQTT> /ble/write/e9:05:8c:a7:64:ab/BCDE/ABCE => "[8.9111328125,4.5166015625,0.48828125,0.6103515625,0.48828125,1.77001953125,0.48828125,0.6103515625,0.48828125,1.77001953125,0.48828125,1.77001953125,0.45776367187,1.77001953125,0.48828125,0.6103515625,0.48828125,1.77001953125,0.45776367187,0.64086914062,0.48828125,0.64086914062,0.48828125,0.6103515625,0.48828125,0.64086914062,0.48828125,0.64086914062,0.48828125,1.73950195312,0.48828125,0.64086914062,0.48828125,1.73950195312,0.48828125,0.64086914062,0.48828125,0.6103515625,0.48828125,1.77001953125,0.48828125,1.77001953125,0.45776367187,0.64086914062,0.48828125,0.6103515625,0.48828125,1.77001953125,0.48828125,0.6103515625,0.54931640625,1.708984375,0.48828125,1.77001953125,0.45776367187,0.64086914062,0.48828125,0.6103515625,0.48828125]"
<Discover> Scanning stopped.
<Connect> e9:05:8c:a7:64:ab: Connecting...
<Connect> Connected.
<Connect> e9:05:8c:a7:64:ab: Getting Service...
<Connect> e9:05:8c:a7:64:ab: found service: bcde
<Connect> e9:05:8c:a7:64:ab: found characteristic: abce
/home/pi/EspruinoHub/lib/util.js:36
buf.writeUInt8(o.charCodeAt(i), i);
^
TypeError: o.charCodeAt is not a function
at Object.exports.obj2buf (/home/pi/EspruinoHub/lib/util.js:36:22)
at /home/pi/EspruinoHub/lib/connect.js:193:41
at /home/pi/EspruinoHub/lib/connect.js:63:9
at Service.<anonymous> (/home/pi/EspruinoHub/node_modules/noble/lib/service.js:53:7)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Service.emit (events.js:211:7)
at Noble.onCharacteristicsDiscover (/home/pi/EspruinoHub/node_modules/noble/lib/noble.js:261:13)
at emitThree (events.js:136:13)
at NobleBindings.emit (events.js:217:7)
If i send the hole command as a string to /ble/write/e9:05:8c:a7:64:ab/nus/nus_tx it works.
So i'm questioning what are the limitations for self defined Services?
Can i send the IR Codes that way?
How "looks" the evt.data Object of the onWrite function?
How can one read that console.log as long as the puck is connected to the IDE?
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,
i try to send some IR Codes via nodered + mqtt + puck to turn on my soundbar on chromecast activity.
Topic:
The Problem is that the EspruinoHub crashes after it receives the message:
If i send the hole command as a string to /ble/write/e9:05:8c:a7:64:ab/nus/nus_tx it works.
So i'm questioning what are the limitations for self defined Services?
Can i send the IR Codes that way?
How "looks" the evt.data Object of the onWrite function?
How can one read that console.log as long as the puck is connected to the IDE?
Thank you very much.