Announcement

Collapse
No announcement yet.

How to start all over

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

    How to start all over

    After some problems with my zigbee2mqtt usb-stick I added a new stick and updated the zigbee2mqtt program. In that pr0ject I lost the few devices I associated. So I did a new association. The log told me the inclusion was successful. And the device has the same code as before.
    So I was expecting in Hs3 that the device worked as before Unfortunately not.
    Since the mcsMQTT extension has a lot of settings it is not clear how to get this right. So what is the best approach? Deleting all the created Hs3 devices? And than try to find the new devices in the list?
    Would be nice if theHs3 devices are created at inclusion the same way as with adding z-wave devices... Anyway some minor help is appreciated.

    #2
    What I do is use the capability to identify topics as Obsolete. This will remove them from mcsMQTT database and will remove and HS devices that may have been created for the obsoleted topics. The next time the topic is seen it will be added to the Association tab. From the Association tab use the "A" column checkbox to create HS device.

    Two ways to obsolete items. One is with checkboxes in the "O" column of the Association tab. The top of the column will add a button to action the set of "O" checkboxes that have been checked. The other, and one I more often use" is from the General tab, Inbound Management section on row for Obsolete with a text box. Enter the topic template in the text box. For example to delete all topics from zigbee2mqtt use (without quotes) "zigbee2mqtt/#". MQTT topic convention with # and + wildcard characters can be specified.

    Can you expand upon what you mean by "at inclusion"? I though that is what the "A" column checkbox did?

    Comment


      #3
      @Michael McSharry
      Thanks for your feedback. I will try your solutions and see if I can manage to get it right again.

      What I meant with "inclusion" is that adding new z-wave devices can be done using the z-wave extension, by clicking the "Include button" or through the app. Making including new devices very easy.
      While including a new device using zigbee2mqtt and than mcsMQTT is more like a puzzle to me because one has to select and create the Hs3 devices manual, by selecting them in the Association tab as you mentioned. And manually including setting the topics needed to be able to use the device (ON - OFF per example like this: zigbee2mqtt/0x00158d000356331d/set).

      So it would be nice (or did I miss that option and is it already there in the mcsMQTT extension?) to have some automatic creation of new Hs3 devices, for new added Zigbee devices as done by the z-wave extension if possible. In Domoticz and HA they have this application included where Domoticz seems to be the more user friendly one

      Comment


        #4
        mcsMQTT supports the HomeAssistant discovery protocol and Zigbee2MQTT also supports it. You do need to tell Zigbee2MQTT to use it in it's configuration.yaml file with key homeassistant = true. The start of mine looks like:
        Code:
        homeassistant: true
        permit_join: true
        When I was testing with my setup today I saw some issues and addressed these in http://mcsSprinklers.com/mcsMQTT_5_2_1_6.zip.

        Each supplier uses their specific flavor of HomeAssistant discovery protocol so while the general approach works there are details that cause difficulties to make it seamless. I am running a version of Zigbee2MQTT that is 12 months old. The discovery announcement was not complete for all my Zigbee devices I have connected. Later versions may be more complete.

        mcsMQTT also supports auto-device creation based upon a wildcard topic template. This will save you from having to check the "A" column for these topics, but it will know how to set the publish topics. HomeAssistant discovery does contain the publish topic. This option is on the General tab of mcsMQTT, Inbound Management section Topic Discovery. It will be the 3rd radio and text box to specify.

        Comment


          #5
          I am on HomeSeer not using HomeAssistant.

          Comment


            #6
            HomeAssistant is the name of the discovery protocol. The HomeAssistant community first developed a discovery protocol and many others adopted it including Zigbee2Mqtt and mcsMQTT. There is another more generic discovery protocol called Homie, but I do not know of any commonly used products that use it.

            Comment


              #7
              Ok, still learning new things every day

              But in the mean time I still do not get the simple switch (Innr) to work (had it working some months a go. This is what I have right now. The device is updating the status so that is working. But to me it is not clear how to publish the right command to get an ON or OFF to the device.

              Click image for larger version  Name:	mcsMqtt002.jpeg Views:	0 Size:	204.1 KB ID:	1374265

              Click image for larger version  Name:	mcsMqtt001.jpeg Views:	0 Size:	37.0 KB ID:	1374266

              Comment


                #8
                The subscribe topic is zigbee2mqtt/0x...9ed

                The publish topic will be zigbee2mqtt/0x...9ed/set

                The publish template will likely by $$LABEL:

                If that does not work then use $$VALUE:

                I forget if zigbee2mqtt uses On/Off or 1/0 for control

                Comment


                  #9
                  Anyone here using zigbee2mqtt with mcsMQTT and willing to share his/ her publish settings in an image as a sample? I still can not get this to work. I tried several options but still no go

                  Comment


                    #10
                    I had the payload template wrong. It is expecting json. Below is for Color Bulb on/off device.
                    Click image for larger version

Name:	Capture1.PNG
Views:	177
Size:	73.5 KB
ID:	1374542
                    Click image for larger version

Name:	Capture2.PNG
Views:	134
Size:	96.0 KB
ID:	1374543
                    Click image for larger version

Name:	Capture3.PNG
Views:	131
Size:	17.1 KB
ID:	1374544

                    My Zigbee2MQTT configuration renamed the base topic to ZigbeeWA to distinguish it from another instance. I just added the bulb again for testing and it shows as the last item in the list. Note that I used the homeassistant discovery protocol and I did not need to do any manual setup of the topics. I tested and made some adjustments in version 5.2.1.6 of mcsMQTT so any version after this will have it for Zigbee2MQTT. I just noticed that the RGB selection was not automatically setup as a HS device. I need to look into that.

                    Code:
                    homeassistant: true
                    permit_join: true
                    mqtt:
                      base_topic: zigbeeWA
                      server: 'mqtt://192.168.0.30'
                    serial:
                      port: /dev/ttyACM0
                    advanced:
                      log_level: debug
                    devices:
                      '0x000d6f000fc74fda':
                        friendly_name: RGBGenie
                        retain: false
                      '0x000d6f001099e6c1':
                        friendly_name: Motion
                        retain: false
                      '0x00158d0002b23edc':
                        friendly_name: Vibration
                        retain: false
                      '0x00158d0002130c6f':
                        friendly_name: Water
                        retain: false
                      '0xb0ce18140001de1b':
                        friendly_name: '0xb0ce18140001de1b'
                        retain: false

                    Comment


                      #11
                      Click image for larger version

Name:	state.jpeg
Views:	103
Size:	206.7 KB
ID:	1384547
                      Might be stupid but I still do not get this to work. I tried all kind of variations in the template field. But nothing happens when I try to switch to on or off. The device publishes status updates so when I switch the device with the device button it updates its status with on or off in Hs3. So it is just the mcsMQTT part which I do not get to work.
                      Anyone using this simple Innr Switch having it working ? Please share your setting so I can get this working. Thanks

                      Comment


                        #12
                        I do not see any Innr switches in the list of zigbee2mqtt supported devices. Many bulbs and som smart plugs. I looked at the smart plug and it is expecting /set topic with Jason payload of state of OFF or ON.

                        First thing I would do is confirm the payload to control your switch. If you have a mqtt test utility then use it. If not the setup a Hs event with mqtt send message action. The format of the action is topic=payload. Use the same topic you have setup for the device. For the payload use {“state”:”ON”}.

                        Once you know for certain the payload it is expecting then I can tell you how to instruct mcsMQTT to send it.

                        Comment


                          #13
                          Thanks for replying. The device is indeed an Innr smart plug (witch has an switch on / off). Using the mqtt-test utility made it a bit more clear. Than I finally succeeded. having {"state":"$$LABEL:"} which seems to use the On or Off from the HS device (0=Off and 1= On). Instead of using $$VALUE: which uses the 0 or 1 which the innr device does not recognise as a payload.

                          Click image for larger version

Name:	topic.jpeg
Views:	101
Size:	77.8 KB
ID:	1384760Click image for larger version

Name:	label.jpeg
Views:	97
Size:	170.2 KB
ID:	1384762

                          Hopefully the next devices will be easyer to connect

                          This info helped too:
                          https://www.zigbee2mqtt.io/devices/SP_220.html

                          Only thing I still do not really understand is hwo to gove or get an
                          <FRIENDLY_NAME> for the device? Assume that will be set in zigbee2mqtt config? Is that a NAME instead off the number 0x00158d00035659ed ?
                          Attached Files

                          Comment


                            #14
                            In post #10 above I showed a zigbee2mqtt configuration.yaml file. Each device has ad unique id, a friendly name, and a retain flag setting. The default friendly name is the unique id, but can be changed by editing the file. When you do this then you will also want to edit mcsMQTT settings for the subscribed and publish topic to match the new friendly name. May be easier to edit all your friendly names in configuration.yaml; remove the existing names from mcsMQTT & HS from the General tab, inbound management section, obsolete topics row and entere zigbee2mqtt/#; and let all the devices to be rediscovered with the corrected topics.

                            Comment


                              #15
                              Thanks. Learned a bunch today.

                              Comment

                              Working...
                              X