Announcement

Collapse
No announcement yet.

SonOff basic WiFi seeing Sensors with mcsMQTT

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

  • SonOff basic WiFi seeing Sensors with mcsMQTT

    Configured a SonOff basic Wifi Module (GDO stuff) to include one temperature sensor.


    [ATTACH]69418[/ATTACH]


    How do I see the sensor in the mcsMQTT plugin?


    Been trying to send a cmnd in console to see the sensor and do not. I only see it on the top of the main page.

    Changing the value of the resistor from 10k to 4.7k see the same temperature value.

    Going to solder a connection for GPIO #4 here for a tiny PIR.
    Last edited by Pete; June 19th, 2018, 09:31 AM.
    - Pete

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

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

  • #2
    I obtain the following on a 5 minute periodic basic
    Code:
    8:56:33 AM Received GarageDoor/Door=CLOSED
    payload for door will be OPEN, CLOSED or INDETERMINATE. I think I suppressed the SENSOR message in mcsTasmota for Door sensors. I thought the three door states gave me everything I wanted. I had not considered using the door controller as a multi-sensor device. The door logic was a real hack of Tasmota as I was learning how that firmware worked and had no context of what normal use of Tasmota may be. Now that I understand it better I probably could redo the door logic based on 6.0.0a and then it and irrigation would have the potential of getting back into the github mainline.

    Looks to me as if you configured a Sonoff RF and not a Sonoff Basic

    Comment


    • #3
      Thank you Michael.

      Looks to me as if you configured a Sonoff RF and not a Sonoff Basic

      Yeah I just tried the SonOff RF looking for sensors and then set it back to SonOff Basic.

      [ATTACH]69423[/ATTACH]

      I had it all apart now as I want to solder a wire to GPIO 4.

      Figured if I mount it over the GDO might as well make it a multifunctional device that:

      1 - checks on the garage door open and closed states
      2 - remote controls the GDO
      3 - has a temperature sensor
      [ATTACH]69426[/ATTACH]
      4 - has a PIR sensor.
      [ATTACH]69425[/ATTACH]

      You can too upgrade the SonOff flash chip for more programming space from 1Mb to 4Mb for pennies nowadays.

      Upgrading Sonoff Wireless Smart Switch Flash Memory (ESP8266)

      Soldered a wire to GPIO4 and tested it to work fine. Use a drop of hot melt glue on the solder piece. Not sure if the hot melt glue will hold the wire in place should the garage get really hot.

      [ATTACH]69431[/ATTACH]

      22:59:07 MQT: GarageDoor1/Door = INDETERMINATE
      22:59:13 MQT: GarageDoor1/Door = CLOSED
      22:59:19 MQT: GarageDoor1/Door = INDETERMINATE
      22:59:25 MQT: GarageDoor1/Door = CLOSED
      22:59:25 MQT: GarageDoor1/Door = INDETERMINATE
      22:59:26 MQT: GarageDoor1/Door = CLOSED
      22:59:26 MQT: GarageDoor1/Door = INDETERMINATE
      22:59:26 MQT: GarageDoor1/Door = CLOSED
      22:59:30 MQT: GarageDoor1/Door = INDETERMINATE
      22:59:32 MQT: GarageDoor1/Door = OPEN
      22:59:40 MQT: GarageDoor1/Door = INDETERMINATE
      22:59:45 MQT: GarageDoor1/Door = OPEN
      22:59:45 MQT: GarageDoor1/Door = INDETERMINATE
      22:59:46 MQT: GarageDoor1/Door = OPEN
      22:59:49 MQT: GarageDoor1/Door = INDETERMINATE

      Configured GPIO 4 and 14 to switch 1 and 2.

      23:08:35 MQT: Door/cmnd/POWER2 = TOGGLE
      23:08:41 MQT: Door/cmnd/POWER2 = TOGGLE
      23:08:49 MQT: Door/cmnd/POWER1 = TOGGLE
      23:08:52 MQT: Door/cmnd/POWER1 = TOGGLE
      Last edited by Pete; June 19th, 2018, 05:11 PM.
      - Pete

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

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

      Comment


      • #4
        http://mcsSprinklers.com/mcsTasmota.zip contains a "A" bin image that reports SENSOR status. It shows up as 5.9.13a.

        Comment


        • #5
          Thank you Michael.

          Program Version 5.9.13a
          Build Date & Time 2018-06-19T20:24:19
          Core/SDK Version 2_4_0/2.1.0(deb1901)

          05:55:19 MQT: GarageDoor1/SENSOR = {"Time":"2018-06-20T05:55:19", "Switch1":"On", "Switch2":"On", "DS18B20":{"Temperature":2.9}, "TempUnit":"C"}

          See the sensor now connected to new connection for GPIO4 using a 10k pull up resistor.

          Relating to GPIO14 still need to use a 10k pull up resistor to get a temperature value.
          - Pete

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

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

          Comment


          • #6
            Tested a few more of the temperature sensors and they are all showing the same values of around 3 degrees Centigrade.

            Took the ones from the Node Red to test which are currently working fine in Node Red OWFS.

            Tried current release of Tasmota bin on a lark.

            Program Version 5.14.0
            Build Date & Time 2018-05-15T15:29:54
            Core/SDK Version 2_3_0/1.5.3(aec24ac9)

            and it doing same value for temperature.

            22:45:26 MQT: GarageDoor1/SENSOR = {"Time":"2018-06-20T22:45:26","Switch1":"OPEN","DS18B20":{"Temperature":3},"T empUnit":"C"}

            So it must be that maybe my pull up resistor is not 10k?
            Last edited by Pete; June 20th, 2018, 04:52 PM.
            - Pete

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

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

            Comment


            • #7
              I was able to send commands to the SonOff to change C to F and take it to 2 decimal places. It is reading a temperature and sensitive if I touch the sensor. Only thing is that the temperature is way off and I have tested with 3 currently utilized sensors and the off temperature is identical for all 3 sensors.
              - Pete

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

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

              Comment


              • #8
                Today added another ground and 3.3VDC terminal to the board. On my SonOff basic the RF pin locations were soldered over except for the first and last pin.

                Here is a picture of the GPIO 4 wiring stuff (yellow wire) done a couple of days ago. The spool of cable is marked 26 guage - thinnest that I had.

                The push button came off today while tinkering. Used a bit of Gorilla glue to fix it on the top of the switch.

                [ATTACH]69457[/ATTACH]

                I wanted to know what the rest of the pins were for and found the SonOff RF module and specifications here:

                433Mhz RF receiver

                [ATTACH]69455[/ATTACH]
                Last edited by Pete; June 21st, 2018, 09:41 AM.
                - Pete

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

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

                Comment


                • #9
                  Did a little experiment this morning with the SonOff Basic Wifi device.

                  Went to the SonOff Tasmota current releases github over here:

                  SonOff Current Releases

                  and downloaded:

                  1 - SonOff minimal bin

                  And uploaded the firmware to my SonOff basic.

                  2 - sonoff-allsensors.binSonoff-Tasmota releases

                  Console is showing:

                  16:44:50 WIF: Checking connection...
                  16:44:50 WIF: Connected
                  16:44:50 UPP: WeMo Type 2, Response sent to 192.168.244.190:11872
                  16:44:51 HTP: WeMo setup
                  16:44:52 UPP: WeMo Type 2, Response sent to 192.168.244.190:11872
                  16:44:52 HTP: WeMo setup

                  Which is my Kodi box

                  5 - OTA sonoff-minimal and sonoff-classic.bin

                  16:56:32 MQT: GarageDoor1/SENSOR = {"Time":"2018-06-21T16:56:32","DS18B20":{"Temperature":37},"TempUnit":"F"}
                  16:56:32 UPP: WeMo Type 2, Response sent to 192.168.244.190:11872
                  16:56:33 HTP: WeMo setup
                  Last edited by Pete; June 21st, 2018, 11:58 AM.
                  - Pete

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

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

                  Comment


                  • #10
                    Opened up a bug report ticket relating to Tasmota V5.14

                    Sonoff-Tasmota sonoff.bin DS18B20 not showing accurate temperature
                    - Pete

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

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

                    Comment


                    • #11
                      If I compare source between 5.9 and 6.0 for the 18b20 I see there was considerable change. I suspect the 5.14 and 6.0 are similiar, but I do not have 5.14 source. I do want to use Sonoff for some 1-wire so I will poke at it when I get some time. What I could try is to import the source from 6.0 and build with 5.9 mcsTasmota.

                      Comment


                      • #12
                        I built 5.9 with the 6.0 18b20 extension. All I did was do what I had to do to make it compile. No evaluation done at all. You are welcome to try if you want http://mcsSprinklers.com/mcsTasmota5913b.bin

                        Comment


                        • #13
                          Thank you Michael ....will give it a try...

                          Program Version 5.9.13b
                          Build Date & Time 2018-06-21T20:16:24
                          Core/SDK Version 2_4_0/2.1.0(deb1901)

                          21:09:05 MQT: GarageDoor/SENSOR = {"Time":"2018-06-21T21:09:05", "Switch1":"On", "Switch2":"On"}

                          Not showing the DS18B20. Will try a cold boot. Same with a cold boot.

                          Wondering what is different with the all sensors 5.14 bin file? Someone mentioned that it is for multiple DS18B20's.
                          Last edited by Pete; June 22nd, 2018, 12:18 AM.
                          - Pete

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

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

                          Comment


                          • #14
                            The source contains xsns_05_ds18x20.ino and xsns_05_ds18b20.ino. It appears the x is for multiple and the b is a single. I changed the b file. There is likely a define in the code to enables use of one vs. the other. I will play around and see if I can figure it out and make something that works.

                            ... The user config file contains the legend. There are actually three options. One a legacy. Default is a single sensor. Multiple sensors occupy 1.3K or 1.5K additional flash.

                            Comment


                            • #15
                              I had just migrated the 6 18x20 file to 5.9 and then Platform IO pushed an update which left me with inability to compile through Atom. Frustrating. There likely is a setting that I can set to stop this push, but for now it is a debug effort for the tools.

                              Comment

                              Working...
                              X