How set up the "native Tasmota discovery"?

The old HA discovery method is removed from Tasmota. It was to unflexibel, had errors and was too resource hungry. We decided to implement how it is done now. HA uses this plugin GitHub - emontnemery/hatasmota to “translate” for HA needs.

Sorry to hear there is no interest from OH to support the millions of Tasmota users to make the use of OH easy for them.

Greetings Jason2866 (dev member of Tasmota crew)

It’s not that we aren’t interested–it’s that someone has to volunteer to do the work. Would you perhaps be interested in contributing to OH? I can’t imagine that anyone would be better suited since you’re on the Tasmota dev team.

I’m not being sarcastic. We really would appreciate it and I’m sure many people would take advantage of Tasmota auto-discovery. I’d certainly be happy to test it.

Sorry out here, never wrote anything with Java. This will not change :wink:

@Johann_Obermeier: is there any clear documentation on the structure of Tasmota’s discovery topics? Looking through both the Tasmota and hatasmota source I wasn’t able to find anything, and the code isn’t exactly easy to follow.

Heh, famous last words. I said the same thing, several years ago. Until I was frustrated enough to want to fix something I depended on in openHAB. I also have no desire to learn JavaScript, TypeScript, or Python, and yet I’ve contributed to several projects in those languages :).

1 Like

Will gather Infos and come back with.

Edit:
Documentation work for this part is on todo list
Relevant Infos Custom Tasmota MQTT discovery format to enable native HA integration · Issue #9267 · arendst/Tasmota · GitHub
and
Tasmota/tasmota/tasmota_xdrv_driver/xdrv_12_discovery.ino at development · arendst/Tasmota · GitHub

class DiscoverySchema(BaseModel):
    ip: IPv4Address
    """IPv4 address"""

    dn: str
    """Device name"""

    fn: List[Union[str, None]]
    """List of FriendlyNames"""

    hn: str
    """Hostname"""

    mac: str
    """MAC address"""

    md: str
    """Module"""

    ofln: str
    """Offline LWT payload"""

    onln: str
    """Online LWT payload"""

    state: List[str]
    """States"""

    sw: str
    """Tasmota firmware version"""

    t: str
    """Topic"""

    ft: str
    """FullTopic"""

    tp: TopicPrefixes
    """Topic prefixes"""

    rl: List[Union[int, None]]
    """Relays"""

    swc: List[int]
    """Switches"""

    btn: List[int]
    """Buttons"""

    so: Dict[str, int]
    """Setoptions"""

    lk: int
    """Light CTRGB linked"""

    lt_st: LightType
    """Light type"""

    ver: int
    """Discovery version"""
1 Like

It seems there are a few more payload objects in the discovery message depending on Tasmota settings, most importantly shutter configuration and buttons. I have a shutters-enabled device in a remote location, I’ll try to gain access to it to update the schema with whatever I can find.

Also another user from Tasmota discord posted these additional keys

‘bat=battery enabled’
‘dslp=deep sleep enabled’
‘if=ifan’
‘sho=shutters’
‘sht=shutterTilt’
‘swn=SwitchText’
‘ty=Tuya’