Closed xoseperez closed 6 years ago
Removing milestone: 1.8.4 (automated comment)
Support for BN-SZ01 released with 1.9.0 using the new LIGHT_PROVIDER_DIMMER
Original comment by Axel Roest (Bitbucket: axello, GitHub: axello):
You say "it should be the same with any other LED device.", but the LIGHT_PROVIDER_MY9192 uses a special chip, and the LIGHT_PROVIDER_RGB apparently does some more magic to appear in the list to add Domotics #idx. Like the POW module does. If have tried the LIGHT_PROVIDER_RGBW option now. If that works, I can probably split of a LIGHT_PROVIDER_DIMMER option. Could you give me a hint in which direction to pursue to add a domoticz #idx to a single bit PWM channel?
Removing milestone: 1.8.1 (automated comment)
There is no one-channel dimmer yet in ESPurna. I don't have that particular device but it should be the same with any other LED device.
Originally reported by: Axel Roest (Bitbucket: axello, GitHub: axello)
Hi, I forked the Espurna repo to add the ITEAD_BNSZ01 LED light. To do that I added extra lines in arduino.h, hardware.h and hardware.ino
However, when I compile it with
it generates errors that lightState(status); and lightState(); are not defined.
These are also used in the AI_LIGHT configuration, but this module uses the my9291 dimmer module. The ITEAD_BNSZ01 uses a BP2838G chip, but what I gather from the following blogpost and using espeasy, it should be dimmable using a simple pwm value on GPIO12. itead-bn-sz01
My problem: how to define GPIO12 as a dimmable output using espurna source code and constants. See my fork for my try-outs Apparently RELAY_PROVIDER_LIGHT is in some way hard-coded to a LIGHT_PROVIDER_MY9192 or LIGHT_PROVIDER_RGB, and there is no LIGHT_PROVIDER_DIMMER or similar which only dims one LED channel?
I have adapted it now to use
and redefined
This compiles. But, I cannot understand how to connect a domoticz idx to this value; I don't understand the logic in the code to add idx channels.
fork at: https://bitbucket.org/axello/espurna_axel branch: ITEAD_BNSZ01