This project scans, automatically connects for nearby ITag devices and bridges their events to mqtt.
This BLE to MQTT bridge enables you to use you smart BLE tags with any smart home solution which uses MQTT either your own custom one or e.g. HomeAssistant
ITag is cheap <2€ BLE device equipped with button and piezzo buzzer.
sudo is needed to build noble dependencies
sudo yarn install
yarn startSee this link
itag/<tag uuid>/presenceemits values1or0if the device is connected or notitag/<tag uuid>/button/clickemits1on button clickitag/<tag uuid>/alert/continuouson payload:< miliseconds >will perform a continuous piezzo aler for ms durationitag/<tag uuid>/alert/beepon payload:< miliseconds >will perform a beeping piezzo aler for ms duration
Is done using environment variales.
BEEP_ON_ITAG_CONNECTdefault:true-> tag will beep after connecting to your computerLOG_LEVELdefault:debug(see: winston log levels)MQTT_BASE_TOPICdefault:itagMQTT_URLdefault:mqtt://localhost:1883(see:mqtt.js format)MQTT_USERNAMEdefault:nullMQTT_PASSWORDdefault:null
Note: ITag has some other services and characteristics available, below are listed only interesting ones
1802-> Immediate Alert [ Alert Level ]1803-> Link Loss [ Alert Level ]ffe0-> Button [ Click ]
ffe1-> Click [ notify ]2a06-> Alert Level [ read write ]0x00-> no alert0x01-> mild alert (continuous)0x02-> high alert (beeping)
Sadly, the devices this project was tested on had no characteristics for battery level.
