Announcement

Collapse
No announcement yet.

Replace xAP with MQTT?

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

  • #46
    Pete, excellent! Thanks for posting this.

    I have some header pins but I haven’t found them yet. My Sonoff Basic board is different than yours. I think it is a newer version (RF V2). The GPIO location is not at a through hole header Pin ☹️. So I will have to solder a wire directly to a pad on the bottom of the board.

    Thanks for the info about using multiple DS18x20 devices on a single Sonoff. This is exactly what I want to do. Do you have any thoughts on how many DS18x20 could be daisy chained to a single Sonoff Basic.
    HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
    2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

    Comment


    • #47
      I am not able to get either the Sonoff Basic or the sonoff 4Ch Pro to work with a DS18S20 sensor. Temperature result is always 0.0.
      HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
      2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

      Comment


      • #48
        Relating to Michael's GDO project here originally mounted the DS18B20 on the SonOff case and it was reading a bit higher temperatures so extended the temperature sensor some 12 inches from the case.

        Personally like to keep GPIOX (serial connection) free just in case I have to revisit the updating of the firmware.

        I did put a request in to the Tasmota folks a few months back about combining the two types of temperature sensors to one firmware for the Tasmota SonOff basic box.

        That said here using two SonOff basics as mini Temperature hubs (up to 5 sensors) and two Sonoff basics as combo sensors temperature/humidity and have added temperature sensors to the MagicHome LED switches (very tiny stuff and a bit of a PITA to solder wires to).
        - Pete

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

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

        Comment


        • #49
          Pete, what version of Tasmota do you use. I am using 5.12 and it does not seem to work with the DS18s20 sensor.
          HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
          2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

          Comment


          • #50
            The sensors will show up on the logs before you see them being displayed. Use the second GPIO that Michael mentioned above for your DQ pin.

            You should be able to see it anyhow with whatever GPIO you are using. Did you drop a 4.7K resistor in place?

            You can use a 10K resistor if you do not have a 4.7K resistor.

            Click image for larger version  Name:	sonoff.jpg Views:	0 Size:	45.3 KB ID:	1311957

            If you need a resistor between DQ and VCC the DS18s20 sensor will show as zero in the console logging.

            I used a resistor by default for my two hubs here.

            For Michael's GDO design / SonOff Basic using Michael's custom 5.9.13g. Note that this is for the Sonoff basic switch.


            For your SonOff device look here and match functions and devices (DS18s20) ==hxxps://github.com/arendst/Sonoff-Tasmota/releases

            Here went to using Espurna firmware for my mini Temperature hubs. It is a bit different than the Tasmota firmware.

            The MQTT messages are almost the same. The only PITA part of the Espurna firmware is that by default you have to set a password and log in to the GUI and there is no per GPIO settings. Just a bunch of different firmwares for different functions.
            - Pete

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

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

            Comment


            • #51
              Do you have any thoughts on how many DS18x20 could be daisy chained to a single Sonoff Basic.

              I tested 5-6 DS18x20 sensors to one Sonoff Basic. The wires were short at around 5 " or so when testing.

              In the implementation of my attic and basement SonOff basic 1-wire hubs I extended all of the temperature wires and am at 4 so far on each of the SonOff basics.

              Thinking you will not have any issues going higher than 4. I have been labeling the end of the wire going to the DS18x20's and writing the mac addresses down to keep track of them a bit.

              The sensors and wires in the attic to the 2nd floor of the house were already there and connected to a Maxim USB 1-Wire thing (chinese version with two mini audioi jack style plugs.

              Here originally started with the Midon Temp05's and Temp08's for 1-Wire stuff. Orginal weather station here was the 1-Wire AAG.
              - Pete

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

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

              Comment


              • #52
                Wow just noticed that the SonOff basic Version 2 is way different than the SonOff basic Version 1. Now I see why you are having issues Steve.

                Sonoff Basic R2

                Around November 2018, Itead changed the layout of the Sonoff Basic (issue #4515).

                The new board is labeled as Sonoff RF R2 POWER V1.0.

                It is easily discerned from previous revisions since it uses wires instead of thick solder traces for mains power.

                The new version of the Sonoff Basic smart switch uses an ESP8285 SoC with the 1MB flash integrated into the same SoC chip.

                GPIO14 is no longer broken out to a contact on the PCB. Instead, GPIO02 (no pullup) is broken out. It is labeled as IO2 on the board. To use GPIO02, take care that it is not being pulled low when the device is booting. Otherwise, the device will not boot into its regular operational mode. Alternatively, you can use use GPIO03 (Rx) which does not have any boot function restrictions. However, both of these GPIO are pulled high momentarily after boot. This means that any connected device may "blink" when the Sonoff is powering up.

                Unlike GPIO03, the GPIO02 PCB contact is not prepared for a pin. You will need to solder your cable directly on the board. Be careful. Too high a temperature or long heating can damage the contact and its connectivity. You should also make sure that there is no tension on the cable. Affix the cable with a cable tie and perhaps some hot glue.

                GPIO02 as a user configurable input is implemented in the Sonoff Basic module (introduced in 6.3.0.15). If you use GPIO03, you must use a device template (rather than selecting the Sonoff Basic module), and also disable serial logging (SerialLog 0).

                Pictures:

                Click image for larger version  Name:	SonoffBasicV2.jpg Views:	0 Size:	77.3 KB ID:	1312084

                Click image for larger version  Name:	SonoffBasicV2-B.jpg Views:	0 Size:	83.9 KB ID:	1312085

                For the 1-Wire DSXXX connection you only need one GPIO ...and the current Tasmota firmware...

                Here is a wiring picture for 1-Wire

                Click image for larger version  Name:	1-Wire-wiring.jpg Views:	0 Size:	72.4 KB ID:	1312089
                CAUTION: Not sure how to change the relay from 120VAC to Low voltage. Here cut the board and used a by pass wire soldered on to board.

                Guessing it involves cutting the two thick wires.

                CHECK to make sure there is NO 120VAC coming out with a VOM.

                I still prefer the serial JTAG upload of firmware versus the wireless upload of firmware.

                Once done with either Tasmota or Espurna firmware you do not have to touch the wire anymore as you can update the firmware via the web interface.

                Here is the Tasmota bin file that I would use with the R2 version of the board.

                hxxps://github.com/arendst/Sonoff-Tasmota/releases/download/v6.5.0/sonoff-sensors.bin

                or if you want to utilize Espurna this is the firmware for the Sonoff Basic R2 version.

                hxxps://github.com/xoseperez/espurna/releases/download/1.13.5/espurna-1.13.5-itead-sonoff-basic-r2-dallas.bin

                Note relating to MQTT both will work. Personally Espurna firmware is more intuitive than the Tasmota firmware for me.

                I am currently utilizing Espurna firmware for my two 1-Temperature hubs.

                Looking on Amazon this morning see SonOff basics labeled R2 and mostly see them as SonOff basic's so really do not know if all of what is sold today on Amazon is SonOff basic R2's or version 1 of these devices.

                xxxx
                - Pete

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

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

                Comment


                • #53
                  Pete, thanks for all this info and the work you did putting this together. It will take me a while to digest all of it. This is a much bigger project than I expected. My time is limited right now due to family health issues. I will work on it as time becomes available. Lately I am spending all my free time just keeping my aging automation platforms running. There is always something that needs attention. It’s unbelievable how many issues came up when I changed my ISP from Comcast to a new fiber optic provider. It’s faster and less expensive but very painful. I hope I made the right decision!
                  HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
                  2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

                  Comment


                  • #54
                    Understood Steve. Baby steps and take care of family first.

                    I have spent more time on modifying the SonOff devices (wires and firmware) than wiring them up for use.

                    You can purchase a Sonoff TH10 instead and firmware upgrade it only with no soldering for your temperature sensors. ($13.90 on Amazon which is the same price for two SonOff basic devices)

                    Much more difficult are modifying the Magic Home controllers (for the Kitchen LED lighting).

                    I have done most of the mods on my workbench which has a soldering station, large lamp magnifying glass, large clamp to hold these boards in place while I tinker with them.

                    Note saftey first here when playing with these 120 VAC Sonoff devices.

                    What is your fiber optic ISP provider?

                    Many years ago went to using Verizon's FIOS which originally was providing DSL.

                    Bridged one network port to my own firewall to my home network and connected the television STBs to the Verizon Box network.

                    Then Verizon sold their stuff to Frontier. What a disaster it was after years of trouble free Verizon FIOS. They screwed up and tried to slam the old Verizon account and internet service went down for about a week.

                    Customer service was so bad that I filed a State's Attorney complaint relating to all of this; then dropped them and went to Comcast.
                    - Pete

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

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

                    Comment


                    • #55
                      Pete, I switched from Comcast internet to MEC fiber. This is my electric company. They now provide internet service. They installed fiber optic cable to access about 50% of their electric customers. I think it was a brilliant move. I was involved with the advisory group durning the planning stages. So far the service has been excellent. If you want to know more, search “Midwest energy and communications, Michigan”.
                      HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
                      2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

                      Comment


                      • #56
                        What a great idea and implementation. The telco's need this kind of competition!
                        - Pete

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

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

                        Comment


                        • #57
                          Pete, I have 2 SonoffTH modules flashed with Tasmota and currently connected to mcsMQTT /HS3. I am using the temp and humidity sensors that came with the TH. Do you know if I can connect multiple DS18x20 sensors to the sonoffTH?
                          HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
                          2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

                          Comment


                          • #58
                            yes.
                            - Pete

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

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

                            Comment


                            • #59
                              Note the following from the Itead web site where the DS18S20 is not supported by the Ewlink App.
                              Sonoff TH10/ TH16 supports four kinds of temperature monitor and humidity monitor sensors, mentioned below:
                              • Si7021, AM2301, DS18B20, DHT11

                              Si7021(wiki) Highly Recommended!
                              In a Tasmota post the following is stated where DS18S20 is supported given a specified compile-time configuration

                              • DS18B20 Temperature - DS18x20 (4) in group 2
                                Enable option USE_DS18x20 in user_config_override.h for multiple sensors using OneWire library
                              • DS18S20 Temperature - DS18x20 (4) in group 2
                                Enable option USE_DS18x20 in user_config_override.h using OneWire library
                              Topology from 1-wire sensors should have a termination at the end of the wire which is usually just a sensor and a pull-up resistance such that the rise time for the digital waveforms are not negatively impacted by the capacitance of the wire.

                              Comment


                              • #60
                                I use a pull up resistor on the two 1-wire hubs (at termination) using the first version of the SonOff basic.
                                - Pete

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

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

                                Comment

                                Working...
                                X