Skip to content

TasmoFleet 0.37.0 "Kullen"

Choose a tag to compare

@github-actions github-actions released this 15 Nov 06:50
· 175 commits to main since this release
Immutable release. Only release title and notes can be modified.
v0.37.0
c2cc04c

Upgrade notes

  • Set up an ACL on your MQTT broker before you update: since this release MQTT is the first way TasmoFleet talks to a device that is online on its broker, so the broker delivers every command, every password in it and the whole configuration dump of every backed-up or restored device to every client that may subscribe to the device's topics (Home Assistant, Node-RED, MQTT Explorer, other devices), and without an ACL that is every client of the broker. docs/mqtt-broker-acl.md has a tested rule set. The Mosquitto app of Home Assistant does not enforce the acl_file of its documented recipe in version 7.1.3 (reported since 7.0.0, upstream app-mosquitto#5): with it, use another broker for the devices until it is fixed (#840)
  • The switches of a device on TasmoFleet's broker whose group topic has not been read yet (or while another device's has not) now go over HTTP, like every other change: its topic might be shared, and a switch over MQTT could reach other devices. If HTTP does not reach such a device either, switching it fails with the reason until that group topic is read. Refreshing the identity of the device it belongs to reads it; the device page's "How TasmoFleet reaches this device" card says whether that is this device or another one (#605)

Added

  • A big red notice says, wherever MQTT settings and MQTT-carried secrets appear, that without an ACL on the broker every MQTT client can read the commands, passwords and device backups TasmoFleet sends through it: on System, MQTT and the setup's broker section, by the device's MQTT password, on the confirmation of a console or bulk command that goes over MQTT, of a restore over MQTT and on the page that starts bulk backups. The new guide docs/mqtt-broker-acl.md has a ready ACL for TasmoFleet, the devices and Home Assistant with the reason for every line, a way to check it, a stricter one-login-per-device variant and sections for plain Mosquitto and EMQX; its rules were run against a real Mosquitto 2.1.2 (make mqtt-acl-check) (#840)
  • The README has a "Community projects" section for unofficial projects by other people; the first entry is tasmofleet-keycloak-theme, a Keycloak login theme in the TasmoFleet look (#848, thanks @Noschvie)

Changed

  • Changes go over MQTT first, like reads since 0.30.0: console and settings writes, Restart, bulk commands and the switches of a device that is online on TasmoFleet's broker with its own topic (its group topic read, and every other device's) are sent over MQTT, and over HTTP only when MQTT cannot carry them or nothing could be published. That holds whatever a change carries: a password, a Wi-Fi name, a login inside a command, a GPIO template and a change of the device's MQTT connection (topic, broker, login) go over MQTT first too. HTTP to a Tasmota is plain text as well, but over MQTT the broker hands a command and its reply to every client subscribed to the device's topics: give the broker an ACL that lets only TasmoFleet and the device read them. The audit log, the console history and the replies keep hiding secrets as before. While HTTP reaches the device (it answers a quick Status 11 TasmoFleet asks right before), a change of its MQTT connection (MqttTLS and MqttTLSFingerprint included, which Tasmota runs as SetOption103 and SetOption132) is sent without a question, and the device's next commands then go over HTTP for about ten minutes, whichever way the change went, so a device that does not come back to the broker after the change, a mistyped MQTT password for instance, is still reached and can be corrected; otherwise the console asks first, a bulk command or Make compliant leaves that device out and the settings page reports it as not sent. The bulk preview and Make compliant's plan refuse such a change up front only for devices whose HTTP is known to fail. Opening a device's console now checks its HTTP, as its page does. Commands that run other commands (Json, If, WebSend, a rule text, DevGroupSend, LoRaCommand, a GPIO template with a CMND part and the like) and Backlog2/Backlog3 still go over HTTP: MQTT does not carry them (If, DevGroupSend, LoRaCommand and a template with CMND are now refused over MQTT like the others). A change MQTT sent and the device did not confirm is reported as an unknown outcome and never sent again; the device's next commands then go over HTTP for a while. A device reply no longer shows the Zigbee network key (KeyL, KeyH) or the BLE bind keys (MIKeys). The audit names the transport, and the device page's "How TasmoFleet reaches this device" card says which way changes go and why; the console's title names the transports ("MQTT + HTTP", "MQTT" or "HTTP") instead of always "HTTP". The console and bulk commands now ask for a confirmation before they set RgxPassword or RgxSSId (the range extender's Wi-Fi password and name) or WiFiTest (a Wi-Fi name and password to try), as for the other passwords and Wi-Fi names, and before MI32Key, MI32Keys or ZbConfig with a value, naming what a wrong key or a changed Zigbee network does (#605)
  • Make compliant goes over MQTT first like every other change: for a device that is online on TasmoFleet's broker with its own topic, the settings are sent over MQTT in chunks of at most 8 settings that fit what the MQTT channel takes (255 bytes per Backlog, before 300), followed by the one save. A change of the device's MQTT connection (its topic, broker or login) goes over MQTT too while HTTP reaches the device (it answers a quick Status 11 right before, once every other setting of the run has been sent, so a setting that closes HTTP is not missed), without a question, and the device's next commands then go over HTTP for a while, as for every other change; when HTTP does not answer such a line is left out and listed as skipped, as before. A chunk MQTT sent and the device did not confirm is reported as an unknown outcome and never sent again; when a step fails, the error names its settings without their values. A rule that writes a restarting SetOption as ON (SetOption103 ON) is now sent after the other settings, like the same rule written as 1. The audit's "via" now says "mqtt" for these runs. A policy rule that names a setting with a number it does not take (Topic1, MqttHost0) is now refused with "write the setting as Topic", and a stored one is left out with that reason: Tasmota drops the number and sets the setting, but TasmoFleet did not know that the line restarts the device or changes its MQTT connection, and did not check its value. The same goes for a SetOption under another name: a rule with a SetOption synonym (MqttTLS, MqttNoRetain, DiscoverOff, ChannelRemap, ...) is refused with "write the setting as SetOption103", and a SetOption number or value with a leading 0 is refused: Tasmota reads SetOption003 as SetOption3 (refused with "write the setting as SetOption3") and a value such as 08 as octal (refused with "write the value as a plain decimal") (#606)
  • Backups and restores go over MQTT first, like every other change: a device that is online on TasmoFleet's broker with its own topic and has a usable MQTT password is backed up with FileDownload and restored with FileUpload, also while its HTTP API works. That holds for every backup: scheduled, before an update (also an update over HTTP), manual, bulk, and the backups a restore takes before and after the upload. HTTP carries a backup or restore only when MQTT cannot: no usable MQTT password, the topic not the device's own, MQTT commands of the device going unanswered, or a backup that MQTT provably did not send at all. A backup or restore that sent anything over MQTT never goes on over HTTP. A config dump holds the Wi-Fi, MQTT and web passwords; it is not better protected over HTTP (plain text there too), but over MQTT the broker hands it to every client subscribed to the device's topics, so give the broker an ACL that lets only TasmoFleet and the device read them. The files of a backup still go over HTTP, because Tasmota has no file transfer over MQTT: after a dump over MQTT the files are read over HTTP from the device's address, but only when the device there reports the device's own MAC (asked before the web password is sent), and when HTTP does not answer the backup is kept without them and says so. A restore over MQTT writes the backup's files over HTTP the same way, and says when they were not restored. A restore whose backup changes the device's MQTT connection (topic, prefixes, broker, login, client ID, TLS or its fingerprints, or MQTT off) no longer asks the lockout question while the device's HTTP API answers (checked when the restore starts and again right before the upload); the device's next commands then go over HTTP for a while, and the wait for the restart also asks HTTP, so such a restore no longer ends with "did not restart in time" when the device came back under its new topic. The device page's "How TasmoFleet reaches this device" card and the restore page say which way the backup, the restore and the files go (#607)
  • A console or bulk command whose arguments the audit hides (it logs them as "Name ***") now says in its confirmation which way it goes to the device, before anything is sent: over MQTT "The command goes to the device over the MQTT broker, unencrypted; the broker also delivers it to every client subscribed to this device's commands (a broker ACL prevents that)." (with an ssl://, tls:// or mqtts:// broker URL "encrypted from TasmoFleet to the broker" instead of "unencrypted"), over HTTP "The command goes to the device over HTTP, unencrypted.". The console asks for every such command, also one that sent at once before; the bulk preview shows one row per transport with how many of the chosen devices take it (and a "Not sent" row for devices whose HTTP is not reachable when MQTT does not carry the command, such as Json or a rule text). The command goes only the way it named: if the way to the device or the broker URL changes before the send, nothing is sent and the console asks again (a bulk run sends nothing and asks you to start again from the device list); a bulk job and its retry keep the way their preview named (#826)
  • Reads follow the same rule as changes: a device online on TasmoFleet's broker is read over MQTT first. The background read of the broker a device reports to (Status 6, SetOption3) and the identity check before it now go over MQTT first, and the restart reason the health tracker reads after a restart (Status 1) does too, so it is also read for a device whose HTTP is blocked or that refuses the stored web password. A foreign device that answers on a device's topic is logged as a warning. HTTP still carries a read when MQTT is not usable for the device or leaves the read unanswered, and where MQTT cannot do it: the health poll (it measures HTTP), the identity probe of "Refresh identity", of a newly added device and of the background identity refresh after every restart and every 24 hours (the firmware language is only on the device's web page; its other reads, Status 5 included, stay on HTTP with it for now, #418), the discovery scan, the files of a backup, and the replies the MQTT channel cannot match (State, a bare Gpio, Gpios, Modules). The list, with the Tasmota source that proves each case, is in the MQTT transport security notes (#839)

Fixed

  • The identity check after a read of a device's values now asks over the transport the read used: when a read of the Settings tab or of the policy check fell back from MQTT to HTTP, it could be answered by another device that now holds the address while the check over MQTT was answered by the right device, and the other device's values were shown and judged as this device's (and the same the other way round). A read answered over both transports is checked over both; a read no check vouches for is refused and nothing of it is kept. The Wi-Fi facts of a device (Status 11) are read over the transport its MAC check was answered on (#810)
  • A relay switch over MQTT that the device does not answer now sends the device's next switches and commands over HTTP for a while, like any other unanswered change over MQTT, instead of publishing every further switch into the void while the device's last will still says Online (#842)

Security

  • A Template whose JSON has a CMND key (any letter case) is logged as Template *** in the audit log and the server log, is not kept in the console's command history, and its console confirmation names the way it goes to the device, like the commands it runs: before, a password inside its CMND (WebPassword ...) was kept there in clear. A Backlog with a part whose braces do not balance ({ and }) is now refused as a malformed command: the device joins such a part with the next one, so a ; inside a Template's JSON hid its CMND from the masking and from the MQTT channel (#843)