Hallo FHEM Freunde,
ich möchte mein System um Zigbee erweitern, komme aber seit Tagen nicht weiter und finde keine Anleitung, Hilfe die mich weiterbringt und bin daher auf euer Fachwissen angewiesen :-)
Ich habe eine Raspberry PI und dort das zigbee2mqtt eingerichtet sowie das mosquitto.
Auf das Frontend komme ich schon mal und beide Dienste scheinen zu laufen.
Als Dongle habe ich den Sonoff Zigbee 3.0 Plus
Nun ist für mich die Frage wie ich FHEM einrichten muss??
- Gibt es hier eine Schritt für Schritt Anleitung.
- Ziel ist es mal eine LED E27 COLOR einzubinden und schlaten zu können.
Bin bei den ganzen Themen im Wiki usw. etwas überfordert.
Danke euch.
Gruss, Fabian
Schau mal unter
HTTPS://www.zigbee2mqtt.io
Da ist alles schön beschrieben,!
Gruß
Maik
Brauchst du mosquitto wirklich?
Einfacher ist es in fhem einen MQTT2_Server zu definieren und in der zigbee2mqtt Config statt mosquitto direkt den MQTT Server von fhem angeben.
Allerdings musst du nun mosquitto "loswerden" oder den MQTT Server von fhem auf einen anderen Port legen...
Dann sollten die Devices automatisch in fhem angelegt werden.
Dann noch ein passendes attrTemplate oder selbst anpassen wie du willst und gut.
Wenn du mosquitto brauchst, dann musst du fhem mittels MQTT2_Client oder GenericBridge (weiß ich jetzt nicht so genau) mit dem mosquitto verbinden...
MQTT2 sollte aber im fhem Wiki ausreichend beschrieben sein.
EDIT: https://forum.fhem.de/index.php?topic=115452.msg1097104#msg1097104
https://wiki.fhem.de/wiki/MQTT#Installation_in_FHEM
Gruß, Joachim
Zitat von: GreenFHEMfan am 27 September 2023, 22:35:06Schau mal unter
HTTPS://www.zigbee2mqtt.io
Da ist alles schön beschrieben,!
Gruß
Maik
Danke für den Hinweis. Leider geht es dort nicht um FHEM
Zitat von: MadMax-FHEM am 27 September 2023, 22:43:14Brauchst du mosquitto wirklich?
Einfacher ist es in fhem einen MQTT2_Server zu definieren und in der zigbee2mqtt Config statt mosquitto direkt den MQTT Server von fhem angeben.
Allerdings musst du nun mosquitto "loswerden" oder den MQTT Server von fhem auf einen anderen Port legen...
Dann sollten die Devices automatisch in fhem angelegt werden.
Dann noch ein passendes attrTemplate oder selbst anpassen wie du willst und gut.
Wenn du mosquitto brauchst, dann musst du fhem mittels MQTT2_Client oder GenericBridge (weiß ich jetzt nicht so genau) mit dem mosquitto verbinden...
MQTT2 sollte aber im fhem Wiki ausreichend beschrieben sein.
EDIT: https://forum.fhem.de/index.php?topic=115452.msg1097104#msg1097104
https://wiki.fhem.de/wiki/MQTT#Installation_in_FHEM
Gruß, Joachim
Hallo Joachim,
danke für die schnelle Antwort.
Ich stehe echt auf dem Schlauch.
mosquitto brauche ich persönlich nicht.
Möchte auf dem einfachsten weg das zum laufen bekommen.
Wenn ich mosquitto lösche, dann geht jedoch das Frontend von zigbee2mqtt nicht mehr.
Gibt es irgendwo eine Step by Step Anleitung um den Dongle anzulernen sowie den internen Server einzurichten?
Zitat von: DJCrazy am 27 September 2023, 23:09:37mosquitto brauche ich persönlich nicht.
Möchte auf dem einfachsten weg das zum laufen bekommen.
Dann wie geschrieben: MQTT2_Server in fhem und in der zigbee2mqtt Config statt mosquitto den fhem MQTT Server angeben.
Zitat von: DJCrazy am 27 September 2023, 23:09:37Wenn ich mosquitto lösche, dann geht jedoch das Frontend von zigbee2mqtt nicht mehr.
Glaube ich nicht.
Ich hatte es genau wie oben geschrieben und kam sehr wohl mit der Weboberfläche drauf.
Weil die geht ja auf zigbee2mqtt (also das nodejs Zeugs) und nicht auf den mosquitto (zumindest denke ich das und ging bei mir).
Ich denke, dass wenn du den mosquitto runterwirfst ohne einen MQTT2_Server in fhem und die Anpassung in der Config startet zigbee2mqtt nicht (mehr) und dann nat. auch kein Webzugang.
Bist du sicher, dass du das alles gemacht hast und zigbee2mqtt (weiterhin) läuft?
EDIT: wie sieht deine zigbee2mqtt Config aus? Wo läuft zigbee2mqtt und wo fhem (selber "Rechner"?) Wie sieht deine MQTT2_Server definition aus (list)?
EDIT:
Zitat von: DJCrazy am 27 September 2023, 23:09:37Gibt es irgendwo eine Step by Step Anleitung um den Dongle anzulernen sowie den internen Server einzurichten?
Verstehe ich nicht? Ich dachte zigbee2mqtt (mit mosquitto) würde laufen? Dann ist doch der Dongle "angelernt" (was immer das sein soll) und was soll der "interne Server" sein?
Gruß, Joachim
Zitat von: DJCrazy am 27 September 2023, 23:07:06Zitat von: GreenFHEMfan am 27 September 2023, 22:35:06Schau mal unter
HTTPS://www.zigbee2mqtt.io
Da ist alles schön beschrieben,!
Gruß
Maik
Danke für den Hinweis. Leider geht es dort nicht um FHEM
Ich habe mein zigbee Projekt in FHEM nach dieser Anweisung eingerichtet.
Schau bei Installation -> Linux
Nach der Anweisung sollte es funktionieren.
Hallo zusammen,
habe nun den Mosquitto Server vollständig deinstalliert und in FHEM den internen MQTT Server aktiviert mit.
defmod myBroker MQTT2_SERVER 1883 global
Danach ein Neustart vom Raspberry PI gemacht und siehe da ich komme zumindest auf das Frontend von Zigbee2mqtt.
Danke Joachim mich hier auf die Spur zu bringen.
Es wurde nun auch ein Ordner automatisch angelegt > MQTT2_DEVICE
Dort ist ein Device drin der sich myBroker nennt und den Status Online hat
LIST
Internals:
CONNECTS 1
Clients :MQTT2_DEVICE:MQTT_GENERIC_BRIDGE:
ClientsKeepOrder 1
DEF 1883 global
FD 13
FUUID 65154010-f33f-c1dd-c02c-4b566da5f3e1c86a
NAME myBroker
NR 367
PORT 1883
STATE Initialized
TYPE MQTT2_SERVER
eventCount 1
MatchList:
1:MQTT2_DEVICE ^.
2:MQTT_GENERIC_BRIDGE ^.
READINGS:
2023-09-28 11:00:09 nrclients 1
2023-09-28 10:59:13 state Initialized
clients:
myBroker_127.0.0.1_39932 1
retain:
Attributes:
Somit müssten alle Vorarbeiten abgeschlossen sein denke ich?
Muss ich sonst noch ein Device oder etwas anlegen?
Ist eines der eingerichteten Sachen in FHEM schon das iO Modul und versendet über den Sonoff Dongle dann die Daten an die Lampen?
Wie bekomme ich die Ledvance COLOR LED nun angelernt und das Template darüber?
Muss ich es über das Frontend des zigbee2mqtt erst anlernen?
Danke euch schon mal für den Support. Wäre sonst heute nicht so weit wie jetzt :-)
Viele Fragen ;)
mach doch mal ein
list TYPE=MQTT2_DEVICE
und poste die einzelnen gelisteten Devices.
Bzw. evtl. mal einen neuen Thread -> neuer/passenderer Titel mit den lists der Devices.
Eigentlich könnte das MQTT2_DEVICE schon die Lampe sein...
Ansonsten evtl. noch mal zigbee2mqtt neu starten oder auch die Lampe noch mal anlernen o.ä.
Irgendwann muss halt zigbee2mqtt etwas bzgl. der Lampe "senden", damit fhem erkennt: da ist doch was "Neues" -> ich leg mal ein MQTT2_DEVICE an...
EDIT: autocreate muss aktiv sein (ist Standard, also wenn nicht "abgeschaltet"/deaktiviert, dann passt das)
Da dann das passende attrTemplate und schauen was geht oder auch fehlt.
Gibt es gar kein passendes attrTemplate, dann ebenfalls einen neuen Thread aufmachen und mittels mitarbeit eines erstellen...
Gruß, Joachim
Hier mal die geforderte List
Internals:
CFGFN
CID zigbee_pi
DEF zigbee_pi
FUUID 6515409e-f33f-c1dd-ad87-e64a99ade7e4674d
IODev myBroker
LASTInputDev myBroker
MSGCNT 12
NAME MQTT2_zigbee_pi
NR 383
STATE online
TYPE MQTT2_DEVICE
eventCount 19
myBroker_CONN myBroker_127.0.0.1_39932
myBroker_MSGCNT 12
myBroker_TIME 2023-09-28 11:59:49
READINGS:
2023-09-28 11:00:15 1_disabled false
2023-09-28 11:00:15 1_endpoints_11_clusters_input_1 ssIasAce
2023-09-28 11:00:15 1_endpoints_11_clusters_input_2 genTime
2023-09-28 11:00:15 1_endpoints_11_clusters_output_1 ssIasZone
2023-09-28 11:00:15 1_endpoints_11_clusters_output_2 ssIasWd
2023-09-28 11:00:15 1_endpoints_13_clusters_input_1 genOta
2023-09-28 11:00:15 1_friendly_name Coordinator
2023-09-28 11:00:15 1_ieee_address 0x00124b002a2eafb4
2023-09-28 11:00:15 1_interview_completed true
2023-09-28 11:00:15 1_interviewing false
2023-09-28 11:00:15 1_network_address 0
2023-09-28 11:00:15 1_supported false
2023-09-28 11:00:15 1_type Coordinator
2023-09-28 11:00:14 IODev myBroker
2023-09-28 11:00:15 extensions []
2023-09-28 11:00:15 groups []
2023-09-28 11:00:15 info {"commit":"4d53ac4c","config":{"advanced":{"adapter_concurrent":null,"adapter_delay":null,"availability_blacklist":[],"availability_blocklist":[],"availability_passlist":[],"availability_whitelist":[],"cache_state":true,"cache_state_persistent":true,"cache_state_send_on_startup":true,"channel":11,"elapsed":false,"ext_pan_id":[221,221,221,221,221,221,221,221],"homeassistant_legacy_entity_attributes":false,"ikea_ota_use_test_url":true,"last_seen":"disable","legacy_api":false,"legacy_availability_payload":false,"log_directory":"/opt/zigbee2mqtt/data/log/%TIMESTAMP%","log_file":"log.txt","log_level":"debug","log_output":["console","file"],"log_rotation":true,"log_symlink_current":false,"log_syslog":{},"output":"json","pan_id":6754,"report":false,"soft_reset_timeout":0,"timestamp_format":"YYYY-MM-DD HH:mm:ss"},"blocklist":[],"device_options":{"legacy":false},"devices":{},"external_converters":[],"frontend":{"host":"0.0.0.0","port":8080},"groups":{},"homeassistant":false,"map_options":{"graphviz":{"colors":{"fill":{"coordinator":"#e04e5d","enddevice":"#fff8ce","router":"#4ea3e0"},"font":{"coordinator":"#ffffff","enddevice":"#000000","router":"#ffffff"},"line":{"active":"#009900","inactive":"#994444"}}}},"mqtt":{"base_topic":"zigbee2mqtt","client_id":"zigbee_pi","force_disable_retain":false,"include_device_information":false,"server":"mqtt://localhost"},"ota":{"disable_automatic_update_check":false,"ikea_ota_use_test_url":true,"update_check_interval":1440},"passlist":[],"permit_join":false,"serial":{"disable_led":false,"port":"/dev/ttyUSB0"}},"config_schema":{"definitions":{"device":{"properties":{"debounce":{"description":"Debounces messages of this device","title":"Debounce","type":"number"},"debounce_ignore":{"description":"Protects unique payload values of specified payload properties from overriding within debounce time","examples":["action"],"items":{"type":"string"},"title":"Ignore debounce","type":"array"},"disabled":{"description":"Disables the device (excludes device from network scans, availability and group state updates)","requiresRestart":true,"title":"Disabled","type":"boolean"},"filtered_attributes":{"description":"Filter attributes with regex from published payload.","examples":["^temperature$","^battery$","^action$"],"items":{"type":"string"},"title":"Filtered publish attributes","type":"array"},"filtered_cache":{"description":"Filter attributes with regex from being added to the cache, this prevents the attribute from being in the published payload when the value didn't change.","examples":["^input_actions$"],"items":{"type":"string"},"title":"Filtered attributes from cache","type":"array"},"filtered_optimistic":{"description":"Filter attributes with regex from optimistic publish payload when calling /set. (This has no effect if optimistic is set to false).","examples":["^color_(mode|temp)$","color"],"items":{"type":"string"},"title":"Filtered optimistic attributes","type":"array"},"friendly_name":{"description":"Used in the MQTT topic of a device. By default this is the device ID","readOnly":true,"title":"Friendly name","type":"string"},"homeassistant":{"properties":{"name":{"description":"Name of the device in Home Assistant","title":"Home Assistant name","type":"string"}},"title":"Home Assistant","type":["object","null"]},"icon":{"description":"The user-defined device icon for the frontend. It can be a full URL link to an image (e.g. https://SOME.SITE/MODEL123.jpg) (you cannot use a path to a local file) or base64 encoded data URL (e.g. image/svg+xml;base64,PHN2ZyB3aW....R0aD)","title":"Icon","type":"string"},"optimistic":{"default":true,"description":"Publish optimistic state after set","title":"Optimistic","type":"boolean"},"qos":{"description":"QoS level for MQTT messages of this device","title":"QoS","type":"number"},"retain":{"description":"Retain MQTT messages of this device","title":"Retain","type":"boolean"},"retention":{"description":"Sets the MQTT Message Expiry in seconds, Make sure to set mqtt.version to 5","title":"Retention","type":"number"}},"required":["friendly_name"],"type":"object"},"group":{"properties":{"devices":{"items":{"type":"string"},"type":"array"},"filtered_attributes":{"items":{"type":"string"},"type":"array"},"friendly_name":{"type":"string"},"off_state":{"default":"auto","description":"Control when to publish state OFF for a group. 'all_members_off': only publish state OFF when all group memebers are in state OFF, 'last_member_state': publish state OFF whenever one of its members changes to OFF","enum":["all_members_off","last_member_state"],"requiresRestart":true,"title":"Group off state","type":["string"]},"optimistic":{"type":"boolean"},"qos":{"type":"number"},"retain":{"type":"boolean"}},"required":["friendly_name"],"type":"object"}},"properties":{"advanced":{"properties":{"adapter_concurrent":{"description":"Adapter concurrency (e.g. 2 for CC2531 or 16 for CC26X2R1) (default: null, uses recommended value)","requiresRestart":true,"title":"Adapter concurrency","type":["number","null"]},"adapter_delay":{"description":"Adapter delay","requiresRestart":true,"title":"Adapter delay","type":["number","null"]},"cache_state":{"default":true,"description":"MQTT message payload will contain all attributes, not only changed ones. Has to be true when integrating via Home Assistant","title":"Cache state","type":"boolean"},"cache_state_persistent":{"default":true,"description":"Persist cached state, only used when cache_state: true","title":"Persist cache state","type":"boolean"},"cache_state_send_on_startup":{"default":true,"description":"Send cached state on startup, only used when cache_state: true","title":"Send cached state on startup","type":"boolean"},"channel":{"default":11,"description":"Zigbee channel, changing requires repairing all devices! (Note: use a ZLL channel: 11, 15, 20, or 25 to avoid Problems)","examples":[15,20,25],"maximum":26,"minimum":11,"requiresRestart":true,"title":"ZigBee channel","type":"number"},"elapsed":{"default":false,"description":"Add an elapsed attribute to MQTT messages, contains milliseconds since the previous msg","title":"Elapsed","type":"boolean"},"ext_pan_id":{"description":"Zigbee extended pan ID, changing requires repairing all devices!","oneOf":[{"title":"Extended pan ID (string)","type":"string"},{"items":{"type":"number"},"title":"Extended pan ID (array)","type":"array"}],"requiresRestart":true,"title":"Ext Pan ID"},"last_seen":{"default":"disable","description":"Add a last_seen attribute to MQTT messages, contains date/time of last Zigbee message","enum":["disable","ISO_8601","ISO_8601_local","epoch"],"title":"Last seen","type":"string"},"legacy_api":{"default":true,"description":"Disables the legacy api (false = disable)","requiresRestart":true,"title":"Legacy API","type":"boolean"},"legacy_availability_payload":{"default":true,"description":"Payload to be used for device availabilty and bridge/state topics. true = text, false = JSON","requiresRestart":true,"title":"Legacy availability payload","type":"boolean"},"log_directory":{"description":"Location of log directory","examples":["data/log/%TIMESTAMP%"],"requiresRestart":true,"title":"Log directory","type":"string"},"log_file":{"default":"log.txt","description":"Log file name, can also contain timestamp","examples":["zigbee2mqtt_%TIMESTAMP%.log"],"requiresRestart":true,"title":"Log file","type":"string"},"log_level":{"default":"info","description":"Logging level","enum":["info","warn","error","debug"],"title":"Log level","type":"string"},"log_output":{"description":"Output location of the log, leave empty to suppress logging","items":{"enum":["console","file","syslog"],"type":"string"},"requiresRestart":true,"title":"Log output","type":"array"},"log_rotation":{"default":true,"description":"Log rotation","requiresRestart":true,"title":"Log rotation","type":"boolean"},"log_symlink_current":{"default":false,"description":"Create symlink to current logs in the log directory","requiresRestart":true,"title":"Log symlink current","type":"boolean"},"log_syslog":{"properties":{"app_name":{"default":"Zigbee2MQTT","description":"The name of the application (Default: Zigbee2MQTT).","title":"Localhost","type":"string"},"eol":{"default":"/n","description":"The end of line character to be added to the end of the message (Default: Message without modifications).","title":"eol","type":"string"},"host":{"default":"localhost","description":"The host running syslogd, defaults to localhost.","title":"Host","type":"string"},"localhost":{"default":"localhost","description":"Host to indicate that log messages are coming from (Default: localhost).","title":"Localhost","type":"string"},"path":{"default":"/dev/log","description":"The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).","examples":["/var/run/syslog"],"title":"Path","type":"string"},"pid":{"default":"process.pid","description":"PID of the process that log messages are coming from (Default process.pid).","title":"PID","type":"string"},"port":{"default":514,"description":"The port on the host that syslog is running on, defaults to syslogd's default port.","title":"Port","type":"number"},"protocol":{"default":"udp4","description":"The network protocol to log over (e.g. tcp4, udp4, tls4, unix, unix-connect, etc).","examples":["udp4","tls4","unix","unix-connect"],"title":"Protocol","type":"string"},"type":{"default":"5424","description":"The type of the syslog protocol to use (Default: BSD, also valid: 5424).","title":"Type","type":"string"}},"title":"syslog","type":"object"},"network_key":{"description":"Network encryption key, changing requires repairing all devices!","oneOf":[{"title":"Network key(string)","type":"string"},{"items":{"type":"number"},"title":"Network key(array)","type":"array"}],"requiresRestart":true,"title":"Network key"},"output":{"description":"Examples when 'state' of a device is published json: topic: 'zigbee2mqtt/my_bulb' payload '{\"state\": \"ON\"}' attribute: topic 'zigbee2mqtt/my_bulb/state' payload 'ON' attribute_and_json: both json and attribute (see above)","enum":["attribute_and_json","attribute","json"],"title":"MQTT output type","type":"string"},"pan_id":{"description":"ZigBee pan ID, changing requires repairing all devices!","oneOf":[{"title":"Pan ID (string)","type":"string"},{"title":"Pan ID (number)","type":"number"}],"requiresRestart":true,"title":"Pan ID"},"timestamp_format":{"description":"Log timestamp format","examples":["YYYY-MM-DD HH:mm:ss"],"requiresRestart":true,"title":"Timestamp format","type":"string"},"transmit_power":{"description":"Transmit power of adapter, only available for Z-Stack (CC253*/CC2652/CC1352) adapters, CC2652 = 5dbm, CC1352 max is = 20dbm (5dbm default)","requiresRestart":true,"title":"Transmit power","type":["number","null"]}},"title":"Advanced","type":"object"},"availability":{"description":"Checks whether devices are online/offline","oneOf":[{"title":"Availability (simple)","type":"boolean"},{"properties":{"active":{"description":"Options for active devices (routers/mains powered)","properties":{"timeout":{"default":10,"description":"Time after which an active device will be marked as offline in minutes","requiresRestart":true,"title":"Timeout","type":"number"}},"requiresRestart":true,"title":"Active","type":"object"},"passive":{"description":"Options for passive devices (mostly battery powered)","properties":{"timeout":{"default":1500,"description":"Time after which an passive device will be marked as offline in minutes","requiresRestart":true,"title":"Timeout","type":"number"}},"requiresRestart":true,"title":"Passive","type":"object"}},"title":"Availability (advanced)","type":"object"}],"requiresRestart":true,"title":"Availability"},"ban":{"items":{"type":"string"},"readOnly":true,"requiresRestart":true,"title":"Ban (deprecated, use blocklist)","type":"array"},"blocklist":{"description":"Block devices from the network (by ieeeAddr)","items":{"type":"string"},"requiresRestart":true,"title":"Blocklist","type":"array"},"device_options":{"title":"Options that are applied to all devices","type":"object"},"devices":{"patternProperties":{"^.*$":{"$ref":"#/definitions/device"}},"propertyNames":{"pattern":"^0x[\\d\\w]{16}$"},"type":"object"},"external_converters":{"description":"You can define external converters to e.g. add support for a DiY device","examples":["DIYRuZ_FreePad.js"],"items":{"type":"string"},"requiresRestart":true,"title":"External converters","type":"array"},"frontend":{"oneOf":[{"title":"Frontend (simple)","type":"boolean"},{"properties":{"auth_token":{"description":"Enables authentication, disabled by default","requiresRestart":true,"title":"Auth token","type":["string","null"]},"host":{"default":"0.0.0.0","description":"Frontend binding host. Binds to a unix socket when an absolute path is given instead.","examples":["127.0.0.1","/run/zigbee2mqtt/zigbee2mqtt.sock"],"requiresRestart":true,"title":"Bind host","type":"string"},"port":{"default":8080,"description":"Frontend binding port. Ignored when using a unix domain socket","requiresRestart":true,"title":"Port","type":"number"},"ssl_cert":{"description":"SSL Certificate file path for exposing HTTPS. The sibling property 'ssl_key' must be set for HTTPS to be activated.","requiresRestart":true,"title":"Certificate file path","type":["string","null"]},"ssl_key":{"description":"SSL key file path for exposing HTTPS. The sibling property 'ssl_cert' must be set for HTTPS to be activated.","requiresRestart":true,"title":"key file path","type":["string","null"]},"url":{"description":"URL on which the frontend can be reached, currently only used for the Home Assistant device configuration page","requiresRestart":true,"title":"URL","type":["string","null"]}},"title":"Frontend (advanced)","type":"object"}],"requiresRestart":true,"title":"Frontend"},"groups":{"patternProperties":{"^.*$":{"$ref":"#/definitions/group"}},"propertyNames":{"pattern":"^[\\w].*$"},"type":"object"},"homeassistant":{"default":false,"description":"Home Assistant integration (MQTT discovery)","oneOf":[{"title":"Home Assistant (simple)","type":"boolean"},{"properties":{"discovery_topic":{"description":"Home Assistant discovery topic","examples":["homeassistant"],"requiresRestart":true,"title":"Homeassistant discovery topic","type":"string"},"legacy_entity_attributes":{"default":true,"description":"Home Assistant legacy entity attributes, when enabled Zigbee2MQTT will add state attributes to each entity, additional to the separate entities and devices it already creates","title":"Home Assistant legacy entity attributes","type":"boolean"},"legacy_triggers":{"default":true,"description":"Home Assistant legacy triggers, when enabled Zigbee2mqt will send an empty 'action' or 'click' after one has been send. A 'sensor_action' and 'sensor_click' will be discoverd","title":"Home Assistant legacy triggers","type":"boolean"},"status_topic":{"description":"Home Assistant status topic","examples":["homeassistant/status"],"requiresRestart":true,"title":"Home Assistant status topic","type":"string"}},"title":"Home Assistant (advanced)","type":"object"}],"requiresRestart":true,"title":"Home Assistant integration"},"map_options":{"properties":{"graphviz":{"properties":{"colors":{"properties":{"fill":{"properties":{"coordinator":{"type":"string"},"enddevice":{"type":"string"},"router":{"type":"string"}},"type":"object"},"font":{"properties":{"coordinator":{"type":"string"},"enddevice":{"type":"string"},"router":{"type":"string"}},"type":"object"},"line":{"properties":{"active":{"type":"string"},"inactive":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}},"title":"Networkmap","type":"object"},"mqtt":{"properties":{"base_topic":{"default":"zigbee2mqtt","description":"MQTT base topic for Zigbee2MQTT MQTT messages","examples":["zigbee2mqtt"],"requiresRestart":true,"title":"Base topic","type":"string"},"ca":{"description":"Absolute path to SSL/TLS certificate of CA used to sign server and client certificates","examples":["/etc/ssl/mqtt-ca.crt"],"requiresRestart":true,"title":"Certificate authority","type":"string"},"cert":{"description":"Absolute path to SSL/TLS certificate for client-authentication","examples":["/etc/ssl/mqtt-client.crt"],"requiresRestart":true,"title":"SSL/TLS certificate","type":"string"},"client_id":{"description":"MQTT client ID","examples":["MY_CLIENT_ID"],"requiresRestart":true,"title":"Client ID","type":"string"},"force_disable_retain":{"default":false,"description":"Disable retain for all send messages. ONLY enable if you MQTT broker doesn't support retained message (e.g. AWS IoT core, Azure IoT Hub, Google Cloud IoT core, IBM Watson IoT Platform). Enabling will break the Home Assistant integration","requiresRestart":true,"title":"Force disable retain","type":"boolean"},"include_device_information":{"default":false,"description":"Include device information to mqtt messages","title":"Include device information","type":"boolean"},"keepalive":{"default":60,"description":"MQTT keepalive in second","requiresRestart":true,"title":"Keepalive","type":"number"},"key":{"description":"Absolute path to SSL/TLS key for client-authentication","examples":["/etc/ssl/mqtt-client.key"],"requiresRestart":true,"title":"SSL/TLS key","type":"string"},"password":{"description":"MQTT server authentication password","examples":["ILOVEPELMENI"],"requiresRestart":true,"title":"Password","type":"string"},"reject_unauthorized":{"default":true,"description":"Disable self-signed SSL certificate","requiresRestart":true,"title":"Reject unauthorized","type":"boolean"},"server":{"description":"MQTT server URL (use mqtts:// for SSL/TLS connection)","examples":["mqtt://localhost:1883"],"requiresRestart":true,"title":"MQTT server","type":"string"},"user":{"description":"MQTT server authentication user","examples":["johnnysilverhand"],"requiresRestart":true,"title":"User","type":"string"},"version":{"default":4,"description":"MQTT protocol version","examples":[5],"requiresRestart":true,"title":"Version","type":["number","null"]}},"required":["server"],"title":"MQTT","type":"object"},"ota":{"properties":{"disable_automatic_update_check":{"default":false,"description":"Zigbee devices may request a firmware update, and do so frequently, causing Zigbee2MQTT to reach out to third party servers. If you disable these device initiated checks, you can still initiate a firmware update check manually.","title":"Disable automatic update check","type":"boolean"},"ikea_ota_use_test_url":{"default":false,"description":"Use IKEA TRADFRI OTA test server, see OTA updates documentation","requiresRestart":true,"title":"IKEA TRADFRI OTA use test url","type":"boolean"},"update_check_interval":{"default":1440,"description":"Your device may request a check for a new firmware update. This value determines how frequently third party servers may actually be contacted to look for firmware updates. The value is set in minutes, and the default is 1 day.","title":"Update check interval","type":"number"},"zigbee_ota_override_index_location":{"description":"Location of override OTA index file","examples":["index.json"],"requiresRestart":true,"title":"OTA index override file name","type":"string"}},"title":"OTA updates","type":"object"},"passlist":{"description":"Allow only certain devices to join the network (by ieeeAddr). Note that all devices not on the passlist will be removed from the network!","items":{"type":"string"},"requiresRestart":true,"title":"Passlist","type":"array"},"permit_join":{"default":false,"description":"Allow new devices to join (re-applied at restart)","title":"Permit join","type":"boolean"},"serial":{"properties":{"adapter":{"default":"auto","description":"Adapter type, not needed unless you are experiencing problems","enum":["deconz","zstack","zigate","ezsp","auto"],"requiresRestart":true,"title":"Adapter","type":["string"]},"baudrate":{"description":"Baud rate speed for serial port, this can be anything firmware support but default is 115200 for Z-Stack and EZSP, 38400 for Deconz, however note that some EZSP firmware need 57600","examples":[38400,57600,115200],"requiresRestart":true,"title":"Baudrate","type":"number"},"disable_led":{"default":false,"description":"Disable LED of the adapter if supported","requiresRestart":true,"title":"Disable led","type":"boolean"},"port":{"description":"Location of the adapter. To autodetect the port, set null","examples":["/dev/ttyACM0"],"requiresRestart":true,"title":"Port","type":["string","null"]},"rtscts":{"description":"RTS / CTS Hardware Flow Control for serial port","requiresRestart":true,"title":"RTS / CTS","type":"boolean"}},"title":"Serial","type":"object"},"whitelist":{"items":{"type":"string"},"readOnly":true,"requiresRestart":true,"title":"Whitelist (deprecated, use passlist)","type":"array"}},"required":["mqtt"],"type":"object"},"coordinator":{"ieee_address":"0x00124b002a2eafb4","meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"},"log_level":"debug","network":{"channel":11,"extended_pan_id":"0x00124b002a2eafb4","pan_id":6754},"permit_join":false,"restart_required":false,"version":"1.33.0"}
2023-09-28 11:59:49 level debug
2023-09-28 11:59:49 message Saving state to file /opt/zigbee2mqtt/data/state.json
2023-09-28 11:00:14 state online
hmccu:
Attributes:
readingList zigbee_pi:zigbee2mqtt/bridge/state:.* { json2nameValue($EVENT) }
zigbee_pi:zigbee2mqtt/bridge/info:.* info
zigbee_pi:zigbee2mqtt/bridge/devices:.* { json2nameValue($EVENT) }
zigbee_pi:zigbee2mqtt/bridge/groups:.* groups
zigbee_pi:zigbee2mqtt/bridge/extensions:.* extensions
zigbee_pi:zigbee2mqtt/bridge/logging:.* { json2nameValue($EVENT) }
room MQTT2_DEVICE
Die erste Testlampe bekomme ich erst heute geliefert. Wird also noch nicht dabei sein im List.
Aber gut zu wissen das es die Geräte selbst erkennen sollte und einfügt.
Dann schau ich mal wenn diese kommt was passiert und würde mich sonst nochmals melden.
Danke Dir
https://wiki.fhem.de/wiki/Zigbee2mqtt#Define_eines_MQTT2-Devices_als_%22Bridge%22
Zitat von: TomLee am 28 September 2023, 12:13:50https://wiki.fhem.de/wiki/Zigbee2mqtt#Define_eines_MQTT2-Devices_als_%22Bridge%22
Ist das notwendig in meiner Konfiguration?
- Die erste Zeite defmod geht noch.
- Will ich die attr hinzufügen bekomme ich Fehlermeldungen
defmod MQTT2_zigbee_pi MQTT2_DEVICE zigbee_pi
attr MQTT2_zigbee_pi IODev MQTT2_FHEM_Server
attr MQTT2_zigbee_pi readingList zigbee_pi:zigbee2mqtt/bridge/state:.* state\
zigbee_pi:zigbee2mqtt/0x90fd9ffffe65db16:.* { json2nameValue($EVENT, ) }\
zigbee_pi:zigbee2mqtt/0x90fd9ffffe0bcd51:.* { json2nameValue($EVENT, ) }\
zigbee_pi:zigbee2mqtt/bridge/log:.* { json2nameValue($EVENT, 'log_') }
attr MQTT2_zigbee_pi room MQTT2_DEVICE
attr MQTT2_zigbee_pi IODev MQTT2_FHEM_Server
Fehler: unknown IODev MQTT2_FHEM_Server specified
attr MQTT2_zigbee_pi readingList zigbee_pi:zigbee2mqtt/bridge/state:.* state\
zigbee_pi:zigbee2mqtt/0x90fd9ffffe65db16:.* { json2nameValue($EVENT, ) }\
zigbee_pi:zigbee2mqtt/0x90fd9ffffe0bcd51:.* { json2nameValue($EVENT, ) }\
zigbee_pi:zigbee2mqtt/bridge/log:.* { json2nameValue($EVENT, 'log_') }
Fehler: MQTT2_zigbee_pi: bad reading name state\ zigbee_pi:zigbee2mqtt/0x90fd9ffffe65db16:.* { json2nameValue($EVENT, ) }\ zigbee_pi:zigbee2mqtt/0x90fd9ffffe0bcd51:.* { json2nameValue($EVENT, ) }\ zigbee_pi:zigbee2mqtt/bridge/log:.* { json2nameValue($EVENT, 'log_') } (contains not A-Za-z/\d_\.- or is too long)
In deinem automatisch angelegten Device hättest einfach nur ein set MQTT2_zigbee_pi attrTemplate zigbee2mqtt_bridge
ausführen müssen.
Wenn dir die automatisch angelegte Definition nicht gesichert hast, würd ich das Device jetzt einfach löschen, den Pi oder zigbee2mqtt Dienst neu starten, dass das Device wieder angelegt wird und darauf dann das Template anwenden.
Und Eingabe als RawDef (unter jedem Device ein "Link" was drin steht löschen [keine Angst "passiert nix"] und alles einfügen und execute)...
Namen etc. nat. anpassen!
Z.B. heißt dein MQTT2_Server ja schon anders ;)
Gruß, Joachim
So die Lampe ist angekommen und im zigbee2mqtt angelernt und lässt sich über das Frontend schon mal steuern.
TOP.
In FHEM wird mir jedoch kein neues einzelnes Gerät angelegt das die Lampe steuern lässt.
Ist das normal oder sollte ein zweites Device dazu kommen im Raum MQTT2_DEVICE ?
List des einzigen MQTT2 Device
Internals:
CONNECTS 3
Clients :MQTT2_DEVICE:MQTT_GENERIC_BRIDGE:
ClientsKeepOrder 1
DEF 1883 global
FD 13
FUUID 65154010-f33f-c1dd-c02c-4b566da5f3e1c86a
NAME myBroker
NR 367
PORT 1883
STATE Initialized
TYPE MQTT2_SERVER
eventCount 5
MatchList:
1:MQTT2_DEVICE ^.
2:MQTT_GENERIC_BRIDGE ^.
READINGS:
2023-09-28 18:48:16 nrclients 1
2023-09-28 18:46:41 state Initialized
clients:
myBroker_127.0.0.1_59522 1
retain:
Attributes:
Bild aus dem Frontend im Anhang
Bild aus dem FHEM im Anhang
Ja es sollte ein zweites Device in dem Raum angelegt werden.
Wie sieht das Bridge-Device jetzt aus, zeig mal ein List.
List vom MQTT2 Server
Internals:
CONNECTS 3
Clients :MQTT2_DEVICE:MQTT_GENERIC_BRIDGE:
ClientsKeepOrder 1
DEF 1883 global
FD 13
FUUID 65154010-f33f-c1dd-c02c-4b566da5f3e1c86a
NAME myBroker
NR 367
PORT 1883
STATE Initialized
TYPE MQTT2_SERVER
eventCount 5
MatchList:
1:MQTT2_DEVICE ^.
2:MQTT_GENERIC_BRIDGE ^.
READINGS:
2023-09-28 18:48:16 nrclients 1
2023-09-28 18:46:41 state Initialized
clients:
myBroker_127.0.0.1_59522 1
retain:
Attributes:
List vom einzigen Device (Vermutlich die Bridge wo du meinst?)
Internals:
CFGFN
CID zigbee_pi
DEF zigbee_pi
FUUID 6515adc0-f33f-c1dd-1b0e-de8e7b96f6922ac0
IODev myBroker
LASTInputDev myBroker
MSGCNT 105
NAME MQTT2_zigbee_pi
NR 375
STATE OFF
TYPE MQTT2_DEVICE
eventCount 117
myBroker_CONN myBroker_127.0.0.1_59522
myBroker_MSGCNT 105
myBroker_TIME 2023-09-28 19:48:14
OLDREADINGS:
READINGS:
2023-09-28 18:49:02 attrTemplateVersion 20220328
2023-09-28 19:48:14 log_level debug
2023-09-28 19:48:14 log_message Saving state to file /opt/zigbee2mqtt/data/state.json
hmccu:
Attributes:
bridgeRegexp zigbee2mqtt/([A-Za-z0-9._]+)[/]?.*:.* "zigbee_$1"
comment To check for new updates of the deamon software, you might want to use a separate HTTPMOD device. See HTTPMOD template zigbee2mqtt_daemon_updates for further details.
devicetopic zigbee2mqtt
getList networkmap_raw:noArg raw $DEVICETOPIC/bridge/request/networkmap raw
networkmap_graphviz:noArg graphviz $DEVICETOPIC/bridge/request/networkmap graphviz
icon mqtt
model zigbee2mqtt_bridge
readingList $DEVICETOPIC/bridge/state:.* state
$DEVICETOPIC/bridge/config/devices:.* {}
$DEVICETOPIC/bridge/config/log_level:.* log_level
$DEVICETOPIC/bridge/config/permit_join:.* permit_join
$DEVICETOPIC/bridge/config/rename:.* { json2nameValue($EVENT, 'rename_') }
$DEVICETOPIC/bridge/config:.* { json2nameValue($EVENT) }
$DEVICETOPIC/bridge/log:.*\"type\".\"devices\".\"message\".* devices
$DEVICETOPIC/bridge/log:.* log
$DEVICETOPIC/bridge/logging:.* { json2nameValue($EVENT,'log_') }
$DEVICETOPIC/bridge/response/networkmap:.* { my $type = $EVENT =~ m/.*,"type":"(raw|graphviz)",.*/ ? $1 : 'networkmap'; $EVENT =~ m/{"data":\{.*"value":"?(.*[^"])"?\},"status":"ok"\}/ ? { $type=>$1 } : {} }
$DEVICETOPIC/bridge/devices:.* devices
$DEVICETOPIC/bridge/info:.* info
$DEVICETOPIC/bridge/groups:.* groups
$DEVICETOPIC/bridge/event:.* { json2nameValue($EVENT) }
$DEVICETOPIC/bridge/extensions:.* extensions
room MQTT2_DEVICE
setList log_level:debug,info,warn,error $DEVICETOPIC/bridge/config/log_level $EVTPART1
permit_join:true,false $DEVICETOPIC/bridge/request/permit_join $EVTPART1
remove:textField $DEVICETOPIC/bridge/config/remove $EVTPART1
ota_update:textField $DEVICETOPIC/bridge/ota_update/update $EVTPART1
ota_update_check:textField $DEVICETOPIC/bridge/ota_update/check $EVTPART1
y_device_setting:textField $DEVICETOPIC/$EVTPART1/set {"$EVTPART2": "$EVTPART3"}
x_bind:textField $DEVICETOPIC/bridge/bind/$EVTPART1 $EVTPART2
x_bind_unbind:textField $DEVICETOPIC/bridge/unbind/$EVTPART1 $EVTPART2
x_device_options:textField $DEVICETOPIC/bridge/config/device_options {"friendly_name":"$EVTPART1","options": {"$EVTPART2": "$EVTPART3"}}
x_group_add_to:textField $DEVICETOPIC/bridge/group/$EVTPART1/add $EVTPART2
x_group_rm_from:textField $DEVICETOPIC/bridge/group/$EVTPART1/remove $EVTPART2
x_group_rm_from_all:textField $DEVICETOPIC/bridge/group/$EVTPART1/remove_all $EVTPART2
x_group_add_group:textField $DEVICETOPIC/bridge/config/add_group $EVTPART1
x_group_rm_group:textField $DEVICETOPIC/bridge/config/remove_group $EVTPART1
z_elapsed:textField $DEVICETOPIC/bridge/config/elapsed $EVTPART1
z_last_seen:disable,ISO_8601,epoch,ISO_8601_local $DEVICETOPIC/bridge/config/last_seen $EVTPART1
z_ban:textField $DEVICETOPIC/bridge/config/ban $EVTPART1
z_rename:textField $DEVICETOPIC/bridge/config/rename {"old":"$EVTPART1","new":"$EVTPART2"}
z_reset_CC:noArg $DEVICETOPIC/bridge/config/reset
setStateList on off
Ich sehe das Problem, warum kein Device angelegt wird, erstmal nicht, Vlt. hat wer anderes ja mehr Durchblick.
Hab nun nochmals beides neu gestartet und nun kam auch die einzelne Lampe als Device.
Ein grosses DANKESCHÖN für euren Support.
Noch eine letzte Frage.
Es wurde nun ebenfalls ein Device Namens zigbee_bridge angelegt automatisch und den Status zeigt ???
Braucht es das Device?
Internals:
CID zigbee_bridge
DEF zigbee_bridge
FUUID 6515beb1-f33f-c1dd-7fc0-fbfc2568a4bb6600
IODev myBroker
NAME MQTT2_zigbee_bridge
NR 77
STATE ???
TYPE MQTT2_DEVICE
READINGS:
2023-09-28 20:33:23 IODev myBroker
2023-09-28 19:59:54 associatedWith MQTT2_zigbee_pi
2023-09-28 19:59:54 data_id FL_Kugel
2023-09-28 19:59:54 error Update of 'FL_Kugel' failed (Device didn't respond to OTA request)
2023-09-28 19:59:54 status error
2023-09-28 19:59:54 transaction ikkbz-2
Attributes:
readingList zigbee2mqtt/bridge/response/restart:.* { json2nameValue($EVENT) }
zigbee2mqtt/bridge/response/device/ota_update/update:.* { json2nameValue($EVENT) }
room MQTT2_DEVICE
Die readingList-Einträge dieses Devices
zigbee2mqtt/bridge/response/restart:.* { json2nameValue($EVENT) }
zigbee2mqtt/bridge/response/device/ota_update/update:.* { json2nameValue($EVENT) }
ergänzt du einfach in der readingList des Bridge-Device, die gehören da hin.
Das zusätzlich erstellte Device kannst du dann löschen, das wird dann nicht mehr angelegt.
Perfekt. Hat ebenfalls geklappt.
(Gibt noch viel zum lernen ;D )
Wenn ich FHEM neu starte (bsp. nach update) muss ich manuell den Zigbee2mqtt Dienst auf dem Raspberry neu starten damit alles wieder geht.
Gibt es eine Möglichkeit den Dienst automatisch neustarten zu lassen nach dem Start von FHEM ?
Entweder über systemctl
https://www.zigbee2mqtt.io/guide/installation/01_linux.html#optional-running-as-a-daemon-with-systemctl
oder pm2
https://pm2.keymetrics.io/docs/usage/quick-start/
Zur eigentlichen Frage:
ZitatGibt es eine Möglichkeit den Dienst automatisch neustarten zu lassen nach dem Start von FHEM ?
Ich weiß auf Anhieb nicht wie man das in FHEM umsetzt, in den Ordner zigbee zu "gehen" und dann das npm Start auszuführen, ich hab einen Verdacht müsste mich aber mit beschäftigen.
systemctl hab ich im Raspberry eingerichtet damit der Dienst Zigbee2MQTT beim Hochfahren oder bei einem Neustart vom Raspberry startet. Das klappt.
Ich suche die Möglichkeit das FHEM einen Befehl absetzt und den Dienst neustarten lässt.
Keine Ahnung, aus welchem Grund möchtest du das machen ?
Wenn ich FHEM neustarte (ohne den ganzen Raspberry) dann verliert Zigbee2MQTT die Verbindung und funkioniert dann nichr mehr. Erst wenn ich den Dienst neustarte geht es wieder
Dann muss man den Grund suchen warum das so ist, das ist ja nicht "normal", eine Idee hab ich aber erstmal nicht.
Es gibt das Modul servicd (oder so ähnlich), damit lassen sich services aus fhem steuern/überwachen...
EDIT: https://forum.fhem.de/index.php?topic=79952.msg719659#msg719659
Bei fhem Start gibt es das Event global:INITIALIZED darauf ein notify was den Dienst neu startet...
Andere Lösung: in der Service Datei von zigbee2mqtt eine Abhängigkeit zu fhem, dann wird (sollte) der Dienst auch mit/nach fhem neu gestartet werden...
Gruß, Joachim
Zitat von: TomLee am 28 September 2023, 22:03:28Dann muss man den Grund suchen warum das so ist, das ist ja nicht "normal", eine Idee hab ich aber erstmal nicht.
Das ist natürlich das was man machen sollte!
Kann mich nicht mehr erinnern, ob das bei mir auch der Fall war, dazu hab ich zu kurz mit zigbee2mqtt rumgespielt...
Gruß, Joachim
Beobachte mal das Log in der Oberfläche von z2m während du FHEM neu startest, vlt. steht da was weshalb der Dienst sich nicht wieder mit dem MQTT2_SERVER verbindet.
Kann man die Zigbee Bridge "MQTT2_zigbee_pi" innerhalb FHEM manuell neustarten?
Würde das mal versuchen ob es dann geht.
Auch zeigt mir die Bridge das State komisch an, wo ich kein devStateIcon drauf bekomme.
Hab ihr da auch so ein Status mit den Klammern {"state":"online"}
Zitat von: TomLee am 28 September 2023, 22:09:07Beobachte mal das Log in der Oberfläche von z2m während du FHEM neu startest, vlt. steht da was weshalb der Dienst sich nicht wieder mit dem MQTT2_SERVER verbindet.
Im Log vom Zigbee2MQTT sieht man das er die Verbindung wieder zum MQTT Server herstellt.
Das Schalten der Lampe geht dann aber trotzdem nicht.
Auszug aus dem Log
error 2023-09-28 22:28:49Not connected to MQTT server!
error 2023-09-28 22:28:59Not connected to MQTT server!
error 2023-09-28 22:29:09Not connected to MQTT server!
error 2023-09-28 22:29:19Not connected to MQTT server!
error 2023-09-28 22:29:29Not connected to MQTT server!
info 2023-09-28 22:29:32Connected to MQTT server
info 2023-09-28 22:29:32MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"online"}'
info 2023-09-28 22:29:34MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"online"}'
debug 2023-09-28 22:30:58Received MQTT message on 'zigbee2mqtt/FL_Kugel/set' with data '{"color":{"hex":"#FF0018"}}'
debug 2023-09-28 22:30:58Publishing 'set' 'color' to 'FL_Kugel'
debug 2023-09-28 22:31:04Received MQTT message on 'zigbee2mqtt/FL_Kugel/set' with data '{"color":{"hex":"#FFA52C"}}'
debug 2023-09-28 22:31:04Publishing 'set' 'color' to 'FL_Kugel'
error 2023-09-28 22:31:05Publish 'set' 'color' to 'FL_Kugel' failed: 'Error: Command 0xf0d1b800001ffc9d/1 lightingColorCtrl.moveToColor({"transtime":0,"colorx":45494,"colory":19418}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms)'
debug 2023-09-28 22:31:05Error: Command 0xf0d1b800001ffc9d/1 lightingColorCtrl.moveToColor({"transtime":0,"colorx":45494,"colory":19418}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms) at Timeout._onTimeout (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7)
debug 2023-09-28 22:31:05Received MQTT message on 'zigbee2mqtt/FL_Kugel/set' with data '{"state":"ON"}'
debug 2023-09-28 22:31:05Publishing 'set' 'state' to 'FL_Kugel'
ZitatKann man die Zigbee Bridge "MQTT2_zigbee_pi" innerhalb FHEM manuell neustarten?
Nein, die Bridge empfängt einfach nur Daten von zigbee2mqtt.
ZitatHab ihr da auch so ein Status mit den Klammern {"state":"online"}
In dem Template gibt's kein devstateicon und kein stateformat, also wird state angezeigt und in state steht bei dir der Json ? Zeig mal ein List.
Hier das List
- Würde gerne den Status normal angeziegt bekommen, damit ich devStateIcon anwenden kann.
Internals:
CID zigbee_pi
DEF zigbee_pi
FUUID 6515adc0-f33f-c1dd-1b0e-de8e7b96f6922ac0
IODev myBroker
LASTInputDev myBroker
MSGCNT 588
NAME MQTT2_zigbee_pi
NR 73
STATE {"state":"online"}
TYPE MQTT2_DEVICE
eventCount 589
myBroker_CONN myBroker_127.0.0.1_59134
myBroker_MSGCNT 588
myBroker_TIME 2023-09-28 23:17:33
READINGS:
2023-09-28 22:28:57 IODev myBroker
2023-09-28 18:49:02 attrTemplateVersion 20220328
2023-09-28 20:48:56 data_friendly_name FL_Kugel
2023-09-28 20:48:56 data_ieee_address 0xf0d1b800001ffc9d
2023-09-28 22:43:33 devices [{"definition":null,"disabled":false,"endpoints":{"1":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"10":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"11":{"bindings":[],"clusters":{"input":["ssIasAce","genTime"],"output":["ssIasZone","ssIasWd"]},"configured_reportings":[],"scenes":[]},"110":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"12":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"13":{"bindings":[],"clusters":{"input":["genOta"],"output":[]},"configured_reportings":[],"scenes":[]},"2":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"242":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"3":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"4":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"47":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"5":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"6":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]},"8":{"bindings":[],"clusters":{"input":[],"output":[]},"configured_reportings":[],"scenes":[]}},"friendly_name":"Coordinator","ieee_address":"0x00124b002a2eafb4","interview_completed":true,"interviewing":false,"network_address":0,"supported":false,"type":"Coordinator"},{"definition":{"description":"SMART+ lamp E27 RGBW","exposes":[{"features":[{"access":7,"description":"On/off state of this light","label":"State","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"},{"access":7,"description":"Brightness of this light","label":"Brightness","name":"brightness","property":"brightness","type":"numeric","value_max":254,"value_min":0},{"access":7,"description":"Color temperature of this light","label":"Color temp","name":"color_temp","presets":[{"description":"Coolest temperature supported","name":"coolest","value":153},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warmest temperature supported","name":"warmest","value":370}],"property":"color_temp","type":"numeric","unit":"mired","value_max":370,"value_min":153},{"access":7,"description":"Color of this light in the CIE 1931 color space (x/y)","features":[{"access":7,"label":"X","name":"x","property":"x","type":"numeric"},{"access":7,"label":"Y","name":"y","property":"y","type":"numeric"}],"label":"Color (X/Y)","name":"color_xy","property":"color","type":"composite"},{"access":7,"description":"Color of this light expressed as hue/saturation","features":[{"access":7,"label":"Hue","name":"hue","property":"hue","type":"numeric"},{"access":7,"label":"Saturation","name":"saturation","property":"saturation","type":"numeric"}],"label":"Color (HS)","name":"color_hs","property":"color","type":"composite"}],"type":"light"},{"access":2,"description":"Triggers an effect on the light (e.g. make light blink for a few seconds)","label":"Effect","name":"effect","property":"effect","type":"enum","values":["blink","breathe","okay","channel_change","finish_effect","stop_effect"]},{"access":1,"description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"4058075208391","options":[{"access":2,"description":"Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).","label":"Transition","name":"transition","property":"transition","type":"numeric","value_min":0},{"access":2,"description":"When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).","label":"Color sync","name":"color_sync","property":"color_sync","type":"binary","value_off":false,"value_on":true},{"access":2,"description":"State actions will also be published as 'action' when true (default false).","label":"State action","name":"state_action","property":"state_action","type":"binary","value_off":false,"value_on":true}],"supports_ota":true,"vendor":"LEDVANCE"},"disabled":false,"endpoints":{"1":{"bindings":[],"clusters":{"input":["genBasic","genIdentify","genGroups","genScenes","genOnOff","genLevelCtrl","lightingColorCtrl","haDiagnostic","touchlink"],"output":["genOta"]},"configured_reportings":[],"scenes":[]},"242":{"bindings":[],"clusters":{"input":[],"output":["greenPower"]},"configured_reportings":[],"scenes":[]}},"friendly_name":"FL_Kugel","ieee_address":"0xf0d1b800001ffc9d","interview_completed":true,"interviewing":false,"manufacturer":"LEDVANCE","model_id":"A60S RGBW","network_address":3348,"power_source":"Mains (single phase)","software_build_id":"02136550","supported":true,"type":"Router"}]
2023-09-28 22:43:33 extensions []
2023-09-28 21:57:56 graphviz digraph G {\nnode[shape=record];\n \"0x00124b002a2eafb4\" [style=\"bold, filled\", fillcolor=\"#e04e5d\", fontcolor=\"#ffffff\", label=\"{Coordinator|0x00124b002a2eafb4 (0x0000)failed: lqi|0 seconds ago}\"];\n \"0xf0d1b800001ffc9d\" [style=\"rounded, filled\", fillcolor=\"#4ea3e0\", fontcolor=\"#ffffff\", label=\"{FL_Kugel|0xf0d1b800001ffc9d (0x0d14)failed: lqi|LEDVANCE SMART+ lamp E27 RGBW (4058075208391)|5 minutes, 7 seconds ago}\"];\n}
2023-09-28 22:43:33 groups []
2023-09-28 22:43:32 info {"commit":"4d53ac4c","config":{"advanced":{"adapter_concurrent":null,"adapter_delay":null,"availability_blacklist":[],"availability_blocklist":[],"availability_passlist":[],"availability_whitelist":[],"cache_state":true,"cache_state_persistent":true,"cache_state_send_on_startup":true,"channel":11,"elapsed":false,"ext_pan_id":[221,221,221,221,221,221,221,221],"homeassistant_legacy_entity_attributes":false,"ikea_ota_use_test_url":true,"last_seen":"disable","legacy_api":false,"legacy_availability_payload":false,"log_directory":"/opt/zigbee2mqtt/data/log/%TIMESTAMP%","log_file":"log.txt","log_level":"debug","log_output":["console","file"],"log_rotation":true,"log_symlink_current":false,"log_syslog":{},"output":"json","pan_id":6754,"report":false,"soft_reset_timeout":0,"timestamp_format":"YYYY-MM-DD HH:mm:ss"},"blocklist":[],"device_options":{"legacy":false},"devices":{"0xf0d1b800001ffc9d":{"friendly_name":"FL_Kugel"}},"external_converters":[],"frontend":{"host":"0.0.0.0","port":8080},"groups":{},"homeassistant":false,"map_options":{"graphviz":{"colors":{"fill":{"coordinator":"#e04e5d","enddevice":"#fff8ce","router":"#4ea3e0"},"font":{"coordinator":"#ffffff","enddevice":"#000000","router":"#ffffff"},"line":{"active":"#009900","inactive":"#994444"}}}},"mqtt":{"base_topic":"zigbee2mqtt","client_id":"zigbee_pi","force_disable_retain":false,"include_device_information":false,"keepalive":60,"reject_unauthorized":true,"server":"mqtt://localhost","user":"pi","version":4},"ota":{"disable_automatic_update_check":false,"ikea_ota_use_test_url":true,"update_check_interval":1440},"passlist":[],"permit_join":false,"serial":{"disable_led":false,"port":"/dev/ttyUSB0"}},"config_schema":{"definitions":{"device":{"properties":{"debounce":{"description":"Debounces messages of this device","title":"Debounce","type":"number"},"debounce_ignore":{"description":"Protects unique payload values of specified payload properties from overriding within debounce time","examples":["action"],"items":{"type":"string"},"title":"Ignore debounce","type":"array"},"disabled":{"description":"Disables the device (excludes device from network scans, availability and group state updates)","requiresRestart":true,"title":"Disabled","type":"boolean"},"filtered_attributes":{"description":"Filter attributes with regex from published payload.","examples":["^temperature$","^battery$","^action$"],"items":{"type":"string"},"title":"Filtered publish attributes","type":"array"},"filtered_cache":{"description":"Filter attributes with regex from being added to the cache, this prevents the attribute from being in the published payload when the value didn't change.","examples":["^input_actions$"],"items":{"type":"string"},"title":"Filtered attributes from cache","type":"array"},"filtered_optimistic":{"description":"Filter attributes with regex from optimistic publish payload when calling /set. (This has no effect if optimistic is set to false).","examples":["^color_(mode|temp)$","color"],"items":{"type":"string"},"title":"Filtered optimistic attributes","type":"array"},"friendly_name":{"description":"Used in the MQTT topic of a device. By default this is the device ID","readOnly":true,"title":"Friendly name","type":"string"},"homeassistant":{"properties":{"name":{"description":"Name of the device in Home Assistant","title":"Home Assistant name","type":"string"}},"title":"Home Assistant","type":["object","null"]},"icon":{"description":"The user-defined device icon for the frontend. It can be a full URL link to an image (e.g. https://SOME.SITE/MODEL123.jpg) (you cannot use a path to a local file) or base64 encoded data URL (e.g. image/svg+xml;base64,PHN2ZyB3aW....R0aD)","title":"Icon","type":"string"},"optimistic":{"default":true,"description":"Publish optimistic state after set","title":"Optimistic","type":"boolean"},"qos":{"description":"QoS level for MQTT messages of this device","title":"QoS","type":"number"},"retain":{"description":"Retain MQTT messages of this device","title":"Retain","type":"boolean"},"retention":{"description":"Sets the MQTT Message Expiry in seconds, Make sure to set mqtt.version to 5","title":"Retention","type":"number"}},"required":["friendly_name"],"type":"object"},"group":{"properties":{"devices":{"items":{"type":"string"},"type":"array"},"filtered_attributes":{"items":{"type":"string"},"type":"array"},"friendly_name":{"type":"string"},"off_state":{"default":"auto","description":"Control when to publish state OFF for a group. 'all_members_off': only publish state OFF when all group memebers are in state OFF, 'last_member_state': publish state OFF whenever one of its members changes to OFF","enum":["all_members_off","last_member_state"],"requiresRestart":true,"title":"Group off state","type":["string"]},"optimistic":{"type":"boolean"},"qos":{"type":"number"},"retain":{"type":"boolean"}},"required":["friendly_name"],"type":"object"}},"properties":{"advanced":{"properties":{"adapter_concurrent":{"description":"Adapter concurrency (e.g. 2 for CC2531 or 16 for CC26X2R1) (default: null, uses recommended value)","requiresRestart":true,"title":"Adapter concurrency","type":["number","null"]},"adapter_delay":{"description":"Adapter delay","requiresRestart":true,"title":"Adapter delay","type":["number","null"]},"cache_state":{"default":true,"description":"MQTT message payload will contain all attributes, not only changed ones. Has to be true when integrating via Home Assistant","title":"Cache state","type":"boolean"},"cache_state_persistent":{"default":true,"description":"Persist cached state, only used when cache_state: true","title":"Persist cache state","type":"boolean"},"cache_state_send_on_startup":{"default":true,"description":"Send cached state on startup, only used when cache_state: true","title":"Send cached state on startup","type":"boolean"},"channel":{"default":11,"description":"Zigbee channel, changing requires repairing all devices! (Note: use a ZLL channel: 11, 15, 20, or 25 to avoid Problems)","examples":[15,20,25],"maximum":26,"minimum":11,"requiresRestart":true,"title":"ZigBee channel","type":"number"},"elapsed":{"default":false,"description":"Add an elapsed attribute to MQTT messages, contains milliseconds since the previous msg","title":"Elapsed","type":"boolean"},"ext_pan_id":{"description":"Zigbee extended pan ID, changing requires repairing all devices!","oneOf":[{"title":"Extended pan ID (string)","type":"string"},{"items":{"type":"number"},"title":"Extended pan ID (array)","type":"array"}],"requiresRestart":true,"title":"Ext Pan ID"},"last_seen":{"default":"disable","description":"Add a last_seen attribute to MQTT messages, contains date/time of last Zigbee message","enum":["disable","ISO_8601","ISO_8601_local","epoch"],"title":"Last seen","type":"string"},"legacy_api":{"default":true,"description":"Disables the legacy api (false = disable)","requiresRestart":true,"title":"Legacy API","type":"boolean"},"legacy_availability_payload":{"default":true,"description":"Payload to be used for device availabilty and bridge/state topics. true = text, false = JSON","requiresRestart":true,"title":"Legacy availability payload","type":"boolean"},"log_directory":{"description":"Location of log directory","examples":["data/log/%TIMESTAMP%"],"requiresRestart":true,"title":"Log directory","type":"string"},"log_file":{"default":"log.txt","description":"Log file name, can also contain timestamp","examples":["zigbee2mqtt_%TIMESTAMP%.log"],"requiresRestart":true,"title":"Log file","type":"string"},"log_level":{"default":"info","description":"Logging level","enum":["info","warn","error","debug"],"title":"Log level","type":"string"},"log_output":{"description":"Output location of the log, leave empty to suppress logging","items":{"enum":["console","file","syslog"],"type":"string"},"requiresRestart":true,"title":"Log output","type":"array"},"log_rotation":{"default":true,"description":"Log rotation","requiresRestart":true,"title":"Log rotation","type":"boolean"},"log_symlink_current":{"default":false,"description":"Create symlink to current logs in the log directory","requiresRestart":true,"title":"Log symlink current","type":"boolean"},"log_syslog":{"properties":{"app_name":{"default":"Zigbee2MQTT","description":"The name of the application (Default: Zigbee2MQTT).","title":"Localhost","type":"string"},"eol":{"default":"/n","description":"The end of line character to be added to the end of the message (Default: Message without modifications).","title":"eol","type":"string"},"host":{"default":"localhost","description":"The host running syslogd, defaults to localhost.","title":"Host","type":"string"},"localhost":{"default":"localhost","description":"Host to indicate that log messages are coming from (Default: localhost).","title":"Localhost","type":"string"},"path":{"default":"/dev/log","description":"The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).","examples":["/var/run/syslog"],"title":"Path","type":"string"},"pid":{"default":"process.pid","description":"PID of the process that log messages are coming from (Default process.pid).","title":"PID","type":"string"},"port":{"default":514,"description":"The port on the host that syslog is running on, defaults to syslogd's default port.","title":"Port","type":"number"},"protocol":{"default":"udp4","description":"The network protocol to log over (e.g. tcp4, udp4, tls4, unix, unix-connect, etc).","examples":["udp4","tls4","unix","unix-connect"],"title":"Protocol","type":"string"},"type":{"default":"5424","description":"The type of the syslog protocol to use (Default: BSD, also valid: 5424).","title":"Type","type":"string"}},"title":"syslog","type":"object"},"network_key":{"description":"Network encryption key, changing requires repairing all devices!","oneOf":[{"title":"Network key(string)","type":"string"},{"items":{"type":"number"},"title":"Network key(array)","type":"array"}],"requiresRestart":true,"title":"Network key"},"output":{"description":"Examples when 'state' of a device is published json: topic: 'zigbee2mqtt/my_bulb' payload '{\"state\": \"ON\"}' attribute: topic 'zigbee2mqtt/my_bulb/state' payload 'ON' attribute_and_json: both json and attribute (see above)","enum":["attribute_and_json","attribute","json"],"title":"MQTT output type","type":"string"},"pan_id":{"description":"ZigBee pan ID, changing requires repairing all devices!","oneOf":[{"title":"Pan ID (string)","type":"string"},{"title":"Pan ID (number)","type":"number"}],"requiresRestart":true,"title":"Pan ID"},"timestamp_format":{"description":"Log timestamp format","examples":["YYYY-MM-DD HH:mm:ss"],"requiresRestart":true,"title":"Timestamp format","type":"string"},"transmit_power":{"description":"Transmit power of adapter, only available for Z-Stack (CC253*/CC2652/CC1352) adapters, CC2652 = 5dbm, CC1352 max is = 20dbm (5dbm default)","requiresRestart":true,"title":"Transmit power","type":["number","null"]}},"title":"Advanced","type":"object"},"availability":{"description":"Checks whether devices are online/offline","oneOf":[{"title":"Availability (simple)","type":"boolean"},{"properties":{"active":{"description":"Options for active devices (routers/mains powered)","properties":{"timeout":{"default":10,"description":"Time after which an active device will be marked as offline in minutes","requiresRestart":true,"title":"Timeout","type":"number"}},"requiresRestart":true,"title":"Active","type":"object"},"passive":{"description":"Options for passive devices (mostly battery powered)","properties":{"timeout":{"default":1500,"description":"Time after which an passive device will be marked as offline in minutes","requiresRestart":true,"title":"Timeout","type":"number"}},"requiresRestart":true,"title":"Passive","type":"object"}},"title":"Availability (advanced)","type":"object"}],"requiresRestart":true,"title":"Availability"},"ban":{"items":{"type":"string"},"readOnly":true,"requiresRestart":true,"title":"Ban (deprecated, use blocklist)","type":"array"},"blocklist":{"description":"Block devices from the network (by ieeeAddr)","items":{"type":"string"},"requiresRestart":true,"title":"Blocklist","type":"array"},"device_options":{"title":"Options that are applied to all devices","type":"object"},"devices":{"patternProperties":{"^.*$":{"$ref":"#/definitions/device"}},"propertyNames":{"pattern":"^0x[\\d\\w]{16}$"},"type":"object"},"external_converters":{"description":"You can define external converters to e.g. add support for a DiY device","examples":["DIYRuZ_FreePad.js"],"items":{"type":"string"},"requiresRestart":true,"title":"External converters","type":"array"},"frontend":{"oneOf":[{"title":"Frontend (simple)","type":"boolean"},{"properties":{"auth_token":{"description":"Enables authentication, disabled by default","requiresRestart":true,"title":"Auth token","type":["string","null"]},"host":{"default":"0.0.0.0","description":"Frontend binding host. Binds to a unix socket when an absolute path is given instead.","examples":["127.0.0.1","/run/zigbee2mqtt/zigbee2mqtt.sock"],"requiresRestart":true,"title":"Bind host","type":"string"},"port":{"default":8080,"description":"Frontend binding port. Ignored when using a unix domain socket","requiresRestart":true,"title":"Port","type":"number"},"ssl_cert":{"description":"SSL Certificate file path for exposing HTTPS. The sibling property 'ssl_key' must be set for HTTPS to be activated.","requiresRestart":true,"title":"Certificate file path","type":["string","null"]},"ssl_key":{"description":"SSL key file path for exposing HTTPS. The sibling property 'ssl_cert' must be set for HTTPS to be activated.","requiresRestart":true,"title":"key file path","type":["string","null"]},"url":{"description":"URL on which the frontend can be reached, currently only used for the Home Assistant device configuration page","requiresRestart":true,"title":"URL","type":["string","null"]}},"title":"Frontend (advanced)","type":"object"}],"requiresRestart":true,"title":"Frontend"},"groups":{"patternProperties":{"^.*$":{"$ref":"#/definitions/group"}},"propertyNames":{"pattern":"^[\\w].*$"},"type":"object"},"homeassistant":{"default":false,"description":"Home Assistant integration (MQTT discovery)","oneOf":[{"title":"Home Assistant (simple)","type":"boolean"},{"properties":{"discovery_topic":{"description":"Home Assistant discovery topic","examples":["homeassistant"],"requiresRestart":true,"title":"Homeassistant discovery topic","type":"string"},"legacy_entity_attributes":{"default":true,"description":"Home Assistant legacy entity attributes, when enabled Zigbee2MQTT will add state attributes to each entity, additional to the separate entities and devices it already creates","title":"Home Assistant legacy entity attributes","type":"boolean"},"legacy_triggers":{"default":true,"description":"Home Assistant legacy triggers, when enabled Zigbee2mqt will send an empty 'action' or 'click' after one has been send. A 'sensor_action' and 'sensor_click' will be discoverd","title":"Home Assistant legacy triggers","type":"boolean"},"status_topic":{"description":"Home Assistant status topic","examples":["homeassistant/status"],"requiresRestart":true,"title":"Home Assistant status topic","type":"string"}},"title":"Home Assistant (advanced)","type":"object"}],"requiresRestart":true,"title":"Home Assistant integration"},"map_options":{"properties":{"graphviz":{"properties":{"colors":{"properties":{"fill":{"properties":{"coordinator":{"type":"string"},"enddevice":{"type":"string"},"router":{"type":"string"}},"type":"object"},"font":{"properties":{"coordinator":{"type":"string"},"enddevice":{"type":"string"},"router":{"type":"string"}},"type":"object"},"line":{"properties":{"active":{"type":"string"},"inactive":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}},"title":"Networkmap","type":"object"},"mqtt":{"properties":{"base_topic":{"default":"zigbee2mqtt","description":"MQTT base topic for Zigbee2MQTT MQTT messages","examples":["zigbee2mqtt"],"requiresRestart":true,"title":"Base topic","type":"string"},"ca":{"description":"Absolute path to SSL/TLS certificate of CA used to sign server and client certificates","examples":["/etc/ssl/mqtt-ca.crt"],"requiresRestart":true,"title":"Certificate authority","type":"string"},"cert":{"description":"Absolute path to SSL/TLS certificate for client-authentication","examples":["/etc/ssl/mqtt-client.crt"],"requiresRestart":true,"title":"SSL/TLS certificate","type":"string"},"client_id":{"description":"MQTT client ID","examples":["MY_CLIENT_ID"],"requiresRestart":true,"title":"Client ID","type":"string"},"force_disable_retain":{"default":false,"description":"Disable retain for all send messages. ONLY enable if you MQTT broker doesn't support retained message (e.g. AWS IoT core, Azure IoT Hub, Google Cloud IoT core, IBM Watson IoT Platform). Enabling will break the Home Assistant integration","requiresRestart":true,"title":"Force disable retain","type":"boolean"},"include_device_information":{"default":false,"description":"Include device information to mqtt messages","title":"Include device information","type":"boolean"},"keepalive":{"default":60,"description":"MQTT keepalive in second","requiresRestart":true,"title":"Keepalive","type":"number"},"key":{"description":"Absolute path to SSL/TLS key for client-authentication","examples":["/etc/ssl/mqtt-client.key"],"requiresRestart":true,"title":"SSL/TLS key","type":"string"},"password":{"description":"MQTT server authentication password","examples":["ILOVEPELMENI"],"requiresRestart":true,"title":"Password","type":"string"},"reject_unauthorized":{"default":true,"description":"Disable self-signed SSL certificate","requiresRestart":true,"title":"Reject unauthorized","type":"boolean"},"server":{"description":"MQTT server URL (use mqtts:// for SSL/TLS connection)","examples":["mqtt://localhost:1883"],"requiresRestart":true,"title":"MQTT server","type":"string"},"user":{"description":"MQTT server authentication user","examples":["johnnysilverhand"],"requiresRestart":true,"title":"User","type":"string"},"version":{"default":4,"description":"MQTT protocol version","examples":[5],"requiresRestart":true,"title":"Version","type":["number","null"]}},"required":["server"],"title":"MQTT","type":"object"},"ota":{"properties":{"disable_automatic_update_check":{"default":false,"description":"Zigbee devices may request a firmware update, and do so frequently, causing Zigbee2MQTT to reach out to third party servers. If you disable these device initiated checks, you can still initiate a firmware update check manually.","title":"Disable automatic update check","type":"boolean"},"ikea_ota_use_test_url":{"default":false,"description":"Use IKEA TRADFRI OTA test server, see OTA updates documentation","requiresRestart":true,"title":"IKEA TRADFRI OTA use test url","type":"boolean"},"update_check_interval":{"default":1440,"description":"Your device may request a check for a new firmware update. This value determines how frequently third party servers may actually be contacted to look for firmware updates. The value is set in minutes, and the default is 1 day.","title":"Update check interval","type":"number"},"zigbee_ota_override_index_location":{"description":"Location of override OTA index file","examples":["index.json"],"requiresRestart":true,"title":"OTA index override file name","type":"string"}},"title":"OTA updates","type":"object"},"passlist":{"description":"Allow only certain devices to join the network (by ieeeAddr). Note that all devices not on the passlist will be removed from the network!","items":{"type":"string"},"requiresRestart":true,"title":"Passlist","type":"array"},"permit_join":{"default":false,"description":"Allow new devices to join (re-applied at restart)","title":"Permit join","type":"boolean"},"serial":{"properties":{"adapter":{"default":"auto","description":"Adapter type, not needed unless you are experiencing problems","enum":["deconz","zstack","zigate","ezsp","auto"],"requiresRestart":true,"title":"Adapter","type":["string"]},"baudrate":{"description":"Baud rate speed for serial port, this can be anything firmware support but default is 115200 for Z-Stack and EZSP, 38400 for Deconz, however note that some EZSP firmware need 57600","examples":[38400,57600,115200],"requiresRestart":true,"title":"Baudrate","type":"number"},"disable_led":{"default":false,"description":"Disable LED of the adapter if supported","requiresRestart":true,"title":"Disable led","type":"boolean"},"port":{"description":"Location of the adapter. To autodetect the port, set null","examples":["/dev/ttyACM0"],"requiresRestart":true,"title":"Port","type":["string","null"]},"rtscts":{"description":"RTS / CTS Hardware Flow Control for serial port","requiresRestart":true,"title":"RTS / CTS","type":"boolean"}},"title":"Serial","type":"object"},"whitelist":{"items":{"type":"string"},"readOnly":true,"requiresRestart":true,"title":"Whitelist (deprecated, use passlist)","type":"array"}},"required":["mqtt"],"type":"object"},"coordinator":{"ieee_address":"0x00124b002a2eafb4","meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"},"log_level":"debug","network":{"channel":11,"extended_pan_id":"0x00124b002a2eafb4","pan_id":6754},"permit_join":false,"restart_required":false,"version":"1.33.0"}
2023-09-28 23:17:33 log_level info
2023-09-28 23:17:33 log_message MQTT publish: topic 'zigbee2mqtt/FL_Kugel', payload '{"brightness":95,"color":{"hue":32,"saturation":82,"x":0.4599,"y":0.4106},"color_mode":"color_temp","color_temp":370,"linkquality":87,"state":"ON","update":{"installed_version":34825552,"latest_version":34891088,"progress":62.96,"remaining":444,"state":"updating"}}'
2023-09-28 19:55:35 raw {"links":[],"nodes":[{"definition":null,"failed":[],"friendlyName":"Coordinator","ieeeAddr":"0x00124b002a2eafb4","lastSeen":null,"networkAddress":0,"type":"Coordinator"},{"definition":{"description":"SMART+ lamp E27 RGBW","model":"4058075208391","supports":"light (state, brightness, color_temp, color_xy, color_hs), effect, linkquality","vendor":"LEDVANCE"},"failed":["lqi"],"friendlyName":"FL_Kugel","ieeeAddr":"0xf0d1b800001ffc9d","lastSeen":1695919724009,"manufacturerName":"LEDVANCE","modelID":"A60S RGBW","networkAddress":3348,"type":"Router"}]}
2023-09-28 22:43:32 state {"state":"online"}
2023-09-28 22:42:55 status ok
2023-09-28 23:04:49 subscriptions zigbee2mqtt/#
2023-09-28 22:42:55 transaction 6m8re-1
2023-09-28 20:48:56 type device_announce
2023-09-28 22:32:26 z_reset_CC set
Attributes:
alias Zigbee Bridge
bridgeRegexp zigbee2mqtt/([A-Za-z0-9._]+)[/]?.*:.* "zigbee_$1"
comment To check for new updates of the deamon software, you might want to use a separate HTTPMOD device. See HTTPMOD template zigbee2mqtt_daemon_updates for further details.
devStateIcon state:online:mqtt@green
state:offline:mqtt@red
devicetopic zigbee2mqtt
getList networkmap_raw:noArg raw $DEVICETOPIC/bridge/request/networkmap raw
networkmap_graphviz:noArg graphviz $DEVICETOPIC/bridge/request/networkmap graphviz
group Funkmodule
model zigbee2mqtt_bridge
readingList $DEVICETOPIC/bridge/state:.* state
$DEVICETOPIC/bridge/config/devices:.* {}
$DEVICETOPIC/bridge/config/log_level:.* log_level
$DEVICETOPIC/bridge/config/permit_join:.* permit_join
$DEVICETOPIC/bridge/config/rename:.* { json2nameValue($EVENT, 'rename_') }
$DEVICETOPIC/bridge/config:.* { json2nameValue($EVENT) }
$DEVICETOPIC/bridge/log:.*\"type\".\"devices\".\"message\".* devices
$DEVICETOPIC/bridge/log:.* log
$DEVICETOPIC/bridge/logging:.* { json2nameValue($EVENT,'log_') }
$DEVICETOPIC/bridge/response/networkmap:.* { my $type = $EVENT =~ m/.*,"type":"(raw|graphviz)",.*/ ? $1 : 'networkmap'; $EVENT =~ m/{"data":\{.*"value":"?(.*[^"])"?\},"status":"ok"\}/ ? { $type=>$1 } : {} }
$DEVICETOPIC/bridge/devices:.* devices
$DEVICETOPIC/bridge/info:.* info
$DEVICETOPIC/bridge/groups:.* groups
$DEVICETOPIC/bridge/event:.* { json2nameValue($EVENT) }
$DEVICETOPIC/bridge/extensions:.* extensions
zigbee2mqtt/bridge/response/restart:.* { json2nameValue($EVENT) }
zigbee2mqtt/bridge/response/device/ota_update/update:.* { json2nameValue($EVENT) }
room System
setList log_level:debug,info,warn,error $DEVICETOPIC/bridge/config/log_level $EVTPART1
permit_join:true,false $DEVICETOPIC/bridge/request/permit_join $EVTPART1
remove:textField $DEVICETOPIC/bridge/config/remove $EVTPART1
ota_update:textField $DEVICETOPIC/bridge/ota_update/update $EVTPART1
ota_update_check:textField $DEVICETOPIC/bridge/ota_update/check $EVTPART1
y_device_setting:textField $DEVICETOPIC/$EVTPART1/set {"$EVTPART2": "$EVTPART3"}
x_bind:textField $DEVICETOPIC/bridge/bind/$EVTPART1 $EVTPART2
x_bind_unbind:textField $DEVICETOPIC/bridge/unbind/$EVTPART1 $EVTPART2
x_device_options:textField $DEVICETOPIC/bridge/config/device_options {"friendly_name":"$EVTPART1","options": {"$EVTPART2": "$EVTPART3"}}
x_group_add_to:textField $DEVICETOPIC/bridge/group/$EVTPART1/add $EVTPART2
x_group_rm_from:textField $DEVICETOPIC/bridge/group/$EVTPART1/remove $EVTPART2
x_group_rm_from_all:textField $DEVICETOPIC/bridge/group/$EVTPART1/remove_all $EVTPART2
x_group_add_group:textField $DEVICETOPIC/bridge/config/add_group $EVTPART1
x_group_rm_group:textField $DEVICETOPIC/bridge/config/remove_group $EVTPART1
z_elapsed:textField $DEVICETOPIC/bridge/config/elapsed $EVTPART1
z_last_seen:disable,ISO_8601,epoch,ISO_8601_local $DEVICETOPIC/bridge/config/last_seen $EVTPART1
z_ban:textField $DEVICETOPIC/bridge/config/ban $EVTPART1
z_rename:textField $DEVICETOPIC/bridge/config/rename {"old":"$EVTPART1","new":"$EVTPART2"}
z_reset_CC:noArg $DEVICETOPIC/bridge/config/reset
setStateList on off
Neustart funktioniert nun mit dem Hinweis zu serviced
Habe hier dann ein notify angelegt welches den Service neustartet.
Auch das State wird nun korrekt angezeigt von der Bridge.
ReadingList erweitert um "zigbee2mqtt/bridge/state:.* { json2nameValue($EVENT) }"
Noch eine Frage zu einem Lampen Device.
1.
State zeigt immer nur "click" an statt den eigentlichen Status.
Was muss ich unter stateFormat genau eingeben? (Denke ein Fehler im Template)
2.
Wo holt sich das devStateIcon den genau die Daten her bzw. wo ist auch das Symbol definiert?
Möchte gerne ein anderes Symbol verwenden und die Farben anpassen des Symboles
Internals:
CID zigbee_FL_Kugel
DEF zigbee_FL_Kugel
FUUID 6515bee1-f33f-c1dd-3ba3-217b55b12fd33ba0
IODev myBroker
LASTInputDev myBroker
MSGCNT 2
NAME MQTT2_zigbee_FL_Kugel
NR 376
STATE click
TYPE MQTT2_DEVICE
eventCount 2
myBroker_CONN myBroker_127.0.0.1_45626
myBroker_MSGCNT 2
myBroker_TIME 2023-09-29 02:05:08
JSONMAP:
color_temp ct
color_temp_startup ct_startup
READINGS:
2023-09-29 02:03:49 IODev myBroker
2023-09-28 19:58:57 associatedWith MQTT2_zigbee_pi
2023-09-28 20:17:26 attrTemplateVersion 20221201
2023-09-29 02:05:08 brightness 254
2023-09-29 02:05:08 color_hue 199
2023-09-29 02:05:08 color_mode color_temp
2023-09-29 02:05:08 color_saturation 5
2023-09-29 02:05:08 color_temp 160
2023-09-29 02:05:08 color_x 0.3176
2023-09-29 02:05:08 color_y 0.3276
2023-09-29 02:05:08 linkquality 90
2023-09-29 02:05:08 state off
2023-09-29 02:05:08 temperature_weather 2.5
2023-09-29 02:05:08 update_installed_version 34891088
2023-09-29 02:05:08 update_latest_version 34891088
2023-09-28 23:25:05 update_progress 100
2023-09-28 23:25:05 update_remaining 11
2023-09-29 02:05:08 update_state idle
Attributes:
alexaName Kugel
alias Lampe <br> Kugel
cmdIcon on:general_an off:general_aus cool:general_an neutral:general_an warm:general_an
comment The specified ct and brightness values in on and warm etc. commands ��can be adjusted at any time via the setList attribute
devStateIcon {zigbee2mqtt_devStateIcon255($name)}
devicetopic zigbee2mqtt/FL_Kugel
genericDeviceType light
getList power_on_behavior:noArg power_on_behavior $DEVICETOPIC/get {"power_on_behavior": ""}
group Zigbee
homebridgeMapping Brightness=brightness::brightness,maxValue=100,max=100,factor=0.39371,delay=true
jsonMap color_temp:ct color_temp_startup:ct_startup
model zigbee2mqtt_light_rgbw_rgb
readingList $DEVICETOPIC:.* { my $ret=json2nameValue($EVENT); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
room Flur
setList on:noArg $DEVICETOPIC/set {"state":"ON"}
off:noArg $DEVICETOPIC/set {"state":"OFF"}
cool:noArg $DEVICETOPIC/set {"color_temp": 160}
neutral:noArg $DEVICETOPIC/set {"color_temp": 320}
warm:noArg $DEVICETOPIC/set {"color_temp": 370}
brightness:colorpicker,BRI,0,5,255 $DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}
color:colorpicker,RGB {"$DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
stateFormat click
userReadings temperature_weather { sprintf("%.1f",ReadingsVal($name,"temperature","")+2.5) }
webCmd on:off:brightness:color:cool:neutral:warm
webCmdLabel Ein:Aus
:Helligkeit
:Farbe
:Kalt- <br> Weiss
:Neutral- <br> Weiss:Warm- <br> Weiss
Zu 1.:weil "du" es "hingeschrieben" hast ;)
ZitatstateFormat click
Wo das herkommt: keine Ahnung...
Aber: es gibt kein Reading click (zumindest konnte ich kein finden), daher wird "nichts ersetzt" und halt der "Text" (click) geschrieben (was soll FHEMWEB sonst tun ;) )...
Zitat von: commandrefstateFormat
Ändert den Gerätestatus, dies ist z.Bsp. in der Ausgabe des list Kommandos zu sehen, oder in der Raumübersicht von FHEMWEB. Falls nicht gesetzt, dann wird das state Reading übernommen. Sonst werden alle Wörter im Wert des Attributes durch das entsprechende Reading des Gerätes ersetzt (soweit vorhanden). Falls der Wert in {} eingeschlossen ist, dann wird es als Perl Ausdruck ausgewertet. Die Auswertung passiert bei jeder Änderung eines Readings.
Die hier beschriebene "set magic" wird auch angewendet.
Hinweis: Manche Module aktualisieren STATE ganz oder teilweise direkt. In diesen Fällen kann es zu abweichenden Anzeigen kommen.
https://wiki.fhem.de/wiki/DeviceOverview_anpassen
Zu 2.:ZitatdevStateIcon {zigbee2mqtt_devStateIcon255($name)}
Das icon wird von der Funktion zigbee2mqtt_devStateIcon255 zurückgegeben.
Wo diese "herkommt" weiß ich (grad) nicht...
Du kannst dir auch selbst eine Sub/Funktion schreiben: https://wiki.fhem.de/wiki/99_myUtils_anlegen
Oder direkt Perl-Code angeben...
Zitat von: commandrefdevStateIcon
Erste Variante:
Leerzeichen getrennte Auflistung von regexp:icon-name:cmd Dreierpärchen, icon-name und cmd dürfen leer sein.
Wenn STATE des Gerätes mit der regexp übereinstimmt, wird als icon-name das entsprechende Status Icon angezeigt, und (falls definiert), löst ein Klick auf das Icon das entsprechende cmd aus. Wenn FHEM icon-name nicht finden kann, wird STATE als Text angezeigt. Beispiel:
attr lamp devStateIcon on:closed off:open
attr lamp devStateIcon on::A0 off::AI
attr lamp devStateIcon .*:noIcon
Anmerkung: Wenn das Icon ein SVG Bild ist, kann das @fill:stroke Suffix verwendet werden um das Icon einzufärben, dabei wird in der SVG die Füllfarbe durch das spezifizierte fill ersetzt, und die Stiftfarbe durch das optionale stroke. Z.B.:
attr Fax devStateIcon on:control_building_empty@red off:control_building_filled:278727 Falls cmd noFhemwebLink ist, dann wird kein HTML-Link generiert, d.h. es passiert nichts, wenn man auf das Icon/Text klickt. Achtung: falls im devStateIcons das Ändern der Stiftfarbe benötigt wird, dann ist die alternative @fill@stroke Syntax zu verwenden.
Zweite Variante:
Perl Ausdruck eingeschlossen in {}. Wenn der Code undef zurückliefert, wird das Standard Icon verwendet; wird ein String in <> zurück geliefert, wird dieser als HTML String interpretiert. Andernfalls wird der String als devStateIcon gemäß der ersten Variante interpretiert, siehe oben. Beispiel:
{'<div style="width:32px;height:32px;background-color:green"></div>'}
Anmerkung: Obiges gilt pro STATE Zeile. Wenn STATE (durch stateFormat) mehrzeilig ist, wird pro Zeile ein Icon erzeugt.
Gruß, Joachim
Zitat von: MadMax-FHEM am 29 September 2023, 09:10:12Wo diese "herkommt" weiß ich (grad) nicht...
https://svn.fhem.de/trac/browser/trunk/fhem/FHEM/10_MQTT2_DEVICE.pm#L870
ZitatReadingList erweitert um "zigbee2mqtt/bridge/state:.* { json2nameValue($EVENT) }"
Warum ? Der Topic war doch schon in der RL vorhanden.
Edit: Achso, dann muss sich das in einer neueren Version geändert haben das da nun ein Json kommt.
ZitatDas Schalten der Lampe geht dann aber trotzdem nicht.
Kannst du nochmal ein List des Devices zeigen während die Befehle in FHEM ausgeführt werden.
Wo in z2m hast du den Topic angepasst auf zigbee2mqtt/FL_Kugel, damit hab ich mich noch nie beschäftigt und war auch bisher
nirgendwo nötig, die Templates basieren alle auf den Standard-Topics.
Weiß nicht ob ich was übersehe, wenn du
{Color::devStateIcon($name,'rgb','rgb','brightness','state')}
in devStateIcon einträgst färbt sich wenigstens das Standardicon, wenn du noch folgendes userreadings ergänzt:
rgb:color_y.* {Color::xyY2hex(ReadingsVal($name,'color_x',0),ReadingsVal($name,'color_y',0),ReadingsVal($name,'brightness',254))}
Hab mal ein update auf 1.33.0 gemacht.
Für die blinden Mitlesenden, an der Payload in dem state-Topic hat sich nichts geändert.
So sieht die Ausgabe im Traffic-Monitor aus:
12:08:48.121
mqttjs_972c9b5d
zigbee2mqtt/bridge/state
offline
12:09:05.333
mqttjs_48c5cb23
zigbee2mqtt/bridge/state
online
OT:
Evt. kann man das ja ändern das keine newlines beim kopieren entstehen:
12:08:48.121 mqttjs_972c9b5d zigbee2mqtt/bridge/state offline
12:09:05.333 mqttjs_48c5cb23 zigbee2mqtt/bridge/state online
Hallo zusammen,
das System läuft nun, sowie auch die Ledvance Smart+ Lampe ist mit allen Fehlern die ich hatte angelernt.
(nur über Alexa lassen sich die Weisstöne nicht schalten - mache da aber mal ein extra Thread auf)
Internals:
CID zigbee_FL_Kugel
DEF zigbee_FL_Kugel
FUUID 6515bee1-f33f-c1dd-3ba3-217b55b12fd33ba0
IODev myBroker
LASTInputDev myBroker
MSGCNT 3
NAME MQTT2_zigbee_FL_Kugel
NR 374
STATE off
TYPE MQTT2_DEVICE
eventCount 4
myBroker_CONN myBroker_127.0.0.1_49822
myBroker_MSGCNT 3
myBroker_TIME 2023-10-01 01:17:46
JSONMAP:
color_temp ct
color_temp_startup ct_startup
READINGS:
2023-09-30 23:57:25 IODev myBroker
2023-09-28 19:58:57 associatedWith MQTT2_zigbee_pi
2023-09-30 23:27:23 attrTemplateVersion 20221201
2023-10-01 01:17:46 brightness 45
2023-10-01 01:17:46 color_hue 32
2023-10-01 01:17:46 color_mode color_temp
2023-10-01 01:17:46 color_saturation 82
2023-10-01 01:17:46 color_temp 370
2023-10-01 01:17:46 color_x 0.4599
2023-10-01 01:17:46 color_y 0.4106
2023-09-30 23:27:42 ct 277
2023-09-30 23:27:42 hex F22F23
2023-10-01 01:17:46 linkquality 84
2023-09-30 23:27:03 rgb FFCC58
2023-10-01 01:17:46 state off
2023-10-01 01:17:46 temperature_weather 2.5
2023-10-01 01:17:46 update_installed_version 34891088
2023-10-01 01:17:46 update_latest_version 34891088
2023-09-28 23:25:05 update_progress 100
2023-09-28 23:25:05 update_remaining 11
2023-10-01 01:17:46 update_state idle
Attributes:
alexaName Kugel
alias Lampe <br> Kugel
cmdIcon on:general_an off:general_aus cool:general_an neutral:general_an warm:general_an
comment The specified ct and brightness values in on and warm etc. commands ��can be adjusted at any time via the setList attribute
devStateIcon off:message_socket_off2@grey
on:message_socket_on2@green
{zigbee2mqtt_devStateIcon255($name)}
devicetopic zigbee2mqtt/FL_Kugel
genericDeviceType light
getList power_on_behavior:noArg power_on_behavior $DEVICETOPIC/get {"power_on_behavior": ""}
group Zigbee
homebridgeMapping Brightness=brightness::brightness,maxValue=100,max=100,factor=0.39371,delay=true Hue=color,cmd=huergb
jsonMap color_temp:ct color_temp_startup:ct_startup
model zigbee2mqtt_light_rgbw_rgb
readingList $DEVICETOPIC:.* { my $ret=json2nameValue($EVENT); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
room Flur
setList on:noArg $DEVICETOPIC/set {"state":"ON"}
off:noArg $DEVICETOPIC/set {"state":"OFF"}
cool:noArg $DEVICETOPIC/set {"color_temp": 160}
neutral:noArg $DEVICETOPIC/set {"color_temp": 320}
warm:noArg $DEVICETOPIC/set {"color_temp": 370}
brightness:colorpicker,BRI,0,5,255 $DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}
color:colorpicker,RGB {"$DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
userReadings temperature_weather { sprintf("%.1f",ReadingsVal($name,"temperature","")+2.5) }
webCmd on:off:brightness:color:cool:neutral:warm
webCmdLabel Ein:Aus
:Helligkeit
:Farbe
:Kalt- <br> Weiss
:Neutral- <br> Weiss:Warm- <br> Weiss
Vielen Dank nochmals für euren Support und der grossen Hilfe.
Gruss, Fabian