nebhead / garage-zero

Garage door opener/closer/controller with status using a Raspberry Pi Zero W and Flask w/Bootstrap
MIT License
17 stars 5 forks source link

Magnetic Switch to confirm Open door #23

Open J0eK1ng opened 3 years ago

J0eK1ng commented 3 years ago

Hi,

My original wireless garage door opener failed a few weeks ago and I have been upgrading several RPi 3 to RPi4. I would like to use your Garage door opener with one of my now unused RPi3. I realize this is not an issue but more a feature request. Would it be possible to add a Magnetic Switch at the doors fully open position and also have your code report this in your interface? This would confirm that the door is actually open and not potentially partly open or closed. I know its probably overkill but it is a security concern for me not really knowing the actual status of the door unless its closed.

Thanks

Denis

nebhead commented 3 years ago

Hey Denis - Yeah, I've actually thought about this as well. Definitely could be something that could be added as an optional feature. Actually, I wonder if there is a good way to tie into the existing microswitch for the shut-off. Maybe that's overcomplicating things though. I'm currently away from my workshop for a while - so it may be some time before I'm able to implement the update, but I'll likely get around to it then. I wouldn't mind having this feature too.

J0eK1ng commented 3 years ago

I'm also thinking that it would be convenient to be able to turn on/off the light on the garage door motor with a relay. That would be a plus for me. What do you think? Denis

J0eK1ng commented 3 years ago

I have been using GarageZero for 2 weeks now and really love it. I have also changed the door status pic to these animated png files of Peter Griffin I like them :) I did have to modify the base.html, doorstatus.html and admin.html to make it look right. If your interested I will share the files. doorclosed dooropen

J0eK1ng commented 3 years ago

Would it be possible to add the IP address or hostname of the device that opened the door in the event logs?

nebhead commented 3 years ago

I have been using GarageZero for 2 weeks now and really love it. I have also changed the door status pic to these animated png files of Peter Griffin I like them :) I did have to modify the base.html, doorstatus.html and admin.html to make it look right. If your interested I will share the files. doorclosed dooropen

LOL! This is excellent, I love it! Can you share a screen shot of the dashboard with the door open? Truly terrific.

nebhead commented 3 years ago

Would it be possible to add the IP address or hostname of the device that opened the door in the event logs?

I haven't tried this before, but it's both a good idea and something that I can try to implement. I'm slowly chipping away at a few other requests, so I'll give this a go.

nebhead commented 3 years ago

FYI... I've also ordered a different type of magnetic switch (https://www.amazon.com/gp/product/B0154PTDFI) which I'm going to use to implement the door open state. Hopefully that will get here before the end of the week and I can get started on this.

nebhead commented 3 years ago

Would it be possible to add the IP address or hostname of the device that opened the door in the event logs?

I haven't tried this before, but it's both a good idea and something that I can try to implement. I'm slowly chipping away at a few other requests, so I'll give this a go.

Appears it's pretty simple to grab the IP in flask using request, so implemented a quick & dirty WriteLog when then button is pressed in the WebUI which logs the IP from the client.

Also fixed a little bug where I was using the datetime module inconsistently.

Updates in the development branch here: https://github.com/nebhead/garage-zero/commit/7adb188af942e03fe1bc23edaa00cd31966b39d5

J0eK1ng commented 3 years ago

Hi nebhead I'm glad you like the animated png files. I'm glad you are adding the magnetic switch for the door open status and as a bonus it will display the close door animation much quicker as opposed to once the door closed sensor is detected.

I'm back from vacation (totally offline) and will post screenshots shortly.

Cheers and keep up the good work.

Denis

J0eK1ng commented 3 years ago

Ok here are the screenshots from my phone. I will have to redo the door closed animation the colors are off. Door_Open Door_Closed

J0eK1ng commented 3 years ago

Maybe just add the IP address to the Full Events Logs or else it will not fit on the cell phone main page. Its always nice to know what device opened the doot.

nebhead commented 3 years ago

Maybe just add the IP address to the Full Events Logs or else it will not fit on the cell phone main page. Its always nice to know what device opened the doot.

Yeah, I like that idea. Maybe the short-log (on the dashboard) just displays a short message only for all of the different events. I'll have to incorporate that.

My SD-Card failed on my garage-zero today :( so I might take this opportunity to completely overhaul some things.

nebhead commented 3 years ago

BTW - IP logging doesn't seem to work with nginx doing reverse proxy. :( Works fine when I'm testing with flask only, but once there are a few more layers involved (i.e. nginx and gunicorn), it just shows the local IP. Anyway, will require more work.