deConz + Hue motion sensor - adjust senisitivity

Well that makes it a lot easier, thanks.

To change the sensitivity requires that deconz stores the value in the device and for battery powered devices this does not always happen right away so I doubt an automation that changes it will work very well.

I have used these outdoors as well and had too many false positives all he time. My solution was to put two different motion sensors outdoors at each location.

And then I have two automations.

One that triggers an action when it detects motion with the condition that the other motion sensor is on.
And the other automation exactly the same with the two sensor entities swapped. It is extremely rare that both sensors make false detections at the same time. Especially if you use two different types. I use a cheap Sonoff RF based sensors two places and a z-wave multisensor two other places.

In one instance I put the Philips outdoor hue sensor in the middle of a patio where it detects everything. And then I have a sonoff at the front door and an Aeotec multisensor where I have the bicycles. And I trigger a TTS message and notification when the Philips registers motion with either the Sonoff or the Aeotec. And that has proven very reliable.

I may have a false detection once a month now. Before I had 5-10 per day

Where did you get that an automation would reconfigure the sensor? Deconz configure service can be used to reconfigure devices through deconz

Do you mean Home Assistant -> Configuration -> Integrations -> deconz -> specific motion sensor?

If yes then I can’t seem to change anything but rename and add to an area? Or am I the wrong place?

Service -> go to services in hass and select appropriately :slight_smile:

@Robban - devastator wanted to change the sensitivity at daytime. Ie twice a day. And that makes sense since the false alarms to PIR sensors happen more often at daylight so a lower sensitivity setting at daylight makes sense. And this is where an automation changing these settings come in to play. And this is where I say that you can for sure do this but be aware that the setting needs to be transmitted by deconz to a battery driven sensor which is asleep so the setting may happen very delayed.

To permanently change the setting you can do this from deconz. Deconz is very geeky and not very user friendly. I guess this is the price you pay for being able to do anything. I do wish the sensitivity setting of motion sensors could be set in the more user friendly Phoscon interface like you do it in the native Philips Hue ios or Android apps.

I changed my sensor sensitivity before we got the vnc feature added to deconz so I used the rest interface method using curl from command line. That took time to figure out. I have some notes how I did it if needed but now I would try to play with deconz first via the vnc interface.

Sorry, didn’t see your reply wasn’t to OP

So in 0.96 I go to Developer Tools -> Services --> then choose “deconz.configure” -> insert service data?

1 Like

Precisely :+1:t2:

Is there anywhere I can read what the JSON should be?

https://dresden-elektronik.github.io/deconz-rest-doc/

Did you get this sorted out? Tried reading the docs but I didn’t fully understand…
If you could share the JSON I wwould be grateful.

No unfortunately. I briefly looked at it, and then put it on the to-do-later list, as it wasn’t obvious to me either how to the JSON.

Ahh… I see.
I need to get this sortet out somehow because my sensor is detecting motion everytime the wind is blowing…

I read the docs again and followed the steps. Now my outdoor sensor is on “sensitivity: 1”. Lets hope it works…

Installed Firefox REST addon
Found my gateway
Got the API by opening the authentication in deCONZ web gui and made the REST “GET”
Made a “GET” request and found the id for my sensor
Configed the sensitivity via a “PUT”

Took me about ten minutes.

1 Like

So I have moved to Deconz recently and whilst it’s been working great I have been suffering with too many false positives because the sensitivity of the Hue motion sensors is too high.

So what I did to remedy this was:

  1. Discover the API key which Home Assistant is using to access Deconz. This can be found in the config/.storage/core.config_entries file. Search for "deconz" and then you’ll find the "api_key". You could of course create a new api key in Deconz but for me I only needed to make this change once.

  2. Download a REST tool for Chrome - I am using YARC - Yet Another Rest Client

  3. Open YARC and in the URL field type http://<deconz-ip-address>:<deconz-http-port-number>/api/<api_key>/sensors and make a GET request.

  4. You’ll then be presented with a list of sensors. Search the JSON output for “sensitivity”. Mine were al lset to 2. Make note of the id number in the example below it is sensor id 5.

  "5": {
    "config": {
      "alert": "none",
      "battery": 100,
      "delay": 0,
      "ledindication": false,
      "on": true,
      "pending": [],
      "reachable": true,
      "sensitivity": 2,
      "sensitivitymax": 2,
      "usertest": false
    },
    "ep": 2,
    "etag": "<removed>",
    "manufacturername": "Philips",
    "modelid": "SML001",
    "name": "Landing Motion Sensor",
    "state": {
      "lastupdated": "2019-09-17T08:45:54",
      "presence": false
    },
    "swversion": "6.1.1.27575",
    "type": "ZHAPresence",
    "uniqueid": "<removed>"
  },
  1. Change the URL to http://<deconz-ip-address>:<deconz-http-port-number>/api/<api_key>/sensors/<sensor_id>/config , add the JSON payload and choose a PUT request.
{
       "sensitivity": 1,
}
  1. Verify the change has been made by making a GET request to http://<deconz-ip-address>:<deconz-http-port-number>/api/<api_key>/sensors/<sensor_id>
{
  "config": {
    "alert": "none",
    "battery": 100,
    "delay": 0,
    "ledindication": false,
    "on": true,
    "pending": [],
    "reachable": true,
    "sensitivity": 1,
    "sensitivitymax": 2,
    "usertest": false
  },
  "ep": 2,
  "etag": "<removed>",
  "manufacturername": "Philips",
  "modelid": "SML001",
  "name": "Landing Motion Sensor",
  "state": {
    "lastupdated": "2019-09-17T08:55:52",
    "presence": false
  },
  "swversion": "6.1.1.27575",
  "type": "ZHAPresence",
  "uniqueid": "<removed>"
}

I hope this helps other people on the forums.

11 Likes

HI @qlqheixs , sorry for pushing that old thread. I followed your steps but have difficulties with user rights.
My result is alwas “unauthorized user” even I used my normal credentials for Phoscon login
this is my request - what is wrong?

{
  "method": "GET",
  "transformRequest": [
    null
  ],
  "transformResponse": [
    null
  ],
  "url": "http://xxx.xxx.xxx.xx:40850/api/bbb5c510b3544e9181768c7532050b26/sensors",
  "headers": {
    "Authorization": "Basic cG9zdEBqb2VyZy1uYXVlbi5kZTpQaXJvbDYyMA==",
    "Accept": "application/json, text/plain, */*"
  },
  "data": "",
  "timeout": {}
}

What is your deconz IP adress? The normal Home Assistant IP adress? Or the IP adress seen in the Hassio add-on? And what port number is deconz when using ingress? I tried the one stated in the config file “40850”, but I get a request failed.

I am using deconz via it’s own Docker container and just expose it through a bridged network.
I know Hassio uses Docker underneath so presumably it is similar. How do you connect to the Phoscon app - perhaps use that IP address?

Using Phoscon is via Hassio ingress, but when I am in Phoscon it states the IP adress is " 172.30.33.0", but if I use that instead and then use:“http://172.30.33.0:8080/api/54678998EA/sensors then” then I still get Request failed