musk95 / STEVAL_BCN002V1

Component for Home Assistant.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Home Assistant: STEVAL_BCN002V1

This component allows to get the data of sensors of STEVAL_BCN002V1 on Home Assistant.

image

Installation

  • All files of this repository should be placed on custom_components\BCN002V1 inside of ~/.homeassistant or ~/config folder.

     $ cd ~/.homeassistant
     $ mkdir custom_components
     $ cd custom_components
     $ git clone https://github.com/musk95/STEVAL_BCN002V1.git BCN002V1
    

Configuration

  1. Start a scan to determine the MAC addresses of the sensor:

    $ sudo hcitool lescan
    LE Scan ...
    4C:65:A8:D2:31:7F BCN-002
    [...]
    

    Or if your distribution is using bluetoothctl:

    $ bluetoothctl
    [bluetooth]# scan on
    Discovery started
    [CHG] Controller XX:XX:XX:XX:XX:XX Discovering: yes
    [NEW] Device E0:F5:F4:FE:DE:AD BCN-002
    
  2. Check for BCN-002 or similar entries, those are your sensor.

  3. To use sensors in your installation, add the following on confidureation.yaml which is located on ~/.homeassistant or ~/config folder.

    bcn002v1:
      mac: 'f5:ce:8c:51:00:95'
    
    sensor:
      - platform: BCN002V1
        scan_interval: 15
        monitored_conditions:
          - pressure
          - temperature
          - humidity
          - battery
          - proximity
     
    light:
      - platform: BCN002V1
    

image2

CONFIGURATION VARIABLES

mac

(string)(Required)
The MAC address of your sensor.

monitored_conditions

(list)(Optional)
The parameters that should be monitored.

Default value:
[“pressure”, “temperature”, “humidity”, “battery”, “proximity”]

pressure
Pressure in mBar at the sensor’s location.

temperature
Temperature in C at the sensor’s location.

humidity
Humidity level in % at the sensor’s location.

proximity
Proximity distance in cm at the sensor’s location.

battery
Battery details (in %).

name

(string)(Optional)
The name displayed in the frontend.

force_update

(boolean)(Optional)
Sends update events even if the value hasn’t changed.

Default value:
false

median

(integer)(Optional)
Sometimes the sensor measurements show spikes. Using this parameter, the poller will report the median of the last 3 (you can also use larger values) measurements. This filters out single spikes. Median: 5 will also filter double spikes. If you never have problems with spikes, median: 1 will work fine.

Default value:
1

timeout

(integer)(Optional)
Define the timeout value in seconds when polling.

Default value:
10

retries

(integer)(Optional)
Define the number of retries when polling.

Default value:
2

cache_value

(integer)(Optional)
Define cache expiration value in seconds.

Default value:
3

adapter

(string)(Optional)
Define the Bluetooth adapter to use. Run hciconfig to get a list of available adapters.

Default value:
hci0

About

Component for Home Assistant.


Languages

Language:Python 100.0%