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

ContactSensor triggered by another accessories #116

Open
Arfa03 opened this issue Apr 3, 2021 · 8 comments
Open

ContactSensor triggered by another accessories #116

Arfa03 opened this issue Apr 3, 2021 · 8 comments

Comments

@Arfa03
Copy link

Arfa03 commented Apr 3, 2021

Hi there,
I’m running Homebridge single instance on a RaspiB3+, the actual configuration was perfectly running until i’ve updated all the system, plugin, node and so.
Now, all is working, but i have a strange issue.
I’ve two contactsensor and one motionsensor configured in my config.json, now, after the updating, it will triggered if i turn on a light from tasmota switch that is mqtt-linked to other one, or if i turn on the gpio pin that i use for turn on the motion sensor.
Is strange because it not is really triggered, but seems that the trigger event is caused by a reverse of the behaviour of the pin.
If the door is closed as example, when i open the door, the sensor says that is open.
But if i turn on the tasmota switch that turn on the light, the sensor says instantly that the door is closed. Strangeness: if i close the door, the contact sensor says the door is open, until i turn another one off and on the tasmota switch, and the behaviour of the pin is now newly inverted, and the contact sensor says closed.
In the gpio-readall, all works ever like a charm, door open pin stays on “1”, door closed pin stays on “0” status.
I’m stuck on this, any help is appreciated.
I’ve tried to remove the plugin and reinstall, with no effect.
I’ve tried in surplus to connect a 10kohm pullup resistor, but obviously the problem not is caused from the physical pin.
What can i do?

@Arfa03
Copy link
Author

Arfa03 commented Apr 21, 2021

For now, i’m solved it by migrating all contact sensor to another plugin, i’m still waiting for a solution for this case.
If anyone have the same problem, the plugin that now i use for the contact sensor, is homebridge-contactsensor via npm.

@coshy81
Copy link

coshy81 commented Apr 29, 2021

Hi there, I can also confirm that the PIN allocations for this GPIO mod has changed from using the wPI number to the BCM number.

gpio-readall helped me understand which pin was what (as you mentioned above), here is a sample of the changes I had to make:

{
"accessory": "GPIODevice",
"name": "Gate",
"type": "GarageDoorOpener",
"pins": [
27, (was wPi 2..)
22 (was wPi 3..)
],
"openingDuration": 15,
"closingDuration": 15
}

I must add, i'm still using version v0.4.7, I'm yet to update to v0.4.9 for fear of this great mod breaking again on me, every time I update I seem to have to fix something..

@Arfa03
Copy link
Author

Arfa03 commented Apr 29, 2021

Hi there, I can also confirm that the PIN allocations for this GPIO mod has changed from using the wPI number to the BCM number.

gpio-readall helped me understand which pin was what (as you mentioned above), here is a sample of the changes I had to make:

{
"accessory": "GPIODevice",
"name": "Gate",
"type": "GarageDoorOpener",
"pins": [
27, (was wPi 2..)
22 (was wPi 3..)
],
"openingDuration": 15,
"closingDuration": 15
}

I must add, i'm still using version v0.4.7, I'm yet to update to v0.4.9 for fear of this great mod breaking again on me, every time I update I seem to have to fix something..

Hi, i’ve not remembered to say that i made this change, obvious.
My problem is not caused from pin numbering, that is correct, but from some things that cause “interference” in the code, i think.
Might be the migration to the new gpio control.

@coshy81
Copy link

coshy81 commented Apr 29, 2021

no problem, have you tried to re-install the wiringPi using: sudo apt-get install wiringpi?

also, I upgraded to version v0.4.9 and my code is still functional

@Arfa03
Copy link
Author

Arfa03 commented May 9, 2021

Hi, yes i’ve tried also to reinstall all common plugin, anyway, if i don’t say dumbness, the versions above 0.4.7 use onoff instead of wPi.
I’ve just now tried the latest release of the plugin, but the problem is still there.

@InZan3
Copy link

InZan3 commented Nov 29, 2021

I have the same problem twice, on my Pi Zero the lights trigger Motion Sensors and on the 3B+ open pin for Garage Door not working anymore. Version 0.4.3 works without Problems. PIN numbers were changed for Update

@Arfa03
Copy link
Author

Arfa03 commented Nov 29, 2021

@InZan3 i’ve solved all of my problem by completely switch all the system to homeassistant, has a more strong community.

@InZan3
Copy link

InZan3 commented Nov 30, 2021

@Arfa03 i want to stay at home bridge

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

3 participants