Skip to content
Bluetooth device (BLE or not) scanner for Jeedom home automation Framework
PHP Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
images virtual jeedom Dec 28, 2018 add le_handle_connection_complete Dec 28, 2018
BTdaemon.php typo fix and add version number Mar 17, 2019
LICENSE add detail for Jeedom virtual creation Dec 28, 2018 check python-bluez May 6, 2017

Bluetooth device (BLE or not) scanner for Jeedom home automation Framework

  • Class BTdaemon purpose: Scan Bluetooth devices on the network and notify a controller when registered devices are in range

Can work with Bluetooth LE (BLE) or normal (BT) devices
Controller is any system having an http API to settle devices ON & OFF
Primary controller configured with this script is Jeedom - but it can easily be adapted
Jeedom http API is used to control tag widgets
This script can run either on the same Raspberry PI as Jeedom or on another Raspberry PI allowing to have the BT adapter placed anywhere in the house
This script is intended to run in CLI mode as a background daemon (via pcntl_fork())
$ php BTdaemon.php

  • Configuration:
    Debug mode is selected when an instance of this class is created $ble = new BLE(debug_mode)
    It is advised to start in debug mode to check everything is fine, then turn debug off
    $ php BTdaemon.php start -> Start daemon
    $ php BTdaemon.php stop -> Stop daemon
    $ php BTdaemon.php conf -> Start configuration of your Bluetooth devices and Jeedom API calls

  • Tested with:
    Raspberry PI 2 - Raspbian Jessie
    BLE devices: Nut mini (
    BT devices: Samsung Galaxy S5, LG G3, iPhone 6s
    Does NOT work with iTags ( Since those devices are switching off when not connected, they can't be used for presence detection
    Bluetooth adapter:

  • Link with the controller
    Define a virtual with on & off cmd action IDs to control the widget via Jeedom http API
    Also create a binary info field that will represent the state of the virtual (only this one is to be displayed)

    In the advance configuration (toothed wheel) of the binary info field, use a binary widget with images for the on & off states (example below or any of your choice that you can also find on the jeedom market)

    When started in configuration mode, the script will ask for the list of Bluetooth devices to monitor (via their BT Mac address)
    For each registered devices, the IDs for on & off Jeedom cmd will be asked and stored into a BLE.ini file

  • Optionally a log file is generated to keep track of devices entering or leaving the adapter scan range

  • More information via Jeedom forum (French Forum)
    User: diving91

You can’t perform that action at this time.