Page 1 of 1

Rule search and day of week in datetime values

Posted: Tue Jan 28, 2020 2:53 pm
by PauliePurple
Hi,

It can be very hard to locate a specific rule in the rules screen, you pretty much have to open each one in the list until you find the rule you're interested in, it would be great to be able to search for rules that impact specific lights or rooms or sensors.

Additionally hue rules use ISO8601:2004 datetime values so can specify a day of the week, it would be great if this was supported when defining times in rules in All4Hue.

Re: Rule search and day of week in datetime values

Posted: Sun Feb 02, 2020 6:00 pm
by ReneWahl
Hello,

Thank you for your comment. But I don't think rules can be limited to a certain day of the week. Where do you have this Information from? Thank you in advance.

BR
Rene

Re: Rule search and day of week in datetime values

Posted: Tue Feb 04, 2020 9:40 am
by MarcusZ.
Hi,

I basically agree with the first point, but you can name your rules accordingly for a good natural sort order. Furthermore you have the possibility to group rules (collapsing those groups in the ui would be nice!)
And it is already possible to show rules belonging to e.g. motion sensors. You can find this in the accessory section.

Regards, Marcus

P.S.: The usage of date patterns in rules was limited in comparison to schedules (I'm quite sure I tested). If there was a change that would be nice, but I haven't read about that yet.

Re: Rule search and day of week in datetime values

Posted: Sat Feb 08, 2020 12:57 pm
by PauliePurple
ReneWahl wrote: Sun Feb 02, 2020 6:00 pm Hello,

Thank you for your comment. But I don't think rules can be limited to a certain day of the week. Where do you have this Information from? Thank you in advance.

BR
Rene
Hi Rene,

This is in fact supported by the Hue API.

https://developers.meethue.com/develop/ ... -patterns/

I can successfully create a rule that specifies /local/configtime in "W003/T11:00:00/T13:00:00" so that it only applies on weekends between 11:00 and 13:00. I have tested this, it works fine, see my exported rule below:

Code: Select all

{
  "name": "paul testing rule using weekday",
  "conditions": [
    {
      "address": "/sensors/47/state/presence",
      "operator": "dx"
    },
    {
      "address": "/config/localtime",
      "operator": "in",
      "value": "W003/T11:00:00/T13:00:00"
    }
  ],
  "actions": [
    {
      "address": "/lights/7/state",
      "method": "PUT",
      "body": {
        "on": true
      }
    }
  ],
  "owner": "3nhYiRFvKGHREMOVED1Jayu00Vdo",
  "timestriggered": 2,
  "lasttriggered": "2020-02-08T11:48:32",
  "created": "2020-02-08T11:42:47",
  "status": "enabled"
}
Best Wishes,

Paul

Re: Rule search and day of week in datetime values

Posted: Sat Feb 08, 2020 1:25 pm
by MarcusZ.
This is so great, thanks for sharing. I hope Rene does have some spare time to implement this for everybody.

The api docs leave so many questions by just being neither complete nor precise. One would need much more time for testing which of the possible command do work though not documented... ;-)

Regards, Marcus

Re: Rule search and day of week in datetime values

Posted: Sun Feb 09, 2020 11:24 am
by ReneWahl
Thanks, Paul, for this useful information. I will have a deeper look into this and update the app within the next weeks. But currently I am blocked with other tasks..

BR
Rene

Re: Rule search and day of week in datetime values

Posted: Sat Mar 28, 2020 4:21 pm
by ReneWahl
Hello again,

In the meantime I implemented the support for rule limitations on certain days of a week. Please download V10 BETA 2 if you want to try it :-)

BR
Rene

Re: Rule search and day of week in datetime values

Posted: Sun Mar 29, 2020 10:28 am
by MarcusZ.
Hello,

I could not yet find the update yesterday, but now it is available. I gave it a short try and it woks as expected.

Nice work thank you!

Regards, Marcus

P.S.: Do you plan to implement collapsing of groups? From my experience, it is a big benefit for usability. (In my development webapp, I have auto-grouping by name prefix for all sections.)

Re: Rule search and day of week in datetime values

Posted: Sun May 10, 2020 9:21 am
by PauliePurple
Ah fantastic - I like the new interface and the way you've implemented the day of week selection. Thanks a lot!
ReneWahl wrote: Sat Mar 28, 2020 4:21 pm Hello again,

In the meantime I implemented the support for rule limitations on certain days of a week. Please download V10 BETA 2 if you want to try it :-)

BR
Rene