Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Motion Sensor status not detected #687

Open
colussim opened this issue Oct 17, 2024 · 1 comment
Open

Motion Sensor status not detected #687

colussim opened this issue Oct 17, 2024 · 1 comment

Comments

@colussim
Copy link

Hi ,
I have a Zigbee motion sensor that publishes to mqtt topic zigbee2mqtt/cellar_detector the following:

{"illumination":"bright","linkquality":96,"occupancy":true,"occupancy_sensitivity":"medium","occupancy_timeout":115,"update":{"installed_version":4102,"latest_version":4102,"state":"idle"}}

I am trying to make it work on homebridge with the following code:

{
    "type": "occupancySensor",
    "name": "Cellar Detector",
    "url": "mqtt://localhost:1883",
    "username": "xxx",
    "password": "xxx",
    "topics": {
        "getName": "occupancy",
        "getOccupancyDetected": "zigbee2mqtt/cellar_detector"
    },
    "integerValue": false,
    "onValue": "true",
    "offValue": "false",
    "manufacturer": "SONOFF",
    "model": "SNZB-06P",
    "serialNumber": "0x0ceff6fffe673e64",
    "firmwareRevision": "1.0.6",
    "accessory": "mqttthing"
}

I get no error message and the state is never detected. In my mqtt server I do have the state change on the occupancy true/false field.I have tried several configurations of the plugin but without success 🥲. Do you have any idea what mistake I might be making?

Thanks

@GithHobby
Copy link

try to remove:
"onValue": "true",
"offValue": "false",

I had a similar problem because "true" is like a string instead of boolean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants