ha-asusrouter icon indicating copy to clipboard operation
ha-asusrouter copied to clipboard

LED RGB Aurora

Open addelovein opened this issue 2 years ago • 9 comments

50CDDD4E-9498-4A2B-9D2C-6091D1C377E0 C58B58A4-C888-4202-AFA2-38CF7AF03C9C Would love to be able to Add some of the RBG features. As is now it always resets to Blue Breathing. But would love to change colors and presets. Then we can use the led for something useful. For example subtle warnings/info. How much the car has charged etc.

But amazing work on this, I’m going to start digging in to the code of this integration. 👏

We got to get this as the main ASUS router in HA. The other one really didn’t work at all.

Great job here Love it!

Uploading 8AD56BCF-9D37-4C27-A37D-7AF78DB83DC4.png…

addelovein avatar May 28 '22 22:05 addelovein

Hello, @addelovein,

Thanks for your feedback! 👍🏻

I was thinking about Aura support, but my device does not have it, so I cannot do any testing directly. In principle, we just need to find out, which commands should be sent for setting and getting the states.

Can Aura be controlled via web panel as well or only through the mobile app?

Vaskivskyi avatar May 29 '22 05:05 Vaskivskyi

Via web aswell.
i Will check what commands it sends. Right now I can’t help much more due to no access to computer. But I can do some Charles proxy on my phone. I’ll get back to you.

addelovein avatar May 29 '22 07:05 addelovein

In principle, it doesn't really matter. The phone is also fine if you are comfortable with package capturing.

In principle, we need the method to determine that the device has the Aura (probably some key in NVRAM). E.g. for LED support, it is a request nvram_get(led_val) to the appGet.cgi endpoint (it would be either boolean status or nothing if the feature is not supported). I would expect something similar for the Aura.

And, of course, what is the control method. Again, for LED it looks like this: "led_val" : 0, "rc_service": "start_ctrl_led" to the applyapp.cgi endpoint, so just a service that except boolean state. For RGB there would be more values

Vaskivskyi avatar May 29 '22 07:05 Vaskivskyi

Sorry for for my presentation. Doing it on phone.

Ledg_scheme 2 static. RGB 3 breathing RGB 6 wave 7 marquee RGB 1 gradient RGB 4 evolution 5 rainbow

set_ledg.cgi?ledg_scheme=X&ledg_rgb=X,X,X, X,X,X, X,X,X,X,x,X

Full example Static all red

set_ledg.cgi?ledg_scheme=2&ledg_rgb= 128,0,0,128,0,0,128,0,0

addelovein avatar May 29 '22 10:05 addelovein

Seem to be not too complicated. But some more things would be needed:

  • Does this hook return any value? To know whether the command was successful.
  • Also, we would need some method to get the status of the RGB. Otherwise, we won't be able to set the state in HA until we send the first command. I'm quite sure, the mobile app should ask it from the device when you open the RGB control tab in it.
  • Maybe it also asks somewhere, how many LEDs are there for RGB? This could be different between devices.

By the way, does the current LED switch from HA influence RGB?

In any case, we are already closer to the RGB support for the integration

P.S. What is your device model?

Vaskivskyi avatar May 29 '22 11:05 Vaskivskyi

You have a messeger app any one for easier communication

addebc avatar May 29 '22 11:05 addebc

http://192.168.50.1/set_ledg.cgi?ledg_scheme=2&ledg_rgb=128,0,0,128,0,0,128,0,0,128,0,0 That makes all leds red

http://192.168.50.1/set_ledg.cgi?ledg_scheme=2&ledg_rgb=128,0,0,128,0,0,128,0,0,0,0,128 And that all red except the outer leds are blue

So basically it contains of 4 LEDS which are set in the values up to 128

page returns {"statusCode":"200"}

http://192.168.50.1/appGet.cgi?hook=nvram_get(ledg_rgb2) will return the values if in this case it is set to static. however if it was another scheme it will return no datA

addebc avatar May 29 '22 11:05 addebc

RT-AX82U

addebc avatar May 29 '22 11:05 addebc

You have a messeger app any one for easier communication

Telegram: https://t.me/Vaskivskyi

Vaskivskyi avatar May 29 '22 11:05 Vaskivskyi

I guess this is stalled? Hitting the URL works for me, pretty cool! Anything I can do to help?

I'd love to link an automation to this when my DSL goes down (😠) .

jlongman avatar Mar 24 '23 17:03 jlongman

Hello, @jlongman,

Yes, unfortunately, the development of this feature is stalled. I would like to get back to it (because it looks cool to use RGB for notifications - that's what the other integration of mine is doing), but unfortunately, without direct access to a compatible device, it's rather complicated.

If you would like to help with the development - I'd gladly prepare some tests you can try. But this would require some time. First I need to fix all the bugs reported with the AsusRouter lately (while I was absent) and try to recall what exactly is the state of the Aura development

Vaskivskyi avatar Apr 01 '23 16:04 Vaskivskyi

I've started looking at it, so please, send them my way. I've got ha-asusrouter and asusrouter cloned.

jlongman avatar Apr 28 '23 16:04 jlongman

Refer to #738 for the updates on the Aura support. The feature is in work

Vaskivskyi avatar Dec 21 '23 07:12 Vaskivskyi