Announcement

Collapse
No announcement yet.

mcsMQTT Plugin

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bug report. If you have a sub/pub (not sure which one did it) tied to a HS device and delete the sub pub it deleted my device.

    Too many bugs or too confusing for me to understand, I'm going to have to step back and come try it again in a few months. Thanks for all the hard work.

    Comment


      Suspect it is working as intended. The only delete capability is on the Edit tab to delete records from the database which will also delete the HS device if one is showing next to the Delete button. When an Accept checkbox is unchecked it will delete the HS device if the device was created by mcsMQTT.

      Since you only want HS MQTT to interface Zwave and you are getting what you need from the other MQTT plugin then there is little reason to cause yourself more work by learning a different plug-in.

      Comment


        Originally posted by Michael McSharry View Post
        The only delete capability is on the Edit tab to delete records from the database which will also delete the HS device if one is showing next to the Delete button. When an Accept checkbox is unchecked it will delete the HS device if the device was created by mcsMQTT.
        Unfortunately it deleted my devices created by the Zwave plugin. Fortunately they were pretty easy to rebuild from the controller.

        I do like your architectural approach much better and I always feel more comfortable using something that's has someone continuing to work on it so will definitely check back in down the road when I have some time to spend on it.

        Thanks again for all the hard work!!

        Comment


          Attached is a guide for integrating HS3 with the Sonoff 4CH Pro and Tasmota firmware as a garage door controller using mcsMQTT.
          Michael, please post this guide as you see fit.
          Attached Files
          Last edited by taylormia; May 24, 2018, 08:54 PM.

          Comment


            Thank you again for an excellent step by step guide. I included it at the top of the thread. I am not certain if you are aware, but I did a garaage door controller in a Sonoff Basic that was described in Section 12.1 of the mcsMQTT manual. With the Basic I had to isolate the relay from mains and with the 4 CH Pro this was not necessary. It is a $25 vs. $5 vs. time to modify decision.

            I also updated the Tasmota firmware to implement a garage door control function. Kind of like what the standard Tasmota does with implementation of a button to be momentary, hold, latch, etc.

            My objective was to make the controller fully self-contained so the command is the desired door state and not a command that just controls the pushbutton. It has retry logic and can use one or two sensors to know the position of the door. In my case the garage door already had a contact for door open and a contact for door closed so I used those existing sensors as discrete inputs to the Sonoff.

            In your writeup you showed the Alexa control via HS with voice control checkbox. Since the Tasmota firmware has Wemo/Hue emulation it is able to directly recognize Alexa commands without HS being involved. I also use Routines in my Alexa app to that I could say "Alexa, Close Garage Door" rather than needing the awkward language of "Alexa, Turn On Garage Door". I recognize that "Turn On" in your case is just a toggle command so not that awkward, but I do not think you have anything that uses your tilt sensor information when control via Alexa.

            Comment


              Thanks for the great feedback. Yes, there are so many ways to do things with Sonoff, MQTT and HS3. I still have a lot of exploring and learning to do

              Comment


                Thank you for the PDF. A great help.

                I got as far as doing the OEM firmware update to 2.0.1 but I'm stuck trying to find the Sonoff on my LAN. I can't seem to get the device to go into whatever mode it needs to broadcast it's SSID. I tried holding a button down for seven seconds, and then quickly pushing the button again, but no luck. Is there some magic to this?

                Again, thanks for the manual.
                Don

                Comment


                  Yep...this step took me several tries to get it right.

                  What worked for me was this sequence:
                  1. Plug in the 4CH Pro
                  2. After about 5 sec, hold down button 3 for about 7 seconds until you have a pattern on the LED such as blink-blink-blink-pause-blink-blink-blink-pause.
                  3. Press the same button again for about 7 seconds until you have a steady blink-blink-blink...

                  Then check your wifi networks for the ITEAD-xxxxx SSID

                  This procedure is documented here: https://github.com/mirko/SonOTA/wiki

                  Good luck!

                  Comment


                    Don, if you are able to use the USB adapter to flash the firmware, then the special builds I did for you will be trying to connect to the SSID that you provided. You only need to fallback where the Sonoff opens an SSID at 192.168.4.1 if it cannot connect to the SSID that you provided.

                    Comment


                      Thanks to both of you. I will try the trick Taylormia suggested. Still waiting on my USB - Serial stuff, but was encouraged to find that I might be able to do this OTA.
                      Last edited by donstephens; May 27, 2018, 02:12 PM.
                      Don

                      Comment


                        Well One step forward, two back. Got the thing to broadcast it's SSID. Started Sonata, tried to follow the prompt but never got to the final stage and now the blue
                        light is blinking twice. Will keep screwing with it, and hope that I haven't hosed the Sonoff.
                        Don

                        Comment


                          I tried the Sonoff Basic with the OEM OTA approach and never had success. Never tried the 4CH. Once Tasmota firmware is installed then OTA is as easy as a HS Updater install of a plugin.

                          Comment


                            Yeah, if I can't get this to work, I'll have to wait until I get my header.
                            Don

                            Comment


                              @Don,may be try Linux. You can boot up to a live Ubuntu with a USB stick.

                              Here was able to program one Sonoff WiFi basic via OTA using Linux Working now with a default bin file. Took a while...~ 20 minutes?

                              Wait was longest for final stage.

                              Earlier had upgraded firmware on another one to 1.6 which I should not have done.

                              These are the steps I followed.

                              1 - apt-get install python3 python3-pip python3-dev
                              2 - python3 -m pip install --upgrade pip
                              3 - git clone hxxps://github.com/mirko/SonOTA.git
                              4 - cd SonOTA
                              5 - pip3 install --user -r requirements.txt
                              6 - ./sonota.py

                              Update Steps

                              The update will go as follows (assuming a stock Sonoff device, the included .bin files have been tested with a Sonoff Basic and a Sonoff Dual). The program will prompt you what to do for each step as required.
                              • You will be promted to fill out the settings for your network (the "server" IP, this is the IP of the PC you are running sonota on, and the SSID and password for your WiFi). (These can also be passed as command line arguments if preferred, or doing a lot of devices.)
                              • Connect to the ITEAD-* WiFi network, you may need to reset your Sonoff to defaults to do this. This stage tells the Sonoff where to get future updates.
                              • Typically, you will be disconnected automatically from the ITEAD-* WiFi network, and your PC will reconnect to your normal network. So this stage will require no intervention, and the Sonoff will connect to your PC to download the required firmware.
                              • Once the firmware has been downloaded, there will be a new FinalStage SSID that you can connect to. Do this, and the device will then download the final stages of the firmware, including the Arduino image, replacing the default boot loader.
                              • That's it! You should be all done and ready to use your new Arduino Firmware (see the Running section).


                              Flashing Itead Sonoff devices with custom firmware via original OTA mechanism

                              Note the following is a partial copy and paste from the linux terminal session.

                              ~~ Provisioning completed
                              Starting stage2...
                              ** The IP address of <serve_host> (192.168.244.236) is not assigned to any interface on this machine.
                              ** Please change WiFi network to XXX-0 and make sure 192.168.244.236 is being assigned to your WiFi interface.
                              ** This application should be kept running and will wait until connected to the WiFi...
                              .........Current IPs: ['192.168.244.236', '192.168.122.1']
                              ~~ Starting web server (HTTP port: 8080, HTTPS port 8443)
                              Using selector: EpollSelector
                              ~~ Waiting for device to connect

                              *** IMPORTANT! ***
                              ** AFTER the first download is COMPLETE, with in a minute or so you should connect to the new SSID "FinalStage" to finish the process.
                              ** ONLY disconnect when the new "FinalStage" SSID is visible as an available WiFi network.
                              This server should automatically be allocated the IP address: 192.168.4.2.
                              If you have successfully connected to "FinalStage" and this is not the IP Address you were allocated, please ensure no other device has connected, and reboot your Sonoff.
                              ..............................

                              >> {
                              "userAgent": "app",
                              "action": "upgrade",
                              "sequence": "1527383023508",
                              "params": {
                              "binList": [
                              {
                              "downloadUrl": "http://192.168.244.236:8080/ota/image_user1-0x01000.bin",
                              "name": "user1.bin",
                              "digest": "1c467a7cb4058df22046ffbc0312272aed324a74e91b9b39e1bf2aef88e eca8a"
                              },
                              {
                              "downloadUrl": "http://192.168.244.236:8080/ota/image_user2-0x81000.bin",
                              "name": "user2.bin",
                              "digest": "804e4f4a2316fbcc2c6b46aff53c24b9be252bf3fd8cf3ea2243e4475a0 52658"
                              }
                              ],
                              "version": "23.42.5",
                              "model": "ITA-GZ1-GL"
                              },
                              "apikey": "xxx",
                              "ts": 0,
                              "deviceid": "1xxx"

                              ~~~ device acknowledged our action request (seq 1527383023505) with error code 0
                              Sending file: /ota/image_user2-0x81000.bin

                              *** IMPORTANT! ***
                              ** AFTER the first download is COMPLETE, with in a minute or so you should connect to the new SSID "FinalStage" to finish the process.
                              ** ONLY disconnect when the new "FinalStage" SSID is visible as an available WiFi network.
                              This server should automatically be allocated the IP address: 192.168.4.2.
                              If you have successfully connected to "FinalStage" and this is not the IP Address you were allocated, please ensure no other device has connected, and reboot your Sonoff.
                              ..........Current IPs: ['192.168.122.1']
                              .Sending file: /ota/image_arduino.bin
                              .Current IPs: ['192.168.4.2', '192.168.122.1']

                              The "FinalStage" SSID will disappear when the device has been fully flashed and image_arduino.bin has been installed.
                              If there is no "Sending file: /ota/image_arduino.bin" log entry, ensure all firewalls have been COMPLETELY disabled on your system.
                              .....200 GET /ota/image_arduino.bin (192.168.4.1) 11586.20ms
                              .........Current IPs: ['192.168.122.1']

                              No longer on "FinalStage" SSID, all done! Now connect to the sonoff-#### SSID and configure for your WiFi (it will not be configured).
                              Quitting.



                              [ATTACH]69004[/ATTACH]
                              Last edited by Pete; May 26, 2018, 10:30 PM.
                              - Pete

                              Auto mator
                              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

                              HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                              HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                              Comment


                                Updated firmware on the SonOff basic to this one as documented in the manual.

                                The firmware, which is the same Tasmota-variant firmware described for devices in this manual is at
                                hxxp://mcsSprinklers.com/mcsTasmota.bin. This same firmware can be used for all other applications of
                                the Sonoff devices in this manual as of May 2018.


                                [ATTACH]69006[/ATTACH]

                                [ATTACH]69007[/ATTACH]
                                Last edited by Pete; May 26, 2018, 10:49 PM.
                                - Pete

                                Auto mator
                                Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

                                HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                                HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                                X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                                Comment

                                Working...
                                X