ZHA: Philips Motion Sensor SML001 entities question

Hi,

I am in the process of migrating my Philips Hue devices from the Hue Hub to ZHA using the ConBee II radio. So far I’m much happier with the ConBee II than I was with the Hue Hub.

I added a Philips Hue Motion Sensor (SML001) last night and it successfully configured, added a device and created 5 entities.
I understand what 4 of the 5 entities do, but I’m confused about the binary_sensor.philips_sml001_on_off entity. It gets the hass:walk icon, suggesting that it is the actual motion sensor, but I have never seen it change state.
The binary_sensor.philips_sml001_occupancy entity seems to be the motion sensor, but it has a Hass:home-outline icon, indicating it is something other than motion.

I have tried setting the state of the binary_sensor.philips_sml001_on_off to ‘on’ and the state changes, but I can’t see what effect it has. The state is also automatically reset to ‘off’ after about 90 seconds.

Is anyone out there able to explain to me what this entity does?

Thanks.

1 Like

Maybe (just a guess) there is a difference in actual movement and reporting of occupancy. Like, movement triggers occupancy, but occupancy lasts x minutes after last movement was detected?

Yeah. I thought it might be something like that too, but in my testing I am unable to make the _on_off sensor change state.
The _occupancy sensor changes state when it detects movement, but the on_off never seems to change state.

Maybe it represents the enable/disable function of that sensor, which is represented by a slider in the Hue app?

1 Like

Yep. Thought about that too, but it is always “Off”, so if that were the case I would expect the occupancy sensor to stop responding, but it doesn’t. In fact, it doesn’t seem to have an effect on any of the other entities.
I have tried setting it to “On” and “Off”, but can’t see what effect it has.
Looks like it is time to go look into he source code :thinking:

1 Like

@wizbang Did you find an answer?

I have many of these sensors and use them with ZHA. If memory serves me, the On/Off status is a tamper switch. I think if you unscrew the backplate, that triggers those. But I’m not sure that I ever actually confirmed that… I have those entities disabled on my devices in HA.

No. I didn’t. @new_west_geek answer sounds plausible. If I get time one evening this week I will experiment and see if that’s it.

@joshuaspence My curiosity got the better of me and I grabbed one of my motion sensors to se if it had a tamper switch as @new_west_geek suggested.
Taking off the rear case you can see there is a hole marked ‘T’ with a push button similar to the reset.
Pressing the button causes the state of the on_off entity to change (and stay changed), but appears to have no affect on the rest of the sensors i.e the keep reporting their normal values. Pushing it again causes the on_off entry to clear.

There is no feature on the rear cover to push into this hole, so what is it’s purpose?

Here is the event pressing the button generates:

{
  "id": 1,
  "type": "event",
  "event": {
    "event_type": "zha_event",
    "data": {
      "device_ieee": "00:17:88:01:04:b5:39:0c",
      "unique_id": "00:17:88:01:04:b5:39:0c:1:0x0006",
      "device_id": "0b5d617be18cd2a7cf4c4ec843daa2f0",
      "endpoint_id": 1,
      "cluster_id": 6,
      "command": "toggle",
      "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-01-26T23:35:07.643329+00:00",
    "context": {
      "id": "6213b2f99671dc9dda008ed0546b3bf8",
      "parent_id": null,
      "user_id": null
    }
  }
}
5 Likes

Wow @wizbang, nice find. I checked mine as well and confirm that it is the same. In that case, I am going to disable these sensor entities for all of my SML001 devices.

I’ve scanned the Net to see if I can find any documentation on what that ‘T’ toggle switch does, but haven’t managed to find anything. If anyone comes across a description of what this feature is meant be, please share as I’d love to know.

Came here with the same questions, and at least got the answer for the “On/Off” behavior for the motion entity. Also - my Phillips’ Hue range seems be quite measly. I mean less than 5 meters and it doesn’t detect occupancy unless I’m very close to it. Is it supposed to behave this way?

Hi @sk229, I’d say the range of my motion sensors are about the same (5-6m), but they detect occupancy at the same range (5-6m). There are some sensitivity settings in the device (the ones the Hue app presented in their setup screen), but to my knowledge they are not available for access through ZHA.
I set mine to the maximum sensitivity before deleting the device from the Hue app just in case they were persistent.

1 Like

After searching the Web for information and investigating the on_off entity for a couple of weeks I have come to the conclusion it is no more than a software switch.
I believe the Hue app uses it to ignore the motion sensor and just use the illuminance sensor.
Basically, the on_off entity just reports the state of the toggle button [T] circled in the photo of my earlier post.
A bit weird, as it requires you to unscrew the rear casing and insert a pin to press the button :thinking:

If anyone else is able to find out more about it I’d be interested to know.

2 Likes

What’s confusing about this entity is that if a blueprint is filtering by setting the device class to “motion”, this on_off sensor is what’s shown, and not the occupancy sensor.

It looks like it’s the same issue with SML002: [BUG] Philips Hue Motion sensor outdoor SML002, On/Off not working and Occupancy acts like On/Off · Issue #804 · zigpy/zha-device-handlers · GitHub

I’ve done a bit more digging into the On/Off endpoint in the motion sensor. It appears to be an endpoint specifically related to Hue’s own software. Other Zigbee clusters associated with this endpoint are; colours, groups and scenes. None of which seem to have any impact when I try configuring them.
I think that the best thing to do in Home Assistant is to disable that entity and forget about it :slight_smile:

@deviantintegral Filter on device_class: occupancy to get the occupancy sensor.

I’ve created a Blueprint for using the motion sensor to control a light or group of lights here. It shows how to set the ZigBee Cluster attributes for the occupancy sensor if you are interested.

3 Likes

Any sense as to if this is common across multiple zigbee sensors? In contrast, “motion” works better for me than “occupancy” on my Aqara sensors if I want short light timeouts. I’m asking because the default example blueprint core ships with filters to motion device classes, and I’m wondering if I should file a PR to remove that filter.

@deviantintegral I have just purchased an Aqara Motion Sensor and plan to take a look at this one to see if I can change the delays etc. You’re right, the Occupied to Unoccupied delay seems to be 10mins in its default setting.
I was going to experiment to see whether I can find a way to change this setting.
I’ve been told that they are not “real” cluster attributes, just registers created by the Zigbee quirks library, so it might take be a while to figure them out.

1 Like

Hello all, thanks for all the info. I just bought one and my question on tbe on_off was answered they this threads :pray:

@wizbang i haven’t had a try on this Making Xiaomi Motion Sensor a Super Motion Sensor - Connected Things - SmartThings Community but I’ll get some more of the aqara’s in the future and try. If you have a chance let us know how you get on :wink:

Greets

330

For those still curious, it looks like the T button can be used to pair the motion sensor directly to a bulb (without the need for a hub).

5 Likes