Rule search and day of week in datetime values

Suggestions for new features can be made here.
Vorschläge für neue Funktionen können hier gemacht werden.
Post Reply
PauliePurple
Posts: 3
Joined: Mon Jan 27, 2020 7:22 pm

Rule search and day of week in datetime values

Post by PauliePurple » Tue Jan 28, 2020 2:53 pm

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.

User avatar
ReneWahl
Site Admin
Posts: 180
Joined: Wed Jan 16, 2019 8:44 pm

Re: Rule search and day of week in datetime values

Post by ReneWahl » 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
all4hue Developer / Entwickler

User avatar
MarcusZ.
Posts: 151
Joined: Sun Jan 20, 2019 4:44 pm

Re: Rule search and day of week in datetime values

Post by MarcusZ. » Tue Feb 04, 2020 9:40 am

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.
2x Bridge V2 (+deCONZ/HA-Bridge)
Hue Go (+BT), Lightstrip (in/out), Play, Bloom; E14+E27 Bulb; Iris, Aura.
Motion sensor (in/out), Dimmer (old/new), Smart Button, Tap Dial.

P.S.: Ich bin *kein* Entwickler von all 4 hue, aber Hue Poweruser!

PauliePurple
Posts: 3
Joined: Mon Jan 27, 2020 7:22 pm

Re: Rule search and day of week in datetime values

Post by PauliePurple » Sat Feb 08, 2020 12:57 pm

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

User avatar
MarcusZ.
Posts: 151
Joined: Sun Jan 20, 2019 4:44 pm

Re: Rule search and day of week in datetime values

Post by MarcusZ. » Sat Feb 08, 2020 1:25 pm

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
2x Bridge V2 (+deCONZ/HA-Bridge)
Hue Go (+BT), Lightstrip (in/out), Play, Bloom; E14+E27 Bulb; Iris, Aura.
Motion sensor (in/out), Dimmer (old/new), Smart Button, Tap Dial.

P.S.: Ich bin *kein* Entwickler von all 4 hue, aber Hue Poweruser!

User avatar
ReneWahl
Site Admin
Posts: 180
Joined: Wed Jan 16, 2019 8:44 pm

Re: Rule search and day of week in datetime values

Post by ReneWahl » Sun Feb 09, 2020 11:24 am

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
all4hue Developer / Entwickler

User avatar
ReneWahl
Site Admin
Posts: 180
Joined: Wed Jan 16, 2019 8:44 pm

Re: Rule search and day of week in datetime values

Post by ReneWahl » 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
all4hue Developer / Entwickler

User avatar
MarcusZ.
Posts: 151
Joined: Sun Jan 20, 2019 4:44 pm

Re: Rule search and day of week in datetime values

Post by MarcusZ. » Sun Mar 29, 2020 10:28 am

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.)
2x Bridge V2 (+deCONZ/HA-Bridge)
Hue Go (+BT), Lightstrip (in/out), Play, Bloom; E14+E27 Bulb; Iris, Aura.
Motion sensor (in/out), Dimmer (old/new), Smart Button, Tap Dial.

P.S.: Ich bin *kein* Entwickler von all 4 hue, aber Hue Poweruser!

PauliePurple
Posts: 3
Joined: Mon Jan 27, 2020 7:22 pm

Re: Rule search and day of week in datetime values

Post by PauliePurple » Sun May 10, 2020 9:21 am

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

Post Reply