gpiozero
pi-mqtt-gpio
Our great sponsors
gpiozero | pi-mqtt-gpio | |
---|---|---|
7 | 6 | |
1,821 | 457 | |
1.4% | - | |
8.0 | 6.1 | |
25 days ago | 9 days ago | |
Python | Python | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gpiozero
-
Raspberry Pi, InfluxDB, Grafana, Docker
It was a bit tricky to get CPU temperature of a host machine (Raspberry Pi) from within the running docker container. This Issue on GitHub has helped me :
- Arduino/ESP32 project --> Raspberry Pi 4 programming/conversion/capability?
-
What can we do with python, exactly?
No. The pi 4 is not a microcontroller. However, I would recommend gpiozero for a regular pi4
-
mqtt-gpio: A service which connects MQTT topics to Raspberry Pi GPIO pins
I run it in K3s on Raspberry Pi OS. The service is built on gpiozero so should work on other devices. It is a very helpful building block in my DIY home automation system. It's a general purpose connector so it can be configured for many different uses. At present I use it to:
- Ask HN: Good Python projects to read for modern Python?
-
GPIO Programming on the Raspberry Pi: Python Libraries
Gpiozero is already installed in the current Raspberry Pi OS - if not, just run python3 -m pip gpiozero. The source code files can be accessed on Github. The official documentation on readthedocs.io provides rich information and plenty example code.
-
Build your SO their own "attention button" this Valentine's Day
The code we will write will be in Python. Let's start with just getting the button to register. We will be using the gpiozero library to do this:
pi-mqtt-gpio
-
Multi-Device Home Assistant
Home Assistant doesn't have direct control of GPIOs built-in anymore, but it's available with either a custom component or MQTT.
- How can I ditch ADT, but keep this equipment and integrate it into HomeKit? (Details in comments)
-
Raspberry Pi as a sensor instead of a hub?
If you want to play around with sensors on a RPi, you can use your existing network and use MQTT to communicate back to your hub. Take a look at https://github.com/flyte/mqtt-io.
-
Suggestions to control a Relay Module
If you install this on the RPI, https://github.com/flyte/mqtt-io setup the digital output to turn the relay on and off and add the HA discovery option, then it will show up as an MQTT switch in Home Assistant and you can turn it on and off from HA
-
How to use RPi Zeros as devices in my HA setup?
I currently use ESP devices with sensors attached in my house however you may be able to use a Raspberry Pi instead and have certain sensors such as Temperature, PIR motion etc ... https://github.com/flyte/pi-mqtt-gpio
-
Built a pool controller for ~$300, controlled using home assistant, mqtt, and node-red.
I have the raspberry pi just running rasbian. I'm using pi-mqtt-gpio to expose the GPIO to MQTT, which then allows HA to pick them up and control them. I went through a few iterations trying to get that to work, including using the remote_pi_gpio integration, but had problems with it. With the integration, every time the pi restarted, HA would need to be restarted to re-establish the connection, and there were times that the GPIO settings on the pi would get reset and HA would lose them. With the pi-mqtt-gpio, it's been way easier and way more stable. I can boot the pi or HA in either order and the connection will still come up every time I've tried. If you're going to do remote gpio with a pi, I definitely recommend it. The MQTT integration in HA picks up the gpio automatically, so there's no HA configuration to be done. My pi-mqtt-gpio configuration: https://imgur.com/imTnUvX
What are some alternatives?
pigpio - pigpio is a C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO).
raspberry-pi-home-automation - Code examples, errata and additional tips and references to interesting projects for the book "Control Your Home with Raspberry Pi: Secure, Modular, Open-Source and Self-Sufficient"
WiringPi - Gordon's Arduino wiring-like WiringPi Library for the Raspberry Pi (Unofficial Mirror for WiringPi bindings)
OctoPrint-Enclosure - OctoPrint Enclosure Plugin
tkgpio - A Python library to simulate electronic devices connected to the GPIO on a Raspberry Pi, using TkInter.
system_sensors - Logging of system sensor specific for the RPI and sending them to a MQTT broker
WiringPi-Python - Unofficial Python-wrapped version of Gordon Henderson's WiringPi version 2.
w1thermsensor - A Python package and CLI tool to work with w1 temperature sensors like DS1822, DS18S20 & DS18B20 on the Raspberry Pi, Beagle Bone and other devices.
RC522-Attendance - Raspberry Pi based RFID Attendance System
systemd-gpio - A systemd unit template that does things when gpio events happen.
mqtt-agent-ledbox - LedBox Mqtt Agent , controlling led animation on the led box