Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
14.49k stars 3.1k forks source link

Feature request: Toggle UDP streaming #122

Closed valki2 closed 5 years ago

valki2 commented 5 years ago

Hi! First off - great software! Works like a charm out-of-the-box and I love the code style!

I am running a massive LED strip as main ceiling light with the possibility to link it to an existing ambilight/hyperion installation. Works fine so far - but I would love to externally control the setting "receive udp realtime" setting as the light should do normal illumination when the tv is off :)

I noticed the bool "realtimeActive" but there seems no API command to switch this one. Did I miss a setting?

If not then I am planning to add it quick and dirty... is this ok and are there any special commit rules?

Aircoookie commented 5 years ago

Hi! Great that you like WLED!

There is an option in sync settings to "Receive realtime", which does what you want! There is no API call for that one yet, so I'm going to add one, since it makes sense to toggle that more often :) "realtimeActive" is a state bool which is true if data is received and normal effects are blocked until the timeout. The bool for deactivating realtime is "receiveDirect".

Yes, you can either just open a PR or wait for me to add it (takes two minutes). By the way, are you running latest master or the 0.8.3 release?

valki2 commented 5 years ago

Ahoi! Running the latest master (except your changes yesterday with the color wheel fix)...

If it's 2mins, then I will happily wait as it's Saturday what makes beer first :-)

Cheers, valki

Am 9. März 2019 10:36:39 MEZ schrieb Aircoookie notifications@github.com:

Hi! Great that you like WLED!

There is an option in sync settings to "Receive realtime", which does what you want! There is no API call for that one yet, so I'm going to add one, since it makes sense to toggle that more often :) "realtimeActive" is a state bool which is true if data is received and normal effects are blocked until the timeout. The bool for deactivating realtime is "receiveDirect".

Yes, you can either just open a PR or wait for me to add it (takes two minutes). By the way, are you running latest master or the 0.8.3 release?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/Aircoookie/WLED/issues/122#issuecomment-471162032

valki2 commented 5 years ago

Thanks - works like a charm! :-)

enriquefernandez commented 5 years ago

Was this added to the API in the end? I would also love to disable UDP listening with the gui, but also via MQTT or HTTP call. That way I could ignore the data coming from hyperion whenever I want.

Thanks!

valki2 commented 5 years ago

Hi! Yes it was added - works here like a charm :) "Alexa, turn the additional ambilight on" and it switches from normal light mode to ambilight :) Am Sa., Mai 4, 2019 08:07 schrieb Enrique Fernández : Was this added to the API in the end? I would also love to disable UDP listening with the gui, but also via MQTT or HTTP call. That way I could ignore the data coming from hyperion whenever I want. Thanks! — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/Aircoookie/WLED/issues/122#issuecomment-489298023), or mute the thread (https://github.com/notifications/unsubscribe-auth/AAYUTDYNF5O7QHE4WSWKWADPTUR3JANCNFSM4G42IVEA).

enriquefernandez commented 5 years ago

Ok, great! How do you activate/deactivate UDP realtime with the API?

I don't see anything for that in the JSON or HTTP api wiki docs..

I see that there's a parameter live in the info object of the JSON api that tells me whether we are receiving UDP realtime data, but it doesn't look like I can disable it. There's the udpn.recv parameter that I can disable, but it looks like that's not for UDP realtime control, but for the (different?) WLED broadcast functionality.

The only method I know to temporarily disable UDP realtime is to go to the Sync Interfaces GUI menu and uncheck the box. This takes quite a lot of clicks to do, and I'd also love to be able to do it via API (MQTT, JSON or similar). My objective would be to tie this to HomeAssistant and have an action that activates or deactivates UDP realtime control that would in reality activate or disable Hyperion. Is this possible with the current API?

This project is awesome by the way.

Thanks!

valki2 commented 5 years ago

I do the magic via openhab...

Switch Zusatzambilight "Zusatzambilight" [ "Switchable" ] { http=">[ON:POST:http://192.168.3.9/win&RD=1] >[OFF:POST:http://192.168.3.9/win&RD=0]"}

In the urls you can see the Syntax!

Have fun

Am 4. Mai 2019 18:29:50 MESZ schrieb "Enrique Fernández" notifications@github.com:

Ok, great! How do you activate/deactivate UDP realtime with the API?

I don't see anything for that in the JSON or HTTP api wiki docs..

I see that there's a parameter live in the info object of the JSON api that tells me whether we are receiving UDP realtime data, but it doesn't look like I can disable it. There's the udpn.recv parameter that I can disable, but it looks like that's not for UDP realtime control, but for the (different?) WLED broadcast functionality.

The only method I know to temporarily disable UDP realtime is to go to the Sync Interfaces GUI menu and uncheck the box. This takes quite a lot of clicks to do, and I'd also love to be able to do it via API (MQTT, JSON or similar). My objective would be to tie this to HomeAssistant and have an action that activates or deactivates UDP realtime control that would in reality activate or disable Hyperion. Is this possible with the current API?

This project is awesome by the way.

Thanks!

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/Aircoookie/WLED/issues/122#issuecomment-489342031

Aircoookie commented 5 years ago

@enriquefernandez Awesome that you like WLED! Oh, just realized, I totally missed adding the &RD= HTTP api call to the doc! Sorry!

enriquefernandez commented 5 years ago

Great! It looks like this API call is exactly what I need. Unfortunately, I'm having some issues at the moment with the ESP becoming unresponsive. I've opened a new issue #163 .

Thanks for the help!