Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule time cannot be randomized #3062

Closed
Thomas-Vos opened this issue Jul 20, 2020 · 4 comments
Closed

Schedule time cannot be randomized #3062

Thomas-Vos opened this issue Jul 20, 2020 · 4 comments
Labels
Backlog This label is assigned if it is implemented later. Feature Request

Comments

@Thomas-Vos
Copy link
Contributor

Feature request type

When creating a schedule using the REST API the time cannot be randomized.

Description

Send a POST request to /api/<username>/schedules with the following body:

{
    "name": "SOn_28_Schedule 1_JbUwF",
    "description": "28",
    "localtime": "2020-07-20T19:30:00A00:10:00",
    "time": "2020-07-20T19:30:00A00:10:00",
    "command": {
        "address": "/api/<username>/groups/28/scenes/4/recall",
        "method": "PUT",
        "body": {}
    },
    "status": "enabled",
    "autodelete": false,
    "recycle": false
}

The request should be successful. However, the random part of the (local)time (A00:10:00) is ignored. That can be seen in the source code here:

{ // cutoff random part, A[hh]:[mm]:[ss], because this is not supported yet
QStringList ls = time.split("A");
if (ls.size() == 2)
{
DBG_Printf(DBG_INFO, "cut off random part %s\n", qPrintable(ls[1]));
time = ls.first();
}
}

{ // cutoff random part, A[hh]:[mm]:[ss], because this is not supported yet
QStringList ls = time.split("A");
if (ls.size() == 2)
{
DBG_Printf(DBG_INFO, "cut off random part %s\n", qPrintable(ls[1]));
time = ls.first();
}
}

Additional context

The Hue API supports randomized schedules.
The issue was originally reported here: https://community.hueessentials.com/t/randomize-schedule-and-phoscon-bridge/243

@Mimiix Mimiix added the Backlog This label is assigned if it is implemented later. label Jul 20, 2020
@Mimiix
Copy link
Collaborator

Mimiix commented Jul 20, 2020

Added backlog, otherwise bot is going to bother you again.

@ChrisHae
Copy link
Contributor

ChrisHae commented Aug 6, 2020

Randomized times will be available in the next deCONZ beta release.

@ChrisHae ChrisHae closed this as completed Aug 6, 2020
@Thomas-Vos
Copy link
Contributor Author

Thanks @ChrisHae, that's awesome! Could you link the PR when you have it ready?

@ChrisHae
Copy link
Contributor

It is already in the master branch and should also been in latest deCONZ v.2.05.80 release
8009689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog This label is assigned if it is implemented later. Feature Request
Projects
None yet
Development

No branches or pull requests

3 participants