This component allows to get the data of sensors of STEVAL_BCN002V1 on Home Assistant.
-
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
-
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
-
Check for BCN-002 or similar entries, those are your sensor.
-
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
(string)(Required)
The MAC address of your sensor.
(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 %).
(string)(Optional)
The name displayed in the frontend.
(boolean)(Optional)
Sends update events even if the value hasn’t changed.
Default value:
false
(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
(integer)(Optional)
Define the timeout value in seconds when polling.
Default value:
10
(integer)(Optional)
Define the number of retries when polling.
Default value:
2
(integer)(Optional)
Define cache expiration value in seconds.
Default value:
3
(string)(Optional)
Define the Bluetooth adapter to use. Run hciconfig to get a list of available adapters.
Default value:
hci0