Announcement

Collapse
No announcement yet.

Hardware mods to Sonoff Wifi Basic

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

    #16
    Thank you Michael.

    So what I noticed here is using first 5 pins:

    1 - VCC 3.3VDC
    2 - RX Pin - serial IN - GPIO 3
    3 - TX Pin - serial OUT - GPIO 1
    4 - Ground Pin
    5 - GPIO 14

    6 - GPIO 4 - soldered wire.

    2nd 3.3 VDC post, one 5.0 VDC and one spare ground pin wired.

    Temperature sensor wired to GPIO 14, ground and 3.3 VCC.
    Garage open and close sensors wired to GPIO4, GPIO3 and Ground pin.

    Initially testing with GPIO 1 (TX Pin) to ground for one door switch. Sonoff did not boot or it went to JTAG mode?

    Configured basic Sonoff WiFi module as follows.

    Click image for larger version  Name:	config2.jpg Views:	1 Size:	37.9 KB ID:	1237058

    Console shows correct stuff when shorting GPIO3 and GPIO4 to ground:

    17:56:41 MQT: /GarageDoor2/POWER = Off
    17:56:48 MQT: /GarageDoor2/STATE = {"Time":"2018-07-29T17:56:48", "Uptime":0 0, "Vcc":3.521, "Wifi"
    17:56:48 MQT: /GarageDoor2/Door2 = CLOSED
    17:56:48 MQT: /GarageDoor2/SENSOR = {"Time":"2018-07-29T17:56:48", "Switch1":"Off", "Switch2":"On"}

    In March of 2017 Theo Arends wrote:

    I do not support GPIO01 as user GPIO as there would be a lot of questions as why it doesn't perform as the user expected as serial input may come along.

    Then later wrote that he did support using GPIO 01 (TX - Serial out) as a user GPIO. This is where I am confused a bit.

    Retested using GPIO3 and GPIO4 as configured above. Reconnected temperature sensor and test remounted it over the GDO. All looks fine now.


    11:35:03 MQT: /GarageDoor1/INFO3 = {"RestartReason":"Software/System restart"}
    11:35:04 UPP: Multicast (re)joined
    11:35:04 MQT: /GarageDoor1/POWER = Off
    11:35:04 HTP: Console
    11:35:11 MQT: /GarageDoor1/STATE = {"Time":"2018-07-29T11:35:11", "Uptime":0 0, "Vcc":3.496, "Wifi"
    OPENED Garage Door.
    11:35:11 MQT: /GarageDoor1/Door1 = OPEN
    11:35:11 MQT: /GarageDoor1/SENSOR = {"Time":"2018-07-29T11:35:11", "Switch1":"On", "Switch2":"Off", "DS18x20":{"DS1":{"Type":"DS18B20", "Address":"282F515C04000080", "Temperature":99.3}}, "TempUnit":"F"}
    Closed Garage Door
    11:35:33 MQT: /GarageDoor1/Door1 = INDETERMINATE
    11:35:44 MQT: /GarageDoor1/Door1 = CLOSED
    11:35:45 MQT: /GarageDoor1/Door1 = INDETERMINATE
    11:35:45 MQT: /GarageDoor1/Door1 = CLOSED

    Installing little terminals to the Sonoff case this

    Can't you swap the temperature sensor and door sensor pins being used in you wiring?

    Trying a change with SonOff #2 device to see if it works.

    Gonna try that next on second SonOff except connect the temperature sensor to GPIO1 instead of GPIO14.week.

    Changing DS18B20 GPIO connection from GPIO 14 to GPIO 1 to see what happens on cold boot and if I can see the temperature sensor connected to GPIO 1
    Last edited by Pete; July 29, 2018, 03:03 PM.
    - 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


      #17
      Testing:

      1 - VCC 3.3VDC
      2 - RX Pin - serial IN - GPIO 3 ==> DQ pin on DS18B20
      3 - TX Pin - serial OUT - GPIO 1 ==> DQ pin on DS18B20
      4 - Ground Pin
      5 - GPIO 14 ==> DQ pin on DS18B20

      6 - GPIO 4 - soldered wire - DQ pin on DS18B20

      Click image for larger version  Name:	Test2.jpg Views:	1 Size:	43.1 KB ID:	1237090

      Tested GPIO1, GPIO3, GPIO4 and GPIO14 to DQ of DS18B20

      GPIO1 ==> DQ - does not work with DS18B20
      GPIO3 ==> DQ - does not work with DS18B20
      GPIO4 ==> DQ works ==> "DS18x20":{"DS1":{"Type":"DS18B20", "Address":"280D7E5B04000049", "Temperature":69.5}}
      GPIO14 ==> DQ - does not work with DS18B20
      Last edited by Pete; July 29, 2018, 03:37 PM.
      - 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


        #18
        Found a drawing that uses a pull up resistor for GPIO 1. The original drawing was incorrect but the subject was using GPIO 1 for a switch.

        Might give this a try. This way I can use GPIO 4 for PIR or Microwave.


        Click image for larger version

Name:	GPIO1-3.jpg
Views:	1403
Size:	33.8 KB
ID:	1237119



        - 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


          #19
          [quote]Is there a way to adjust the mcsTasmota firmware to show local time and date once it starts to chat?[/quote[]

          if is not an areas I explored. I notice that it starts then eventually does NTP to update the time. If you have specific suggestion then I can see if it can be implemented.

          Comment


            #20
            Thank you Michael.

            Tested the quote function. It is on the top of the first advanced bar. I see this above: []QUOTE]

            If you have specific suggestion then I can see if it can be implemented.
            Console commands are sticky.

            Commands in mcsMQTT would be propietary to the (mcs)Tasmota firmware.

            Originally used the console commands to change Centigrade to Fahrenheit. Easy peasy stuff.

            Console commands did work a few versions back.

            Click image for larger version  Name:	time.jpg Views:	1 Size:	54.4 KB ID:	1237139

            Commands -
            - 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


              #21
              Pete, are you just documenting the reference to console commands? Are you indicating that they stopped working with mcsTasmota a few versions back? Have you tried to access some of the added features, such as irrigation schedules, via the console?

              Comment


                #22
                are you just documenting the reference to console commands? Are you indicating that they stopped working with mcsTasmota a few versions back?

                Yes console, http and Mosquitto in the command reference wiki. I used the http commands a while back. I dunno why they quit working as the commands are part of the Tasmota core.

                Have you tried to access some of the added features, such as irrigation schedules, via the console?

                No.

                I am only testing stuff right now with the Sonoff basic Wifi Module.

                Most of the time it's been adding hardware mods - soldering wires / posts.

                It's been a couple of months ago that I changed the default temperature setting from C to F.

                The temperature change thing was all I ever did with the command line interface. I did test status and stuff and all of that worked fine a few mcsT
                asmota versions back.
                - 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


                  #23
                  Waiting now to solder posts to Sonoff Wifi module as the wires I am using are 26 guage and difficult to deal with outside of the box.

                  I was using alligator clips for my testing and working on a ladder over the GDO which is a PITA.

                  Relating to the command stuff it is easiest for you to see for yourself uploading current Tasmota basic firmware to the SonOff device and try the commands using http and then watching the console responses to what you type.

                  I have read how easy it is to expand the flash from 1 Mb to 2 Mb. Wondering if I should do this with next purchase more Sonoff modules?
                  Last edited by Pete; July 31, 2018, 02:38 PM.
                  - 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


                    #24
                    BTW looks like HST is restructuring the forum and I couldn't find my posts from yesterday here....did find them eventually...
                    - 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


                      #25
                      Drilled 3 small holes, glued and soldered 3 terminal post to top of case today on the the Sonoff Basic WiFi modules.

                      Used a bit of liquid nail and a toothpick to glue the terminal to the case. Soldered 3 wires and used hot glue on the underside of the case to keep the wires in place.

                      GPIO 4 - Ground - GPIO 3

                      Found today that the temperature sensor mounted on the case of the Sonoff reads about 10 degrees higher than the ambient temperature tested by opening the case and checking temperature of the DS18B20 sensor.




                      Click image for larger version  Name:	mods2.jpg Views:	1 Size:	65.8 KB ID:	1237869
                      Last edited by Pete; August 2, 2018, 02:17 PM.
                      - 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


                        #26
                        I ended up using the AM2301 devices glued to the case of the weatherproof sonoff basic box for temp and humidity sensing, the thermals from the sonoff basic impacted less. Also I had a play running the tasmota code on a wemos and made my own DS18b20 hat, again to get away from thermal impact from the electronics, that worked well however it does get away from the "all in one" sollution....
                        HS 2.2.0.11

                        Comment


                          #27
                          Thank you Pete.

                          Yeah will be upgrading the one I installed to an AM2301. The Sonoff is mounted right now over the garage door opener near the ceiling of the garage.

                          Type":"DS18B20", "Address":"282F515C04000080", "Temperature":102.0

                          Not sure how accurate I am making it subtracting numbers with it. (93.8).

                          Are you utilizing the Sonoff DIN case for mounting on a DIN rail?
                          - 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


                            #28
                            Hi Pete

                            Here are a few piccies, stuff I'm playing with. The one in the case is out on my balcony that drives a light, has the local switch and the AM2301. The garage one hanging from the roof is the quick one I put together when I first started. The final one mimics the lighting controller in tasmota, it drives the RGB strip behind a wall feature, I've got a new one coming in a slim case that will fit behind the screen :-)

                            Click image for larger version

Name:	20180803_223704.jpg
Views:	842
Size:	40.7 KB
ID:	1238048Click image for larger version

Name:	20180803_223839.jpg
Views:	710
Size:	55.1 KB
ID:	1238050Click image for larger version

Name:	20180803_223808.jpg
Views:	700
Size:	44.9 KB
ID:	1238051
                            Attached Files
                            HS 2.2.0.11

                            Comment


                              #29
                              Thank you for the pictures Pete.

                              I was curious about the outdoor boxes.

                              Been a bit paranoid about garage door automation from the 1990's where I had automated the garage door which was separate from the house automation and wife pulled in garage, didn't shut off car or alarm in garage while on a conference call kept talking while the garage door shut. I am still today reminded of that automation.
                              - 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


                                #30
                                Pete, my garage door doesnt shut automatically however I've set it that if its open for more than 30 mins it sends me an SMS.....just to make sure I dont go to bed without shutting the door.....
                                HS 2.2.0.11

                                Comment

                                Working...
                                X