xoseperez / espurna

Home automation firmware for ESP8266-based devices
http://tinkerman.cat
GNU General Public License v3.0
3k stars 638 forks source link

Ability to have multiple but same type sensors #354

Closed xoseperez closed 6 years ago

xoseperez commented 6 years ago

Originally reported by: blue (Bitbucket: bluexp, GitHub: bluexp)


Trying latest version today I found out that I can have only one of ds1820 or dht sensors working at a time. I suggest implementing the ability to monitor both of those sensor simultaneously. And I also suggest adding a feature to the software to define more than one sensor of the same type, i.e defining 2 ds1829 and 3 dht ,etc

xoseperez commented 6 years ago

Original comment by blue (Bitbucket: bluexp, GitHub: bluexp):


The issue is solved

xoseperez commented 6 years ago

Original comment by blue (Bitbucket: bluexp, GitHub: bluexp):


Thanks.

xoseperez commented 6 years ago

Version 1.11 uses a common API with different sensors as classes. You can instantiate multiple sensors of the same type in the _initSensors method.

BTW, dallas sensors use one wire protocol. You can connect multiple sensors to the same GPIO and it will detect and use all of them...

MiG-41 commented 3 years ago

. You can connect multiple sensors to the same GPIO and it will detect and use all of them...

I have a lot of chinesse DS18B20 under the floor , but the problem is ,that they have to be max 5Pcs on one bus/GPIO . More of them couses no detection , and stronger pullup helps only partially ( you can add 1Pcs more ). So Looking for opportunity ,where it is possible to use more then one GPIO in ESP8266... It will work ?