Autor Thema: Zigbee2MQTT OTA-Update  (Gelesen 290 mal)

Offline majestro84

  • Full Member
  • ***
  • Beiträge: 327
Zigbee2MQTT OTA-Update
« am: 12 März 2020, 15:29:55 »
Hallo

In der aktuellen zigbee2MQTT Version (1.11.0) ist es nun möglich seine Zigbee Devices per OTA Update auf die neuste Firmware zubringen.
Mit deCONZ geht das seit kurzen wohl auch.
https://forum.fhem.de/index.php/topic,107853.0.html

Aktuelle mögliche Hersteller sind:
IKEA TRÅDFRI
Ubysis
Salus SP600 Smart plug
Osram

Weitere Infos dazu unter
https://www.zigbee2mqtt.io/information/ota_updates.html

Ich habe es mit meinen Osram Devices getestet dauert zwar pro Device ca. 10-15 Minuten hat aber bei allen super funktioniert.

Um es über Fhem zu starten habe ich in der Setlist der Bridge/Dongle um folgendes erweitert.
update:textField BASE_TOPIC/bridge/ota_update/update $EVTPART1
update_check:textField BASE_TOPIC/bridge/ota_update/check $EVTPART1

Ins Feld muss der DEVICE_FRIENDLY_NAME eingetragen werden wie zum Beispiel beim Löschen eines Devices.

Vielleicht baut @Beta-User die beiden Zeilen mit in das attrTemplate mit ein.

VG Alex

Internals:
   CID        Zigbee_Pi
   DEF        Zigbee_Pi
   DEVICETOPIC MQTT2_Zigbee_Pi
   FUUID      5c488520-f33f-e69a-8956-85b6af0da8d19985
   IODev      MQTT_Server
   LASTInputDev MQTT_Server
   MQTT_Server_MSGCNT 40
   MQTT_Server_TIME 2020-03-12 15:08:59
   MSGCNT     40
   NAME       MQTT2_Zigbee_Pi
   NR         532
   STATE      online
   TYPE       MQTT2_DEVICE
   READINGS:
     2020-03-11 16:46:51   commit          e140cf5
     2020-03-11 16:46:51   coordinator_meta_maintrel 1
     2020-03-11 16:46:51   coordinator_meta_majorrel 2
     2020-03-11 16:46:51   coordinator_meta_minorrel 7
     2020-03-11 16:46:51   coordinator_meta_product 1
     2020-03-11 16:46:51   coordinator_meta_revision 20191106
     2020-03-11 16:46:51   coordinator_meta_transportrev 2
     2020-03-11 16:46:51   coordinator_type zStack3x0
     2020-03-12 15:08:59   log             {"type":"ota_update","message":"Finished update of '0x7cb03eaa00b1f6a3', from '{\"softwareBuildID\":\"V1.04.12\",\"dateCode\":\"20140331DEOS****\"}' to '{\"softwareBuildID\":\"V1.05.09\",\"dateCode\":\"20140331DEOS****\"}'","meta":{"status":"update_succeeded","device":"0x7cb03eaa00b1f6a3","from":{"softwareBuildID":"V1.04.12","dateCode":"20140331DEOS****"},"to":{"softwareBuildID":"V1.05.09","dateCode":"20140331DEOS****"}}}
     2020-03-11 16:46:51   log_level       info
     2020-03-11 16:46:51   permit_join     false
     2020-01-09 20:20:24   remove          set 0x000b57fffed6c8c6
     2020-03-11 16:46:50   state           online
     2020-03-10 13:17:41   subscriptions   zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/+/get zigbee2mqtt/+/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/+/set zigbee2mqtt/+/+/+/+/+/set/+ zigbee2mqtt/+/+/+/+/get zigbee2mqtt/+/+/+/+/get/+ zigbee2mqtt/+/+/+/+/set zigbee2mqtt/+/+/+/+/set/+ zigbee2mqtt/+/+/+/get zigbee2mqtt/+/+/+/get/+ zigbee2mqtt/+/+/+/set zigbee2mqtt/+/+/+/set/+ zigbee2mqtt/+/+/get zigbee2mqtt/+/+/get/+ zigbee2mqtt/+/+/set zigbee2mqtt/+/+/set/+ zigbee2mqtt/+/get zigbee2mqtt/+/get/+ zigbee2mqtt/+/set zigbee2mqtt/+/set/+ zigbee2mqtt/bridge/config/+ zigbee2mqtt/bridge/config/+/+ zigbee2mqtt/bridge/configure zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/+/get_group_membership zigbee2mqtt/bridge/device/+/+/get_group_membership zigbee2mqtt/bridge/device/+/get_group_membership zigbee2mqtt/bridge/group/+/+/+/+/+/+/remove zigbee2mqtt/bridge/group/+/+/+/+/+/add zigbee2mqtt/bridge/group/+/+/+/+/+/remove zigbee2mqtt/bridge/group/+/+/+/+/+/remove_all zigbee2mqtt/bridge/group/+/+/+/+/add zigbee2mqtt/bridge/group/+/+/+/+/remove zigbee2mqtt/bridge/group/+/+/+/+/remove_all zigbee2mqtt/bridge/group/+/+/+/add zigbee2mqtt/bridge/group/+/+/+/remove zigbee2mqtt/bridge/group/+/+/+/remove_all zigbee2mqtt/bridge/group/+/+/add zigbee2mqtt/bridge/group/+/+/remove zigbee2mqtt/bridge/group/+/+/remove_all zigbee2mqtt/bridge/group/+/add zigbee2mqtt/bridge/group/+/remove zigbee2mqtt/bridge/group/+/remove_all zigbee2mqtt/bridge/group/remove_all zigbee2mqtt/bridge/networkmap zigbee2mqtt/bridge/networkmap/routes
     2020-03-12 14:57:34   update          set 0x7cb03eaa00b1f6a3
     2020-03-12 14:57:11   update_check    set 0x7cb03eaa00b1f6a3
     2020-03-11 16:46:51   version         1.11.0
Attributes:
   IODev      MQTT_Server
   bridgeRegexp zigbee2mqtt/([A-Za-z0-9._]*)[/]?.*:.* "zigbee_$1"
   getList    devicelist:noArg log zigbee2mqtt/bridge/config/devices
  networkmap_raw:noArg raw zigbee2mqtt/bridge/networkmap raw
  networkmap_graphviz:noArg graphviz zigbee2mqtt/bridge/networkmap graphviz
   icon       mqtt
   model      zigbee2mqtt_bridge
   readingList zigbee2mqtt/bridge/state:.* state
  zigbee2mqtt/bridge/config/devices:.* {}
  zigbee2mqtt/bridge/config/log_level:.* log_level
  zigbee2mqtt/bridge/config/permit_join:.* permit_join
  zigbee2mqtt/bridge/config/rename:.* { json2nameValue($EVENT, 'rename_') }
  zigbee2mqtt/bridge/log:.*\"type\".\"devices\".\"message\".* devices
  zigbee2mqtt/bridge/log:.* log
  zigbee2mqtt/bridge/networkmap:.* {}
  zigbee2mqtt/bridge/networkmap/graphviz:.* graphviz
  zigbee2mqtt/bridge/networkmap/raw:.* raw
  zigbee2mqtt/bridge/config:.* { json2nameValue($EVENT) }
   room       MQTT2
   setList    log_level:debug,info,warn,error zigbee2mqtt/bridge/config/log_level $EVTPART1
  permit_join:true,false zigbee2mqtt/bridge/config/permit_join $EVTPART1
  remove:textField zigbee2mqtt/bridge/config/remove $EVTPART1
  update:textField zigbee2mqtt/bridge/ota_update/update $EVTPART1
  update_check:textField zigbee2mqtt/bridge/ota_update/check $EVTPART1
  y_device_setting:textField zigbee2mqtt/$EVTPART1/set {"$EVTPART2": "$EVTPART3"}
  x_bind:textField zigbee2mqtt/bridge/bind/$EVTPART1 $EVTPART2
  x_bind_unbind:textField zigbee2mqtt/bridge/unbind/$EVTPART1 $EVTPART2
  x_device_options:textField zigbee2mqtt/bridge/config/device_options {"friendly_name":"$EVTPART1","options": {"$EVTPART2": "$EVTPART3"}}
  x_group_add_to:textField zigbee2mqtt/bridge/group/$EVTPART1/add $EVTPART2
  x_group_rm_from:textField zigbee2mqtt/bridge/group/$EVTPART1/remove $EVTPART2
  x_group_rm_from_all:textField zigbee2mqtt/bridge/group/$EVTPART1/remove_all $EVTPART2
  x_group_add_group:textField zigbee2mqtt/bridge/config/add_group $EVTPART1
  x_group_rm_group:textField zigbee2mqtt/bridge/config/remove_group $EVTPART1
  z_elapsed:textField zigbee2mqtt/bridge/config/elapsed $EVTPART1
  z_last_seen:textField zigbee2mqtt/bridge/config/last_seen $EVTPART1
  z_ban:textField zigbee2mqtt/bridge/config/ban $EVTPART1
  z_rename:textField zigbee2mqtt/bridge/config/rename  {"old":"$EVTPART1","new":"$EVTPART2"}
  z_reset_CC:noArg zigbee2mqtt/bridge/config/reset
   setStateList on off

« Letzte Änderung: 12 März 2020, 15:32:29 von majestro84 »
Server: HP-T610 - Debian 10 aktuellen FHEM-Docker Image:Z-Wave (RollerShutter,DoorWindow,Socket,PIR,....) | ENIGMA2 | EGPM2LAN | BLE-Tag(PRESENCE) | HUE | alexa-fhem | Shelly1&2 | MQTT2
1.Pi-Zero:Viessmann(optolink) mit 89_VCONTROL300.pm
2.Pi3 Dongle Server: Zigbee2MQTT(CC1352P-2), Z-Wave(UZB1), BT
Informativ Informativ x 1 Liste anzeigen

Offline KernSani

  • Developer
  • Hero Member
  • ****
  • Beiträge: 3189
Antw:Zigbee2MQTT OTA-Update
« Antwort #1 am: 12 März 2020, 16:17:28 »
Cool :-) Danke für den Hinweis, probiere ich heute Abend mal aus


Gesendet von iPhone mit Tapatalk
RasPi: RFXTRX, HM, zigbee2mqtt, mySensors, JeeLink, miLight, squeezbox, Alexa, Siri, ...

Offline KernSani

  • Developer
  • Hero Member
  • ****
  • Beiträge: 3189
Antw:Zigbee2MQTT OTA-Update
« Antwort #2 am: 13 März 2020, 00:15:16 »
OSRAM und TRADFRI aktualisiert :-)
RasPi: RFXTRX, HM, zigbee2mqtt, mySensors, JeeLink, miLight, squeezbox, Alexa, Siri, ...

Offline joelinux

  • New Member
  • *
  • Beiträge: 25
  • Doku, Doku, Doku...
Antw:Zigbee2MQTT OTA-Update
« Antwort #3 am: 13 März 2020, 09:57:02 »

Um es über Fhem zu starten habe ich in der Setlist der Bridge/Dongle um folgendes erweitert.
update:textField BASE_TOPIC/bridge/ota_update/update $EVTPART1
update_check:textField BASE_TOPIC/bridge/ota_update/check $EVTPART1

Ins Feld muss der DEVICE_FRIENDLY_NAME eingetragen werden wie zum Beispiel beim Löschen eines Devices.

Vielleicht baut @Beta-User die beiden Zeilen mit in das attrTemplate mit ein.

VG Alex

Passen die beiden Setter in das zigbee2mqtt Bridge Gerät oder aber in das jeweilige zigbee Endgerät?
Beim Hinzufügen zum zigbee Endgerät habe ich den freundlichen Zigbee Namen vor Augen, bzw. kann die Setter komplett ohne weitere Eingabe anlegen.

Ein erfolgreicher Update kann aus dem Wechsel des Readings update_available von true -> false erkannt werden.
Der 'langsame' Verlauf des Updates kann im Event Monitor des zigbee2mqtt Brücken Gerätes verfolgt werden.
Meine Tradfri On/Off Taster benötigen bis zu 2 Stunden. Auch gelingt der Firmware Update nicht immer und bricht ab.
Tapfere Wiederholungen und Geduld haben dann auch die kleinen Batterie betriebenen Geräte auf den neuesten Stand gehoben.

Mit freundlichem Gruß
joelinux

Beispiel:

define MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 MQTT2_DEVICE zigbee_Tradfri_E1743_on_off_Switch_2
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 DbLogExclude .*
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 IODev MQTT2_FHEM_Server
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 devStateIcon true:10px-kreis-gelb false:10px-kreis-gruen online:10px-kreis-gruen offline:10px-kreis-rot
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 devicetopic zigbee2mqtt/Tradfri_E1743_on_off_Switch_2:.*
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 group Duschbeleuchtung
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 icon control_home
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 imageLink /fhem/deviceimages/mqtt2/E1743.jpg
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 model zigbee2mqtt_wireless_button_old
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 readingList $DEVICETOPIC:.* { json2nameValue($EVENT) }
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 room Dusche,ZigBee
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 setList x_ota_update_check:Tradfri_E1743_on_off_Switch_2 zigbee2mqtt/bridge/ota_update/check $EVTPART1\
x_ota_update_do:Tradfri_E1743_on_off_Switch_2 zigbee2mqtt/bridge/ota_update/update $EVTPART1
attr MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 stateFormat Click: click\
update_available\
linkquality

setstate MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 Click: off\
false\
36
setstate MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 2020-01-09 21:23:17 associatedWith MQTT2_zigbee_Coordinator
setstate MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 2020-03-12 14:33:34 battery 87
setstate MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 2020-03-12 14:33:34 click off
setstate MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 2020-03-12 14:33:34 elapsed 721
setstate MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 2020-03-12 14:33:34 last_seen 2020-03-12T14:33:34+01:00
setstate MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 2020-03-12 14:33:34 linkquality 36
setstate MQTT2_zigbee_Tradfri_E1743_on_off_Switch_2 2020-03-12 14:33:34 update_available false
   
FHem on RPi2 Buster, Duofern Rollladen, ZWave Rolllade + Steckdosen, ZigBee (Philips, Tradfri), Tasmota (diverse Steckdosen, GU10 und E14 LSC Leds von Action, Sonoff RF Bridge), InterTechno Dimmer Steckdose ITLR-200

 

decade-submarginal