Hass discovery improvments (#512)

Rename set commands to config
correct json buffer size and gateway name
replace state to cmd
replace set by config
add restart and erase command
add unicity to gateway command switches
BLE devices shouldn't be child of the gateway
make the BTtoMQTT topic consistent with other definitions
This commit is contained in:
Florian authored and GitHub committed 2019-12-20 23:01:56 +01:00
1 parent e4d96b2bfd
commit db8df1ddf6
10 files changed
+74 -59

No files matched your search

+6 -6
View File
@@ -52,11 +52,11 @@ More info are available on [my blog](https://1technophile.blogspot.fr/2017/11/mi
## Setting a white or black list
A black list is a list of mac adresses that will never be published by OMG
to set black list
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/set -m '{"black-list":["012314551615","4C6577889C79","4C65A6663C79"]}'`
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"black-list":["012314551615","4C6577889C79","4C65A6663C79"]}'`
A white list is a list of mac adresses permitted to be published by OMG
to set white list
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/set -m '{"white-list":["012314551615","4C65A5553C79","4C65A6663C79"]}'`
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"white-list":["012314551615","4C65A5553C79","4C65A6663C79"]}'`
Note: if you want to filter (white or black list) on BLE sensors that are auto discovered, you need to wait for the discovery before applying the white or black list
@@ -64,11 +64,11 @@ Note: if you want to filter (white or black list) on BLE sensors that are auto d
If you want to change the time between readings you can change the interval by MQTT, if you want the BLE scan every 66seconds:
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/set -m '{"interval":66000}'`
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"interval":66000}'`
you can also force a scan to be done by the following command:
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/set -m '{"interval":0}'`
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"interval":0}'`
Once done the previous value of interval will be recovered.
@@ -78,11 +78,11 @@ The default value is set into config_BT.h
If you want to change the minimum RSSI value accepted for a device to be published, you can change it by MQTT. For example if you want to set -80
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/set -m '{"minrssi":-80}'`
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"minrssi":-80}'`
you can also accept all the devices by the following command:
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/set -m '{"minrssi":0}'`
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"minrssi":0}'`
The default value is set into config_BT.h