Commit Graph

18 Commits

Author SHA1 Message Date
Eli Ribble 7e43fca7d4 Add, I dunno, some changes I made. 2024-09-15 14:29:13 -07:00
Eli Ribble 68e59c0ae4 Add missing files 2024-09-15 14:28:58 -07:00
Eli Ribble 73e41d90b7 Make daemon-test work similar to previous 'test', but over the network.
This really is just to make my life a little easier since the daemon is
running and stable on my remote machine and directly editing the
software on that device is obnoxious due to network errors.
2023-05-31 09:37:29 -07:00
Eli Ribble 82c741033d Show existing relays on relay creation page.
This both shows the relays that we already have assigned and removes
existing pins from the list to choose from. It also alphabetizes for
easy reading by the human.
2023-05-26 09:52:01 -07:00
Eli Ribble 0fee05acf7 Invalidate relay cache after changing config.
Without this we don't see new relays after we add them.
2023-05-26 09:47:20 -07:00
Eli Ribble b4027baf68 Don't require a full pin scan for the root page.
The full pin scan is slow, and it's slowing me down. Instead, just load
what we know we need for the configured relays unless we are adding a
new relay.
2023-05-26 09:44:17 -07:00
Eli Ribble dd637c2eaa Get working scanning over rgpiod
This includes getting a list of chips, their line numbers, enumerating
the properties of the lines/pins, and providing to the user the list of
valid pins to connect to relays.

It also includes reworking the fake relay system and the configuration
file.

I believe this ends the rampant refactoring and I'll now stabilize out
some features.
2023-05-26 09:28:39 -07:00
Eli Ribble cbffa327b9 Move to using remote rgpiod connection.
This adds a bunch of stuff, some barely working. The core idea that I'm
adding now is that I'm redoing the way that we interact with the gpio
pins. Previously I had planned to use lgpio from abyz.me.uk/lg/ directly
and run this program *only* on the single-board computer with the GPIO
pins. Turns out I can instead run the lgpio project's rgpiod program on
the single-board computer and talk to it over the network.

This is way more stable and way faster for development, so that's what
I'm doing.

This is just a checkpoint.

Incidentally, here is the license for the rgpio.py code:

"This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>"
2023-05-26 08:13:54 -07:00
Eli Ribble 57d8ff0b39 Checkpoint, switching computers. 2023-05-16 19:21:11 -07:00
Eli Ribble c36a32179a This is just work-in-progress. Switching underlying frameworks...
I wanna go FastAPI.
2023-05-15 14:46:58 -07:00
Eli Ribble 320591277f Add sketch of relays, jinja templating. 2023-05-12 15:09:44 -07:00
Eli Ribble 0d1020a3d5 Add aiohttp web server.
We switch to having the server kick off the mDNS discovery process
because aiohttp recommends it and it fits well enough that I don't mind.
2023-05-12 14:47:42 -07:00
Eli Ribble 9f3de33337 Add coroutine for handling mDNS query responses.
We can now discover our device. Maybe. I'm really not sure if I'm doing
the protocol correctly, but it looks pretty good. *shrug*.
2023-05-12 14:31:45 -07:00
Eli Ribble bc79e842e7 Create a basic async loop. 2023-05-12 14:13:27 -07:00
Eli Ribble 409e6152ae Add basic logic for creating a module using flit. 2023-05-12 14:07:58 -07:00
Eli Ribble c732dd963c Initial commit with README. 2023-05-12 13:01:48 -07:00
Eli Ribble 911f85e9fb Add working relay.py from relay control board. 2023-05-12 13:01:22 -07:00
eliribble 92549bfec7 Initial commit 2023-05-12 11:16:33 -06:00