Rule for motion timeout (HUE)

Hi everyone

Is it possible too create a rule that can change the no motion timeout period on my philips hue motion sensors?

Using the paperui thing or using http

Problem I’m having is motion sensor turns light off too quick when going too bed it’s a good timeout period all day but not at night when going bed I could do with sending the command too the motion sensor too wait for a period of 10 mins or something

I would post logs rules items all that but will wait too see of possible first

You might be able to do this through the REST api:

Hi again @vzorglub thanks for the reply

I still haven’t used the REST api but I have heard of it,

So no clue how too access it or what it does or is capable of doing

Looking at the docs it’s going too take alot learning to get anything working there could be worth it seems quite a powerfull thing

In the paperUI install the REST API docs
Addons - Misc - Rest documentation

Then on your dashboard you should get a new tile:
image

1 Like

i have done that and had a little look around but i haven’t got a clue how to use it or change anything here

i’m also a little scared too as it seems like an area that a little mistake could damage the entire system

what do i need to do find the hue motion sensor thing ?

First one

  • Get all available things
  • Try it out!

You will get a json with all available things in there

that’s one of the things i tried :wink:

looking again and searching for the motion sensor returns some values but nothing about the timeout period

snip from Rest API

    "editable": true,
    "label": "Kids Bedroom Motion Sensor",
    "bridgeUID": "hue:bridge:001788781cca",
    "configuration": {
      "sensitivity": 2,
      "sensitivitymax": 2,
      "sensorId": "45",
      "on": true
    },
    "properties": {

looking in paper ui the values are not there either

Looking at the poll results from the bridge i cant see a value there either maby this is only configurable on the hue app on the phone


{"state":{"presence":false,"lastupdated":"2019-01-31T10:39:51"},"swupdate":{"state":"noupdates","lastinstall":null},"config":{"on":true,"battery":100,"reachable":true,"alert":"none","ledindication":false,"usertest":false,"sensitivity":2,"sensitivitymax":2,"pending":[]},"name":"Back Door","type":"ZLLPresence","modelid":"SML001","manufacturername":"Philips","productname":"Hue motion sensor","swversion":"6.1.0.18912","uniqueid":"0006","capabilities":{"certified":true}}

Looks like it, you are going to have to use a rule

I’m still going too look into using the rest api looks like it’s useful for some complex automations

Anything that can be configured in paper ui can be configured using the rest api and a rule?

Eg if I needed too change the sensitivity of a sensor this can be done using a rule?

Yes, the paperUI is just a fancy interface for the rest api.

1 Like

That I didn’t know, good too know so if that’s the case is rest api capable of more than what paper is

Yes

Thanks for that

food for thought :slight_smile:

It’s also really helpful for setting items to values while testing rules using the post or update command

Hi @waspie

I have been creating items as needed for this on my sitemap wishing there was a better way

this will be your new best friend!
POST is like sendCommand and PUT is like sendUpdate or postUpdate whatever it is.

GET is good for viewing current state. You’ll figure it all out.

1 Like