Sharpy
(Aaron Sharp)
January 30, 2019, 11:57pm
1
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
vzorglub
(Vincent Regaud)
January 31, 2019, 9:10am
2
You might be able to do this through the REST api:
Sharpy
(Aaron Sharp)
January 31, 2019, 10:10am
3
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
vzorglub
(Vincent Regaud)
January 31, 2019, 10:23am
4
In the paperUI install the REST API docs
Addons - Misc - Rest documentation
Then on your dashboard you should get a new tile:
1 Like
Sharpy
(Aaron Sharp)
January 31, 2019, 10:45am
5
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 ?
vzorglub
(Vincent Regaud)
January 31, 2019, 10:48am
6
First one
Get all available things
Try it out!
You will get a json with all available things in there
Sharpy
(Aaron Sharp)
January 31, 2019, 10:53am
7
that’s one of the things i tried
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}}
vzorglub
(Vincent Regaud)
January 31, 2019, 11:03am
8
Looks like it, you are going to have to use a rule
Sharpy
(Aaron Sharp)
January 31, 2019, 11:07am
9
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?
vzorglub
(Vincent Regaud)
January 31, 2019, 11:08am
10
Yes, the paperUI is just a fancy interface for the rest api.
1 Like
Sharpy
(Aaron Sharp)
January 31, 2019, 11:16am
11
That I didn’t know, good too know so if that’s the case is rest api capable of more than what paper is
waspie
(scott dee)
January 31, 2019, 12:12pm
14
It’s also really helpful for setting items to values while testing rules using the post or update command
Sharpy
(Aaron Sharp)
January 31, 2019, 12:18pm
15
Hi @waspie
I have been creating items as needed for this on my sitemap wishing there was a better way
waspie
(scott dee)
January 31, 2019, 12:21pm
16
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