Not outside your LAN you can’t.
Zigbee2MQTT supports controlling things like pairing mode and such through MQTT messages. In fact, OH should have discovered a Zigbee2MQTT Bridge Thing among all other devices which has a Channel to enable pairing mode, among other Channels:
version: 1
things:
homeassistant:device:broker:zigbee2mqtt_5Fbridge_5F0xc02cedfffee9b626:
bridge: mqtt:broker:broker
label: Zigbee2MQTT Bridge
config:
topics:
- binary_sensor/1221051039810110150109113116116_0xc02cedfffee9b626/connection_state
- binary_sensor/1221051039810110150109113116116_0xc02cedfffee9b626/restart_required
- button/1221051039810110150109113116116_0xc02cedfffee9b626/restart
- select/1221051039810110150109113116116_0xc02cedfffee9b626/log_level
- sensor/1221051039810110150109113116116_0xc02cedfffee9b626/coordinator_version
- sensor/1221051039810110150109113116116_0xc02cedfffee9b626/network_map
- sensor/1221051039810110150109113116116_0xc02cedfffee9b626/version
- switch/1221051039810110150109113116116_0xc02cedfffee9b626/permit_join
basetopic: homeassistant
channels:
connection_state:
type: switch
label: Connection state
config:
component: binary_sensor
nodeid: 1221051039810110150109113116116_0xc02cedfffee9b626
objectid:
- connection_state
config:
- "{\"default_entity_id\":\"binary_sensor.zigbee2mqtt_bridge_connection_state\",\"device\":{\"hw_version\":\"EmberZNet 8.0.2 [GA]\",\"identifiers\":[\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"],\"manufacturer\":\"Zigbee2MQTT\",\"model\":\"Bridge\",\"name\":\"Zigbee2MQTT Bridge\",\"sw_version\":\"2.12.1\"},\"device_class\":\"connectivity\",\"entity_category\":\"diagnostic\",\"name\":\"Connection state\",\"object_id\":\"zigbee2mqtt_bridge_connection_state\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"payload_off\":\"offline\",\"payload_on\":\"online\",\"state_topic\":\"zigbee2mqtt/bridge/state\",\"unique_id\":\"bridge_0xc02cedfffee9b626_connection_state_zigbee2mqtt\",\"value_template\":\"{{ value_json.state }}\"}"
coordinator_version:
type: string-advanced
label: Coordinator version
config:
component: sensor
nodeid: 1221051039810110150109113116116_0xc02cedfffee9b626
objectid:
- coordinator_version
config:
- "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_template\":\"{{ value_json.state }}\"}],\"availability_mode\":\"all\",\"default_entity_id\":\"sensor.zigbee2mqtt_bridge_coordinator_version\",\"device\":{\"hw_version\":\"EmberZNet 8.0.2 [GA]\",\"identifiers\":[\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"],\"manufacturer\":\"Zigbee2MQTT\",\"model\":\"Bridge\",\"name\":\"Zigbee2MQTT Bridge\",\"sw_version\":\"2.12.1\"},\"enabled_by_default\":false,\"entity_category\":\"diagnostic\",\"icon\":\"mdi:chip\",\"name\":\"Coordinator version\",\"object_id\":\"zigbee2mqtt_bridge_coordinator_version\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"state_topic\":\"zigbee2mqtt/bridge/info\",\"unique_id\":\"bridge_0xc02cedfffee9b626_coordinator_version_zigbee2mqtt\",\"value_template\":\"{{ value_json.coordinator.meta.revision }}\"}"
log_level:
type: string
label: Log level
config:
component: select
nodeid: 1221051039810110150109113116116_0xc02cedfffee9b626
objectid:
- log_level
config:
- "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_template\":\"{{ value_json.state }}\"}],\"availability_mode\":\"all\",\"command_template\":\"{\\\"options\\\": {\\\"advanced\\\": {\\\"log_level\\\": \\\"{{ value }}\\\" } } }\",\"command_topic\":\"zigbee2mqtt/bridge/request/options\",\"default_entity_id\":\"select.zigbee2mqtt_bridge_log_level\",\"device\":{\"hw_version\":\"EmberZNet 8.0.2 [GA]\",\"identifiers\":[\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"],\"manufacturer\":\"Zigbee2MQTT\",\"model\":\"Bridge\",\"name\":\"Zigbee2MQTT Bridge\",\"sw_version\":\"2.12.1\"},\"entity_category\":\"config\",\"name\":\"Log level\",\"object_id\":\"zigbee2mqtt_bridge_log_level\",\"options\":[\"error\",\"warning\",\"info\",\"debug\"],\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"state_topic\":\"zigbee2mqtt/bridge/info\",\"unique_id\":\"bridge_0xc02cedfffee9b626_log_level_zigbee2mqtt\",\"value_template\":\"{{ value_json.log_level | lower }}\"}"
permit_join:
type: switch
label: Permit join
config:
component: switch
nodeid: 1221051039810110150109113116116_0xc02cedfffee9b626
objectid:
- permit_join
config:
- "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_template\":\"{{ value_json.state }}\"}],\"availability_mode\":\"all\",\"command_topic\":\"zigbee2mqtt/bridge/request/permit_join\",\"default_entity_id\":\"switch.zigbee2mqtt_bridge_permit_join\",\"device\":{\"hw_version\":\"EmberZNet 8.0.2 [GA]\",\"identifiers\":[\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"],\"manufacturer\":\"Zigbee2MQTT\",\"model\":\"Bridge\",\"name\":\"Zigbee2MQTT Bridge\",\"sw_version\":\"2.12.1\"},\"icon\":\"mdi:human-greeting-proximity\",\"name\":\"Permit join\",\"object_id\":\"zigbee2mqtt_bridge_permit_join\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"payload_off\":\"{\\\"time\\\": 0}\",\"payload_on\":\"{\\\"time\\\": 254}\",\"state_off\":\"false\",\"state_on\":\"true\",\"state_topic\":\"zigbee2mqtt/bridge/info\",\"unique_id\":\"bridge_0xc02cedfffee9b626_permit_join_zigbee2mqtt\",\"value_template\":\"{{ value_json.permit_join | lower }}\"}"
restart:
type: string
label: Restart
config:
component: button
nodeid: 1221051039810110150109113116116_0xc02cedfffee9b626
objectid:
- restart
config:
- "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_template\":\"{{ value_json.state }}\"}],\"availability_mode\":\"all\",\"command_topic\":\"zigbee2mqtt/bridge/request/restart\",\"default_entity_id\":\"button.zigbee2mqtt_bridge_restart\",\"device\":{\"hw_version\":\"EmberZNet 8.0.2 [GA]\",\"identifiers\":[\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"],\"manufacturer\":\"Zigbee2MQTT\",\"model\":\"Bridge\",\"name\":\"Zigbee2MQTT Bridge\",\"sw_version\":\"2.12.1\"},\"device_class\":\"restart\",\"name\":\"Restart\",\"object_id\":\"zigbee2mqtt_bridge_restart\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"payload_press\":\"\",\"unique_id\":\"bridge_0xc02cedfffee9b626_restart_zigbee2mqtt\"}"
restart_required:
type: switch-advanced
label: Restart required
config:
component: binary_sensor
nodeid: 1221051039810110150109113116116_0xc02cedfffee9b626
objectid:
- restart_required
config:
- "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_template\":\"{{ value_json.state }}\"}],\"availability_mode\":\"all\",\"default_entity_id\":\"binary_sensor.zigbee2mqtt_bridge_restart_required\",\"device\":{\"hw_version\":\"EmberZNet 8.0.2 [GA]\",\"identifiers\":[\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"],\"manufacturer\":\"Zigbee2MQTT\",\"model\":\"Bridge\",\"name\":\"Zigbee2MQTT Bridge\",\"sw_version\":\"2.12.1\"},\"device_class\":\"problem\",\"enabled_by_default\":false,\"entity_category\":\"diagnostic\",\"name\":\"Restart required\",\"object_id\":\"zigbee2mqtt_bridge_restart_required\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"payload_off\":false,\"payload_on\":true,\"state_topic\":\"zigbee2mqtt/bridge/info\",\"unique_id\":\"bridge_0xc02cedfffee9b626_restart_required_zigbee2mqtt\",\"value_template\":\"{{ value_json.restart_required }}\"}"
version:
type: string
label: Version
config:
component: sensor
nodeid: 1221051039810110150109113116116_0xc02cedfffee9b626
objectid:
- version
config:
- "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_template\":\"{{ value_json.state }}\"}],\"availability_mode\":\"all\",\"default_entity_id\":\"sensor.zigbee2mqtt_bridge_version\",\"device\":{\"hw_version\":\"EmberZNet 8.0.2 [GA]\",\"identifiers\":[\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"],\"manufacturer\":\"Zigbee2MQTT\",\"model\":\"Bridge\",\"name\":\"Zigbee2MQTT Bridge\",\"sw_version\":\"2.12.1\"},\"entity_category\":\"diagnostic\",\"icon\":\"mdi:zigbee\",\"name\":\"Version\",\"object_id\":\"zigbee2mqtt_bridge_version\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"state_topic\":\"zigbee2mqtt/bridge/info\",\"unique_id\":\"bridge_0xc02cedfffee9b626_version_zigbee2mqtt\",\"value_template\":\"{{ value_json.version }}\"}"
network_map#json-attributes:
type: string-advanced
label: JSON Attributes
config:
component: sensor
nodeid: 1221051039810110150109113116116_0xc02cedfffee9b626
objectid:
- network_map
config:
- "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_template\":\"{{ value_json.state }}\"}],\"availability_mode\":\"all\",\"default_entity_id\":\"sensor.zigbee2mqtt_bridge_network_map\",\"device\":{\"hw_version\":\"EmberZNet 8.0.2 [GA]\",\"identifiers\":[\"zigbee2mqtt_bridge_0xc02cedfffee9b626\"],\"manufacturer\":\"Zigbee2MQTT\",\"model\":\"Bridge\",\"name\":\"Zigbee2MQTT Bridge\",\"sw_version\":\"2.12.1\"},\"enabled_by_default\":false,\"entity_category\":\"diagnostic\",\"json_attributes_template\":\"{{ value_json.data.value | tojson }}\",\"json_attributes_topic\":\"zigbee2mqtt/bridge/response/networkmap\",\"name\":\"Network map\",\"object_id\":\"zigbee2mqtt_bridge_network_map\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\":\"2.12.1\",\"url\":\"https://www.zigbee2mqtt.io\"},\"state_topic\":\"zigbee2mqtt/bridge/response/networkmap\",\"unique_id\":\"bridge_0xc02cedfffee9b626_network_map_zigbee2mqtt\",\"value_template\":\"{{ now().strftime('%Y-%m-%d %H:%M:%S') }}\"}"
network_map#sensor:
type: string-advanced
label: Sensor
Because Zigbee2MQTT doesn’t expose it’s own logs over any API I can find. So there’s no way the OH binding can see those logs to add them to the openhab.log.
It can, and it already does. IF Zigbee2MQTT determines a device is offline, the corresponding Thing in OH will be marked as offline and the error will be reported as the Thing’s status.
That’s because Items represent state. That is a deliberate architectural choice in the OH framework. Ephemeral events that do not represent states are not supposed to be linked to Items. These Channels trigger rules directly.
But if you must link it for what ever reason, you have a profile that will let you link even these Channels to an Item if you so desire. Or you can record your statistics in the rule that triggers when the button press events occur.
A binding isn’t going to change this fundamental design decision in OH core.
It’s not missing. Sending ephemeral events is intended to be done from a rule. For MQTT there’s the publishMQTT Action. Receiving ephemeral events are used to trigger a rule to process the event. That’s how OH is designed to work and how all the bindings work.
But of course, if you do not like that design decision, you as an end user have the option to link an event Channel to an Item using the profile and you can set up a Generic MQTT Thing to publish. A binding isn’t going to change this fundamental design choice though.
In the case of Rollershutter, Dimmer, Color, and Player Items, indeed they can receive commands that do not match their state, but they are all still stateful. They all carry something representing the current position or setting of the device. And the commands cause the device to change it’s state.
Receiving an ephemeral event is very different. There is no state associated with the event.
As shown above, you don’t need a Generic MQTT Thing for this. The discovered Zigbee2MQTT Bridge Thing has a Channel for that for you.