[gelöst] zigbee_pi {"state":"online"} sieht nicht schön aus

Begonnen von moerte, 12 März 2025, 20:37:06

Vorheriges Thema - Nächstes Thema

moerte

Guten Abend.
Nachdem ich endlich mit kleinen Hürden zigbee2mqtt am laufen habe, zeigt es mir leider aufeinmal den state von  zigbee_pi nicht mehr mit dem grünen leuchtenden Punkt an, sondern so:

{"state":"online"}

Kann man das irgendwie ändern?
Ansonsten läuft soweit alles, ich kann Geräte hinzufügen, das Device bekommt readings, auf das Frontend kann ich zugreifen etc.

Nur der Status stört mich noch etwas.
LG und einen schönen Abend an alle Leser.

frober

Die readingsList anpassen:

$DEVICETOPIC/availability:.* { json2nameValue($EVENT) }
Raspi 3b mit Raspbian Bullseye und relativ aktuellem Fhem,  FS20, LGW, PCA301, Zigbee, MQTT, MySensors mit RS485(CAN-Receiver) und RFM69, etc.,
einiges umgesetzt, vieles in Planung, smile

********************************************
...man wächst mit der Herausforderung...

moerte

Zitat von: frober am 12 März 2025, 21:09:43Die readingsList anpassen:

$DEVICETOPIC/availability:.* { json2nameValue($EVENT) }

Vielen Dank für deine Antwort.. leider bleibt es so stehen (siehe Bild im Anhang)
und hier die List dazu:

Internals:
   CID        zigbee_pi
   DEF        zigbee_pi
   FUUID      67d1c5a2-f33f-599c-2be4-f890bb8ed09bfa3f
   IODev      myBroker
   LASTInputDev myBroker
   MSGCNT     61
   NAME       zigbee_pi
   NR         511
   STATE      {"state":"online"}
   TYPE       MQTT2_DEVICE
   eventCount 64
   myBroker_CONN myBroker_127.0.0.1_49932
   myBroker_MSGCNT 61
   myBroker_TIME 2025-03-12 21:31:13
   OLDREADINGS:
   READINGS:
     2025-03-12 20:05:33   attrTemplateVersion 20240628
     2025-03-12 21:29:39   data_friendly_name 0xa4c138d4d911ac4b
     2025-03-12 21:29:39   data_ieee_address 0xa4c138d4d911ac4b
     2025-03-12 20:13:10   data_time       254
     2025-03-12 21:29:39   devices         [{"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":"0x00124b0030db9bd2","interview_completed":true,"interviewing":false,"network_address":0,"supported":true,"type":"Coordinator"},{"date_code":"","definition":{"description":"Vibration sensor","exposes":[{"access":1,"category":"diagnostic","description":"Remaining battery in %, can take up to 24 hours before reported","label":"Battery","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},{"access":1,"category":"diagnostic","description":"Voltage of the battery in millivolts","label":"Voltage","name":"voltage","property":"voltage","type":"numeric","unit":"mV"},{"access":1,"description":"Indicates whether the device detected vibration","label":"Vibration","name":"vibration","property":"vibration","type":"binary","value_off":false,"value_on":true},{"access":3,"description":"Sensitivty of the sensor (0 = highest sensitivity, 50 = lowest sensitivity). Press button on the device right before changing this","label":"Sensitivity","name":"sensitivity","property":"sensitivity","type":"numeric","value_max":50,"value_min":0},{"access":1,"category":"diagnostic","description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"TS0210","options":[{"access":2,"description":"Time in seconds after which vibration is cleared after detecting it (default 90 seconds).","label":"Vibration timeout","name":"vibration_timeout","property":"vibration_timeout","type":"numeric","value_min":0}],"supports_ota":false,"vendor":"Tuya"},"disabled":false,"endpoints":{"1":{"bindings":[],"clusters":{"input":["genPowerCfg","ssIasZone","genBasic"],"output":["genOta","genTime"]},"configured_reportings":[],"scenes":[]}},"friendly_name":"0xa4c138d4d911ac4b","ieee_address":"0xa4c138d4d911ac4b","interview_completed":true,"interviewing":false,"manufacturer":"_TZ3000_lqpt3mvr","model_id":"TS0210","network_address":4707,"power_source":"Battery","supported":true,"type":"EndDevice"}]
     2025-03-12 20:13:28   info            {"commit":"ba337bd","config":{"advanced":{"cache_state":true,"cache_state_persistent":true,"cache_state_send_on_startup":true,"channel":11,"elapsed":false,"ext_pan_id":[43,60,172,246,74,168,69,69],"last_seen":"disable","log_console_json":false,"log_debug_namespace_ignore":"","log_debug_to_mqtt_frontend":false,"log_directories_to_keep":10,"log_directory":"/opt/zigbee2mqtt/data/log/%TIMESTAMP%","log_file":"log.log","log_level":"info","log_namespaced_levels":{},"log_output":["console","file"],"log_rotation":true,"log_symlink_current":false,"log_syslog":{},"output":"json","pan_id":38716,"timestamp_format":"YYYY-MM-DD HH:mm:ss"},"availability":{"active":{"timeout":10},"enabled":false,"passive":{"timeout":1500}},"blocklist":[],"device_options":{},"devices":{"0xa4c138d4d911ac4b":{"friendly_name":"0xa4c138d4d911ac4b"}},"frontend":{"base_url":"/","enabled":true,"port":8080},"groups":{},"homeassistant":{"discovery_topic":"homeassistant","enabled":false,"experimental_event_entities":false,"legacy_action_sensor":false,"status_topic":"homeassistant/status"},"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,"maximum_packet_size":1048576,"server":"mqtt://localhost","user":"aziiinrw"},"ota":{"default_maximum_data_size":50,"disable_automatic_update_check":false,"image_block_response_delay":250,"update_check_interval":1440},"passlist":[],"serial":{"disable_led":false},"version":4},"config_schema":{"definitions":{"device":{"properties":{"debounce":{"description":"Debounces messages of this device","requiresRestart":true,"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) or a path to a local file inside the `device_icons` directory.","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"},"throttle":{"description":"The minimum time between payloads in seconds. Payloads received whilst the device is being throttled will be discarded","requiresRestart":true,"title":"Throttle","type":"number"}},"required":["friendly_name"],"type":"object"},"group":{"properties":{"filtered_attributes":{"items":{"type":"string"},"type":"array"},"friendly_name":{"type":"string"},"off_state":{"default":"auto","description":"Control when to publish state OFF or CLOSE for a group. 'all_members_off': only publish state OFF/CLOSE when all group members are in state OFF/CLOSE,  '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)","maximum":64,"minimum":1,"requiresRestart":true,"title":"Adapter concurrency","type":["number","null"]},"adapter_delay":{"description":"Adapter delay","maximum":1000,"minimum":0,"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 might require re-pairing some 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 re-pairing 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"},"log_console_json":{"default":false,"description":"Console json log","requiresRestart":true,"title":"Console json log","type":"boolean"},"log_debug_namespace_ignore":{"default":"","description":"Do not log these namespaces (regex-based) for debug level","examples":["^zhc:legacy:fz:(tuya|moes)","^zhc:legacy:fz:(tuya|moes)|^zh:ember:uart:|^zh:controller"],"title":"Log debug namespace ignore","type":"string"},"log_debug_to_mqtt_frontend":{"default":false,"description":"Log debug level to MQTT and frontend (may decrease overall performance)","requiresRestart":true,"title":"Log debug to MQTT and frontend","type":"boolean"},"log_directories_to_keep":{"default":10,"description":"Number of log directories to keep before deleting the oldest one","maximum":1000,"minimum":5,"title":"Number of past log folders to keep","type":"number"},"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":["error","warning","info","debug"],"title":"Log level","type":"string"},"log_namespaced_levels":{"additionalProperties":{"enum":["error","warning","info","debug"],"type":"string"},"default":{},"description":"Set individual log levels for certain namespaces","examples":[{"z2m:mqtt":"warning"},{"zh:ember:uart:ash":"info"}],"propertyNames":{"pattern":"^(z2m|zhc|zh)(:[a-z0-9]{1,})*$"},"title":"Log Namespaced Levels","type":"object"},"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":{"oneOf":[{"title":"syslog (disabled)","type":"null"},{"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 (enabled)","type":"object"}],"requiresRestart":true},"network_key":{"description":"Network encryption key, changing requires re-pairing 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 re-pairing 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)","maximum":127,"minimum":-128,"requiresRestart":true,"title":"Transmit power","type":["number","null"]}},"title":"Advanced","type":"object"},"availability":{"description":"Checks whether devices are online/offline","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"}},"required":["timeout"],"requiresRestart":true,"title":"Active","type":"object"},"enabled":{"default":false,"description":"Enable availability checks","requiresRestart":true,"title":"Enabled","type":"boolean"},"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"}},"required":["timeout"],"requiresRestart":true,"title":"Passive","type":"object"}},"required":[],"title":"Availability","type":"object"},"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"},"frontend":{"properties":{"auth_token":{"description":"Enables authentication, disabled by default","requiresRestart":true,"title":"Auth token","type":["string","null"]},"base_url":{"default":"/","description":"Base URL for the frontend. If hosted under a subpath, e.g. 'http://localhost:8080/z2m', set this to '/z2m'","pattern":"^\\/.*","requiresRestart":true,"title":"Base URL","type":"string"},"enabled":{"default":false,"description":"Enable frontend","requiresRestart":true,"title":"Enabled","type":"boolean"},"host":{"description":"Frontend binding host. Binds to a unix socket when an absolute path is given instead.","examples":["127.0.0.1","::1","/run/zigbee2mqtt/zigbee2mqtt.sock"],"requiresRestart":true,"title":"Bind host","type":["string","null"]},"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"]}},"required":[],"title":"Frontend","type":"object"},"groups":{"patternProperties":{"^.*$":{"$ref":"#/definitions/group"}},"propertyNames":{"pattern":"^[\\w].*$"},"type":"object"},"homeassistant":{"description":"Home Assistant integration (MQTT discovery)","properties":{"discovery_topic":{"default":"homeassistant","description":"Home Assistant discovery topic","examples":["homeassistant"],"requiresRestart":true,"title":"Homeassistant discovery topic","type":"string"},"enabled":{"default":false,"description":"Enable Home Assistant integration","requiresRestart":true,"title":"Enabled","type":"boolean"},"experimental_event_entities":{"default":false,"description":"Home Assistant experimental event entities, when enabled Zigbee2MQTT will add event entities for exposed actions. The events and attributes are currently deemed experimental and subject to change.","title":"Home Assistant experimental event entities","type":"boolean"},"legacy_action_sensor":{"default":false,"description":"Home Assistant legacy actions sensor, when enabled a action sensor will be discoverd and an empty `action` will be send after every published action.","title":"Home Assistant legacy action sensors","type":"boolean"},"status_topic":{"default":"homeassistant/status","description":"Home Assistant status topic","examples":["homeassistant/status"],"requiresRestart":true,"title":"Home Assistant status topic","type":"string"}},"required":[],"title":"Home Assistant integration","type":"object"},"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 your 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"},"maximum_packet_size":{"default":1048576,"description":"Specifies the maximum allowed packet length (in bytes) that the server can send to Zigbee2MQTT. NOTE: The same value exists in your MQTT broker but for the length the client can send to it instead.","maximum":268435456,"minimum":20,"requiresRestart":true,"title":"Maximum packet size","type":"number"},"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":{"default_maximum_data_size":{"default":50,"description":"The size of file chunks sent during an update (in bytes). Note: This value may get ignored for manufacturers that require specific values.","maximum":100,"minimum":10,"requiresRestart":true,"title":"Default maximum data size","type":"number"},"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"},"image_block_response_delay":{"default":250,"description":"Limits the rate of requests (in milliseconds) during OTA updates to reduce network congestion. You can increase this value if your network appears unstable during OTA.","minimum":50,"requiresRestart":true,"title":"Image block response delay","type":"number"},"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","null"]}},"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"},"serial":{"properties":{"adapter":{"description":"Adapter type, not needed unless you are experiencing problems","enum":["deconz","zstack","zigate","ezsp","ember","zboss"],"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"}},"required":["mqtt"],"type":"object"},"coordinator":{"ieee_address":"0x00124b0030db9bd2","meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"},"log_level":"info","network":{"channel":11,"extended_pan_id":"0x2b3cacf64aa84545","pan_id":38716},"permit_join":false,"restart_required":false,"version":"2.1.3","zigbee_herdsman":{"version":"3.2.7"},"zigbee_herdsman_converters":{"version":"23.2.0"}}
     2025-03-12 21:31:13   log_level       info
     2025-03-12 21:31:13   log_message     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0xa4c138d4d911ac4b', payload '{"battery_low":false,"linkquality":0,"tamper":false,"vibration":false}'
     2025-03-12 20:13:27   permit_join     set permit_join true
     2025-03-12 20:13:28   status          ok
     2025-03-12 20:13:10   transaction     7zarv-1
     2025-03-12 21:29:39   type            device_announce
   hmccu:
Attributes:
   bridgeRegexp zigbee2mqtt/((?!bridge)[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
  $DEVICETOPIC/bridge/response/permit_join:.* { json2nameValue($EVENT) }
  $DEVICETOPIC/bridge/definitions:.* {}
  $DEVICETOPIC/availability:.* { json2nameValue($EVENT) }
   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

passibe

Siehe hier: https://forum.fhem.de/index.php?topic=140307.msg1330288#msg1330288
und hier: https://forum.fhem.de/index.php?topic=140990.msg1336399#msg1336399
jeweils mit ggfs. weiterführenden Links.

Zusammengefasst: Das vorhandene Template für die bridge ist durch zigbee2mqtt v2 veraltet; {"state":"online"} kriegst du für die Bridge mit
$DEVICETOPIC/bridge/state:.* { state=>(json2nameValue($EVENT))->{state} }richtig hin und für andere Devices mit
$DEVICETOPIC/availability:.* { availability=>(json2nameValue($EVENT))->{state} }

moerte

Zitat von: passibe am 12 März 2025, 21:51:35Siehe hier: https://forum.fhem.de/index.php?topic=140307.msg1330288#msg1330288
und hier: https://forum.fhem.de/index.php?topic=140990.msg1336399#msg1336399
jeweils mit ggfs. weiterführenden Links.

Zusammengefasst: Das vorhandene Template für die bridge ist durch zigbee2mqtt v2 veraltet; {"state":"online"} kriegst du für die Bridge mit
$DEVICETOPIC/bridge/state:.* { state=>(json2nameValue($EVENT))->{state} }richtig hin und für andere Devices mit
$DEVICETOPIC/availability:.* { availability=>(json2nameValue($EVENT))->{state} }

Ahh ok - aber leider bleibt es so wie es ist  {"state":"online"}
Dann werde ich mal deine verlinkungen genauer anschauen - obwohl ich denke, dass sich an dem readinglist nichts ändert, als was du jetzt schon höflicherweise geschrieben hast,

frober

#5
...und das Reading wird nur bei Statusänderung oder Neustart von z2m gesendet.

Mein Topic ist auch für andere Devices  richtig, sofern es nicht stört, das es in state landet. Hatte die Bridge übersehen...
Raspi 3b mit Raspbian Bullseye und relativ aktuellem Fhem,  FS20, LGW, PCA301, Zigbee, MQTT, MySensors mit RS485(CAN-Receiver) und RFM69, etc.,
einiges umgesetzt, vieles in Planung, smile

********************************************
...man wächst mit der Herausforderung...

moerte

#6
Danke euch - ein neustart hat geholfen.
Sieht besser aus - nur leider ohne den schönen grünen Punk  ;D
Damit kann ich leben.
Habt vielen Dank für die schnelle Antworten.


Ist eure Info und devices Liste in der Bridge auch so ewig lang???

TomLee

ZitatNachdem ich endlich mit kleinen Hürden zigbee2mqtt am laufen habe, zeigt es mir leider aufeinmal den state von  zigbee_pi nicht mehr mit dem grünen leuchtenden Punkt an...

Wie kannst Du den "grünen Punkt" vermissen, wenn Du gerade erst von z2t nach z2m umgestellt hast?
MMn. wurde via AttrTemplate das zigbee2mqtt_bridge-Template noch nie mit einem devStateIcon verteilt.

TomLee

Zitat von: passibe am 12 März 2025, 21:51:35$DEVICETOPIC/bridge/state:.* { state=>(json2nameValue($EVENT))->{state} }

Ist doch doppelt gemoppelt, $EVENT einfach nur json2nameValue übergeben ist doch ausreichend.
$DEVICETOPIC/bridge/state:.* { json2nameValue($EVENT)}

passibe

Zitat von: TomLee am 12 März 2025, 22:59:06Ist doch doppelt gemoppelt
Ah, du hast recht. Bei der Bridge ist es in der Tat egal, weil state ja schon der Key des JSON-Objekts ist.
Bei den Devices muss es natürlich trotzdem noch explizit ausgelesen werden, weil da das Reading ja (in aller Regel) nicht state ist.

moerte

Zitat von: TomLee am 12 März 2025, 22:26:22
ZitatNachdem ich endlich mit kleinen Hürden zigbee2mqtt am laufen habe, zeigt es mir leider aufeinmal den state von  zigbee_pi nicht mehr mit dem grünen leuchtenden Punkt an...

Wie kannst Du den "grünen Punkt" vermissen, wenn Du gerade erst von z2t nach z2m umgestellt hast?
MMn. wurde via AttrTemplate das zigbee2mqtt_bridge-Template noch nie mit einem devStateIcon verteilt.

Guten morgen- ich habe bei z2t das attrTemplate  tasmota_zigbee2tasmota_bridge genutzt. Und daher hab ich jetzt den "grünen Punkt" vermisst  8)
Und wenn mich nicht alles getäuscht hat, war sogar bei dem z2m gestern ganz am Anfang auch mal ein grüner Punkt.
Aber wie gesagt, ich kann damit leben  ;D

taskkill

probier mal
devStateIcon
online:remotecontrol/black_btn_GREEN offline:remotecontrol/black_btn_RED
RPI 3B+ mit Raspbian Bullseye auf SSD, aktiver USB-Hub, Fhem (is klar), TI CC2652P, nanoCUL 868 WMBUS, Echo Plus 2te Gen., ESPxxxx, usw.

moerte

Zitat von: taskkill am 13 März 2025, 07:35:10probier mal
devStateIcon
online:remotecontrol/black_btn_GREEN offline:remotecontrol/black_btn_RED

Das gefällt mir !  O:-)

TomLee

Zitat von: TomLee am 12 März 2025, 22:59:06$DEVICETOPIC/bridge/state:.* { json2nameValue($EVENT)}

Das ist der LWT-Topic des Client. Bei mir landet diese Information mittlerweile bei einem Großteil meiner Devices in dem kleingeschriebenen Reading "lwt". Für mich hab ich das so vor längerem mal festgelegt das ich das so haben will.

Hab den ReadingList-Eintrag bei mir in der Bridge jetzt so am laufen:
$DEVICETOPIC/bridge/state:.* { lwt=>(json2nameValue($EVENT))->{state} }
Ich fänd es toll wenn man sich in FHEM auch hier auf einen Standard einigen könnte. Bspw. lwt ;D