Announcement

Collapse
No announcement yet.

How to add Device via Zigbee2MQTT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to add Device via Zigbee2MQTT

    Looking for guidance on what to enter into mcsMQTT Plugin. I am working my way through the manual.

    Click image for larger version

Name:	image.png
Views:	365
Size:	96.3 KB
ID:	1585813

    Click image for larger version

Name:	image.png
Views:	334
Size:	91.1 KB
ID:	1585814

    #2
    This setup looks reasonable if you are running zigbee2mqtt and HS on the same computer.

    I have never used the browser interface for zigbee2mqtt, but a desirable setup from the command line in /data/configuration.yaml is to have homeassistant: true so mcsMQTT will automatically create HS devices for zigbee2mqtt devices.

    Comment


      #3
      That worked!!! I can now see my zigbee2mqtt device among my z-wave devices....
      ​​

      I changed the homeassistant: parameter to true...
      ​​

      However, my zigbee2mqtt device is an RGBWW LED controller. I would expect to see controls like Brightness, Color Temp, Color, and State like what I see on the Zigbee2MQTT dashboard, but I only see Brightness control on the HS4 Devices screen.

      ​​

      Comment


        #4
        On the mcsMQTT MQTT Page, General Tab at the top is a checkbox for debug. This will create a file in subfolder /data/mcsMQTT/mcsMQTT Debug.txt. It will contain some data about messages received and what mcsMQTT did with the message. It can be posted here or emailed to mcsSolutions at CenturyTel.net.

        After enabling debug then stop and start zigbee2mqtt to assure the Homeassistant messages are sent. Also do something with the LED controller to change color, state, temp to assure visibility exists into the way its status is being reported.

        HS RGB control is normally a color picker. What do you expect to see for the WW channels of the controller?

        The only color zigbee device I have is a RGB Bulb. The Homesasistant discovery message from my debug file for it is:

        Code:
        7:03:17 AM Topic homeassistant/light/0xb0ce18140001de1b/light/config Payload
        {"brightness":true,
        "color_temp":true,
        "xy":true,
        "schema":"json",
        "command_topic":"zigbeeWA/SengledColor/set",
        "state_topic":"zigbeeWA/SengledColor",
        "name":"SengledColor_light",
        "unique_id":"0xb0ce18140001de1b_light_zigbeeWA",
        "device":{"identifiers":"zigbee2mqtt_0xb0ce18140001de1b",
        "name":"SengledColor",
        "sw_version":"Zigbee2mqtt 1.2.1",
        "model":"Element Plus Color (A19) (E11-N1EA)",
        "manufacturer":"Sengled"},
        "availability_topic":"zigbeeWA/bridge/state"}​
        In this case the status is reported by zigbee2mqtt on the topic zigbeeWA/SengledColor. I do not have the bulb in service right now so cannot show example. Rather than the entire debug file, just the discovery and status messages are of interest.

        Comment


          #5
          I started looking at the discovery and see that zigbee2mqtt is only partially following the HomeAssistant Discovery specification. For example, zigbee2mqtt does not specify a brightness or color control topic. What they do instead is include flags for brightness, color_temp, and in this case xy for color. I understand what they have done, but since it does not follow the standard I will need to develop a zigbee2mqtt variant to handle the light devices. It is still useful to know the HomeAssistant Discovery message for your device, or at least identify the LED controller you are using to see if zigbee2mqtt has documented its operation on its web site.

          Comment


            #6
            I don’t understand why XY would be used for color. Makes more sense to use rgb (0-255,0-255,0-255). I’ve discovered the color temp control manipulates the white (W) and warm white (WW) LEDs on the chip. I think my specific controller is documented....it’s a Gledopto GL-C-008. I will give the Zigbee2MQTT documentation a try.

            Thank you.

            Looks like I spoke too soon. Just read that the device can be controlled via RGB, XY, and HEX. Would be nice to get that type of control into the mcsMQTT.

            Comment


              #7
              Hello Michael

              I use this device in Zigbee2mqtt

              https://www.zigbee2mqtt.io/devices/HG06104A.html

              I never managed to send the color to the led strip, only the brightness and On or Off​

              Click image for larger version

Name:	Screen Shot 01-14-23 at 06.17 PM.jpg
Views:	315
Size:	25.7 KB
ID:	1586483

              Jean-francois.

              Comment


                #8
                I installed the latest version of zigbee2mqtt and observed that the discovery protocol for the Sengled bulb had changed. I updated the plugin to recognize this new protocol. I do not know if it applies to Gledopto GL-C-008 as the documentation does not disclose the discovery protocol. If it does not work, then I will need the homeassistant/.../config messages being produced. This is available in the mcsMQTT debug.

                For my bulb the following is what is now auto-created

                Click image for larger version

Name:	0x.png
Views:	330
Size:	133.1 KB
ID:	1586541
                The update is at bottom of mcsMQTT Change Log (HS4 & HS3) - HomeSeer Message Board​ with both patch and updater override operations available for the install.

                Comment


                  #9
                  Hmm....that seemed to work. After a bit of revision to the Status/Graphics, I get the following now....

                  Click image for larger version  Name:	image.png Views:	0 Size:	76.4 KB ID:	1586940
                  However, I can't seem to get the State control to work. I believe its an "ON" or "OFF" to the device and not a 0 to 1 or 0 to 255. The HS4 control do not seem to allow ON/OFF for Start/End under the Edit Controls.

                  The Zigbee2MQTT shows the following for State...

                  Click image for larger version  Name:	image.png Views:	0 Size:	35.4 KB ID:	1586941

                  Comment


                    #10
                    Originally posted by Michael McSharry View Post
                    I installed the latest version of zigbee2mqtt and observed that the discovery protocol for the Sengled bulb had changed. I updated the plugin to recognize this new protocol. I do not know if it applies to Gledopto GL-C-008 as the documentation does not disclose the discovery protocol. If it does not work, then I will need the homeassistant/.../config messages being produced. This is available in the mcsMQTT debug.

                    For my bulb the following is what is now auto-created

                    Click image for larger version  Name:	0x.png Views:	23 Size:	133.1 KB ID:	1586541
                    The update is at bottom of mcsMQTT Change Log (HS4 & HS3) - HomeSeer Message Board​ with both patch and updater override operations available for the install.
                    How do you have your Edit Controls set up for the Light: state for the ON/OFF?
                    Mine looks like this.....
                    Click image for larger version

Name:	image.png
Views:	284
Size:	132.8 KB
ID:	1587419

                    Comment


                      #11
                      I do not think mcsMQTT will create automatically a two state device with value of 0 and 1. It's default is 0 and 1 for the two states.

                      Click image for larger version

Name:	0x.png
Views:	295
Size:	73.5 KB
ID:	1587424 These values are setup from the MQTT Page, Association Tab, Edit popup (click the Ref button) for the specifc device. Mine looks like

                      Click image for larger version

Name:	1.png
Views:	287
Size:	26.1 KB
ID:	1587425

                      What did you do that resulted in 255 rather than 1 being used. It can be used, but needs to be consistent on the Edit popup so mcsMQTT knows what value to store in HS when ON is received.

                      Comment


                        #12
                        On the Associations tab I got this....
                        Click image for larger version  Name:	image.png Views:	0 Size:	98.8 KB ID:	1588127

                        When I click on the 157 REF, I get this about halfway down.....

                        Click image for larger version  Name:	image.png Views:	0 Size:	45.3 KB ID:	1588137

                        The 255 I got before is what I manually entered in the Edit Controls section of the HS Status/Graphics section. Its probably wrong. I changed it back from 255 to 1 and now it seems to have gone back to default....

                        Click image for larger version  Name:	image.png Views:	0 Size:	122.1 KB ID:	1588138

                        Comment


                          #13
                          Let us reset as I am not clear as to the problem that is being investigated.

                          One thing I notice is you have no control in HS for the state. This is because there is nothing in the Pub Topic (External Control) textbox for the State data. They exists in most of the other associated topics.

                          Click image for larger version  Name:	2.png Views:	0 Size:	8.4 KB ID:	1588149

                          This will create HS controls for ON and OFF. There also needs to be instructions to mcsMQTT as to how to format the command. It looks like the other items that are visible on the Edit screen with whatever HS sends (ON or OFF for $$LABEL: ) and the key "state" wrapped in a JSON object.

                          Click image for larger version  Name:	3.png Views:	0 Size:	5.4 KB ID:	1588150

                          If I am not on the correct track, then point me differently.

                          Comment


                            #14
                            Hmm...that seem to work. What I didn't notice before is that this field was blank....

                            Click image for larger version

Name:	image.png
Views:	280
Size:	142.5 KB
ID:	1588157

                            You can see that in the previous post. I copied the one from the color_temp just above it and also filled in the Publish Payload Template field that you stated.
                            Now I get my ON/OFF buttons....

                            Click image for larger version

Name:	image.png
Views:	279
Size:	21.6 KB
ID:	1588158

                            Thanks again!!!!

                            Comment

                            Working...
                            X