# Presets using JSON API for exact time or day of year trigger?

**URL:** https://wled.discourse.group/t/presets-using-json-api-for-exact-time-or-day-of-year-trigger/5080
**Category:** Questions
**Created:** [March 18, 2022, 8:18pm UTC](https://wled.discourse.group/t/presets-using-json-api-for-exact-time-or-day-of-year-trigger/5080 "2022-03-18T20:18:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![badjesus](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/badjesus/32/2922_2.png) [@badjesus](https://wled.discourse.group/u/badjesus)
#### Post date: [March 18, 2022, 8:18pm UTC](https://wled.discourse.group/t/presets-using-json-api-for-exact-time-or-day-of-year-trigger/5080/1 "2022-03-18T20:18:20Z")

</div>

Hey guys, I have spent the last hour reading and going through docs. I am getting a lot of misinformation from just the version differences with Macros and Playlists/Presets.

I may be blind and missing it, but is there any way to store a “schedule” using the presets to say turn on the lights on Nov 12th at 2:00pm, and have that stored on the device?

I realize that it appears as though the design is do more complex controls like through another system like HA or even Alexa, but I am looking for a solution where through the API you can store schedules in memory? Or is that not possible currently?

This is of course not using the UI at all. Just using the API (pref Json).

Am I missing something?

I have gone over the different API docs for HTTP, JSON and MQTT, and I have read on here, through the wiki and reddit as much as I can but I can’t seem to find any specific JSON commands where I can set times and have them stored on the device memory VS a third party control.

---

<div class="post-metadata">

### Author: ![tonyno](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/tonyno/32/242_2.png) [@tonyno](https://wled.discourse.group/u/tonyno)
#### Post date: [March 18, 2022, 9:02pm UTC](https://wled.discourse.group/t/presets-using-json-api-for-exact-time-or-day-of-year-trigger/5080/2 "2022-03-18T21:02:39Z")

</div>

See Time & Macros page in UI…

![image](https://global.discourse-cdn.com/free1/uploads/wled/original/2X/c/cc7a03c6f4a27774657e7b05f9c22e03f29ae5f3.png)

Oh, via json… Oops.

---

<div class="post-metadata">

### Author: ![huggy-d1](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/huggy-d1/32/51_2.png) [@huggy-d1](https://wled.discourse.group/u/huggy-d1)
#### Post date: [March 22, 2022, 1:28pm UTC](https://wled.discourse.group/t/presets-using-json-api-for-exact-time-or-day-of-year-trigger/5080/3 "2022-03-22T13:28:37Z")

</div>

Set a date / time preset up manually using WLED UI. Capture json configuration that includes the new date/time preset. Reverse it.

Once you figure it out, please feel free and update the _open source_ documentation to match the approach and results you figured out so others will not be as confused as you.

---

<div class="post-metadata">

### Author: ![DM1](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@DM1](https://wled.discourse.group/u/DM1)
#### Post date: [November 28, 2022, 12:00am UTC](https://wled.discourse.group/t/presets-using-json-api-for-exact-time-or-day-of-year-trigger/5080/4 "2022-11-28T00:00:24Z")

</div>

Hello, I wanted to piggy back off of this thread and see if @badjesus or anyone else was able to come up with a solution for accessing Scheduling configuration through JSON API?

My ideal scenario would be to be able to do the following through API:

- Read all current “Time-Controlled Presets” setup
- Add new “Time-Controlled Preset” schedule
- Remove existing “Time-Controlled Preset”

One way I though this could be accomplished is to create a custom UserMod, but before doing so I wanted to ask if anyone has a better suggestion.
