4 releases
0.2.2 | Apr 29, 2024 |
---|---|
0.2.1 | Aug 24, 2023 |
0.2.0 | Aug 4, 2023 |
0.1.8 | Jul 28, 2023 |
0.0.0 |
|
#359 in Hardware support
66KB
914 lines
Pixy
Pixy is a web server designed to be used with IoT devices for secure-by-default sensor data relay. It was originally built for use with the Pimoroni Enviro Pico, so you could say it is a Raspberry Pi Pico proxy.
Overview
Pixy is a Rust-based proxy for relaying sensor messages to multiple targets defined within a simple YAML configuration file. It acts as a single write-only entrypoint for IoT devices, reducing configuration overhead and making it easier to distribute data to many independent systems.
Got suggestions for Pixy? Open an issue for a feature request, or start a discussion!
Motivation
After setting up an Enviro Pico and connecting it to my Home Assistant instance with MQTT, I started thinking of some other uses for it. I've been thinking on how I could connect it up to other automation platforms (like IFTTT), how I might transmit data to citizen science initiatives, or how I might wire up more robust alerting systems, improve fault tolerance, etc., which did not feel possible to do when trying to extend battery life on the Pico as much as possible.
Scouring through some forums and github repositories, I found that other people who use this board also had similar thoughts regarding uploads to multiple targets, as well as increasing the list of available targets. However, multiple upload targets = more time spent uploading = more battery used, so doing this from the Pico itself did not seem like a good idea. I decided that I would write some kind of sensor proxy that could handle the multi-target upload, so the Pico would only ever need to upload to one target.
My goals with this proxy were:
- The proxy should be fast, so the HTTP server listener should return before finishing the re-exporting of the sensor data.
- The proxy should be small, so it could ideally run on a Raspberry Pi Zero.
- The proxy should be simple, so writing a configuration file should be straightforward.
- The proxy should be flexible, so there should be many ways of installing/running it.
- The proxy should be scalable, so it should be able to handle as many or as few boards as you throw at it.
Installation
Pixy can be installed in a number of different ways depending on your preferences and platform. See the installation docs for more info.
If you are hoping to run Pixy in a Raspberry Pi or a Pi Zero, you should prefer using the Debian/Ubuntu/Raspian instructions that set up the systemd service to run in the background.
At this time, Windows & Mac OS support are only available through the Docker installation.
Configuring Pixy
After running through the relevant install steps, read the configuration
License
This project is primarily licensed under the MIT License. For all terms, please see the LICENSE file.
Some scripts in the pkg/debian
directory are based off of code licensed under the MPL 2.0, and as such these are also licensed under the MPL 2.0. Any such scripts under the license will:
- Include notice that the script is licensed under the MPL 2.0, the full text of which is available in the LICENSE-MPL file
- Include a link to the MPL 2.0 FAQ
- Include a link to the original script used to create the existing script
Roadmap
For a snapshot of the current plans for Pixy, see the milestones page on GitHub.
Dependencies
~21–36MB
~584K SLoC