Zigbee2MQTT not updating items

I need your help seting an installation with zigbee2mqtt running in one rpi and openhabian in other.
in the zigbee2mqtt. Everything seams to work. In the zigbee2mqtt logs I can see:

info <small>2024-10-02 10:41:12</small>`z2m: Restarting Zigbee2MQTT`

info <small>2024-10-02 10:41:12</small>`z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/response/restart', payload '{"data":{},"status":"ok","transaction":"pclgo-5"}'`

info <small>2024-10-02 10:41:26</small>`z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Botao_comercial', payload '{"action":"single","battery":100,"linkquality":201,"power_outage_count":115,"voltage":3012}'`

In the MQTT Explorer connected to the Openhabian machine I have:

But nothing happens to the Item.

Things:

Bridge mqtt:broker:mosquitto "MQTTBroker" [  host="localhost", port=1883, secure=false]
{
    Thing topic Botao_fab "Botao" @ "Botao" {
    Channels:
            Type string : action "action" [ stateTopic= "zigbee2mqtt/Botao_fabricacao/action" ]
            Type number : linkquality "linkquality" [ stateTopic= "zigbee2mqtt/Botao_fabricacao/linkquality" ]               

    }        
    Thing topic Botao_esc "Botão" @ "Botao" {
    Channels:
            Type string : action "action" [ stateTopic= "zigbee2mqtt/Botao_escritorio/action" ]
            Type number : linkquality "linkquality" [ stateTopic= "zigbee2mqtt/Botao_escritorio/linkquality" ]               

    }     
        Thing topic Botao_comercial "Botão" @ "Botao" {
    Channels:
            Type string : action "action" [ stateTopic= "zigbee2mqtt/Botao_comercial/action" ]
            Type number : linkquality "linkquality" [ stateTopic= "zigbee2mqtt/Botao_comercia_/linkquality" ]               

    }
Items:
String Botao_fabricacao "Botao"  {channel = "mqtt:topic:mosquitto:Botao_fab:action", autoupdate="false" , expire="1s, vidro"}
String Botao_escritorio "Botao"  {channel = "mqtt:topic:mosquitto:Botao_esc:action", autoupdate="false" , expire="1s, vidro"}
String Botao_comercial "Botao"  {channel = "mqtt:topic:mosquitto:Botao_comercial:action", autoupdate="false" , expire="1s, vidro"}

I now I’m missing something, but can´t find what.

João

Bom dia João,

Have you tried the home assistant auto discovery? I have somewhat decent results using it in OpenHAB and the items are properly populated.
(I’m ignoring the duplicated channels that I’m getting for some reason, if anyone is working on this please reach out :slight_smile: )

As seen in MQTT Explorer, there is no such topic as zigbee2mqtt/Botao_fabricacao/action
nor any other of the set topics.
Instead, what you get is zigbee2mqtt/Botao_fabricacao and zigbee2mqtt/Botao_comercial as topics, both of them use JSON objects. You can get parts of the information by using JSONPATH, e.g.

Type number : linkquality "linkquality" [ stateTopic= "zigbee2mqtt/Botao_fabricacao", transformationPattern="JSONPATH:$.linkquality" ]

However, you also can setup zigbee2mqtt to send json and attribute (or only attribute):
Go to zigbee2mqtt Web UI → Settings → Advanced → MQTT output type and chose attribute or attribute_and_json instead of json.
After submitting the new setting, zigbee2mqtt will generate additional topics for each attribute.