Public Access
Slow mode (Home Assistant switch "FlipDot Display Slow mode", dropdown
"FlipDot Display Slow mode interval", web UI Settings) makes the display
change only every 1, 2, 5, 10, 15, 20, 30 or 60 minutes, on the clock, and
powers it off in between: less noise. Nothing else is drawn meanwhile, also
no page changes. It updates at once after boot, the night, the Power switch
and live mode, and when it is switched off. Rules can override it ("show at
once in slow mode"): while their page is shown the display works normally.
Settings layout 7 and schedule layout 4 (older records are converted; they
are stored again once the firmware is marked good, so a rollback still
finds the old ones). Pages in older formats are rewritten in the current
one, in time-boxed steps. /api/status reports old_data_left.
Version 2.15.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.7 KiB
C
30 lines
1.7 KiB
C
#pragma once
|
|
|
|
#include "logic/display_controller.h"
|
|
#include "logic/settings.h"
|
|
|
|
// Home Assistant integration over MQTT (with discovery):
|
|
// FlipDot Display Power switch: off = draw the off image and switch the display off
|
|
// FlipDot Display Mode select: the page shown during the day (a dynamic page, e.g.
|
|
// the built-in "Clock", or a bitmap)
|
|
// FlipDot Display Off image select: left on the dots when the display switches off
|
|
// ("Blank" or a bitmap)
|
|
// FlipDot Display IP sensor: the IP address
|
|
// FlipDot Display Firmware sensor: version and health, e.g. "2.1.0, ok, 0 crashes, ..."
|
|
// FlipDot Display Recovery button: restart into the recovery app (for 10 minutes)
|
|
// FlipDot Display Stopwatch switch: the stopwatch of the dynamic pages runs
|
|
// FlipDot Display Stopwatch reset button: back to 0
|
|
// FlipDot Display Shown page sensor: the page or bitmap on the display now
|
|
// FlipDot Display Back to schedule button: ends a manual pick (the Mode dropdown)
|
|
// FlipDot Display Slow mode switch: the display only changes every few minutes
|
|
// FlipDot Display Slow mode interval select: how often ("15 minutes"; settings.slow_mode)
|
|
//
|
|
// The broker comes from the settings (web UI); an empty host means BROKER_ADDR, MQTT_USER
|
|
// and MQTT_PASSWORD from secrets.h. Changes need a restart.
|
|
void homeAssistantBegin(DisplayController &controller, const HomeAssistantSettings &settings);
|
|
void homeAssistantLoop();
|
|
bool homeAssistantConnected();
|
|
|
|
// Publish the firmware status (only sent when it changes, and again after a reconnect)
|
|
void homeAssistantSetFirmwareStatus(const char *status);
|