Announcement

Collapse
No announcement yet.

Replace xAP with MQTT?

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

  • Michael McSharry
    replied
    Can you comment on whether this approach should work, or do I need to provide a separate power source (or perhaps using the parasitic approach) for the sensor.
    The approach should work, but a pull-up resistor between GPIO and 3.3V of about 4.7K should be used. It may be possible to configure Tasmota to have the ESP8266 internal resistor used, but I have never tried.

    When the case is installed then the temperature will be reporting higher than ambient temperature, but I assume you are just doing a test at this time.

    There are two libraries used for 1-wire. One is based upon Dallas Semi code and one with more compact code. The original is called Legacy and is what I use when I compile. I do not know what is distributed in the standard Tasmota downloads.

    Leave a comment:


  • Pete
    replied
    It is difficult to get a solid connection holding the DS18B20 sensor to the board. Here soldered wires from board to small terminals that I glued to the outside case (labeled). Also used a 4K pull up resistor between DQ (GPIOX) and VCC here.

    Look at the terminal console and you will see the temperature sensor there.

    Purchased terminals in bulk on Amazon (cheaper on Ebay). 3 terminals to one block and drilled tiny holes for the wires to the board and super glued the terminal board to the SonOff case. Thinking too I soldered on male header pins where the holes were (ardunio style) to make it more plug n play (and colors of wires like red, black and yellow ==> VCC, Ground and DQ)

    Amazon sells kits with different color wires and terminals so it is easier to test with.

    Click image for larger version  Name:	headerpins.jpg Views:	0 Size:	132.2 KB ID:	1311876

    Here only using SonOff Basics for my current 1-wire stuff. It's been months now working great.



    Using SonOff basics here for my 1-Wire temperatures and combo Temperature / Humidity sensors.

    I still record the 1-Wire MAC addresses for the temperature sensor placements here as I did for the old 1-wire stuff as I lose track of them.

    I have two SonOff's which have been tested to connect to up to 5 sensors each so put one of these in the attic for the second floor and one in the basment for main floor, basement and outdoors.

    There is one right now connected to a combo sensor and I have put temperature sensors on the SonOff basic switches (GDO in garage) and now have added Magic Home LED controllers to the mix with temperature sensors in them.

    Here to confirm I look at the debug console and see my temperature sensors using Espurna Firmware.

    [308867] [MQTT] Sending Espurna-1WIREB/data => {"temperature/0":69.6,"temperature/1":69.9,"temperature/2":66.9,"temperature/3":68.5,"time":"2019-06-22 08:45:13","mac":"84:F3:EB:93:8F:72","host":"Espurna-1WIREB","ip":"192.168.244.226","id":977435459} (PID 1261)
    [308887] [MQTT] Publish ACK for PID 1261
    [368878] [MQTT] Sending Espurna-1WIREB/data => {"temperature/0":69.6,"temperature/1":69.9,"temperature/2":67.1,"temperature/3":68.5,"time":"2019-06-22 08:46:13","mac":"84:F3:EB:93:8F:72","host":"Espurna-1WIREB","ip":"192.168.244.226","id":977435460} (PID 1262)
    [368899] [MQTT] Publish ACK for PID 1262
    [428890] [MQTT] Sending Espurna-1WIREB/data => {"temperature/0":69.6,"temperature/1":69.9,"temperature/2":67.1,"temperature/3":68.5,"time":"2019-06-22 08:47:13","mac":"84:F3:EB:93:8F:72","host":"Espurna-1WIREB","ip":"192.168.244.226","id":977435461} (PID 1263)
    [428909] [MQTT] Publish ACK for PID 1263
    [488901] [MQTT] Sending Espurna-1WIREB/data => {"temperature/0":69.6,"temperature/1":69.9,"temperature/2":67.2,"temperature/3":68.5,"time":"2019-06-22 08:48:13","mac":"84:F3:EB:93:8F:72","host":"Espurna-1WIREB","ip":"192.168.244.226","id":977435462} (PID 1264)
    [488924] [MQTT] Publish ACK for PID 1264
    [548912] [MQTT] Sending Espurna-1WIREB/data => {"temperature/0":69.6,"temperature/1":69.9,"temperature/2":67.2,"temperature/3":68.5,"time":"2019-06-22 08:49:13","mac":"84:F3:EB:93:8F:72","host":"Espurna-1WIREB","ip":"192.168.244.226","id":977435463} (PID 1265)
    [548933] [MQTT] Publish ACK for PID 1265

    On the Tasmota firmware go to the console and you will see the temperature sensor.

    07:08:38 MQT: /GarageDoor1/Door1 = CLOSED
    07:08:38 MQT: /GarageDoor1/SENSOR = {"Time":"2019-06-22T07:08:38", "Switch1":"Off", "Switch2":"On", "DS18x20":{"DS1":{"Type":"DS18S20", "Address":"10A04713000800D9", "Temperature":71.7}}, "TempUnit":"F"}
    07:13:38 MQT: /GarageDoor1/STATE = {"Time":"2019-06-22T07:13:38", "Uptime":9820, "Vcc":3.500, "Wifi":{"AP":2, "SSId":"ICS-0", "RSSI":84, "IPAddress":"192.168.244.220", "APMac":"E0:10:7F:A6:59:48"}}
    07:13:38 MQT: /GarageDoor1/Door1 = CLOSED

    And MQTT configuration stuff:

    sensor:
    - name: Espurna_1WIREB_temperature
    platform: mqtt
    state_topic: Espurna-1WIREB/temperature/0
    unit_of_measurement: °F


    sensor:
    - name: Espurna_1WIREB_temperature
    platform: mqtt
    state_topic: Espurna-1WIREB/temperature/1
    unit_of_measurement: °F


    sensor:
    - name: Espurna_1WIREB_temperature
    platform: mqtt
    state_topic: Espurna-1WIREB/temperature/2
    unit_of_measurement: °F

    Click image for larger version  Name:	mcsMQTT-2.jpg Views:	0 Size:	38.2 KB ID:	1311874

    sensor:
    - name: Espurna_1WIREB_temperature
    platform: mqtt
    state_topic: Espurna-1WIREB/temperature/3
    unit_of_measurement: °F

    So on the Homeseer 3 MQTT plugin association page / tab I look and tag the sensors then they become HS3 devices.




    Click image for larger version  Name:	mcsMQTT.jpg Views:	0 Size:	85.4 KB ID:	1311875


    To monitor and go to the individual web gui's here using Jon00's monitor utility and have it set to ARP to be able to link to the GUIs.a

    I was using custom micro travel routers for WAPs here for a bit (OpenWRT) and recently went over to a Ruckus AP with multiple SSIDs.

    xxx

    Leave a comment:


  • Steve Q
    replied
    I connected a DS18S20 to the 4Ch board as shown below. It’s impossible for me to know if this crude connection is actually making electrical contact. I am not seeing a temperature value (only 0.0). Can you comment on whether this approach should work, or do I need to provide a separate power source (or perhaps using the parasitic approach) for the sensor.

    I am seeing the temperature value of 0.0 from the 4Ch in mcsMQTT. So I think I can get it working with HS3 now.

    Click image for larger version  Name:	06E4180B-55EF-4DAD-A1BA-4977E26F4464.jpeg Views:	0 Size:	125.2 KB ID:	1311871
    Click image for larger version  Name:	BE702BCA-7134-4F00-B8DE-132377D15A96.jpeg Views:	0 Size:	108.7 KB ID:	1311872
    Last edited by Steve Q; June 22, 2019, 07:53 AM. Reason: Add photos

    Leave a comment:


  • Steve Q
    replied
    Originally posted by Michael McSharry View Post

    The first figure in your reference link shows the ESP Program Header. That is where TX/Serial Out/GPIO1 and RX/Serial In/GPIO3 are located. They are labeled on the circuit board.

    mcsXap does not communicate with Sonoff devices. mcsMQTT provides that interface when flashed with Tasmota or other MQTT-compliant firmware. There is not specific configuration for this or any sensor. It works like any relay, but you do not have abilty to control from HS. It only provides status.
    Thanks much, so the hole on the board labeled RX is GPIO3. I will try a temporary connection to a DS18B20.

    Sorry, my mistake. “How do I configure mcsXAP to capture the temperature value” should have been; How do I configure mcsMQTT to capture the temperature value?

    Leave a comment:


  • Michael McSharry
    replied
    Thanks, I have the Sonoff 4Ch Pro. The board looks like this https://github.com/arendst/Sonoff-Ta...Sonoff-4CH-Pro I cannot find pins labeled GPIO.

    I have no issue with soldering a wire to the Sonoff Basic. How do I configure mcsXAP to capture the temperature value.
    The first figure in your reference link shows the ESP Program Header. That is where TX/Serial Out/GPIO1 and RX/Serial In/GPIO3 are located. They are labeled on the circuit board.

    mcsXap does not communicate with Sonoff devices. mcsMQTT provides that interface when flashed with Tasmota or other MQTT-compliant firmware. There is not specific configuration for this or any sensor. It works like any relay, but you do not have abilty to control from HS. It only provides status.

    Leave a comment:


  • Steve Q
    replied
    Originally posted by jfla View Post
    Hello Steve



    My 1-Wire network run on Win10 with Xapmcs1wire and HSPI_MCSXAP

    driver for Win10 : https://www.maximintegrated.com/en/p...ad_drivers.cfm

    Jean-Francois
    I cannot get Xapmcs1wire.exe to get the sensor information. What version of Xapmcs1wire are you using? Are you using the DS9490?

    Thank you😀

    Leave a comment:


  • Steve Q
    replied
    Originally posted by Michael McSharry View Post
    On the 4CH there are three GPIO available for configuraiton in Tasmota. When you select the pin used for the DS18x20 then another MQTT topic related to SENSORS wiil be produced. I suggest GPIO 1 or 3 since there are available with through-hole connections on the Sonoff. GPIO 2 is associated with boot mode on ESP8265/6 so need to be careful how it is used.
    Thanks, I have the Sonoff 4Ch Pro. The board looks like this https://github.com/arendst/Sonoff-Ta...Sonoff-4CH-Pro I cannot find pins labeled GPIO.

    I have no issue with soldering a wire to the Sonoff Basic. How do I configure mcsXAP to capture the temperature value.



    Leave a comment:


  • Michael McSharry
    replied
    On the 4CH there are three GPIO available for configuraiton in Tasmota. When you select the pin used for the DS18x20 then another MQTT topic related to SENSORS wiil be produced. I suggest GPIO 1 or 3 since there are available with through-hole connections on the Sonoff. GPIO 2 is associated with boot mode on ESP8265/6 so need to be careful how it is used.

    Leave a comment:


  • Steve Q
    replied
    Click image for larger version

Name:	4C9AC511-0CA6-4123-AD80-48A76A7FDA90.jpeg
Views:	52
Size:	96.9 KB
ID:	1311703
    Originally posted by Michael McSharry View Post

    If you want help, then a little more info is needed about how far you got with mcsMQTT.
    Thanks, All I have done so far is connect a Sonoff Basic that is flashed and setup to work with The DS18s20. I have not yet soldered the sensor to the Sonoff.

    I have added this sonoff Basic to mcsMQTT/HS3 and I am able to control the ON/OFF function, I have not figured how to get the temperature value from the it.

    Click image for larger version

Name:	750C8E64-8DFA-4532-AF4E-2F0E5BFB1379.jpeg
Views:	62
Size:	115.3 KB
ID:	1311702

    Leave a comment:


  • Eman
    replied
    Originally posted by Steve Q View Post

    Thanks for posting these links. I have looked at the info for these and similar other devices. For me, the learning curve is too steep. Getting the info into HS3 has never been easy for me. I’m not willing to spend a lot of effort learning the custom software typically used by these systems.
    You just load EVOK on the SD and the unit is up and running. I use mine with the Jeedom plugin.

    Eman.

    Leave a comment:


  • Steve Q
    replied
    Originally posted by Eman View Post
    Steve Q If don't mind a few bucks and avoid stress and that you have already have MQTT then go here : https://www.unipi.technology/products/1-wire-network-46 and how to here : https://www.unipi.technology/news/no...ontrollers-234


    Eman.
    Thanks for posting these links. I have looked at the info for these and similar other devices. For me, the learning curve is too steep. Getting the info into HS3 has never been easy for me. I’m not willing to spend a lot of effort learning the custom software typically used by these systems.

    Leave a comment:


  • Steve Q
    replied
    Originally posted by jfla View Post
    Hello Steve



    My 1-Wire network run on Win10 with Xapmcs1wire and HSPI_MCSXAP

    driver for Win10 : https://www.maximintegrated.com/en/p...ad_drivers.cfm

    Jean-Francois
    Thanks for posting. These windows 10 drivers are new! I have not seen them before. I’m going to try them on my Win 10 64bit Dell micro.

    Leave a comment:


  • Michael McSharry
    replied
    I am working on connecting a DS18s20 to a Sonoff Basic. I am getting MQTT sensor messages (temperature) from the Sonoff via MQTT Tool, but I have not been able to get them into HS3 via mcsMQTT.
    If you want help, then a little more info is needed about how far you got with mcsMQTT.

    Leave a comment:


  • Michael McSharry
    replied
    The library that does DS18B20 obviously fits. There is no other library of which I am aware for Adruino/ESP8266 that covers the other types of devices. This effort would essentially be creating the library. For xapmcs1wire I was using the JAVA library with a J.NET connector. The JAVA library may be open source, but I have not looked. Even if it is available it is still much effort to try to port it.

    Leave a comment:


  • Pete
    replied
    Michael McSharry

    Just curious if the 1-wire library would fit on 1Mb of space on a Sonoff (include the rest of the SonOff stuff) or would it be some sort of add on for more space?

    Leave a comment:

Working...
X