Announcement

Collapse
No announcement yet.

How to start?

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

  • How to start?

    Dear,
    I'm approaching to MQTT, I'm a super nob :-)

    -Installed mqtt broker on my raspberry Pi3 (mosquitto). Configuration with user and password has been done.
    -Installed MCSMQTT HS3 plugin. Configuration of server user and password done.
    -Installed MQTT client on my smartphone for first test. Configuration of server user and password done.

    The plugin documentation for me is little hard... what can I do to start and tray to create a virtual device that I can commando with my smartphone?

  • #2
    There is a quick start toward the beginning of the manual with several use cases to get one started. In this case you will want to publish a Topic with your smartphone. e.g. Test/Button with payload of ON.

    Go the mcsMQTT Associations tab and you will see the topic listed on a row of the Association table. You then use the "A" column checkbox to create a virtual device. Alternately you can click on the leftmost link of the sequence number and this will create the HS device and bring up an Edit page to allow you to customize the properties of the device.

    On the Association tab or Edit page/tab enter a Publish topic for this newly created association. e.g cmnd/Test/Button.

    You can then go to HS Device Management page and you will see the device of Device Type MQTT_Receive. You should also see ON and OFF buttons to that can be used to publish the cmnd/Test/Button topic.

    Comment


    • #3
      Cris

      One thing I found that makes it easier, when the plugin is running, go to the tasmota web page on the device and toggle the output. The mqtt plugin will capture that and you will have a reference for that device.

      On the associations tab you can then use the filters for the specific device to see what its sending:

      Filter Association Table by Mqtt Topic and JSON Payload Key

      This is HUGELY handy when you have lots of devices.

      If you are using a "sonoffbasic" here is an example of an association to control the relay "sonoff-pow-mancave" is the device, you will have your own.

      Remember all of the "tele" messages are sent at the predetermined time as in your mqtt config under tasmota.

      DOnt worry, stare at it, it will make sense. REMEMBER, dont delete the device via HS, do it via the plugin and not "HS device Management web page".
      Attached Files
      HS 2.2.0.11

      Comment


      • #4
        Thanks guys!!!
        If a day you will be in Italy, notify me! I can offer my real italian ice-cream or a super-pizza!!!
        Thanks again for help!

        Cris

        Comment


        • #5
          Hi Cris

          Good luck :-) You will have so much fun with this plugin. I have it driving my sonoff devices where I cannot physically run wires. For all other devices I use the Arduino plugin.

          Michael has done a great job..

          Pete
          HS 2.2.0.11

          Comment


          • #6
            The MCSTasmota console and info page provide a bunch of information that you can utilize when configuring the Mosquitto messages in the mcsMQTT association tables.

            Broker in this case is one of two RPi's running Node Red / OWFS / Mosquitto broker.

            2 SonOff (WiFi basic with mcsTasmota firmware) devices ==> RPi1 Node Red Broker ==> HS3 mcsMQTT plugin
            RPI X 2 (OWFS Node Red) ==> RPi1 Node Red Broker ==> HS3 mcsMQTT plugin

            Baby steps here initially configuring the two SonOff WiFi basic devices using the mcsMQTT manual, hard ware adds to the SonOff devices then later will customize the two devices. Really only adds have been installing GPIO and VCC and Negative posts on the Sonoff basic modules. Bench tested GPIO/Ground and switch and temperature messages first. Once the devices are mounted (~ 3 meters on ceiling of the garage) much more difficult to test.

            Switched temperature sensors here from old AAG to newer Arduino sensors. Noticed too that one of the two sensors (they have power on LEDs) needs 5VDC versus the other one working fine at 3.3VDC. The little Arduino sensors already include small pull up smd resistors. Michael's most current version of mcsTasmota firmware includes the temperature sensor stuff. Initially tested sensors with the Tasmota sensors firmware. It is a tight build now to include relay, multiple GPIO and temperature sensors.

            OTA firmware update is two parts; basic and and updated firmware because of the size limits relating to OTA firmware updating. Much easier though than having the SonOff taken apart on the workbench to JTAG it.

            Removing the SonOff WiFi cover here a couple of weeks back broke off the button zero stalk and used glue to keep it fixed to the base. Most of the concern here was looking for the little metal bubble inside of the switch (button zero) that fell out.

            Once all of this is working then it remains solid with no issues relating to WiFi connectivity.

            Console messages:

            03:45:33 MQT: /GarageDoor1/SENSOR = {"Time":"2018-07-26T03:45:33", "Switch1":"On", "Switch2":"On", "DS18x20":{"DS1":{"Type":"DS18B20", "Address":"282F515C04000080", "Temperature":93.4}}, "TempUnit":"F"}
            03:46:55 HTP: Main Menu
            03:46:58 HTP: Console

            Toggle relay:

            [ATTACH]70149[/ATTACH]

            Toggle switch console message:

            03:48:44 MQT: /GarageDoor1/RESULT = {"POWER":"On"}
            03:48:44 MQT: /GarageDoor1/POWER = On
            03:48:45 MQT: /GarageDoor1/POWER = Off
            03:48:48 HTP: Console

            Info page:

            MQTT Client & Fallback Topic GarageDoor1
            MQTT User mcs
            MQTT Topic GarageDoor1
            MQTT Group Topic sonoffs
            MQTT Full Topic /GarageDoor1/cmnd/

            When using the mcsMQTT association tab filter and sort to date. Otherwise you will have a list of hundreds of messages. The date sort puts recent messages on the top of the list.

            [ATTACH]70150[/ATTACH]
            Last edited by Pete; July 26th, 2018, 08:16 AM.
            - Pete

            Auto mator
            Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
            Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

            X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

            Comment


            • #7
              I'm stupid, stupid,stupid...
              Spent half day to try and re-try...
              Mi error:
              -In Tasmota firmware entered MQTT Host 192.168.1.31... the correct was 192.168.1.35. AAAAAAAAAAAAHHHHHHHHHHHH I'm stupid.
              -In MCSMQTT plugin entered cmd/xxxx/xxx instead of cmnd/xxxx/xxx

              Is a fantastic plugin, I'm playing with MQTT sending data with my smartphone (mqtt client) and nodemcu.

              I'm in the same Petez69 situation: sonoff devices where not physically run wires, and Arduino plugin for other situation.

              Great!
              Thanks a lot! Pizza and grappa for all!

              Comment


              • #8
                Originally posted by khriss75 View Post
                -In MCSMQTT plugin entered cmd/xxxx/xxx instead of cmnd/xxxx/xxx
                Cris

                I've done this SO many times :-) Or cnmd and I stare at it and cant see the problem. You are human like us all :-)

                As I said once you get many devices, use the filters to work with the devices or you will get lost. Again you can practice your commands on the tasmota device console, once you get it working then you can put it into the mscmqtt device in the plugin.

                You will have lots of fun :-)

                I've just purchased a few led strips, for the kitchen and laundry, places I cant get wires. I will try the nodemcu arduino plugin first and then compare it to tasmota "magichome" device....Be interesting to see how they compare :-)

                Enjoy !

                Pete
                HS 2.2.0.11

                Comment


                • #9
                  Originally posted by Pete View Post

                  Removing the SonOff WiFi cover here a couple of weeks back broke off the button zero stalk and used glue to keep it fixed to the base. Most of the concern here was looking for the little metal bubble inside of the switch (button zero) that fell out.
                  Glad I'm not the only one, I had one do this and I spent ages looking for the bit. I managed to put it back together and then using a soldering iron to melt the 4 little plastic posts that hold the top button plate on.

                  I think these buttons are a little fragile but as you say, once flashed its all about OTA ;-)

                  Pete
                  HS 2.2.0.11

                  Comment

                  Working...
                  X