Theo's Tips
Obtaining the IP address of a Tasmota device
- The network name is be
<MQTT_TOPIC>-<last 4 decimal chars of MAC address>
. The default name issonoff-xxxx
. - Use the
Status 5
command
Available Characters for HOSTNAME
- 24 chars max
- only a..z A..Z 0..9 '-'
- no '-' as last char
RFC952
ASSUMPTIONS
- A "name" (Net, Host, Gateway, or Domain name) is a text string up to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus sign (-), and period (.). Note that periods are only allowed when they serve to delimit components of "domain style names". (See RFC-921, "Domain Name System Implementation Schedule", for background). No blank or space characters are permitted as part of a name. No distinction is made between upper and lower case. The first character must be an alpha character. The last character must not be a minus sign or period. A host which serves as a GATEWAY should have "-GATEWAY" or "-GW" as part of its name. Hosts which do not serve as Internet gateways should not use "-GATEWAY" and "-GW" as part of their names. A host which is a TAC should have "-TAC" as the last part of its host name, if it is a DoD host. Single character names or nicknames are not allowed.
Topic, GroupTopic, and FallBack Topic
Initially Tasmota had one MQTT configurable topic planned called TOPIC. It soon became apparent that when two devices come online with the same topic this would be a challenge, to say the least!
Tasmota then introduced a unique, non-configurable "fallback topic" that allows to always change the MQTT configurable topic to a new unique topic. This fallback topic is just what it is meant to be: A FALLBACK TOPIC in case of emergency.
All MQTT status messages will be sent using the configurable TOPIC which must be made unique by the user. It might be called bedroom
but it could also have been called titanic10
as long as the user knows what it is and where to find it.
Having two devices with the same topic allowed for MQTT commands to be sent once to make the devices act in conjunction. That inspired a third topic to subscribe to called GROUPTOPIC. The default GROUPTOPIC is sonoffs
. Devices with the same GROUPTOPIC will react to the same MQTT command. You can use this to take actions (e.g., update firmware) devices using different groups (e.g., sonoff, sonoff-sensors, etc.).
Changing TOPIC can be done online using the fallback topic and is only needed once. There is no need to change user_config_override.h
all the time, as many users seem to think they have to do with any new release. All changes are stored in flash. A lot of coding effort is expended to retain these changes between firmware updates.
Flash Memory Considerations
-
To stop saving parameter changes to Flash or Spiffs use command
SaveData off
. -
To stop saving power changes only to Flash or Spiffs use command
SetOption0 off
. This will disable the relay from returning to the same state after power on UNLESS you use the MQTT retain flag in which case the MQTT broker will send the last known MQTT state on restart or power on. The commandButtonRetain on
will configure the button to send a MQTT command with Topic and the MQTT retain flag set.
3D Printed Cases
Don't have 3D printer? Depending on where you live, you may be able to find a third party to print the model for you. Some schools and public libraries provide printing services. Search for a printing service using 3D Hubs or send your design to a service like Shapeways.
Wiki has moved to link on the left.