Example: Bluetooth presence and signal level detection

Task

Mostly Bluetooth integration into LogicMachine is used for presence detection which brings possibility to launch specific scene or objects once Bluetooth device appears or disappears in visibility zone of LogicMachine. Also by knowing RSSI (signal level) you can activate specific objects, for example, switch on light when Bluetooth band is approaching LogicMachine Ambient.

Adding profile

Download and unarchive General profile file. Add it in LogicMachine BLE tab.

universal_profile

Assign Universal profile to the found BLE device, in this example – Fitbit Charge HR

fitbit_found

ble_choose_profile

Map Presence and RSSI to KNX grp address

fitbit_logicmachine_settings

logicmachine_ble_setup_complete

Create event-based script for presence object

In Objects tab see that both grp addresses are changing values.

lm_fitbit_objects

Click on Event-based script icon near Presence object 1/1/93 and add following code which will change the value of the object 0/4/17 to true or false depending on appearance/disappearance of BLE band.

Source code    
  1. grp.write('0/4/17', event.getvalue())

ble_presence_script