Page 1 of 1
SONOFF S20_EU_V1.3: HowTo DS18B20 and more???
Posted: 16 Mar 2018, 22:22
by M*I*B
Hello there again...
some days before I get five of the Wallplugs. Flashing the Firmware goes without problems (mega-20180316 1Mb).
I also have disable the RS232 to use the both Pins GPIO1 and GPIO3 i.e. for a DS18B20... Have I doing some wrong to this point? I hope not...
Now I have connect a DS18B20 to GPIO1 (TX) and enter that to "Device > Enviroment -DS18B20", named is "DS-Sensor", enabled it and say to use GPIO-1 (former TX) as Port... But that doesn't work...
If I take a look the deviceadress is empty and the result is 0.00 °C; nothing goes on there... I also have try GPIO-3 (maybe wrong solder) but same=none result...
So where is my mistake there? May anybody like to help me on?
EDIT say:
What I also don't understand is the reaction of the button itselve... The Port (GPIO-1) is pulled up to Ub (Pullup ON) and will be going down while I press the Button... But that isn't what the Firmware see! If I configure "Pullup ON" and "Pushbutton active LOW" similar to the Hardware the Status toggle after every push! That's wrong in my eyes!
Re: SONOFF S20_EU_V1.3: HowTo DS18B20 and more???
Posted: 16 Mar 2018, 22:45
by grovkillen
Re: SONOFF S20_EU_V1.3: HowTo DS18B20 and more???
Posted: 16 Mar 2018, 23:06
by M*I*B

No
Just a moment... I just solder one... (time goes by ...)
... Yepp! Works now if I enter "%value% in the formular field ... Thanx a lot... Sometimes things are much to simple to find them
EDIT:
Works for a little while and now shows "nan" and if I take a look the adress are gone and don't comes up again.
Then the thing with the button will be left for solution... Any idea about that?
Re: SONOFF S20_EU_V1.3: HowTo DS18B20 and more???
Posted: 16 Mar 2018, 23:16
by grovkillen
See this for better understanding :
https://www.letscontrolit.com/wiki/inde ... noff_Touch
Push button active high will make the relay pull when button is released, push button active low will pull the relay (instantaneously) when button is touched.
Re: SONOFF S20_EU_V1.3: HowTo DS18B20 and more???
Posted: 16 Mar 2018, 23:29
by M*I*B
... that's what I have say ... But it doesn't work this way. Take a look at the attachement... This config (and also with Active HIGH) create a toogle signal at the button and not a momentary one.
If the Status = 0 and I press the button, the Status goes 1 and stay. If I push the button again, the status goes 0 and stay. That's wrong... Right is: Untouched Button have to be 1 (Pullup and open switch) and have to be 0 if I hold down the button (Switch closed to GND).
Re: SONOFF S20_EU_V1.3: HowTo DS18B20 and more???
Posted: 16 Mar 2018, 23:35
by grovkillen
Yes that is what I would think as well. Must be a bug...? Are you able to test on another unit? Don't know how S20 is hardwired, could be that it fix the HIGH on GPIO 0 some other way.
Re: SONOFF S20_EU_V1.3: HowTo DS18B20 and more???
Posted: 16 Mar 2018, 23:47
by M*I*B
... I will try the other one tomorrow; it's near midnight right now ...
I will also do a messurement with the Scope on the button if the hardware signals are right. But if I'm remember right it's wired simple from Port via Button to GND; makes no sense to do it different ...
The other problem with the DS stay hard... If I take a look with the Scope the Signal on the Dataline stays high all the time. That tell me that the Firmware don't "call" the port for Datarequest. If I create a Reboot there will be also no "hello? Anybody there?". I believe the Call must be every XX seconds similar to the entry I have entered in the DS18B20 - settings at "delay"... But there is nothing...
Re: SONOFF S20_EU_V1.3: HowTo DS18B20 and more???
Posted: 17 Mar 2018, 14:28
by M*I*B
... ok, there is no way ... I believe the actual Firmware is buggy...
I have try now four S20 with the actual firmware (ESP_Easy_mega-20180316_normal_ESP8285_1024.bin) and all do it the same way:
Connecting the DS with Pullup at GPIO-1 (TX) or GPIO-3 (RX) after deactivating the RS232. Then enter the 1st time the "Devices / Environment - DS18b20" and the HEX- address comes up and also a temp like 24.55. Just after the 1st try the DS- Device goes to NAN and if I take a look inside the device the HEX address is gone.
I also have connect a Scope on the Dataline. The line is high the whole time that tells me that the ESPeasy- firmware don't poll the port. After a Reboot it looks like a short polling but just a single times... after that it's quite again
Re: SONOFF S20_EU_V1.3: HowTo DS18B20 and more???
Posted: 17 Mar 2018, 14:43
by TD-er
Hmm sounds like you did the impossible and may have found.... <looking around to see nobody is watching> a bug....</>
I've seen more issues with those 1wire sensors.
Not sure about the solution though. Maybe some reset of the bus is needed? Pull-up resistors on the wires?
If no ideas pop up here, please add an issue on the Github.
Re: SONOFF S20_EU_V1.3: HowTo DS18B20 and more???
Posted: 17 Mar 2018, 21:37
by M*I*B
... some new information:
I think the problem is not directly with the 1wire-query, but is related to the function "delay". If I change the value the polling stops and don't start again, also RESET don't start it again. If I change the value to i.e. 5sec, save it and disconnect the S20 from power, wait a minute and connect it again, the polling starts also. It stops again if I touch the delay- option. Same at all five S20 ...