[SSD1306] Save/load/init/erase SSD1306 configs (#1501)

* Save/load/init/erase SSD1306 configs

Save/load/init/erase SSD1306 configs to stick across restarts, overwrite defaults

* SSD1306 combinable
This commit is contained in:
DigiH authored and GitHub committed 2023-03-06 10:19:31 -06:00
1 parent 1b5215de42
commit 3b6b758098
3 files changed
+154 -32

No files matched your search

+2 -1
View File
@@ -6,8 +6,9 @@
If you want to use the BLE decoding capabilities of OpenMQTTGateway with a tablet or smartphone you can use [Theengs App](https://app.theengs.io/).
:::
::: NOTE
::: warning Note
If you are on macOS and have a LilyGo LoRa32 V2.1 board, make sure you have the [correct driver for the CH9102 Serial Chip](https://github.com/WCHSoftGroup/ch34xser_macos) installed and selected in the popup when initiating the web install.
:::
To finalise the driver installation don't forget the confirmation in the **Security** section of **System Preferences** after the restart.
+22
View File
@@ -84,3 +84,25 @@ You can also change it by MQTT. For example if you want to display module json m
And to disable the display of module json messages:
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{"display-json":false}'`
### Store the current display configuration in the gateway
To store the running display configuration into non-volatile storage on the gateway use the following command. This assures persistence across restarts.
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{"save":true}'`
At any time, you can reload the stored configuration with the command:
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{"load":true}'`
If you want to erase the stored configuration, use the command:
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{"erase":true}'`
Note that this will not change the running configuration, it only ensures that the default configuration is used at next startup.
If you want to load the default configuration use the command:
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{"init":true}'`
Note that this will not change the stored configuration, `erase` or `save` is still needed to overwrite the saved configuration.