* Inverted idle logo Back on white background start-up logo. Inverted idle logo with random positioning. * Idle Logo display default true DISPLAY_IDLE_LOGO true as burn-in screens saver, especially fo the constant heading and line * Display Brightness added * SSD1306toMQTT / MQTTtoSSD1306 Additional "onstate" and "brightness" setting and regular display state reporting Docs - separate Displays section
3.3 KiB
Displays
SSD1306 Display (Heltec SX127X and LILYGO® LoRa32 boards)
Several options are available for the display of information on the SSD1306 display. Some options are exclusive to each other, and when a different option is enabled, the current option is disabled.
The current SSD1306 display states are being published to the SSD1306toMQTT topic, e.g.
{"onstate":true,"brightness":50,"display-metric":true,"display-flip":true,"idlelogo":true,"log-lcd":false,"json-lcd":true}
Display ON/OFF
To turn the SSD1306 display on or off.
This can be enabled with the compiler directive -DDISPLAY_STATE=true.
MQTT Display OFF command:
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {"onstate":false}
MQTT Display ON command:
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {"onstate":true}
Brightness
The display brightness can be set between 0-100%.
It is recommended to set a value lower than 100 to extend the life of the OLED display. The default setting is 50.
This can be set with the compiler directive -DDISPLAY_BRIGHTNESS=50.
or with the runtime command
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {"brightness":50}
Metric or Imperial property units
To have applicable device properties displayed in Imperial units, e.g. °F for temperature.
This can be set with the compiler directive -DDISPLAY_METRIC=false.
or with the runtime command
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {"display-metric":false}
Rotating the display by 180 degrees
This can be set with the compiler directive -DDISPLAY_FLIP=false.
or with the runtime command
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {"display-flip":false}
Display idle Logo
To display the OpenMQTTGateway logo during device display idle time. This reduces the likelihood of burn-in.
This can be set with the compiler directive -DDISPLAY_IDLE_LOGO=true.
or at runtime with
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {"idlelogo":true}
Setting the log output
The display of serial log messages to the display can be enabled via compiler directive -DLOG_TO_LCD=true or via MQTT commands.
For example if you want to set the serial log to LCD
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{"log-lcd":true}'
you can also revert it back to the serial monitor:
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{"log-lcd":false}'
The log level of the messages displayed is Errors and Warnings, and this can only be changed via the compiler directive -DLOG_LEVEL_LCD=LOG_LEVEL_NOTICE.
Displaying Module json messages (default)
The display of messages from various modules is also supported. Currently supported modules include ZgatewayRTL_433, ZgatewayBT and ZsensorBME280.
This can be enabled with the compiler directive -DJSON_TO_LCD=true.
You can also change it by MQTT. For example if you want to display module json messages:
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{"json-lcd":true}'
And to disable the display of module json messages:
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{"display-json":false}'