Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor DS18x20 is selectable, even not in compiled firmware #6647

Closed
10 of 12 tasks
Jason2866 opened this issue Oct 15, 2019 · 5 comments
Closed
10 of 12 tasks

Sensor DS18x20 is selectable, even not in compiled firmware #6647

Jason2866 opened this issue Oct 15, 2019 · 5 comments
Labels
question Type - Asking for Information

Comments

@Jason2866
Copy link
Collaborator

BUG DESCRIPTION

Choice is seen in GPIO config page even when all DS18xx drivers are not compiled in firmware.

image

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in the wiki
  • Searched the problem in the forum
  • Searched the problem in the chat
  • Device used (e.g., Sonoff Basic): NodeMCU
  • Tasmota binary firmware version number used: dev 6.6.0.18 latest
    • Pre-compiled
    • Self-compiled
      • IDE / Compiler used: VSC
  • Flashing tools used: Esptool.py
  • Provide the output of command: Backlog Template; Module; GPIO:
11:14:14 CMD: Backlog Template; Module; GPIO
11:14:14 MQT: stat/sonoff-6111ED/RESULT = {"NAME":"Generic","GPIO":[255,255,255,255,255,255,255,255,255,255,255,255,255],"FLAG":15,"BASE":18}
11:14:15 MQT: stat/sonoff-6111ED/RESULT = {"Module":{"18":"Generic"}}
11:14:15 MQT: stat/sonoff-6111ED/RESULT = {"GPIO0":{"0":"None"},"GPIO1":{"0":"None"},"GPIO2":{"0":"None"},"GPIO3":{"0":"None"},"GPIO4":{"0":"None"},"GPIO5":{"0":"None"},"GPIO12":{"0":"None"},"GPIO13":{"166":"Zigbee Rx"},"GPIO14":{"0":"None"},"GPIO15":{"165":"Zigbee Tx"},"GPIO16":{"0":"None"}}

11:15:07 CMD: status 0
11:15:07 MQT: stat/sonoff-6111ED/STATUS = {"Status":{"Module":18,"FriendlyName":["Zigbee"],"Topic":"sonoff-6111ED","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
11:15:07 MQT: stat/sonoff-6111ED/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://192.168.2.20/data/firmwares/sonoff-minimal.bin","RestartReason":"Software/System restart","Uptime":"0T00:08:27","StartupUTC":"2019-10-15T09:06:40","Sleep":50,"CfgHolder":4617,"BootCount":18,"SaveCount":36,"SaveAddress":"FA000"}}
11:15:07 MQT: stat/sonoff-6111ED/STATUS2 = {"StatusFWR":{"Version":"6.6.0.18(sonoff)","BuildDateTime":"2019-10-15T11:05:19","Boot":31,"Core":"STAGE","SDK":"2.2.2-dev(38a443e)"}}
11:15:07 MQT: stat/sonoff-6111ED/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Jason_Home_WLAN",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C8000100060000005A64000000000000","00000000"]}}
11:15:07 MQT: stat/sonoff-6111ED/STATUS4 = {"StatusMEM":{"ProgramSize":418,"Free":584,"Heap":26,"ProgramFlashSize":1024,"FlashSize":4096,"FlashChipId":"16400E","FlashMode":3,"Features":["00000809","08800180","044003A1","00000012","000000C0","00000000"],"Drivers":"1,2,8,10,23","Sensors":"5"}}
11:15:07 MQT: stat/sonoff-6111ED/STATUS5 = {"StatusNET":{"Hostname":"sonoff-6111ED-4589","IPAddress":"192.168.2.163","Gateway":"192.168.2.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.2.1","Mac":"DC:4F:22:61:11:ED","Webserver":2,"WifiConfig":5}}
11:15:07 MQT: stat/sonoff-6111ED/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.2.114","MqttPort":1883,"MqttClientMask":"sonoff-%06X","MqttClient":"sonoff-6111ED","MqttUser":"openhabian","MqttCount":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":30}}
11:15:07 MQT: stat/sonoff-6111ED/STATUS7 = {"StatusTIM":{"UTC":"Tue Oct 15 09:15:07 2019","Local":"Tue Oct 15 11:15:07 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":99}}
11:15:07 MQT: stat/sonoff-6111ED/STATUS10 = {"StatusSNS":{"Time":"2019-10-15T11:15:07"}}
11:15:07 MQT: stat/sonoff-6111ED/STATUS11 = {"StatusSTS":{"Time":"2019-10-15T11:15:07","Uptime":"0T00:08:27","UptimeSec":507,"Vcc":3.078,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Wifi":{"AP":1,"SSId":"Jason_Home_WLAN","BSSId":"00:A0:57:2A:BD:19","Channel":13,"RSSI":92,"LinkCount":1,"Downtime":"0T00:00:05"}}}

TO REPRODUCE

Compile firmware without DS18xx driver

EXPECTED BEHAVIOUR

Choice should not appear
image

@Jason2866
Copy link
Collaborator Author

Uncomment in sonoff_template.h did solve

#if defined(USE_DS18B20) || defined(USE_DS18x20)
//  GPIO_DSB,            // Single wire DS18B20 or DS18S20
#endif

So it seems the if does not work

@arendst
Copy link
Owner

arendst commented Oct 15, 2019

This is as designed.

When you do not select define USE_DS18x20 it will always install the single DS18B20 driver as configured in sonoff_post.h

@ascillato2 ascillato2 added the question Type - Asking for Information label Oct 15, 2019
@Jason2866
Copy link
Collaborator Author

I feel free to ask, why?

@arendst
Copy link
Owner

arendst commented Oct 15, 2019

legacy, Legacy, LEGACY!

The DS18B20 and DHT sensors were added when the Sonoff TH was introduced. This device had default support for these sensors from itead.

I agree, we are now two years ahead and might conclude to abandon the single device driver in favour of the one and only multi device DS18X20 driver.

arendst added a commit that referenced this issue Oct 16, 2019
Remove default DS18B20 driver and only support define DS18x20 (#6647)
@Jason2866
Copy link
Collaborator Author

thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Type - Asking for Information
Projects
None yet
Development

No branches or pull requests

3 participants