You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for a nice script, got the functionality up and running with home assistant.
Just a few notes on what I experienced:
I had to change the name of the expected device from ITAG to iTAG to get the script to do the connection. I guess the devices vary in name.
Also initially after a connection I got the error: TypeError: Cannot read property 'write' of undefined
at peripheral.discoverAllServicesAndCharacteristics (/home/pi/itag-mqtt-bridge/src/index.js:74:33)
at Peripheral. (/home/pi/node_modules/noble/lib/peripheral.js:101:13)
at Service. (/home/pi/node_modules/noble/lib/service.js:53:7)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:96:13)
at Service.emit (events.js:191:7)
at Noble.onCharacteristicsDiscover (/home/pi/node_modules/noble/lib/noble.js:261:13)
at emitThree (events.js:116:13)
at NobleBindings.emit (events.js:197:7)
at NobleBindings.onCharacteristicsDiscovered (/home/pi/node_modules/noble/lib/hci-socket/bindings.js:339:8)
which I solved by uncommenting the relevant lines after line 74:
Thank you for your looking into the code, and also bringing this up.
Seem that China never disappoints with its diversity. Also when it comes to small BLE trackers. :-)
The reason for the disabling the Link Loss is that my specific device had a LinkLoss feature enabled by default. When the connection was interrupted by turning of the mqtt bridge app, or by simply walking too far from the raspberry, my device would start beeping. Thats not exactly the use case i wanted.
Where did you get your BLE tag, would you mind sharing a reference (link to e-shop)?
Hi,
Thank you for a nice script, got the functionality up and running with home assistant.
Just a few notes on what I experienced:
I had to change the name of the expected device from ITAG to iTAG to get the script to do the connection. I guess the devices vary in name.
Also initially after a connection I got the error:
TypeError: Cannot read property 'write' of undefined
at peripheral.discoverAllServicesAndCharacteristics (/home/pi/itag-mqtt-bridge/src/index.js:74:33)
at Peripheral. (/home/pi/node_modules/noble/lib/peripheral.js:101:13)
at Service. (/home/pi/node_modules/noble/lib/service.js:53:7)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:96:13)
at Service.emit (events.js:191:7)
at Noble.onCharacteristicsDiscover (/home/pi/node_modules/noble/lib/noble.js:261:13)
at emitThree (events.js:116:13)
at NobleBindings.emit (events.js:197:7)
at NobleBindings.onCharacteristicsDiscovered (/home/pi/node_modules/noble/lib/hci-socket/bindings.js:339:8)
which I solved by uncommenting the relevant lines after line 74:
//linkLossAlertLevelCh.write(new Buffer([itag_characteristic_alertLevel_value_noAlert]), true, (error)=>{
// if(error) log.error(error)
// log.debug(
ITAG peripheral id: ${peripheral.id} LinkLoss AlertLevel write success
)// if(beep_on_itag_connect==='true') alertITAGContinous(peripheral.id,200)
// });
I am not sure if this error is only related to my specific installation.
/Bjarke
The text was updated successfully, but these errors were encountered: