Page 1 of 1

z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Saturday 26 November 2022 22:16
by Kjeld
Hi all

I'm pretty new to domoticz so sorry if I'm not clear with the question or I posted it wrongly.
I have an issue with the Moes MS-105B 2 channel dimmer. Via domoticz I can switch it on and off, it will show the correct brightness however I can't change the brightness. Via MQTT2Zigbee I am able to set the correct brightness. With MQTT explorer I discovered a difference in the messages sent.
MQTT2Zigbee zigbee2mqtt/dimmer/l1= {"brightness":40,"state":"ON"}
via Domoticz it is zigbee2mqtt/dimmer/l1/set= {"brightness":40,"state":"ON"}

How/where can I change the stucture of the message? since it looks I only have to remove set from the path.

Thanks in advance.
Kjeld
I'm running zigbee2mqtt (v1.28.2)/domoticz (2022.2)/ConBee2 on raspberry pi 3 and at the moment mainly placed switches and dimmers to make current lights smart.

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Saturday 26 November 2022 23:44
by waltervl
Seems to be an issue in Zigbee2mqtt. But how do you connect zigbee2mqtt with Domoticz, by python plugin or MQTT Autodiscover gateway?

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Sunday 27 November 2022 13:46
by Kjeld
I'm using MQTT Auto Discovery Client Gateway with LAN interface.
The reason I thought that it could be related to domoticz is because setting the brightness via Zigbee2MQTT works fine.

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Sunday 27 November 2022 15:42
by waltervl
I know too little from MQTT AD but I believe from zigbee2mqtt to domoticz the state topic is used to send the state of a device. The set topic is used to send de new state to set to zigbee2mqtt that will send it to the device.

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Tuesday 29 November 2022 19:53
by Kjeld
thanks for trying.

From the mqtt log I see
below is mqtt log when changing the brightness correctly to 28 via the zigbee2mqtt frontend

debug 2022-11-27 20:40:26: Received MQTT message on 'zigbee2mqtt/dimmerWoonkamer/set' with data '{"brightness_l1":28}'
debug 2022-11-27 20:40:26: Publishing 'set' 'brightness' to 'dimmerWoonkamer'

below is mqtt log when changing brightness to 61 from domoticz, which fails.

debug 2022-11-27 20:42:37: Received MQTT message on 'zigbee2mqtt/dimmerWoonkamer/l1/set' with data '{"brightness":61,"state":"ON"}'
debug 2022-11-27 20:42:37: Publishing 'set' 'state' to 'dimmerWoonkamer'

So somehow it looks like the message from Domoticz is not what is is supposed to be.
Now I have to find a way of changing it.

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Tuesday 29 November 2022 20:23
by waltervl
And what is zigbee2mqtt log saying if the dimmer is set from Domoticz?

Edit: also check this page: https://www.zigbee2mqtt.io/devices/MS-105B.html

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Tuesday 29 November 2022 22:03
by GeflapteAppel
Same dimmer, same setup (with autodiscover), same issue.

Domoticz seems to target the first dimmer by encoding `l1` in the device path, while Zigbee2MQTT, when using its frontend, does target the "whole" device and encodes the `l1` dimmer in the brightness property of the data.
Is this some issue with how the device is advertised to domoticz using autodiscover? I also like to know how to fix this :)


Ps, I did not have this issue when setting the brightness for dimmer + z2m with autodiscover in a Home Assistant setup.

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Tuesday 29 November 2022 23:10
by waltervl
I suppose the Domoticz AD developers have not encountered this type of double chanel device yet. So I would advise to make a GitHub issue with al the data (mqtt discover, config and state payloads) necessary to recreate the device.

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Thursday 01 December 2022 20:22
by GeflapteAppel
waltervl wrote: Tuesday 29 November 2022 23:10 I suppose the Domoticz AD developers have not encountered this type of double chanel device yet. So I would advise to make a GitHub issue with al the data (mqtt discover, config and state payloads) necessary to recreate the device.
I'll create an issue 👍 Just in the main domoticz repo?
I can see the config and state payloads in MQTT Explorer, but I don't know where to look for the mqtt discover data. Is it the event topic below?
ps, where does AD devs stand for :)

topic: homeassistant/light/0x84ba20fffe655423/light_l1/config

Code: Select all

{
  "availability": [
    {
      "topic": "zigbee2mqtt/bridge/state",
      "value_template": "{{ value_json.state }}"
    }
  ],
  "brightness": true,
  "brightness_scale": 254,
  "command_topic": "zigbee2mqtt/0x84ba20fffe655423/l1/set",
  "device": {
    "identifiers": [
      "zigbee2mqtt_0x84ba20fffe655423"
    ],
    "manufacturer": "Moes",
    "model": "Smart dimmer module (2 gang) (MS-105B)",
    "name": "0x84ba20fffe655423"
  },
  "name": "0x84ba20fffe655423 l1",
  "schema": "json",
  "state_topic": "zigbee2mqtt/0x84ba20fffe655423/l1",
  "unique_id": "0x84ba20fffe655423_light_l1_zigbee2mqtt"
}
topic: zigbee2mqtt/bridge/event

Code: Select all

{
  "data": {
    "definition": {
      "description": "Smart dimmer module (2 gang)",
      "exposes": [
        {
          "endpoint": "l1",
          "features": [
            {
              "access": 3,
              "description": "On/off state of this light",
              "endpoint": "l1",
              "name": "state",
              "property": "state_l1",
              "type": "binary",
              "value_off": "OFF",
              "value_on": "ON",
              "value_toggle": "TOGGLE"
            },
            {
              "access": 3,
              "description": "Brightness of this light",
              "endpoint": "l1",
              "name": "brightness",
              "property": "brightness_l1",
              "type": "numeric",
              "value_max": 254,
              "value_min": 0
            }
          ],
          "type": "light"
        },
        {
          "endpoint": "l2",
          "features": [
            {
              "access": 3,
              "description": "On/off state of this light",
              "endpoint": "l2",
              "name": "state",
              "property": "state_l2",
              "type": "binary",
              "value_off": "OFF",
              "value_on": "ON",
              "value_toggle": "TOGGLE"
            },
            {
              "access": 3,
              "description": "Brightness of this light",
              "endpoint": "l2",
              "name": "brightness",
              "property": "brightness_l2",
              "type": "numeric",
              "value_max": 254,
              "value_min": 0
            }
          ],
          "type": "light"
        },
        {
          "access": 1,
          "description": "Link quality (signal strength)",
          "name": "linkquality",
          "property": "linkquality",
          "type": "numeric",
          "unit": "lqi",
          "value_max": 255,
          "value_min": 0
        }
      ],
      "model": "MS-105B",
      "options": [],
      "supports_ota": false,
      "vendor": "Moes"
    },
    "friendly_name": "0x84ba20fffe655423",
    "ieee_address": "0x84ba20fffe655423",
    "status": "successful",
    "supported": true
  },
  "type": "device_interview"
}

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Thursday 01 December 2022 20:43
by Kjeld
Glad I'm not the only one with this issue ;-)
Great that you will continue with this, I don't feel knowledgeable enough yet to make a ticket with the correct info.

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Thursday 01 December 2022 21:17
by waltervl
AD stands for Autodiscover so a little short for the MQTT Autodiscover gateway implementation.
An issue can be made here
https://github.com/domoticz/domoticz/issues

See also the instructions here: https://www.domoticz.com/wiki/MQTT#Debu ... er_devices

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Friday 02 December 2022 21:46
by GeflapteAppel
Thanks waltervl.

I've just posted the issue https://github.com/domoticz/domoticz/issues/5440

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Sunday 04 December 2022 10:12
by Kjeld
I've tested with MQexplorer and had the same results. But I see it's already been picked up and solved, waiting for the next release.

Thanks

Re: z2mqtt Moes MS-105B dimmer set brightness issue

Posted: Sunday 04 December 2022 10:29
by GeflapteAppel
Kjeld wrote: Sunday 04 December 2022 10:12 I've tested with MQexplorer and had the same results. But I see it's already been picked up and solved, waiting for the next release.

Thanks
If you're on beta, you can now update to the latest version 👍