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:
1 parent
e4d96b2bfd
commit
db8df1ddf6
10 files changed
+74
-59
No files matched your search
@@ -14,10 +14,10 @@ ON command
|
||||
or with [json receiving](../upload/pio.md#api)
|
||||
|
||||
OFF command:
|
||||
`mosquitto_pub -t home/OpenMQTTGateway_MEGA/commands/MQTTtoONOFF -m '{"pin":15,"state":0}'`
|
||||
`mosquitto_pub -t home/OpenMQTTGateway_MEGA/commands/MQTTtoONOFF -m '{"pin":15,"cmd":0}'`
|
||||
|
||||
ON command
|
||||
`mosquitto_pub -t home/OpenMQTTGateway_MEGA/commands/MQTTtoONOFF -m '{"pin":15,"state":1}'`
|
||||
`mosquitto_pub -t home/OpenMQTTGateway_MEGA/commands/MQTTtoONOFF -m '{"pin":15,"cmd":1}'`
|
||||
|
||||
## FASTLED
|
||||
### The FASTLED module support 2 different operation modes
|
||||
|
||||
+6
-6
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
## Restart the ESP
|
||||
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/set" -m '{"cmd":"restart"}'`
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"cmd":"restart"}'`
|
||||
|
||||
## Erase the ESP settings
|
||||
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/set" -m '{"cmd":"erase"}'`
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"cmd":"erase"}'`
|
||||
Reference in new issue
Block a user