diyhue / Lights

DIY lights with support for diyHue
https://diyhue.org/
172 stars 97 forks source link

ESP32 #101

Closed tomfrenzel closed 3 years ago

tomfrenzel commented 3 years ago

Can you make an ESP32 compatible script for generic Lights?

ryancasler commented 3 years ago

Generic Dimmable light or on/off light? The on/off light would be easy to adapt to the ESP32. The dimmable light is going to be a little harder. The ESP32 doesn't support analogWrite, you have to use ledc, which would mean the entire sketch would have to be re-written. It can be done but it would be much easier to just use an ESP8266 based board instead. They are plenty powerful enough for this application. The ESP32 is kinda overkill.

tomfrenzel commented 3 years ago

Alright i'll use the ESP8266 then. And just to make sure: I need to upload the Generic On/OFF Scetch and flash upload some kind of firmware? Because i couldn't find one for Generic lights in your repo.

ryancasler commented 3 years ago

Are you trying to use it for an ON/OFF light or a dimmable light? It depends on what you are trying to build.

tomfrenzel commented 3 years ago

Just as an ON/OFF Light

ryancasler commented 3 years ago

Then the On/Off sketch is what you want.

tomfrenzel commented 3 years ago

And what bin File do i have to flash?

tomfrenzel commented 3 years ago

@ryancasler Alright i uploaded the sketch and configured the esp8266 over its web interface. But my Hue Bridge (Gen. 2) can't find it. What did i do wrong?

ryancasler commented 3 years ago

You can't use these sketches with a genuine Hue Bridge. Only with DIYHue. Hue doesn't support wifi lights, only Zigbee ones that are part of the "Friends of Hue" program.

alexyao2015 commented 3 years ago

Esphome. Plan to depreciate the old sketches.