krvarma / homebridge-particle

Homebridge plugin for Particle Devices
22 stars 14 forks source link

Door accessory #2

Open johandk89 opened 8 years ago

johandk89 commented 8 years ago

Hi are there any plans to support a Door accessory? There is a different homebridge plugin that supports a HTTP Door accessory (https://github.com/EricConnerApps/homebridge-httpdoor) but that plugin does a POST request and it doesn't send the POST data in the body as required by Particle

krvarma commented 8 years ago

Yes, I am planning more accessories one by one. I will add Door and check in soon.

Cheers!

johandk89 commented 8 years ago

Cool thanks!

tmur11 commented 8 years ago

@krvarma any update on implementing some new accessories?

tmur11 commented 8 years ago

@krvarma and @johandk89 I've successfully modified the plugin to support door sensors and am continuing to work to implement more. I'm extremely new to this, I'll try and maybe make a pull request? I've never done one before but perhaps @krvarma you could have a peek at my code at let me know what you think.

Joead commented 7 years ago

@tmur11 I would also like to control a Particle connected door via this plugin. Would you mind sharing your code?

tmur11 commented 7 years ago

@Joead how do i got about doing so? you should going the https://homebridgeteam.slack.com/messages/homebridge-particle/ slack channel so we can chat.

EdwardOliver commented 7 years ago

I just joined Git Hub in order to learn more about this project. The plugin works great as is, but I would also like to add some additional sensors.

cmegens commented 7 years ago

Can I in any way help? I connected my rolling shutters to a particle photon (connected an additional remote to it). This has 3 options: open, close and stop. I added a semi-close option which stop closing after 7 seconds, leaving the shutters open slightly. I now connected this to home bridge which is great, but these 4 options show as 4 lights. I would really like to change this to a door construction, so can I help? I'll fiddle with the code anyway, but if somebody also has some work setup I'm happy to add.

pedroserano commented 6 years ago

Just submitted a pull request that I wrote, tested, and works to support PIR motion sensors. Will look at the door accessory (which would really be a contact sensor, right?)

pedroserano commented 6 years ago

Oh also a couple things are needed in the particle .ino program:

AT THE TOP:

#define MOTION_PIN      A0

bool currentMotion = 0;
int motionvalue = 0;

And then in the loop function:

    motionvalue = analogRead(MOTION_PIN);
    if (motionvalue > 2000){ currentMotion = 1;}
    else if (motionvalue <2000){ currentMotion =0;}

    publish("Motion", currentMotion);