www.homeseer.com    
 

Go Back   HomeSeer Message Board > 3rd Party Plug-Ins/Scripts > Plug-ins by Author > Click Here for List of Author Forums > MCS Plug-Ins and Scripts > mcsMQTT (3P)

mcsMQTT (3P) Discussion of mcsMQTT plug-in

Reply
 
Thread Tools Display Modes
  #1  
Old June 19th, 2018, 06:17 AM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
SonOff basic WiFi seeing Sensors with mcsMQTT

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


Name:  sensor.jpg
Views: 94
Size:  18.6 KB


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.
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; June 19th, 2018 at 10:31 AM.
Reply With Quote
  #2  
Old June 19th, 2018, 12:08 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,774
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
Reply With Quote
  #3  
Old June 19th, 2018, 01:13 PM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
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.

Name:  sonoffbasic.jpg
Views: 76
Size:  18.2 KB

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
Name:  tempsensor.jpg
Views: 74
Size:  17.7 KB
4 - has a PIR sensor.
Name:  pir.jpg
Views: 75
Size:  20.5 KB

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.

Name:  testgpio.jpg
Views: 71
Size:  15.6 KB

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
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; June 19th, 2018 at 06:11 PM.
Reply With Quote
  #4  
Old June 19th, 2018, 11:29 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,774
http://mcsSprinklers.com/mcsTasmota.zip contains a "A" bin image that reports SENSOR status. It shows up as 5.9.13a.
Reply With Quote
  #5  
Old June 20th, 2018, 01:01 AM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
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

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT
Reply With Quote
  #6  
Old June 20th, 2018, 05:34 PM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
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?
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; June 20th, 2018 at 05:52 PM.
Reply With Quote
  #7  
Old June 21st, 2018, 06:51 AM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
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

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT
Reply With Quote
  #8  
Old June 21st, 2018, 08:57 AM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
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.

Name:  Sonoff-6.jpg
Views: 55
Size:  64.0 KB

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

433Mhz RF receiver

Name:  Sonoff-4.jpg
Views: 54
Size:  63.3 KB
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; June 21st, 2018 at 10:41 AM.
Reply With Quote
  #9  
Old June 21st, 2018, 11:22 AM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
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.bin

And uploaded the firmware to my SonOff basic.

Restarted it.

It went to the flashing mode and did not connect to my AP.

Took a break here and added two more pins mentioned above. (3.3VDC and Ground).

Connected the Sonoff basic to the serial to USB device just connecting the 3.3VDC and Ground for power and one temperature sensor. (GPIO4, VDC and Ground with a 10K resistor between GPIO4 and VCC).

The device booted up and connected to the AP right away and now shows the correct temperature.

Program Version 5.14.0
Build Date & Time 2018-05-15T15:18:52
Restart Reason Power on
Friendly Name 1 Sonoff-1

Main page shows:
DS18S20 Temperature 73°F

Console shows
16:17:25 MQT: GarageDoor1/SENSOR = {"Time":"2018-06-21T16:17:25","DS18S20":{"Temperature":73},"TempUnit":"F"}

If I disconnect it from USB 3.3 VDC power and reconnect it to the 120VAC power then the device doesn't connect to the WAP.

Leaving it connected for now to the USB 3.3VDC on the computer and uploading bins posted above.

1 - OTA file mcsTasmotaMinimal.bin

I get an error:

Upload Failed
Upload buffer miscompare

2 - OTA sonoff-minimal.bin (version 5.14)

Upload Successful
Device will restart in a few seconds

3 - OTA sonoff.bin (version 5.14)

Restarted it.

Wierd cuz now my temperature is off again and keeps changing.

DS18B20 Temperature 51°F
DS18B20 Temperature 38°F

6:35:40 MQT: GarageDoor1/SENSOR = {"Time":"2018-06-21T16:35:40","DS18B20":{"Temperature":38},"TempUnit":"F"}

4 - OTA sonoff-minimal and sonoff-allsensors.bin

Now main page temperature is correct.

DS18S20 Temperature 71°F
16:41:19 MQT: GarageDoor1/SENSOR = {"Time":"2018-06-21T16:41:19","DS18S20":{"Temperature":71},"TempUnit":"F"}

Guessing right now that there are bugs with the current releases 5.14 posted here ==> Sonoff-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
16:56:34 UPP: WeMo Type 2, Response sent to 192.168.244.190:11872
16:56:35 HTP: WeMo setup
16:56:43 WIF: Checking connection...
16:56:43 WIF: Connected

6 - went back to original (this time minimal bin uploaded)

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

17:05:28 MQT: GarageDoor1/SENSOR = {"Time":"2018-06-21T17:05:28", "DS18B20":{"Temperature":37.74}, "TempUnit":"F"}

7 - next test will be to clear flash first with Arduino IDE program and start all over again..via JTAG.

mcsTasmota(1)$ esptool.py --port /dev/ttyUSB0 write_flash -fs 1MB -fm dout 0x0 mcsTasmotaA.bin
esptool.py v2.3.1
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Compressed 508144 bytes to 351557...
Wrote 508144 bytes (351557 compressed) at 0x00000000 in 31.0 seconds (effective 131.0 kbit/s)...
Hash of data verified.

Disconnected it from serial port and connected 120VAC rebooted it.

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

17:47:17 MQT: GarageDoor1/SENSOR = {"Time":"2018-06-21T17:47:17", "DS18B20":{"Temperature":37.40}, "TempUnit":"F"}

DS18B20 Temperature 37.29°F

So the only one that works for me showing the correct temperature is the sonoff-minimal and sonoff-allsensors.bin (5.14) which is the wrong bin for the SonOff basic.

The sonoff-minimal and sonoff-classic (5.14) and sonoff (5.14) do not show the correct temperature.
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; June 21st, 2018 at 12:58 PM.
Reply With Quote
  #10  
Old June 21st, 2018, 01:50 PM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
Opened up a bug report ticket relating to Tasmota V5.14

Sonoff-Tasmota sonoff.bin DS18B20 not showing accurate temperature

Hardware SonOff basic WiFi module testing connecting to:
1 - GPIO 4
2 - GPIO 14

~ 12" leads to DS18B20

DQ-VCC 10K Resistor

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

Console shows:
DS18B20 Temperature 38°F
6:35:40 MQT: GarageDoor1/SENSOR = {"Time":"2018-06-21T16:35:40","DS18B20":{"Temperature":38},"TempUnit":"F"}

Inside home testing and actual temperature is around 70 °F

If I upload sonoff-allsensors.bin to the Sonoff Basic Wifi temperature reads are correct.

DS18S20 Temperature 71°F
16:41:19 MQT: GarageDoor1/SENSOR = {"Time":"2018-06-21T16:41:19","DS18S20":{"Temperature":71},"TempUnit":"F"}
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT
Reply With Quote
  #11  
Old June 21st, 2018, 04:22 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,774
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.
Reply With Quote
  #12  
Old June 21st, 2018, 11:20 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,774
Camera

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
Reply With Quote
  #13  
Old June 22nd, 2018, 01:01 AM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
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.
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; June 22nd, 2018 at 01:18 AM.
Reply With Quote
  #14  
Old June 22nd, 2018, 12:05 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,774
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.
Reply With Quote
  #15  
Old June 22nd, 2018, 07:51 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,774
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.
Reply With Quote
  #16  
Old June 22nd, 2018, 10:34 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,774
Got going again with Atom/PlatformIO. Rebuild of incompatible packages was needed.

I was able to to read DS18b20 with the compile of 18x20 which just fit under the wire at 498K. When I select only GPIO14 as my sensor it works. When I select door sensors too then the temperature does not report. I just need to dig into my hack of the door sensors to see what needs to be altered.

While not yet ready to post update, the good news is that I am able to get the 1-wire working.
Reply With Quote
  #17  
Old June 23rd, 2018, 01:47 AM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,774
mcsTasmota.zip has been updated with a C version included. This is 5.9.13 with multiple temp sensors. It is right at 500K.

The JSON reported is three levels deep. mcsMQTT has provisions for only two so I will need to update the plugin. I will keep it at max eight levels, but with five for topic and three for JSON vs. the six/two now.

published topic with two sensors. One in ice and one at ambient.

Code:
sonoff/SENSOR={"Time":"2018-06-22T21:29:21", "Switch2":"On", "DS18x20":{"DS1":{"Type":"DS18B20", "Address":"28FF8A8B601703B6", "Temperature":32.9}, "DS2":{"Type":"DS18B20", "Address":"28FFD7086017039E", "Temperature":73.4}}, "TempUnit":"F"}
Reply With Quote
  #18  
Old June 23rd, 2018, 07:05 AM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
Great news Michael.

I was going to add a second DS18B20 sensor to play with.

I see above now that you are showing the MAC address of the sensors too.

One other thing I see now with the 5.9.13 B version is that I have to go to the GUI about three times before it comes up. Don't know why it appears to be a bit slow to respond.

Upgraded this morning to the C version.

Program Version 5.9.13c
Build Date & Time 2018-06-22T22:27:54
Core/SDK Version 2_4_1/2.2.1(cfd48f3)

Note that I am playing with only one DS18B20 temperature sensor. (not two at this time).

Left the DS18B20 plugged in to GPIO4 and using a 10K resistor between VCC and DQ. For a bit saw a 185 degrees temperature then it went away.

OK so I moved the DS18B20 sensor to GPIO14 and using a 10K resistor between VCC and DQ. I also disabled GPIO1, GPIO3 and GPIO4.

03:21:37 MQT: GarageDoor/SENSOR = {"Time":"2018-06-23T03:21:37", "DS18x20":{"DS1":{"Type":"DS18S20", "Address":"10A52F47000800CB", "Temperature":185.0}}, "TempUnit":"F"}

I removed the 10k resistor and do not see anything.

Reconnected it to GPIO4 with a 10k resistor and without 10k resistor and disabled GPIO1, GPIO3 and GPIO14.

No sensor seen.

Went back to using GPIO14 with a 10k resistor and disabled GPIO1, GPIO3 and GPIO4 and then enabled GPIO1 and GPIO3 (door open / closed).

03:21:37 MQT: GarageDoor/SENSOR = {"Time":"2018-06-23T03:21:37", "DS18x20":{"DS1":{"Type":"DS18S20", "Address":"10A52F47000800CB", "Temperature":185.0}}, "TempUnit":"F"}

It is a bit slower navigating. Noticed too above that my DS18B20 sensor is showing up as a DS18S20 sensor.

Like your testing if I connect the temperature sensor to GPIO4 I get no readings of the DS18B20.

I have read too that the GPIO4 port by default has a pull up SMD resistor already on the SonOff board which I am looking for. It is present on a different SonOFF board.

Name:  pullup.jpg
Views: 38
Size:  295.4 KB

The dash after the sensor might be cuz the firmware is for multiple 1-wire sensors?

DS18S20-1 Temperature 185.0°F

Name:  GDO.jpg
Views: 39
Size:  56.5 KB

So adding another DS18B20 temperature sensor.

Question: I have a few of the older AAG temperature sensors and have removed a few from the cases.

I soldered a VCC, DQ and Ground wire for testing on one and just noticed another tiny Maxim chip on the back side of the board.

I am currently using these for my new Node Red OWFS 1-wire set up (mixed HB, Midon and AAG sensor boards here)

This Maxim chip looks like a 6 pin IC with 3 pins connected to the PC board.

Here is a picture of it.

Do you know what the chip is Michael?

It is so small that I cannot tell.

Thinking it might be for voltage control?

The old AAG temperature or temperature combo sensors are working great using two wires only (parasitic mode).

Looks like a 1990's Maxim chip. Pin #2,4,5,6 doesn't appear connected to anything.

Looking to build a new case using a 3D printer for these old AAG sensor boards as well as all of the old Midon boards I have.

Name:  aag1.jpg
Views: 42
Size:  55.3 KB

OK so connected the AAG board with 1-wire sensor by itself to the SonOff and am getting correct temperature reads from it.
The tiny AAG board like the tiny Midon board is 1-wire labeled DS18B20 (not DS18S20)

06:24:35 MQT: GarageDoor/INFO1 = {"Module":"Sonoff Basic", "Version":"5.9.13c", "FallbackTopic":"GarageDoor", "GroupTopic":"sonoffs"}
06:29:43 MQT: GarageDoor/SENSOR = {"Time":"2018-06-23T06:29:43", "Switch1":"On", "Switch2":"On", "DS18x20":{"DS1":{"Type":"DS18S20", "Address":"10A04713000800D9", "Temperature":73.4}}, "TempUnit":"F"}

DS18S20-1 Temperature 71.7°F

If I watch it for a few minutes it shows two 1-wire sensors.

Console shows this for two sensors and they did come up as sensor 1 and 2 and had same MAC address:

06:54:44 MQT: GarageDoor/SENSOR = {"Time":"2018-06-23T06:54:44", "Switch1":"On", "Switch2":"On", "DS18x20":{"DS1":{"Type":"DS18S20", "Address":"10A04713000800D9", "Temperature":71.2}, "DS2":{"Type":"DS18S20", "Address":"10A04713000800D9", "Temperature":71.2}}, "TempUnit":"F"}

Curious what is different between the AAG temperature sensor and the Midon temperature sensor. I do see the addition 6 pin Maxim chip on the AAG board but cannot figure out whether it is actually connected to anything. I only see one mac address coming up.

Tinning the end of the AAG wires and changing the colors of the wires to RED (VCC), Black (ground) and Yellow (DQ) and adding this sensor to the Midon 1-wire sensor to see what happens.

OK now this is what I see with the AAG and the Midon 1-wire temperature boards.

07:54:11 MQT: GarageDoor/SENSOR = {"Time":"2018-06-23T07:54:11", "Switch1":"On", "Switch2":"On", "DS18x20":{"DS1":{"Type":"DS18S20", "Address":"10A04713000800D9", "Temperature":73.5}, "DS2":{"Type":"DS18S20", "Address":"10A52F47000800CB", "Temperature":185.0}}, "TempUnit":"F"}

Two MAC's show up but the Midon board is still showing 185. Note this board works fine with OWFS.

Main page shows:

DS18S20-1 Temperature 71.9°F
DS18S20-2 Temperature 185.0°F

08:03:20 MQT: GarageDoor/SENSOR = {"Time":"2018-06-23T08:03:20", "Switch1":"On", "Switch2":"On", "DS18x20":{"DS1":{"Type":"DS18S20", "Address":"10A04713000800D9", "Temperature":71.7}, "DS2":{"Type":"DS18S20", "Address":"10A52F47000800CB", "Temperature":71.7}}, "TempUnit":"F"}

DS18S20-1 Temperature 71.8°F
DS18S20-2 Temperature 71.7°F

Fixed it by moving the jumper for parasitic or 5VDC as documented. Board jumper is labeled P (parasitic) or L (VCC?)
Forgot about the jumper on the board. Now removing AAG sensor to leave just the Midon Sensor.

Works fine now.

08:11:29 MQT: GarageDoor/SENSOR = {"Time":"2018-06-23T08:11:29", "Switch1":"On", "Switch2":"On", "DS18x20":{"DS1":{"Type":"DS18S20", "Address":"10A52F47000800CB", "Temperature":75.2}}, "TempUnit":"F"}

DS18S20-1 Temperature 73.4°F

So that the issue that I had with the Midon sensor showing 185 was relating to forgetting to move the PL jumper which is 3 pins.

I left the Midon board with the jumper in place and guessing that it is the same function with the jumper in place using the VCC.
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; June 23rd, 2018 at 12:18 PM.
Reply With Quote
  #19  
Old June 23rd, 2018, 10:19 AM
Steve Q's Avatar
Steve Q Steve Q is offline
OverSeer
 
Join Date: Jun 2005
Location: Michigan
Posts: 3,665
Pete, this is the first time I’ve seen this thread.

I’m not quite sure what you goal is, but I am using the SonoffTH with McsMQTT plugin ver 3.3 and I have no issues getting temperature and humidity results in the proper format. The TH and the external sensor were really inexpensive. I did a bunch of research into using a DS1820 and I decided it was not worth the effort.

Steve Q
__________________
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
Reply With Quote
  #20  
Old June 23rd, 2018, 10:29 AM
Pete's Avatar
Pete Pete is online now
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,427
@Steve,

Yeah here have been using 1-Wire stuff since the 1990's and have a collection of:

1 - original AAG temperature and temperature humidity sensors - the humidity sensors here are very small and compact and continue to work today.

2 - original Midon 1-wire sensor boards with DS18B20's on them plus traces for more 1-wire devices.

3 - original Hobby Boards temperature sensors, combo temperature-humidity sensors and combo temperature, humidity and light sensor boards.

4 - some place have a bunch of DS18B20 sensors loosey goosey in a tiny bag.

5 - cabled 1-wire probes like the ones you mention that SonOff sells that I purchased a few years back.

I have no need to purchase any more sensors here. (IE: the second floor - every room (bedrooms and bathrooms and hallway and attic) is wired today with a combo 1-wire temperature and humidity sensor going to the ZNet RPi using Node Red OWFS / Mosquitto these days).

For outside using regular wired to 9097 / Node Red / OWFS stuff - adding sensors to outdoor AC compressor next. (no SonOFFs).

For this SonOff basic Wifi module looking to install and configure.

1 - push button for GDO
2 - two door sensors (open and close)
3 - one 1-wire temperature sensor for Garage
4 - one tiny PIR sensor for Garage (note I already have a regular wired PIR in the garage but it really doesn't work well when it is hot in the garage).

That said also have other wired sensors in the garage and CCTV and RFID tags on the cars plus one combo temperature humidity sensor (wired).

Everything is ready in the garage except that I have to climb a ladder to install the SonOff module and I want to make sure that it is working before I install it over the GDO(s).

Next project, next SonOff basic will try the water meter counter and the add of the 1-wire sensor mounted right on the copper water pipe to see the temperature of the water as it comes in to the house.

In a quickie summary have or will have relating to 1-wire sensors....

1 - RPi in basement doing Node Red / OWFS / 1-Wire / Mosquitto doing main floor and outside
2 - RPi in attic doing Node Red / OWFS / 1-wire / Mosquitto doing 2nd floor and attic

#1 and #2 are replacing multiple 1-wire networks (xAP) which utilized 3 Temp08's and 1 Temp05 and 1 9097 that are (were) cat5e wired.

3 - SonOff's will all have at least one temperature sensor or one combo sensor (if it works).

Additionally here have Leviton OmniPro temperature sensors inside and outside of the house (and combo sensors) wired to the alarm panel.
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; June 23rd, 2018 at 12:40 PM.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Revisiting SonOff Basic firmware updates Pete mcsMQTT (3P) 2 June 18th, 2018 08:01 AM
Sonoff Basic Wifi Garage MQTT configuration Pete mcsMQTT (3P) 38 June 17th, 2018 12:12 AM
SonOff basic WiFI flashing via esp tools Pete mcsMQTT (3P) 2 June 2nd, 2018 02:59 PM
SonOff Basic WiFi Switch Pictorial Pete mcsMQTT (3P) 9 May 29th, 2018 04:15 PM
very basic but less expensive ethernet/wifi 16 zone controllers NeverDie Irrigation Discussion 9 May 13th, 2014 04:12 PM


All times are GMT -4. The time now is 03:26 PM.


Copyright HomeSeer Technologies, LLC