{"id":14985305,"url":"https://github.com/flyte/mqtt-io","last_synced_at":"2026-04-01T21:28:17.944Z","repository":{"id":37092360,"uuid":"60875368","full_name":"flyte/mqtt-io","owner":"flyte","description":"Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.","archived":false,"fork":false,"pushed_at":"2026-03-23T23:14:58.000Z","size":1535,"stargazers_count":501,"open_issues_count":69,"forks_count":164,"subscribers_count":23,"default_branch":"develop","last_synced_at":"2026-03-24T20:17:57.336Z","etag":null,"topics":["am2302","bananapi","beaglebone","beaglebone-black","dht11","dht22","gpio","gpio-pins","home-assistant","lm75","mqtt","pcf8574","piface-digital","python","raspberry-pi","raspberry-pi-gpio","rpi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flyte.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-06-10T20:35:32.000Z","updated_at":"2026-03-17T16:10:17.000Z","dependencies_parsed_at":"2024-02-19T16:48:01.254Z","dependency_job_id":"e9aae88f-4e25-47db-83eb-0596046cfb30","html_url":"https://github.com/flyte/mqtt-io","commit_stats":{"total_commits":686,"total_committers":58,"mean_commits":"11.827586206896552","dds":0.2842565597667639,"last_synced_commit":"678276f11ce94369a59ba51064ddb0099b6bf90d"},"previous_names":["flyte/pi-mqtt-gpio"],"tags_count":83,"template":false,"template_full_name":null,"purl":"pkg:github/flyte/mqtt-io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyte%2Fmqtt-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyte%2Fmqtt-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyte%2Fmqtt-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyte%2Fmqtt-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flyte","download_url":"https://codeload.github.com/flyte/mqtt-io/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyte%2Fmqtt-io/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["am2302","bananapi","beaglebone","beaglebone-black","dht11","dht22","gpio","gpio-pins","home-assistant","lm75","mqtt","pcf8574","piface-digital","python","raspberry-pi","raspberry-pi-gpio","rpi"],"created_at":"2024-09-24T14:10:41.075Z","updated_at":"2026-04-01T21:28:17.924Z","avatar_url":"https://github.com/flyte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n***************************************************************************************\nDO NOT EDIT README.md DIRECTLY, IT'S GENERATED FROM README.md.j2 USING generate_docs.py\n***************************************************************************************\n--\u003e\n\n# MQTT IO\n\n[![Discord](https://img.shields.io/discord/713749043662290974.svg?label=Chat%20on%20Discord\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)](https://discord.gg/gWyV9W4)\n\nExposes general purpose inputs and outputs (GPIO), hardware sensors and serial devices to an MQTT server. Ideal for single-board computers such as the Raspberry Pi.\n\nVisit the [documentation](https://mqtt-io.app/) for more detailed information.\n\n## Supported Hardware\n\nHardware support is provided by specific GPIO, Sensor and Stream modules. It's easy to add support for new hardware and the list is growing fast.\n\n### GPIO Modules\n\n  - Beaglebone GPIO (`beaglebone`)\n  - Linux Kernel 4.8+ libgpiod (`gpiod`)\n  - GPIO Zero (`gpiozero`)\n  - MCP23017 IO expander (`mcp23017`)\n  - Orange Pi GPIO (`orangepi`)\n  - PCF8574 IO expander (`pcf8574`)\n  - PCF8575 IO expander (`pcf8575`)\n  - PiFace Digital IO 2 (`piface2`)\n  - Raspberry Pi GPIO (`raspberrypi`)\n  - XL9535/PCA9535/TCA9535 IO expander (`xl9535`)\n\n### Sensors\n\n  - ADS1x15 analog to digital converters (`ads1x15`)\n  - ADXl345 3-axis accelerometer up to ±16g  (`adxl345`)\n  - AHT20 temperature and humidity sensor (`aht20`)\n  - AS3935 lightning detector (`as3935`)\n  - BH1750 light level sensor (`bh1750`)\n  - BME280 temperature, humidity and pressure sensor (`bme280`)\n  - BME680 temperature, humidity and pressure sensor (`bme680`)\n  - DHT11/DHT22/AM2302 temperature and humidity sensors (`dht22`)\n  - DS18S20/DS1822/DS18B20/DS1825/DS28EA00/MAX31850K temperature sensors (`ds18b`)\n  - ENS160  digital multi-gas sensor with multiple IAQ data (TVOC, eCO2, AQI) (`ens160`)\n  - FLOWSENSOR generic flow rate sensor like YF-S201, YF-DN50 or others (`flowsensor`)\n  - FREQUENCYCOUNTER Counts pulses from GPIOs and return the frequency in Hz (`frequencycounterr`)\n  - HCSR04 ultrasonic range sensor (connected to the Raspberry Pi on-board GPIO) (`hcsr04`)\n  - INA219 DC current sensor (`ina219`)\n  - LM75 temperature sensor (`lm75`)\n  - MCP3008 analog to digital converter (`mcp3008`)\n  - PMS5003 particulate sensor (`pms5003`)\n  - SHT40/SHT41/SHT45 temperature and humidity sensors (`sht4x`)\n  - TSL2561 light level sensor (`tsl2561`)\n  - VEML7700 light level sensor (`veml7700`)\n  - YF-S201 flow rate sensor (`yfs201`)\n\n\n### Streams\n\n  - Serial port (`serial`)\n  - PN532 NFC/RFID reader (`pn532`)\n\n## Installation\n\n_Requires Python 3.6+_\n\n`pip3 install mqtt-io`\n\n## Execution\n\n`python3 -m mqtt_io config.yml`\n\nSome configuration parameters can be passed as environment variables:\n\n- `MQTT_IO_HOST` - Host name or IP address of the MQTT server.\n- `MQTT_IO_PORT` - Port number to connect to on the MQTT server.\n- `MQTT_IO_USER` - Username to authenticate with on the MQTT server.\n- `MQTT_IO_PASSWORD` - Password to authenticate with on the MQTT server.\n- `MQTT_IO_PROTOCOL` - Version of the MQTT protocol to use.\n\nEnvironment variables take precedence over configuration files.\n\n## Configuration Example\n\nConfiguration is written in a YAML file which is passed as an argument to the server on startup.\n\nSee the [full configuration documentation](https://github.com/flyte/pi-mqtt-gpio/wiki/Configuration) for details.\n\nThe following example will configure the software to do the following:\n\n- Publish MQTT messages on the `home/input/doorbell` topic when the doorbell is pushed and released.\n- Subscribe to the MQTT topic `home/output/port_light/set` and change the output when messages are received on it.\n- Periodically read the value of the LM75 sensor and publish it on the MQTT topic `home/sensor/porch_temperature`.\n- Publish any data received on the `/dev/ttyUSB0` serial port to the MQTT topic `home/serial/alarm_system`.\n- Subscribe to the MQTT topic `home/serial/alarm_system/send` and send any data received on that topic to the serial port.\n\n```yaml\nmqtt:\n  host: localhost\n  topic_prefix: home\n\n# GPIO\ngpio_modules:\n  # Use the Raspberry Pi built-in GPIO\n  - name: rpi\n    module: raspberrypi\n\ndigital_inputs:\n  # Pin 0 is an input connected to a doorbell button\n  - name: doorbell\n    module: rpi\n    pin: 0\n\ndigital_outputs:\n  # Pin 1 is an output connected to a light\n  - name: porch_light\n    module: rpi\n    pin: 1\n\n# Sensors\nsensor_modules:\n  # An LM75 sensor attached to the I2C bus\n  - name: lm75_sensor\n    module: lm75\n    i2c_bus_num: 1\n    chip_addr: 0x48\n  # An INA219 sensor attached to the I2C bus\n  - name: ina219_sensor\n    module: ina219\n    i2c_bus_num: 1\n    chip_addr: 0x43\n\n\nsensor_inputs:\n  # lm75 - The configuration of the specific sensor value to use (LM75 only has temperature)\n  - name: porch_temperature\n    module: lm75_sensor\n  # ina219 - The configuration of the specific sensor value to use (4 options for the ina219 sensor)\n  - name: power\n    type: power\n    module: ina219_sensor\n  - name: bus_voltage\n    type: bus_voltage\n    module: ina219_sensor\n  - name: current\n    type: current\n    module: ina219_sensor\n  - name: shunt_voltage\n    type: shunt_voltage\n    module: ina219_sensor\n\n# Streams\nstream_modules:\n  # A serial port to communicate with the house alarm system\n  - name: alarm_system\n    module: serial\n    device: /dev/ttyUSB0\n    baud: 9600\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyte%2Fmqtt-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflyte%2Fmqtt-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyte%2Fmqtt-io/lists"}