Tasmota: Get info from MQTT to Home Assistant

Created on 14 May 2017  路  5Comments  路  Source: arendst/Tasmota

I need to get some info like ip address, firmware version, etc, from my Sonoffs, but i only can get this information using tele/ topics !!

This Works

  • platform: mqtt
    state_topic: 'tele/sonoff01/STATE'
    value_template: "{{ value_json.Wifi.RSSI }}"
    name: 'Wi-Fi Signal Sonoff01'
    unit_of_measurement: '%'

Dont show nothing

  • platform: mqtt
    state_topic: 'stat/sonoff01/STATUS2'
    value_template: "{{ value_json.StatusFWR.Program }}"
    name: 'Version Sonoff '

How i can make a sensor to get the others informations using "stat" ?

stale

Most helpful comment

If you just make a automation with time trigger you could send the Status 2 command to the Sonoff based on whenever you want to request the sensor value and then you will have the sensor response.
Something like this should do the magic:
automation:
trigger:
platform: time
# Matches every hour at 5 minutes past whole
minutes: 5
seconds: 00
action:
service: mqtt.publish
data:
topic: 'cmnd/sonoff01/status 2'

You may not want to send the request every hour, once a day might be often enough, see this for other time triggers: https://home-assistant.io/docs/automation/trigger/

All 5 comments

You will have to execute the command status 2 in order to get the StatusFWR message.

Can you show how can i make this in home assistant sensor configuration ??
Thanks !!

If you just make a automation with time trigger you could send the Status 2 command to the Sonoff based on whenever you want to request the sensor value and then you will have the sensor response.
Something like this should do the magic:
automation:
trigger:
platform: time
# Matches every hour at 5 minutes past whole
minutes: 5
seconds: 00
action:
service: mqtt.publish
data:
topic: 'cmnd/sonoff01/status 2'

You may not want to send the request every hour, once a day might be often enough, see this for other time triggers: https://home-assistant.io/docs/automation/trigger/

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TylerDurden23 picture TylerDurden23  路  3Comments

ximonline picture ximonline  路  3Comments

renne picture renne  路  3Comments

jensuffhaus picture jensuffhaus  路  3Comments

Vujagig picture Vujagig  路  3Comments