diff --git a/docs/advanced/logs.md b/docs/advanced/logs.md index 59a141b..2b98567 100644 --- a/docs/advanced/logs.md +++ b/docs/advanced/logs.md @@ -6,8 +6,23 @@ import CenteredImage from '@site/src/components/CenteredImage'; # Logs -While logs are normally sent over MQTT, any logs that are created before WiFi-connection are sent out on Serial. -If you wish to see the logs going over MQTT, you can look at the topic `nspanel//log`. +Once the NSPanel is connected to MQTT, it sends its logs on the topic `nspanel//log`, where `` is the MAC address of the panel. +These are the logs you see in the live log view on the NSPanel page in the web interface, and the log level is set on the +settings page on the panel itself. + +Logs created while the panel isn't connected to MQTT, for example during boot or before WiFi has connected, can't reach the +manager, so they're written to the serial port instead. + +## Serial log setting + +The **Serial log** setting on the panel's own settings page controls when log lines are also written to the serial port: + +- **Auto (only while not connected to MQTT)** - The default. Lines go to the serial port only while they can't be sent over + MQTT. Writing to the serial port slows the panel down, so it is skipped once the logs reach the manager. +- **Always** - Every line is written to the serial port as well. Useful when debugging with a serial cable attached. +- **Never** - Nothing is written to the serial port. + +## Read the serial log If you wish to look at the logs going over serial, you can use programs like Putty. @@ -24,4 +39,10 @@ will be something similar to `/dev/ttyUSB0`. Example: - \ No newline at end of file + + +## Event loop watchdog + +If the panel stops responding to touches while it still shows as online in the manager, look for `LoopWatchdog` lines in its +log. The panel logs these when its main event loop has stalled for 15 seconds or more: one line per task, each with a backtrace. +They are useful to include in a bug report. diff --git a/docs/advanced/mqtt-topics.md b/docs/advanced/mqtt-topics.md index 587ea78..cac5d83 100644 --- a/docs/advanced/mqtt-topics.md +++ b/docs/advanced/mqtt-topics.md @@ -26,7 +26,9 @@ Below table is a description of all MQTT topics that might be of use by a user. | nspanel/\/screensaver_mode_cmd | screensaver mode | Select what screensaver to display
Choose from the following:
- with_background
-without_background
-datetime_with_background
-datetime_without_background
or no_screensaver | | nspanel/\/screensaver_mode_state | screensaver mode | The currently selected screensaver mode | | nspanel/\/log | Log message | The panel will send live logs on this topic. | -| nspanel/\/buzzer_raw_command | Buzzer raw command | The raw command to control the buzzer. | +| nspanel/\/buzzer_raw_command | RTTTL string | An RTTTL tune to play on the buzzer. An empty message stops playback. | +| nspanel/\/buzzer_mute_cmd | 1 or 0 | Send a 1 or 0 to mute or unmute the sounds configured for panel events. Tunes sent on buzzer_raw_command still play. | +| nspanel/\/buzzer_mute_state | 1 or 0 | Whether the event sounds are currently muted. | Below are more topics that are used internally. Replace `` with the IP address of the manager container. @@ -34,6 +36,7 @@ Below are more topics that are used internally. Replace `` with | --------------------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------- | | nspanel/mqttmanager\_\/status/time | Time as a string | Current time sent by MQTTManager. | | nspanel/mqttmanager\_\/status/date | Date as a string | Current date sent by MQTTManager. | +| nspanel/mqttmanager\_\/status/epoch | Unix time (ms) | Current time in milliseconds since the Unix epoch, sent by MQTTManager every minute and whenever a panel comes online. Panels use it to set their clock. Not retained. | | nspanel/mqttmanager\_\/status/weather | Protobuf | A protobuf representation of the current weather and weather forecast. | | nspanel/\/status_report | Protobuf | Protobuf payload with current state of the panel. | | nspanel/\/status | JSON | JSON payload with current online/offline state of the panel. | @@ -41,7 +44,6 @@ Below are more topics that are used internally. Replace `` with | nspanel/mqttmanager\_\/command | Protobuf | Protobuf payload from panel with a command for MQTTManager to perform. | | nspanel/mqttmanager\_\/room/\/state | Protobuf | Protobuf payload from the manager that represents the "Home page" state to display on the NSPanel for the given room. | | nspanel/mqttmanager\_\/all_rooms_state | Protobuf | Protobuf payload from the manager that represents the "Home page" state to display on the NSPanel when in "All rooms" mode. | -| nspanel/mqttmanager\_\/all_rooms_state | Protobuf | Protobuf payload from the manager that represents the "Home page" state to display on the NSPanel when in "All rooms" mode. | | nspanel/mqttmanager\_\/entity_pages/\/state | Protobuf | Protobuf payload from the manager that represents the "Entities"/"Scenes" state to display on the NSPanel when. | | nspanel/mqttmanager\_\/relay_groups/\/state | 1 or 0 | Current state of the relay group binding 1 for "ON" and 0 for "OFF". | | nspanel/mqttmanager\_\/entities/lights/\/state | Protobuf | Current state of the light. | diff --git a/docs/web-interface.md b/docs/web-interface.md index c8e9592..c5b152c 100644 --- a/docs/web-interface.md +++ b/docs/web-interface.md @@ -69,6 +69,17 @@ Available options for each individual NSPanel are: - **Detached mode** - Detached mode controls an entity via your selected home automation platform. Do not however that not all entity types support the toggle mechanism. - **Custom MQTT** - This mode can be used to send a custom message on a custom MQTT topic. - **Follow mode** - When the button is pressed the relay is engaged, when the button is release the relay is disconnected. + - **Thermostat (heating) mode** - The panel switches the relay itself to keep the temperature between a lower and an + upper limit. The relay turns on when the temperature falls to the **Relay 1/2 lower temperature** and turns off when it + rises to the **Relay 1/2 upper temperature**. + - **Thermostat (cooling) mode** - As above, but the other way round: the relay turns on when the temperature rises to + the upper temperature and turns off when it falls to the lower temperature. + + In both thermostat modes the button doesn't control the relay, and the relay starts off when the panel boots. + The limits are whole degrees, in the same unit the panel shows (Celsius or Fahrenheit). + The panel uses only its own internal temperature sensor, so it doesn't depend on another sensor reporting in. + Be aware that the relay can warm the panel and skew the reading, and that a panel that stops responding also stops + switching the relay. - **Relay 1/2 default mode** - Select the default mode of the relay when the NSPanel starts. - **Register relay 1/2** as: - **Switch** - The relay will be registered to Home Assistant as a switch entity. @@ -193,7 +204,7 @@ When adding/editing a thermostat/climate entity you get multiple options of char - **Home Assistant Entity