publish discovery for sensors BLE once per run, add ble white and black list

Avoid publishing auto discovery on a time basis
publish auto discovery only one time per BLE sensor
add BLE white and black list implementation
set black list
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/set -m '{"black-list":["012314551615","4C6577889C79","edfrgtyjulik"]}'
set white list
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/set -m '{"white-list":["012314551615","4C65A5553C79","edfrgtyjulik"]}'
This commit is contained in:
Florian committed 2019-03-18 23:29:47 +01:00
1 parent 7a39bba272
commit 60f68d00f4
4 files changed
+138 -33

No files matched your search

+9 -2
View File
@@ -25,6 +25,8 @@
*/
/*----------------------BT topics & parameters-------------------------*/
#define subjectBTtoMQTT Base_Topic Gateway_Name "/BTtoMQTT/"
#define subjectMQTTtoRF Base_Topic Gateway_Name "/commands/MQTTto433"
#define subjectMQTTtoBTset Base_Topic Gateway_Name "/commands/MQTTtoBT/set"
#define TimeBtw_Read 55555 //define the time between 2 scans
#define Scan_duration 10 //define the time for a scan
#define HM-10
@@ -38,9 +40,14 @@
// if not commented Home presence integration with HOME ASSISTANT is activated
#define subjectHomePresence Base_Topic "home_presence/" Gateway_Name // will send Home Assistant room presence message to this topic (first part is same for all rooms, second is room name)
struct BLEdevice{
char macAdr[13];
boolean isDisc;
boolean isWhtL;
boolean isBlkL;
};
struct decompose
{
struct decompose{
char subject[4];
int start;
int len;