deConz Binding how disable hue motion sensor motion detection

hi all
changed my hue motion sensor from the hue bridge to my conbee 2 with deconz binding. Now I’ve the issue that there’s no channel which enabled to enable or disable the sensor. (which was there with the hue bridge)
Is there any possibility to add the missing channel or enable/disable motion detection by a button for example?
thnx in advance for all your hints
Matt

Why would you want to disable it. Just don’t have OH take action when you receive a motion ON event.

There’s an issue (or normal operation) that when there’s lot of movement the sensor will stop passing movement to OH and then my timer will disable the light. To fix that there’s a button idea which turn on the light an disable the sensor so that it will not start to pass the movements and disable the light again …long story short …if you have a better solution, will be cool to try that of course.

Frankly I don’t understand your issue. But when OH receives the button press it can start ignoring sensor events. Any logic you have local to the sensor you can re-implement in OH.

Try to explain it
there’s a Motion Sensor controlling a light with a timer disabling the light after 60 seconds. Each time the Sensor detects a movement it will “retime” the timer to another 60 seconds.
As written before, if there’s a lot of movement in front of the sensor it will stop sending events for a while …in this case the light will go off. In this particular case I will have a button where after pressing it the motion sensor will be disabled an the light enabled till I press it again. Then the sensor will be enabled again …what will turn off the light after 60 seconds if there was a motion.
This configuration was already working on OH3 but with the Hue Motion Sensor connected to a Hue Bridge …there was a channel “operation” on the sensor which could be set to on or off.
After moving the same sensor to the Conbee 2 with the deConz binding this channel doesn’t exist any more.
Any idea how to handle that?

Because my rules are written in ECMA and there are two different rules for the sensor and the switch I can’t use a variable inside my rules (an don’t know how to define global ones which would help :slight_smile: )

Looks like it is missing in deconz. There is no code for enable AFAIK.

You can help yourself with a virtual switch item, lets call it sensorOperation.

Both your rules can check the state of this operation and change it to your needs.

After having a closer look, it should be available.

		<supported-bridge-type-refs>
			<bridge-type-ref id="deconz"/>
		</supported-bridge-type-refs>
		<label>Presence Sensor</label>
		<description>A Presence sensor</description>
		<channels>
			<channel typeId="system.motion" id="presence"/>
			<channel typeId="last_updated" id="last_updated"/>
			<channel typeId="system.power" id="enabled"/>
		</channels>

		<representation-property>uid</representation-property>

		<config-description-ref uri="thing-type:deconz:sensor"/>
	</thing-type>

The enabled channel does exactly the same as the hue binding does. Is that channel missing in your thing?

Yes, it is missing. There’s no such channel on my sensor. But here’re 3 things from one Sensor which I get. Presence, Illuminance and Temperature …but no one has the enabled channel :frowning:

That was exactly what I needed …that’s my global var which does the thing :slight_smile:
Was somehow stuck to the idea that an item should have some hardware behind …a virtual switch did it.

Thank you for your help!

That’s probably a bug.

How did you define the thing? UI? With or without discovery? Can you show me the REST API response for that sensor? (http://<address>/api/<apikey>/sensors/<sensorid>)

With the UI, using discovery. There’s nothing under http://host:8080/api/sensors/ …404 :frowning:

Argh! I edited the link above. The forum software messed up the link. The address is the address of the deconz-gateway, not the openHAB address. You can use the same API key that you use for openHAB.

No problem …here’re two responses from two of three things on one sensor

{
	"config": {
		"alert": "none",
		"battery": 100,
		"delay": 0,
		"ledindication": false,
		"on": true,
		"pending": [],
		"reachable": true,
		"sensitivity": 2,
		"sensitivitymax": 2,
		"usertest": false
	},
	"ep": 2,
	"etag": "xxxxxx",
	"lastseen": "2021-03-08T16:29Z",
	"manufacturername": "Philips",
	"modelid": "SML001",
	"name": "Bewegungsmelder Eingang",
	"state": {
		"lastupdated": "2021-03-08T16:29:33.396",
		"presence": false
	},
	"swversion": "6.1.1.27575",
	"type": "ZHAPresence",
	"uniqueid": "xxxxx"
}

and this

{
	"config": {
		"alert": "none",
		"battery": 100,
		"ledindication": false,
		"on": true,
		"pending": [],
		"reachable": true,
		"tholddark": 12000,
		"tholdoffset": 7000,
		"usertest": false
	},
	"ep": 2,
	"etag": "xxxxxx",
	"lastseen": "2021-03-08T16:29Z",
	"manufacturername": "Philips",
	"modelid": "SML001",
	"name": "Bewegungsmelder Eingang",
	"state": {
		"dark": false,
		"daylight": false,
		"lastupdated": "2021-03-08T16:29:10.868",
		"lightlevel": 14523,
		"lux": 28
	},
	"swversion": "6.1.1.27575",
	"type": "ZHALightLevel",
	"uniqueid": "xxxxxxxx"
}

thnx…