Announcement

Collapse
No announcement yet.

Dropping Z-wave over MQTT and Shelly

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

    Dropping Z-wave over MQTT and Shelly

    Mr. Michael McSharry

    After 3 years of struggling with Z-wave I decided to move on and try other things. Was starting to get very frustrating as my network started to grow above 60 devices.

    People from HS Forum opened my eyes and point me to your work. Now I'm really looking forward to enter this world. I hope you can help me get things running as I'm completely new .

    Thank you for your great work!!!

    Br,
    Dali

    #2
    Here to help in any way I can.

    Comment


      #3
      Originally posted by Michael McSharry View Post
      Here to help in any way I can.
      Thank you!!!

      Comment


        #4
        Hello.

        Ok. I got my first Device Preflashed with Tasmoto.

        https://templates.blakadder.com/delock_11827.html

        I'm about to testing it on latest HS4 with McsMQTT plugin. I managed to get device to connected to my network and open the MQTT settings.

        Device did not respond to address suggested in the manual.
        http://delock-1137.local
        http://delock-1137

        I had to use app FING to find the address manualy.

        Click image for larger version

Name:	mqtt settings.jpg
Views:	103
Size:	85.7 KB
ID:	1427563

        So. I know the HOST is server IP and port. But I'm not sure about other fields.

        I hope you can jump it. In the meantime I will try to find the answer myself.

        Thank you

        Br,
        Dali

        Comment


          #5
          I managed to get the device into Association Table and it does respond well

          Next I guess is to create a device in HS.

          Working on it

          So far so good.

          Br,
          Dali

          Comment


            #6
            I assume you figured out that the HOST field is the IP of HS where mcsMQTT is running. Everything else should be ok.

            Comment


              #7
              Thank you Michael.

              Yes things are getting familiar bit by bit.

              I do have one problem. Switch updates Current,Power,Voltage values to it's WEB interface, but not further to HS. It was working for some time, but it stopped.

              Here is the video
              https://1drv.ms/v/s!ApyYXYdlHSsRhrIn...ao4VA?e=vOp2eQ

              Also I don't know how to make a HS button so I can turn it ON/OFF from HS Device. I guess I should put in some commands, or is it done automatically?

              Thank you

              Br,
              Dali


              Comment


                #8
                It kinda works, but very very sluggish and very unreliable. It's GUI is accurate 100% but data sent out to MQTT seems to be a disaster. It's 5 minutes till I turned it off and MQTT still didn't update the current, power and voltage values.

                Is this a crappy MQTT integration?

                Br,
                Dali

                Comment


                  #9
                  The resolution on the video is fuzzy so I cannot see specific numbers but can view the overall. There are two HS devices, POWER and RESULT:POWER where the status appears to track the Toggle on the WLAN-Switch. I do not know if the mcsMQTT Association tab is showing the same two devices or something else. It looks to me as if the Pub text boxes on the two mcsMQTT devices are blank. This means they should be status-only devices in HS. If you want for HS to control them then the control topic is entered into the Pub text box. I believe you setup Tasmota using default topic structure so the Pub topic would be cmnd/delock/POWER.

                  If you do not get On and Off buttons then created on the HS device, then click on the Association tab Ref column button to bring up the Edit tab for the device. Confirm that the Control/Status UI is Button and the VSP entries are On and Off.

                  As a note, if you are using Shelly devices, then you do not need to install Tasmota. The Shelly devices talk MQTT. Just look at the mcsShelly manual to get directions on how to turn on MQTT for the Shelly. Of course after it has been flashed with Tasmota you can no longer use the Shelly firmware and the instructions in mcsShelly would no longer apply. Using Tasmota is fine. I'm just letting you know about your other option.

                  Comment


                    #10
                    Thank you.

                    I manage to get buttons working good. On/OFF Status is updated correctly and fast all the time.

                    The metering (current, power, voltage) has a strange behaviour reading are slow and state is not updated most of the time. How does the communication between HS and plug device goes? Why does the Plug Web Admin shows 100% correct values fast, but HS will not. Is this information not send to MQTT or gets lost somewhere?

                    Isn't (unlike z-wave) communication between HS and device always established and checked on very fast cycles?

                    How would I set the system to check power state each second?

                    Thank you

                    Br,
                    Dali



                    Comment


                      #11
                      Tasmota Logging page. Set the status update interval which defaults to 5 minutes. Change in energy occurs in matters of milliseconds and is available locally as you observed. One needs to decide the purpose of receiving the energy use. If it triggers events then you made need it more often. If logging to a database then the 5 minutes seems like a reasonable interval. For my whole-house monitoring (xAP and not MQTT) I do 15 second updates, but my use is still just logging for non-realtime analysis and charting.

                      If you need real-time decisions based upon energy use, or other sensor that has high change rates, you may want to consider Tasmota Rules where the devices contains the logic and only outputs to MQTT the decisions that need to be made based upon the energy.

                      Comment


                        #12
                        Tasmota supports device discovery. If you enter “ setoption19 on” In the Tasmota console then Discovery will be enabled which means that Tasmota will send some MQTT topics that describe the device. McsMQTT also supports Home Assistant Discovery. I believe the setting is in the Inbound Management section of General tab. When it is used then mcsMQTT will automatically configure HS with the device.

                        When Shelly firmware is used then mcsMQTT will recognize the Shelly and automatically configure the HS devices.

                        Auto Discovery is it required, but makes it easier for those just starting and saves time for the more experienced.

                        Comment


                          #13
                          Originally posted by Michael McSharry View Post
                          T
                          If you need real-time decisions based upon energy use, or other sensor that has high change rates, you may want to consider Tasmota Rules where the devices contains the logic and only outputs to MQTT the decisions that need to be made based upon the energy.
                          Ahh the logging. I though this was for debug logging purpose. Yes but the minimum setting is 10sec. Can I pull the device using an even rule.

                          Like pool the device on every second? Or Pool the device 1 sec after the state changes? What would be a command for that?

                          Thank you
                          Br,
                          Dali

                          Comment


                            #14
                            Originally posted by Michael McSharry View Post
                            Tasmota supports device discovery. If you enter “ setoption19 on” In the Tasmota console then Discovery will be enabled which means that Tasmota will send some MQTT topics that describe the device. McsMQTT also supports Home Assistant Discovery. I believe the setting is in the Inbound Management section of General tab. When it is used then mcsMQTT will automatically configure HS with the device.

                            When Shelly firmware is used then mcsMQTT will recognize the Shelly and automatically configure the HS devices.

                            Auto Discovery is it required, but makes it easier for those just starting and saves time for the more experienced.
                            Hm, Don't see an option where I could enter this. It's preflashed tasmoto device, not Shelly.

                            Click image for larger version

Name:	image_94679.jpg
Views:	87
Size:	88.7 KB
ID:	1427716

                            Thank you
                            Br,
                            Dali

                            Comment


                              #15
                              Console of Tasmota
                              Click image for larger version

Name:	Capture2.PNG
Views:	76
Size:	36.4 KB
ID:	1427857

                              General Tab of mcsMQTT

                              Click image for larger version

Name:	Capture1.PNG
Views:	71
Size:	22.0 KB
ID:	1427858

                              The Homeassistant Discovery protocol, when enabled, is sent out by the widget (Tasmota) when it starts after power cycle. mcsMQTT will remember the device description so that when a Topic matching the Topic in the Discovery protocol is first received it will create the HS device if it has not already been created.

                              Since the device creation only occurs on initial observation of the topic it will not create devices automatically if you turn on Homeassistant Discovery after topics have already been published. To overcome this use the "O"bsolete checkbox on the Association tab to remove from mcsMQTT memory of the previously received topics from the widget. It may be easier to do it from General tab, Inbound Management, Obsolete topics row text box with template for the widget's topic. (e.g. delock/#)

                              Comment

                              Working...
                              X