-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add "devices" type that have inputs and outputs #1
Comments
Hi @shmick, Thanks I appreciate that :) I'm currently working on adding GPIO scripting capabilities that should allow the application to function as you've described. The implementation will allow you to define 'do', 'while' and 'then' conditions. basically in the following format (pseudo) I'll try to describe it using your application as an example. And yes state refers to the setting of an IO pin HIGH or LOW. Do: This will set the states for the relay and an 'opening' warning light (as an example of multiple outputs).
While: Pause while waiting for a different pin's condition to change - In this case the 'door is open' reed switch. (so far equivalent of 'do ... while (door_open_input == 0)' )
Then: Apply this state to the specified pins after the while condition is no longer satisfied.
Which forms the equivalent of
This script can be named something like "Open South Door" and triggered from the home screen in a similar way to the existing 'serial commands' section. Also the application's GPIO area can configure a gpio input to indicate the current state of 'door_input' on the home screen. You will be able to set these scripts up by modifying the config.json file or through the UI in the app's settings page. Hope this all makes sense :) I wanted to create a solution that kept the application as general-purpose as possible, so let me know if this will accomplish what you wanted. Ash. |
First off, nice project. The UI is nice and clean.
Right now I have 2 garage doors that I'm currently controlling with my Pi, but I'd like a nicer web interface. Each door has an input and an output on the Pi. The input is a magnetic reed switch that reports door state ( open / close ) and the output is a relay that simulates a button push (on, wait, off).
The UI would then report red/green status based on the value of input pin, but would control the output pin
What would be nice is something like a "devices" type that would have properties such as:
Cheers.
The text was updated successfully, but these errors were encountered: