Announcement

Collapse
No announcement yet.

SonOff WiFi Basic GDO multisensor - button - temperature sensor project

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

    SonOff WiFi Basic GDO multisensor - button - temperature sensor project

    This is an overview of the GDO SonOff WiFi basic project.

    Doing a quickie summary here as new Chamberlain MyQ GDO is using security 2.0 + which is different than older Liftmaster GDO.

    This Chamberlain GDO is an upgrade from the Liftmaster and Craftsman of old. Never connected or used the MyQ stuff. Personally I liked the Liftmaster and Craftman GDO's the best. Two weeks ago the Logic board went out on it. The GDO is over a year old and the logic board is only covered for 1 year. No local dealers would sell me a logic board due to saftey installation reasons (???). Ordered one from Chamberlain. The security 2.0 + stuff was more difficult to pair with the Homelink GDO buttons built in to the automobiles. The 2 wire GDO button is digital now rather than analog.

    Hardware list for one GDO.

    - SonOff basic WiFi module upgraded to current level of mcsTasmota via Linux serial JTAG port
    - 2 reed sensors for door open and closed sensors
    - DS18S20 old AAG 1-wire sensor + 4.7k Ohm pull up resistor
    - Liftmaster push button power control model # 883LMW

    Hardware modifications for SonOff basic Wifi module

    - cut trace for 120VAC solenoid switch such that it functions as a low voltage relay
    - wired GPIO #4
    - connected GPIO #3 (serial IN) to #57 Door Closed reed switch
    - connected GPIO #4 (aux GPIO) to #56 Door Open reed switch
    - connected GPIO #14 to DS18S20 AAG temperature sensor (3.3 VDC, Ground and DQ GPIO #14 - NOTE: pull up resistor is between DQ and 3.3VDC)

    Changes: Removed DS18B20 temperature board and heatsink and went to an external DS18S20 temperature sensor.

    Click image for larger version  Name:	SonoffGDO.jpg Views:	1 Size:	87.8 KB ID:	1257743Click image for larger version  Name:	SonOff - GDOStuff.jpg Views:	1 Size:	133.7 KB ID:	1257744

    Click image for larger version  Name:	GDO1.jpg Views:	1 Size:	78.3 KB ID:	1257727

    Hardware modifications to Liftmaster push button control model # 883LMW

    - Tiny button that can be glued on to the SonOff WiFi basic device
    - two wires are control wires to GDO (white and red)
    - two wires soldered for push button on to circuit board (blue and black)
    - programmed button removing current Chamberlain door button 2 wires. (Easy - just connect two wires and press button until it opens garage door).

    Click image for larger version  Name:	ButtonWires.jpg Views:	1 Size:	203.6 KB ID:	1257741

    HS3 Mosquitto Variables and button

    Click image for larger version  Name:	MMQTTStuff.jpg Views:	2 Size:	109.8 KB ID:	1257764

    Click image for larger version  Name:	HHS3Variable.jpg Views:	1 Size:	33.2 KB ID:	1257742

    Note: Project completed and in use with no issues. Please comment if I left anything out.

    Final project did not utilize onboard temperature sensor and went to an aux DS18B20 sensor.

    Included aux GPIO #4 wire use. This is optional and you can utilize JTAG GPIO ports (RX/TX instead).

    Included the GDO button modifications here for a myQ Security 2.0+ digital button ($8.00 USD).

    xxxxx
    Last edited by Pete; November 17, 2018, 08:48 AM.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - 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

    #2
    Revisiting this project now....liking the other 4 Espurna firmware updated devices because I can do more with them with base software...

    At this time the SonOff WiFi basic GDO is doing garage door open and close and button and temperature sensor. In the past when changing APs the device locks up.

    I have not done that today testing multiple AP connectivity.

    That said I am playing with multiple OpenWRT APs and placements of these for just the WiFi devices.

    With the Espurna firmware I can keep adding APs to base and do a scan to see best RSSI and the firmware will typically attach to the AP with the best RSSI.

    How difficult would it be to convert the GDO SonOff basic device running Tasmota to Espurna firmware?
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - 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


      #3
      It took me quite a bit of effort to understand Tasmota to implement the garage door logic. I have no desire to learn Espurna to the same level. I cannot understand how the WiFi networks where the GDO is installed can be so variable that more than two would be needed. If changing AP's is a problem then why not just setup one. If you do not have an nearby AP, then put one in the garage so the Sonoff will have a good signal.

      Comment


        #4
        Understood Michael.

        Yeah just been using mini APs with OpenWRT on them moving them around a bit.

        The garage Tasmosta GDO device works fine and signal strength is fine testing to 3 WAPs (basement, main floor and top floor).

        Speed is same or faster than the hard wired stuff to the OmniPro panel and OmniPlugin.

        The Tasmota software always defaults to first WAP and only goes to second WAP when first one is off. With Espurna it looks at the RSSI signal and picks the best one.

        - Pete

        Auto mator
        Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
        Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
        HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

        HS4 Pro - V4.1.18.1 - 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


          #5
          Michael,

          Updated mcsMQTT a few days back on HS3. The mcsMQTT update wiped up my original Sonoff basic MQTT HS3 configuration and event files. Wierd cuz it didn't affect my Ring devices or temperature hubs or LED controllers.

          I looked at the current documentation and it does not have the same stuff as the original documentation had for configuration. I had a bunch of events working via the original triggers which are now all gone. Well the events are there but the MQTT configuration of devices is gone. Can I get that document with the original settings. I do not know what would change to wipe these settings out.

          This is what I see now with the Sonoff basic modded to GDO stuff.

          Click image for larger version  Name:	GDO.jpg Views:	0 Size:	100.9 KB ID:	1412695

          Would it be better to update the firmware to current release of the Tasmota Sonoff basic firmware?

          Will I see the two door sensors, be able to use the button and temperature sensor? Its been a while here mostly using Espurna. I did like the newer Tasmota firmware for the Gosund switches and there was no Espurna firmware for the Gosund dimmer switches.

          I have gone back to using the OmniPro alarm zones for the GDO as they are still in place and I was still using them for time being.
          - Pete

          Auto mator
          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
          Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
          HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

          HS4 Pro - V4.1.18.1 - 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


            #6
            I want to update if I can to current revision of Tasmota starting first with basic bin then regular tasmota firmware.

            Will I see the two garage sensors (switches?), temperature sensor and GDO button (relay)?

            Only real concern here is having the relay defaulting to on and opening the garage door when I reboot.

            Think I can do this without taking the Sonoff basic off line?

            I have to climb up to the GDO and disconnect everything. Will it save the WiFi settings upgrading to current revisions of Sonoff firmware?

            It's been about 2 years that I have done this and its been fine those two years. I did leave the wired stuff to the alarm panel and I was still using it.
            - Pete

            Auto mator
            Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
            Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
            HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

            HS4 Pro - V4.1.18.1 - 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


              #7
              The GDO was my first mod to Tasmota source. I generally use compile-time configuration parameters to include and exclude application-specific logic such as the GDO, irrigation, laser motion, etc. These were mainly done with Tasmota 5 and there may have been some with Tasmota 6. This logic is not contained in the Tasmota main line. If you load any other binary than the one that was originally provided then you will no longer have the GDO functionality.

              mcsMQTT maintains a backup each time it starts and these backup files are retained for 6 months (default). This should mean you MQTT configuration can be restored by renaming the database of one of the backups. If you had setup events etc in HS then those would not be retained and if HS devices were deleted then they cannot be recovered except from a HS backup.

              What is of interest to me is what happened to loose the associations. Do you have any more specific information on the update that was done?

              Comment


                #8
                Do you have any more specific information on the update that was done?

                Not really. Just saw it there one day last week and updated. Been trying to keep up with updates and this is the first time that I have seen the deletions of the associations and only on the customized Sonoff basic with the custom GDO tasmota firmware.

                Will shut down HS3 now and rename new db to backup and rename old backup to new db.

                Looking at the backups and only seeing backups of the mcsMQTT DB from 2019.

                Everything is there but there are no associations. Best then to redo all of the associations.

                Can I have a copy of the PDF from that time please with the open/closed/intermediate stuff ?


                - Pete

                Auto mator
                Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                HS4 Pro - V4.1.18.1 - 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


                  #9
                  Yes only the GDO configurations went away with the mcsMQTT HS3 update. That said I started to play a bit to get it configured again and then it wouldn't connect to any SSID I had here. So removed it and disconnected it. An issue I had was when bringing up a new Alexa device it would open the garage door which was annoying anyhow.

                  Tried to find the original mcsMQTT documentation which showed the open, intermedia and closed pieces and could not.

                  So now thinking I may be able to do the same with a Shelly Uni 1 device which will provide me with digital and analog inputs and GDO button.

                  What do you think Michael?
                  - Pete

                  Auto mator
                  Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                  Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                  HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                  HS4 Pro - V4.1.18.1 - 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


                    #10
                    Section 17.2 of the current mcsMQTT.pdf describes the configuration. My specific setup is attached. I don't understand how any version of mcsMQTT could change the ESP8266 configuration for the GDO.

                    I am not familiar with a Shelly Uni 1. The Shelly 1 does not expose the Analog and the switch input may not be isolated from AC.

                    This morning I downloaded the latest Tasmota which is 8.4.3. It is quite different than the Tasmota 5.9 upon which the GDO was originally developed. It looks to have integrated the ESP32 which is great. When I did the BLE beacon it was much work to get the Tasmota source working on ESP32. I'm thinking about porting the GDO to this version now that I have some better understanding of Tasmota structure. Don't know how long this will take as I have only browsed the new source. While the implementation will be totally different, the functionality of the GDO knowing its state and responding to desired final position commands will be the same.

                    Click image for larger version

Name:	Capture.PNG
Views:	451
Size:	26.7 KB
ID:	1414803

                    Comment


                      #11
                      Thank you Michael.

                      I don't understand how any version of mcsMQTT could change the ESP8266 configuration for the GDO.

                      The update did not change anything in the Sonoff basic. What changed was that I lost all of my settings in the mcsMQTT plugin for all of the devices associated with the Sonoff GDO.

                      Wierd cuz the mcsMQTT update did not change any of the mcsMQTT configs in Homeseer for 10 other firmware updated devices. This was the only Tasmota device. The rest are Espurna devices. I moved the two Gosund switches to another house (without Homeseer). One of the Gosund switches was programmed with Espurna firmware and the other with Tasmota firmware.

                      Interesting that when I brought up the Ring to MQTT app Homeseer / mcsMQTT automagically saw this and created the alarm keyboard device and sensors. I did not do anything proactively to use this plugin in Homeseer / mcsMQTT.

                      It would be great to get new firmware for the Sonoff basic GDO device. I messed it up today as the button fell off and the switch below the button fell apart. I guess I can just put a piece of aluminum foil on it to reprogram it. And well I held the button down before it broke off and reset it to scratch and now it doesn't connect to the WiFi.

                      It's been so long sitting there in the garage working fine that I forgot what I had set up with it. Thinking its been over a year now. Always working perfectly. When I pulled it apart I removed all of the terminal connections to the main board and the terminal connections were not labeled so will need to trace each one one GPIO at a time. Not a biggy as the OmniPro 2 panel stuff works fine with Homeseer and Alexa TTS and output button connected to the alarm panel. Kind of over did it with a parallel set up.
                      - Pete

                      Auto mator
                      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                      HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                      HS4 Pro - V4.1.18.1 - 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


                        #12
                        I did the implementation of the GDO logic in Tasmota 8.4.3 using the features available in Tasmota rather than modifying the browser pages etc. Happy with it. I will continue to test and then likely post tomorrow.

                        I also noticed the Echo discovery was causing the GDO to open so I disabled the emulation from Tasmota browser because I did not want to deal with it then. Clearly something had changed from when originally implemented. Tomorrow I will look at the Wemo emulation again to see if there is still an issue. As a minimum I can disable the open and only allow close to be recognized.

                        Comment


                          #13
                          Thank you Michael.
                          - Pete

                          Auto mator
                          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                          Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                          HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                          HS4 Pro - V4.1.18.1 - 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


                            #14
                            You shiny new GDO firmware is ready. The binary is larger than the 5.9.1 version. When I tried an OTA two-step install the loading of the minimal was fine, but it would not run so not able to perform the second step. I needed to use serial connection to update the Sonoff. I suspect it is due to the different memory layout that exists with the newer Tasmota versions.

                            I added SetOption114 and SetOption115. These will not be found in the online Tasmota command list. No changes made to the other commands other than forcing poweronstate to off and power control is not a relay control, but abstracted to represent a desired position of the door.

                            power ON/1 command is used to open the door
                            power OFF/0 command is used to close the door
                            power TOGGLE/2 command will command door to opposite position. If current position cannot be sensed then it will act like OFF command.

                            The actual control of the pushbutton can be tracked with the RESULT or POWER topics

                            Status is reported in the SENSOR topic. It will have JSON entries for the two switches and a 4-state composite for the door position such as below
                            ........MQT: GarageDoor/SENSOR = {"Time":"2020-08-29T21:52:47","Switch1":"ON","Switch2":"OFF","Door":"Closed"}

                            STATE topic is unchanged with info about the device.


                            Click image for larger version

Name:	Capture.PNG
Views:	584
Size:	29.6 KB
ID:	1415166

                            The garage door control has been ported to Tasmota version 8.4.0.3 using features built into Tasmota rather than a hack of the Tasmota code. The same functionality exists as in the original version, but has been modernized for long term maintenance. There is no change in the hardware interface. Binary for this version is at http://mcsSprinklers.com/mcsGDO_8403.zip.

                            The following console/MQTT/serial configuration options are utilized:
                            Pulsetime1 <#> -- duration of the pushbutton press in 0.1 seconds (default 10 if not set)
                            Pulsetime2 <#> -- time allowance for door to open or close in seconds+100 (e.g. 130 is 30 seconds)
                            Poweronstate 0 -- forced by firmware to 0 so pushbutton relay is off on power up
                            Switchmode1 2 (invert) - set if open switch status is ground when active
                            Switchmode2 2 (invert) - set if closed switch status is ground when active
                            SetOption114 1 -- to enable the GDO functionality
                            SetOption115 1 -- to prohibit Echo control of "Open Door" or "Door On", Close/Off control not affected

                            The two Pulsetime options replace the hacked browser interface for setting up the timing for the door control.

                            Switchmode parameters are only needed if the switch input is at ground potential to indicate an active state of opened or closed.


                            SetOption114 must be 1 to enable the GDO logic. If left at 0 then the relay control will follow normal Tasmota logic.

                            SetOption115 affects the WeMo emulation. If set to 1 then Echo can only be used to close the door. Any open attempts with Echo will be ignored. If left at 0 then both directions of control via Echo are enabled.

                            Comment


                              #15
                              I noticed the mcsSprinklers.com HTTP server is down. I'm attaching the same file here.
                              Attached Files

                              Comment

                              Working...
                              X