emontnemery / hatasmota

MIT License
25 stars 20 forks source link

Feature Request: Start Tasmota Firmware Update via Homeassistant #151

Open FaserF opened 2 years ago

FaserF commented 2 years ago

Homeassistant has a cool new feature, where integrations can display if its device has a firmware update available. https://www.home-assistant.io/integrations/update/

Would it be possible to implement this? Would be quite nice, to have this update sensor and start firmware updates through Homeassistant.

https://github.com/arendst/Tasmota/discussions/15480

tismofied commented 2 years ago

Hope this get enough attention. I love this idea

bifbaf commented 1 year ago

+1 for this. I would also love to have this integration in HA. At the moment it is only possible to do a swarm firmware update for tasmota with some other tools but these tools would be obsolete if we get a integration in HA.

SteveDinn commented 1 year ago

+1 if we can have a way to specify the base URL for the tasmota binaries. I disallow most of my IOT devices from accessing the Internet, but I have an intranet website set up for tasmota OTA upgrades.

tbclark3 commented 1 year ago

I hope this feature request is still alive. I have a bunch of tasmota devices, and it would be incredible to have this feature in the integration.

bifbaf commented 1 year ago

Just use tasmo admin for updating your tasmota devices. You can install it via add on.

frostworx commented 1 year ago

tasmoadmin is really nice, but a full integration (as in esphome) would be much more user-friendly.

Darthmonkey commented 6 months ago

Once you reach critical mass (over 10 devices) updating via Tasmota would be massively useful.

Jpsy commented 5 months ago

+1 I would be very happy to at least have an update sensor entity for my Tasmota devices. So I would know when an update is available. The update itself can be issued through TasmoAdmin for now.

koch86 commented 2 months ago

Would also highly appreciate the feature. Until then, I am using simple bash script to trigger OTA update on all my devices. Sure, not a perfect solution (plain PW, manual list of IP addresses ...) but works fine for me. Might also work per command from inside HA via MQTT integration - but did not find time to work that out.

#!/bin/bash

devices=(
    "10.2.0.68"
    "10.2.0.21"
    "10.2.0.176"
    "10.2.0.234"
    "10.2.0.220"
    "10.2.0.121"
    "10.2.0.95"
    "10.2.0.202"
    "10.2.0.105"
    "10.2.0.126"
    "10.2.0.248"
    "10.2.0.39"
    "10.2.0.82"
)

start_ota_update() {
    local device_ip=$1
    echo "Starte OTA-Update auf $device_ip"

    response=$(curl -s -X POST "http://$device_ip/cm?user=admin&password=*******&cmnd=Upgrade%201")

    if echo "$response" | grep -q "Upgrade"; then
        echo "OTA-Update auf $device_ip gestartet:"
        echo "Antwort: $response"
    else
        echo "Fehler beim Starten des OTA-Updates auf $device_ip."
        echo "Antwort: $response"
    fi
}

for device in "${devices[@]}"; do
    start_ota_update "$device"
done