[SYS][BREAKING] Optim json size (#1823)
This commit is contained in:
1 parent
25af43bdeb
commit
5a07020144
6 files changed
+66
-66
No files matched your search
@@ -78,7 +78,7 @@ You should see the gateway connected to your broker by checking with an MQTT cli
|
||||
|
||||
To make the auto discovery compatible with OpenHAB you have to send the following command with a retain flag.
|
||||
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"ohdiscovery":true}'`
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"ohdisc":true}'`
|
||||
|
||||
## Adding the things
|
||||
1. From the Administration click on "Things" under "Settings", you should see a number in the INBOX button
|
||||
|
||||
+3
-3
@@ -225,11 +225,11 @@ Or by an MQTT command.
|
||||
|
||||
To change presence publication topic, use this MQTT command:
|
||||
|
||||
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"presenceTopic":"presence/"}'`
|
||||
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"prestopic":"presence/"}'`
|
||||
|
||||
To use iBeacon UUID for presence, instead of sender (random) MAC address, use this MQTT command:
|
||||
|
||||
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"presenceUseBeaconUuid":true}'`
|
||||
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"presuseuuid":true}'`
|
||||
|
||||
This will change usual payload for iBeacon from:
|
||||
`{"id":"60:87:57:4C:9B:C2","mac_type":1,"rssi":-78,"distance":7.85288,"brand":"GENERIC","model":"iBeacon","model_id":"IBEACON","mfid":"4c00","uuid":"1de4b189115e45f6b44e509352269977","major":0,"minor":0,"txpower":-66}`
|
||||
@@ -250,7 +250,7 @@ home/OpenMQTTGateway/BTtoMQTT/5210A84690AC {"id":"52:10:A8:46:90:AC","mac_type":
|
||||
|
||||
To use iBeacon UUID as topic, use this MQTT command:
|
||||
|
||||
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"pubBeaconUuidForTopic":true}'`
|
||||
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"pubuuid4topic":true}'`
|
||||
|
||||
Resulting in such messages (for the same iBeacon as previously):
|
||||
```
|
||||
|
||||
+5
-5
@@ -22,13 +22,13 @@ With Home Assistant, this command is directly available through MQTT auto discov
|
||||
## Auto discovery
|
||||
You can deactivate the MQTT auto discovery function, this function enables to automatically create devices/entities with Home Assistant convention.
|
||||
### Deactivate
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"discovery":false}'`
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"disc":false}'`
|
||||
|
||||
### Activate
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"discovery":true}'`
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"disc":true}'`
|
||||
|
||||
If you want the settings to be kept upon gateway restart, you can save the state by adding `"save":true` (ESP32 only).
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"discovery":false, "save":true}'`
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"disc":false, "save":true}'`
|
||||
|
||||
::: tip
|
||||
Auto discovery is enable by default on release binaries, on platformio (except for UNO). With Arduino IDE please read the [advanced configuration section](../upload/advanced-configuration#auto-discovery) of the documentation.
|
||||
@@ -37,10 +37,10 @@ Auto discovery is enable by default on release binaries, on platformio (except f
|
||||
## AutoDiscovery compatible with OpenHAB (default: false)
|
||||
OpenHAB does not support the key `is_defined` in the json template, to remove it at runtime and make the auto discovery compatible you can use the following command with a retain flag.
|
||||
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"ohdiscovery":true}'`
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"ohdisc":true}'`
|
||||
|
||||
If you want the settings to be kept upon gateway restart, you can save the state by adding `"save":true` (ESP32 only).
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"ohdiscovery":true, "save":true}'`
|
||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"ohdisc":true, "save":true}'`
|
||||
|
||||
::: tip
|
||||
This command can also be used with other controllers that does not support the is_defined key.
|
||||
|
||||
Reference in new issue
Block a user