RavenSystem / esp-homekit-devices

Advanced firmware to add native Apple HomeKit and custom configurations, compatible with any SoC based on ESP32, ESP32-S, ESP32-C and ESP8266 series. (Shelly, Sonoff, Electrodragon, Tuya...)
Other
2.72k stars 357 forks source link

RGB/W brightness issue #355

Closed greensouth closed 5 years ago

greensouth commented 5 years ago

Hi Jose!

It's possible that since I applied Ravencore to a RGB Magic Home its bright is lower than the exposed with the original firm?

Maybe it's not, but I would swear that it's about 10% less bright.

I fiddled with the color boost option but it seems that it only lowered even more to me.

Maybe there are demons in my controller!

Also, a couple of times I lost connection and had to reflash it in order to link it to my wifi again. Tried to perform a reset (10 reboots in less than 3 seconds.... But it is impossible when you have to switch it on and off pulling the cable xD)

Thanks! And great exposition at Reddit

RavenSystem commented 5 years ago

Hi Jose!

It's possible that since I applied Ravencore to a RGB Magic Home its bright is lower than the exposed with the original firm?

Maybe it's not, but I would swear that it's about 10% less bright.

I fiddled with the color boost option but it seems that it only lowered even more to me.

Set color boost to 100% and select a different color. Color boost value is applied in the next color change. Tell me your results, please.

Maybe there are demons in my controller!

Demons are always welcome ;)

Also, a couple of times I lost connection and had to reflash it in order to link it to my wifi again. Tried to perform a reset (10 reboots in less than 3 seconds.... But it is impossible when you have to switch it on and off pulling the cable xD)

If you lose wifi connection, you don't need to reflash. Try to put your device is other place with better wifi coverage and repower it. Actually, you can not reset RGBW device switching it on and off. The only way is to push and hold the button (GPIO0). In next version, you will be able to reset any accessory switching it quickly from Home App too.

Thanks! And great exposition at Reddit

Cheers! :)

mafyata commented 5 years ago

Hi Jose!

It's possible that since I applied Ravencore to a RGB Magic Home its bright is lower than the exposed with the original firm?

Maybe it's not, but I would swear that it's about 10% less bright.

I fiddled with the color boost option but it seems that it only lowered even more to me.

Maybe there are demons in my controller!

Also, a couple of times I lost connection and had to reflash it in order to link it to my wifi again. Tried to perform a reset (10 reboots in less than 3 seconds.... But it is impossible when you have to switch it on and off pulling the cable xD)

Thanks! And great exposition at Reddit

Do you have original software of magic home rgb controller ? I forget to backup mine before flash it.

greensouth commented 5 years ago

Nope, same bright but color changing. I suppose it's happening because I have no white channel. But anyways still low bright.

When set boost at 100%, some colors just blinks and turns off.

Maybe voltage passed to the strip is not enough? I don't know if this is managed when programing a firmware for the controller.

:(

RavenSystem commented 5 years ago

Nope, same bright but color changing. I suppose it's happening because I have no white channel. But anyways still low bright.

When set boost at 100%, some colors just blinks and turns off.

Maybe voltage passed to the strip is not enough? I don't know if this is managed when programing a firmware for the controller.

:(

Don't worry about white channel.

Try this: With brightness at max and color boost 100%, set pure red color, and same with pure blue and pure green; and post here the results, please.

RavenSystem commented 5 years ago

@greensouth Any news about that? Did you try what I said?

greensouth commented 5 years ago

Wenas José! Actually I have nothing installed on my iPhone which let me set RGB values manually or pure colors, I move the color picker as close as I think it's the most pure values in both EVE and Home App. Still see them a bit dim. I think I was able to set color boost to about 30% to get the maximum fidelity of colors/brightness with my RGB controller.

I suppose that it's having some difficult matching the color wheel (which uses WHITE as a color to mix all the possible combinations) with only 3 channels.

I'm expecting to receive some RGBW Led stripes + Controller this week and I'm planning on flashing one with Ravencore and let the other with the default firmware and I will check both.

I'm curious about what is exactly the function of color boosting when getting / setting the color values.

Btw, were you able to take a look at what I told you about adding some custom delay for the timers when beginning the movement of the rolling shutters?

Also I read about the new accessory system that you are working on, and how easy its going to be for our projects (ESP chips) and i'm really excited. Can't wait order a few ones and try to make some IoT stuff with your firm as soon as it's available.

Thanks!

RavenSystem commented 5 years ago

@greensouth

If you want a good white color, RGBW led strip is your best choice. Mixing RGB to get white is... well... is a shit.

Color boost is a factor from 1 to 3 (0% to 100%) to mix RGB colors and try to match with your led strip in a better way.

Btw, were you able to take a look at what I told you about adding some custom delay for the timers when beginning the movement of the rolling shutters?

I remember something about this, but I am not able to find it now. Can you post the link of the issue?

greensouth commented 5 years ago

Hey @RavenSystem I've just received the rgbw strip and WORKS LIKE A CHARM! With Ravencore. I'm changing all my RGB stuff.

The roller shutter thing is a little miss-adjustment when setting the time that takes to open and close the rolling shutter.

It takes a couple of seconds, maybe three, to tight the hooks before it begins to move. That adds some extra time where it's not moving at all but enough to break the calculations for setting %. In my case, closing at 50% is far from the half of the window.

Adding extra time for opening/closing doesn't work. It would be needed to add a setting for adding a configurable delay for 0 and 100 positions, before starting to count the real time once the hooks are tight, which is when the rolling shutter begins to move.

Maybe it's a bit difficult to explain :/

RavenSystem commented 5 years ago

@greensouth Más cómodo en español:

Sé que te refieres a las persianas que tenemos todos en nuestras casas, al menos en España, que las puedes bajar pero dejando las ranuras esas abiertas para que entre algo de luz, o aire. Obviamente, el % de HomeKit se refiere realmente a la posición del motor, y no de la persiana en sí. Al 0%, la persiana está totalmente cerrada, sin ranuras abiertas ni nada, en modo búnker. Al 10%, la persiana seguro que seguirá cerrada, pero con las ranuras abiertas. Y al 50%, la persiana estará un poco abierta, pero no a la mitad. Aunque el motor sí que estará a su mitad de recorrido.

Poniendo tiempos más altos de lo que realmente tarda la persiana en subir y en bajar no sirve para nada. De hecho, es mejor poner el tiempo exacto, ya que luego esto sirve para que en los casos en los que pierda un poco de sincronización (estos motores no tienen unos tiempo de trabajo exactos), el accesorio pueda volver a sincronizarse automáticamente cuando subas o bajes la persiana del todo.

Ahora bien, tú sugieres poder indicar el tiempo que tarda la persiana de estar totalmente cerrada, a estar cerrada pero con las ranuras abiertas, y que empieza a contar el porcentaje una vez que ha alcanzado esa posición. Así si le dices que la abra al 50%, se abrirá al 50%, pero ¿qué pasa si quieres poner la persiana con las ranuras medio abiertas, o solo un poco por la parte de arriba? Yo a veces las quiero así. No te creas que no le he dado ya vueltas a este tema, y sigo en ello. Por ahora la mejor idea que he tenido es que del 0 al 5% corresponda a cuando la persiana está de totalmente cerrada a cerrada pero con todas las ranuras abiertas. Y ya del 5% al 100%, sería de la persiana cerrada (ranuras abiertas), a la persiana abierta. De esta manera, el 50% estaría muy cerca de la mitad real.

greensouth commented 5 years ago

Es que parece una chuminada, pero al final tiene la cosa más enrea de lo que parece. Todo tiende a liarse ;) además veo que estás a tope con el otro proyecto.

Te va a echar el coco lumbres!!

X cierto el tema Magic Home he estado dándole unas cuantas vueltas más, y cuando hace el Fade al cambiar de color, sube a tope la intensidad y luego cuando llega al color final, es cuando la baja.

Ahí es donde está la pequeña pérdida de brillo que te comentaba.

;)

RavenSystem commented 5 years ago

Por el otro proyecto no te preocupes. En realidad tengo un interés personal en el tema de las persianas. ¿Qué te parece lo de dejar un 5% para la parte de las ranuras?

Respecto a lo de los LEDs, es posible que pase lo que dices. Mejoraré el algoritmo, pero puedo asegurarte que el color final que te pone ya fijo es el color seleccionado.

greensouth commented 5 years ago

Acabo de probarlo y a mí se me empiezan a ver todas las rajitas a partir de casi el 10%, pero todo esto es muy elástico, supongo que dependerá del motor, de los flejes y tal.

Enviado desde mi iPhone

El 18 may 2019, a las 23:46, José Antonio Jiménez notifications@github.com escribió:

Por el otro proyecto no te preocupes. En realidad tengo un interés personal en el tema de las persianas. ¿Qué te parece lo de dejar un 5% para la parte de las ranuras?

Respecto a lo de los LEDs, es posible que pase lo que dices. Mejoraré el algoritmo, pero puedo asegurarte que el color final que te pone ya fijo es el color seleccionado.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

RavenSystem commented 5 years ago

Claro, por eso digo de configurar el primer 5% aparte con el tiempo que tarda el motor en poner la persiana a punto para empezar a abrirse (ya con todas las ranuras abiertas).

Ya que estás, haz una cosa: Pon la persiana en el % que sea para dejarla en el punto justo antes de empezar a abrirse, y dime en qué % es.

RavenSystem commented 5 years ago

Y prueba la version 0.8.11 que acabo de sacar con lo de los LEDs y me cuentas.

greensouth commented 5 years ago

En mi motor sobre el 10%

Enviado desde mi iPhone

El 18 may 2019, a las 23:56, José Antonio Jiménez notifications@github.com escribió:

Claro, por eso digo de configurar el primer 5% aparte con el tiempo que tarda el motor en poner la persiana a punto para empezar a abrirse (ya con todas las ranuras abiertas).

Ya que estás, haz una cosa: Pon la persiana en el % que sea para dejarla en el punto justo antes de empezar a abrirse, y dime en qué % es.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

RavenSystem commented 5 years ago

En mi motor sobre el 10%

Entonces si le dices que te ponga la persiana al 55% tendría que estar abierta a la mitad, ¿no?

greensouth commented 5 years ago

Tal cual está ahora mismo, para notar que está subida al 50% , tendría que ponerla al 70% sin exagerte

Enviado desde mi iPhone

El 19 may 2019, a las 0:31, José Antonio Jiménez notifications@github.com escribió:

En mi motor sobre el 10%

Entonces si le dices que te ponga la persiana al 55% tendría que estar abierta a la mitad, ¿no?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

RavenSystem commented 5 years ago

Tal cual está ahora mismo, para notar que está subida al 50% , tendría que ponerla al 70% sin exagerte

¿Y tienes los tiempos exactos puestos? (De un final de carrera a otro del motor)

greensouth commented 5 years ago

Si tío, es súper raro, pero tb lo monté en casa de un vecino con el mismo motor y tal, y le pasa igual, de 0 a 100 cuadran los tiempos con los finales de carrera, pero visualmente por lo que te comenté hasta que se tensan los flejes, se queda muy corto en los porcentajes intermedios.

RavenSystem commented 5 years ago

Ahhh, claro. Ya sé por qué pasa eso. Cuanta más persiana hay recogida, más radio tiene el eje, y más longitud de persiana recoge por vuelta.

greensouth commented 5 years ago

Le vas a tener.que meter un multiplicador o algo! Jajajajaja

Enviado desde mi iPhone

El 19 may 2019, a las 0:44, José Antonio Jiménez notifications@github.com escribió:

Ahhh, claro. Ya sé por qué pasa eso. Cuanta más persiana hay recogida, más radio tiene el eje, y más longitud de persiana recoge por vuelta.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

RavenSystem commented 5 years ago

Ya pensaré un algoritmo para solucionar esa chapuza de controlador de persianas, y digo chapuza por ser suave, porque es una m... bueno, esta es la parte divertida de la programación.

Y no te olvides de probar la 0.8.11 con los LEDs.

greensouth commented 5 years ago

Mañana lo pruebo con el que más problemas me da, porque cuando lo flashee no me dejó hacerlo con OTA (no sé si ese día estaría el servidor caido o algo) y tengo que volver a soldar e intentarlo a ver si esta vez me deja la actualización :/

Oye muchas gracias por el currazo que te estás pegando. Estoy deseando de que me llegue el NodeMCU a ver si tengo huevos de echar a andar y probar lo otro!

Enviado desde mi iPhone

El 19 may 2019, a las 0:49, José Antonio Jiménez notifications@github.com escribió:

Ya pensaré un algoritmo para solucionar esa chapuza de controlador de persianas, y digo chapuza por ser suave, porque es una m... bueno, esta es la parte divertida de la programación.

Y no te olvides de probar la 0.8.11 con los LEDs.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

RavenSystem commented 5 years ago

De nada hombre. Yo me alegro de que mis firmwares sirvan para algo medio útil, aunque como controlador de persianas sea chapuzero (aún). Y yo odio las chapuzas.

El 19 may 2019, a las 0:54, greensouth notifications@github.com escribió:

Mañana lo pruebo con el que más problemas me da, porque cuando lo flashee no me dejó hacerlo con OTA (no sé si ese día estaría el servidor caido o algo) y tengo que volver a soldar e intentarlo a ver si esta vez me deja la actualización :/

Oye muchas gracias por el currazo que te estás pegando. Estoy deseando de que me llegue el NodeMCU a ver si tengo huevos de echar a andar y probar lo otro!

Enviado desde mi iPhone

El 19 may 2019, a las 0:49, José Antonio Jiménez notifications@github.com escribió:

Ya pensaré un algoritmo para solucionar esa chapuza de controlador de persianas, y digo chapuza por ser suave, porque es una m... bueno, esta es la parte divertida de la programación.

Y no te olvides de probar la 0.8.11 con los LEDs.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

RavenSystem commented 5 years ago

@greensouth Actualiza alguna de tus persianas a la 0.8.12, ciérrala del todo, y luego entra en EVE y pon la opción "Boost" al 100% (Es una opción nueva), y prueba a ver qué tal van ahora las posiciones intermedias.

https://github.com/RavenSystem/esp-homekit-devices/wiki/RavenCore#boost-default-0

greensouth commented 5 years ago

Justamente lo estaba haciendo!!

Con el 71% de boost LO-CLA-VA

Ahora es PERFECTO!!! Muchas gracias tiaco!!!!!! Fíjate si estoy contento que en cuanto cobre (y pague las rift s) tiro a pillar el motor para el salón !!

Ayer estuve dándole a los LED y he llegado a la conclusión de que la transición entre colores satura mucho al controlador, y le mete lagazos, y más cuando usas la rueda de HomeKit, que es impreciso y te hace moverte muchas veces entre colores en un espacio muy corto de tiempo, creo que la transición animada debería ser opcional con un switch, qué opinas?

Enviado desde mi iPhone

El 19 may 2019, a las 17:37, José Antonio Jiménez notifications@github.com escribió:

@greensouth Actualiza alguna de tus persianas a la 0.8.12, ciérrala del todo, y luego entra en EVE y pon la opción "Boost" al 100% (Es una opción nueva), y prueba a ver qué tal van ahora las posiciones intermedias.

https://github.com/RavenSystem/esp-homekit-devices/wiki/RavenCore#boost-default-0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mafyata commented 5 years ago

Can someone tell me which command to use to download original magichome firmware before flash with ravencore ? I use windows pc.

RavenSystem commented 5 years ago

@mafyata esptool.py -p /dev/espport read_flash 0x0 firmware.bin

mafyata commented 5 years ago

Where will be downloaded ? Is only one file to download?

RavenSystem commented 5 years ago

Where will be downloaded ?

In the working directory.

Is only one file to download?

Yes, only a file with a full firmware backup. Then you only must write it at 0x0 address.

mafyata commented 5 years ago

I don’t know the directory, may be esptool directory. Thank you very much. :)

RavenSystem commented 5 years ago

I don’t know the directory, may be esptool directory. Thank you very much. :)

The working directory is where you run the command. Instead, you can run: esptool.py -p /dev/espport read_flash 0x0 C:\firmware.bin

mafyata commented 5 years ago

This command will do the job easier. Thanks again

RavenSystem commented 5 years ago

@mafyata With that command, you can do a backup of any firmware, not only of Magic Home.

mafyata commented 5 years ago

🥇

mafyata commented 5 years ago

Problem with reading flash: C:\WINDOWS\system32>esptool.py -p com4 read_flash 0x0 firmware.bin usage: esptool read_flash [-h] [--spi-connection SPI_CONNECTION] [--no-progress] address size filename esptool read_flash: error: argument size: invalid arg_auto_int value: 'firmware.bin'

mafyata commented 5 years ago

I find an issue: esptool.py -p com4 -b 115200 read_flash 0 0x200000 c:/firmware.bin

RavenSystem commented 5 years ago

@greensouth Prueba la versión 0.8.13 a ver si ya no te da tirones la transición de colores.

greensouth commented 5 years ago

Te cuento @RavenSystem ,

En el cambio de color es como si partiera no del color inicial, sino de un blanco o algo más intenso.

Si estoy en rojo y muevo al azul, hace algo así como ROJO - BLANCO - AZUL. Estoy intentando subirte un vídeo a ver si lo puedes ver, y gratis y por cortesía, las conversaciones de mis vecinos que se escuchan por el lavadero. 🤪

https://www.youtube.com/watch?v=KPsYG5qgAWY&feature=youtu.be

El 27 may 2019, a las 20:48, José Antonio Jiménez notifications@github.com escribió:

@greensouth https://github.com/greensouth Prueba la versión 0.8.13 a ver si ya no te da tirones la transición de colores.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RavenSystem/esp-homekit-devices/issues/355?email_source=notifications&email_token=AAYTELXKSS7J34WDVBIE4L3PXQUJTA5CNFSM4HI4CU7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWKLG4Y#issuecomment-496284531, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYTELT7N7442IUVRCROFDLPXQUJTANCNFSM4HI4CU7A.

RavenSystem commented 5 years ago

@greensouth Ahora lo veo claro, reproduciendo el vídeo al 25% de su velocidad. En problema es que funciona demasiado bien, es decir, la respuesta es tan inmediata al cambio de color, que junto con la porquería de rueda de selección de color de la aplicación Casa, da como resultado una verdadera m... Fíjate que en cuanto tu pones el dedo sobre la rueda ya está aplicando el color seleccionado, que es más blanco que el que tú realmente quieres, y cuando tú pones el dedo, te aparece la lupa de ajuste fino, y tú desplazas el dedo hacia el exterior de la rueda, pero antes de empezar a desplazarlo, ya te ha cambiado el color al seleccionado nada más posar el dedo. No sé si me explico. El caso es que ya sé cómo solucionarlo.

greensouth commented 5 years ago

@greensouth Ahora lo veo claro, reproduciendo el vídeo al 25% de su velocidad. En problema es que funciona demasiado bien, es decir, la respuesta es tan inmediata al cambio de color, que junto con la porquería de rueda de selección de color de la aplicación Casa, da como resultado una verdadera m... Fíjate que en cuanto tu pones el dedo sobre la rueda ya está aplicando el color seleccionado, que es más blanco que el que tú realmente quieres, y cuando tú pones el dedo, te aparece la lupa de ajuste fino, y tú desplazas el dedo hacia el exterior de la rueda, pero antes de empezar a desplazarlo, ya te ha cambiado el color al seleccionado nada más posar el dedo. No sé si me explico. El caso es que ya sé cómo solucionarlo.

si es que al final una imagen... ;) Justo ahora estoy flasheando otro magic home que me ha llegado

RavenSystem commented 5 years ago

Pues vas a tener que actualizarlo en breve, porque en unos minutos saco nueva versión.

RavenSystem commented 5 years ago

@greensouth Prueba la 0.8.14 a ver qué tal.

greensouth commented 5 years ago

@greensouth Prueba la 0.8.14 a ver qué tal.

en ello está, me ha pillado la actualización en mitad del flasheo y no lo veía Homekit, tenía que haber echado la Bonoloto!

Menudo retardo de un segundo le has metido eh?? jajajjaja para mi que te has colao! yo creo que con 300 / 600ms va que arde, pero sí, muchísimo más estable!

Es curioso, ya me pasó la otra vez con otro Magic Home, a veces cuando se esta descargando el main vía OTA, creo que lo pilla caído o algo de eso, que no termina de bajarse y no se expone como accesorio en homekit. Tienes alguna forma de saber si el fichero esta en mantenimiento, si esta caído o algo? URL de donde se baja o algo de eso.

RavenSystem commented 5 years ago

@greensouth Cuando dices "muchísimo más estable" quieres decir que aún no es totalmente estable? O ya sí lo es?

Y sí, puede que me haya columpiado con el segundo de retardo, pero eso tiene fácil arreglo.

greensouth commented 5 years ago

@greensouth Cuando dices "muchísimo más estable" quieres decir que aún no es totalmente estable? O ya sí lo es?

Y sí, puede que me haya columpiado con el segundo de retardo, pero eso tiene fácil arreglo.

eso es que va fino filipino, ya no parece que estés empastillao en una discoteca! ;)

RavenSystem commented 5 years ago

eso es que va fino filipino, ya no parece que estés empastillao en una discoteca! ;)

@greensouth Mmm, y si le pongo una opción adicional que sea modo disco y se ponga a poner colores aleatorios? De hecho se podrían precargar varios modos: color fijo, brisa mañanera, lumbre de hogar, bar de luces de colores...

greensouth commented 5 years ago

eso es que va fino filipino, ya no parece que estés empastillao en una discoteca! ;)

@greensouth Mmm, y si le pongo una opción adicional que sea modo disco y se ponga a poner colores aleatorios? De hecho se podrían precargar varios modos: color fijo, brisa mañanera, lumbre de hogar, bar de luces de colores...

... lupanar, casa de pelos... hay tantas posibilidades! jajajajj de hecho la app del magic home tiene alguna movida de esas.

RavenSystem commented 5 years ago

@greensouth pues puede que cuando tenga tiempo y ganas lo haga. Por cierto, nueva versión 0.8.15 con el retardo a 300ms, a ver qué tal.

greensouth commented 5 years ago

@greensouth pues puede que cuando tenga tiempo y ganas lo haga. Por cierto, nueva versión 0.8.15 con el retardo a 300ms, a ver qué tal.

actualizando!