gemu2015 / Sonoff-Tasmota

Tasmota Fork TCS34725,PN532_i2,ccc1101 Moritz support,m5stack 4,7 epaper, hotplug drivers
GNU General Public License v3.0
24 stars 19 forks source link

May I add TCS34725 to the main TASMOTA project #26

Open stefanbode opened 3 years ago

stefanbode commented 3 years ago

Have you looked for this feature in other issues and in the docs?
yes

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. How far are you with bugfixing this driver? If everything is ok I can help you to integrate this driver into the TASMOTA main project. OK?

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

(Please, remember to close the issue when the problem has been addressed)

gemu2015 commented 3 years ago

ok if you think this would be interesting i can make a pr for it. i just updated the driver and tested with my hardware, it works fine. i will provide a pr in the next few days.

i still have another interresting driver for the eQ3 max devices (window sensors and thermostats). however they recently were declared end of life. so it makes no sense to pr

gemu2015 commented 3 years ago

@stefanbode ok, made a branch ready for pr. But i am not happy with the adafruit library because it works with delay() for integration time. it has to be redesigned to circumvent this. i am currently busy with other things. feel free to rewrite the code without delays and pr

stefanbode commented 3 years ago

Ok, I will take a look at it. It could be that for the light measurement the delay is mandatory because of the way it gets measured. I already see this on other devices that took on low light up to 1 second

gemu2015 commented 3 years ago

there is the option to use an extra IRQ pin but i would prefer to use only SDA,SCL

gemu2015 commented 3 years ago

i use this in a battery operated luxmeter with a small OLED display. In this use case i do not mind the delay. it works well. in Tasmota however for general use we must get rid of it

hmjvaline commented 1 year ago

Does tasmota support TCS34725 now? Or not?

gemu2015 commented 1 year ago

Tasmota does not support TCS34725. as already said i use this driver in a lux meter and it works well. however since it is synchronous it blocks the tasmota loop for quite some time while getting values. this is not allowed in Tasmota. You will have to rewrite the driver for asynchronous requests before it may be added to Tasmota.

dragospascale commented 5 months ago

You can use TCS34725 async library to write the driver: [https://github.com/ysard/TCS34725]