Tasmota version mqtt topic

Hi,

I would like to have the newest version number to be shown in ha.

Bonus - Update Notification: @smadds also publishes the latest released version number to a publicly available MQTT server which may be subscribed to at sonoff.maddox.co.uk:1883 with the topic sonoff-version . No authentication needed.

I don’t know how to set this up, i tried this without luck:

sensor:
  - platform: mqtt
    name: "Sonoff Version"
    state_topic: "sonoff.maddox.co.uk:1883"

Usually it looks like this “stat/sonoff_haus/RESULT” but I don’t know what to the with an URL.

Thanks

I have this command:line sensor for the latest Tasmota:

  - platform: command_line
    name: "Latest Tasmota"
    command: '/usr/bin/mosquitto_sub -h sonoff.maddox.co.uk -t "sonoff-version" -C 1'
    scan_interval: 3600

If you’re (hopefully) on hassbian, you have to install mosquitto-clients.
sudo apt install mosquitto-clients

I have Hass.io

Does this mean your setup will not work for me?

I think not with hass.io

This worked for me:

sensor:
  - platform: rest
    name: Sonoff - newest version
    resource: https://api.github.com/repos/arendst/Sonoff-Tasmota/releases/latest
    value_template: '{{ value_json.tag_name }}'
    headers:
      Accept: application/vnd.github.v3+json
      Content-Type: application/json
      User-Agent: Home Assistant REST sensor 

I found this here:

1 Like

Unfortunately the code I postet above does not work as expected.

Github only allows 60 request per hour. It looks like the code looks for the version number every 30 seconds, because github blocks the sensor every 30 minutes.

I tried adding

timeout: 1800

but that did do the trick.

I didn’t use the component “rest” before. How can I change the update rate?

Scan interval

1 Like