WACUP

General => General Discussion => Topic started by: SilverJohn on July 29, 2025, 06:24:01 AM

Title: Need help with Yule Log HTTP post
Post by: SilverJohn on July 29, 2025, 06:24:01 AM
I have a scrolling text setup for WLED that requires an HTTP Post to send to it to show text. I _think_ I can do this with Yule Log's http post setup. Does anyone know anything about this?
Title: Re: Need help with Yule Log HTTP post
Post by: SilverJohn on July 29, 2025, 02:04:53 PM
Perhaps I wasn't too clear with my previous post. I can send data to the scrolling text display by using curl, as follows:

curl -X POST "http://[wled ip]/json/state" -d '{"seg": [{"n": "Text to Display"}]}' -H "Content-Type: application/json"

I was wondering if there was a way to do this in Yule Log, eliminating the need for a script to do it...

Title: Re: Need help with Yule Log HTTP post
Post by: dro on July 29, 2025, 06:50:27 PM
I don't think the HTTP Post handling will be able to work in that manner as what's being sent is expected to be part of the url parameters instead of a configured data element (if I'm remembering what the -d curl parameter was meant to signify). With the plug-in as-is, using the current playing tab options & having curl send the contents of that file for the request would allow you to get metadata out of wacup in an equivalent manner since you can format the atf result to replicate a valid json data block but it's still relying on an external curl instance. I'll add this to my todo list (no eta when I'll get around to having the post mode be able to send it as a body / data block instead of as parameters).
Title: Re: Need help with Yule Log HTTP post
Post by: SilverJohn on July 29, 2025, 08:12:26 PM
Don't go to any effort. I have a script that can do this, I just wanted to see if I was not seeing how to do it without the script.
Title: Re: Need help with Yule Log HTTP post
Post by: SilverJohn on July 31, 2025, 03:43:12 PM
Many thanks to the developers for the quick response and wonderful project.