smartechru / homebridge-relays

This Homebridge plugin controls 4 relays through Apple Home App.
MIT License
16 stars 13 forks source link

I would like to ask if i could have the source code before build #8

Closed dylanbarne closed 3 years ago

dylanbarne commented 3 years ago

May I have the source code to build a custom relay switch for my garage that make use of a ultrasonic distance sensor to check whether the garage is open.

If yes you can contact me dylan14022005@gmail.com

smartechru commented 3 years ago

Hi @dylanbarne,

Well... I didn't get your point. If you can explain more detail about what you are going to do, that would be brilliant. Please feel free to ask me if you have any questions.

dylanbarne commented 3 years ago

I want to build a component which uses and ultrasonic distance sensor to detect whether my garage is open and then uses that to set the garage to either the on or off position. I am unsure of how to use typescript for homebridge in combination with gpio. The documentation seems to be missing some important stuff. 😆 Thanks for any help you can give

toshibochan commented 3 years ago

For garage door I use https://www.npmjs.com/package/homebridge-gpio-garagedoor-d

smartechru commented 3 years ago

Here is a typescript version of the garage door plugin - https://github.com/KraigM/homebridge-gpio-garagedoor Feel free to message me if you have any questions.

dylanbarne commented 3 years ago

Thank you so much, how does he turn on the gpio pin using typescript. In his code there is no specific point where he tells the raspberry to turn the pin on, this is the closest he gets image