{"id":16516612,"url":"https://github.com/eadf/esp_mqtt_ports","last_synced_at":"2026-03-12T14:11:26.181Z","repository":{"id":27320066,"uuid":"30794424","full_name":"eadf/esp_mqtt_ports","owner":"eadf","description":"Control up to 512 digital pins with your smartphone and one esp8266","archived":false,"fork":false,"pushed_at":"2015-03-01T20:44:22.000Z","size":476,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T10:38:19.584Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eadf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-14T11:10:37.000Z","updated_at":"2017-10-13T23:28:36.000Z","dependencies_parsed_at":"2022-09-02T04:41:49.295Z","dependency_job_id":null,"html_url":"https://github.com/eadf/esp_mqtt_ports","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eadf/esp_mqtt_ports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eadf%2Fesp_mqtt_ports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eadf%2Fesp_mqtt_ports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eadf%2Fesp_mqtt_ports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eadf%2Fesp_mqtt_ports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eadf","download_url":"https://codeload.github.com/eadf/esp_mqtt_ports/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eadf%2Fesp_mqtt_ports/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30427896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:00:25.264Z","status":"ssl_error","status_checked_at":"2026-03-12T13:59:52.690Z","response_time":114,"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":[],"created_at":"2024-10-11T16:25:46.019Z","updated_at":"2026-03-12T14:11:26.149Z","avatar_url":"https://github.com/eadf.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esp_mqtt_ports\n\nControl up to 512 digital pins [with your smartphone](http://www.openhab.org/) and one esp8266 (with 8 GPIOS).\n\nThis can be done by connecting 4*8 [mcp23017 (I²C version)](http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en023499) port expanders to the GPIO ports like this.\n\nI²C group | sda | scl | mcp23017\n----------|-----|-----|--------------\n0         |GPIO0+10KΩ pullup|GPIO2 +10KΩ pullup| 8*mcp23017 with address 0..7\n1         |GPIO4+10KΩ pullup|GPIO5 |8*mcp23017 with address 0..7\n2         |GPIO12+10KΩ pullup|GPIO13 |8*mcp23017 with address 0..7\n3         |GPIO14 +10KΩ pullup|GPIO15+10KΩ **pulldown**|8*mcp23017 with address 0..7\n\nBe careful with GPIO4 and GPIO5, they are sometimes mislabeled on the silkscreen.\n\nYou can add pullups to the ```scl``` pins too, but they are always driven by the esp so that's not required.\n\nTake care with the boot mode pins of the esp, GPIO0, GPIO2 should be high and GPIO15 should be low at normal bootup (did i get that right?). \n\nThis is only the default pinout, it's really easy to change.\n\n###dependencies\n\nI'm pulling in several git subtree projects :\n* [tuanpmt's mqtt project: esp_mqtt](https://github.com/tuanpmt/esp_mqtt) \n* [The mcp23017 driver](https://github.com/eadf/esp8266_mcp23017)\n* [The i2c driver](https://github.com/eadf/esp8266_i2c_driver)\n* [gpio helper library](https://github.com/eadf/esp8266_easygpio)\n* [esp8266_stdout](https://github.com/eadf/esp8266_stdout)\n\nThe makefile is copied from [esp_mqtt.](https://github.com/tuanpmt/esp_mqtt)\n\n###mqtt format\n\ntopic: ```/deviceId/portexpander```  deviceId is unique to each esp, look in the console. \n\nmessage: ```GABBBBBBBBBBBBBBBB``` where:\n* G = I²C group [0..3]\n* A = Address within I²C group [0..7]\n* BBBBBBBBBBBBBBBB = binary of pin status, msb first\n \nIf you want to set the first pin high (rest low) on the second mcp23017 (address 1) in the third I²C group (2) you send this message:```210000000000000001``` (as a string)\n\n### todo\n* tests, it seems to work - but i have not tested a full compliment of mcp23017:s.\n* input mode\n\n###License\nGPL v3\n\nThe makefile is copied from [esp_mqtt.](https://github.com/tuanpmt/esp_mqtt)\n\n###Building and installing:\n\nFirst you need to install the sdk and the easy way of doing that is to use [esp_open_sdk.](https://github.com/pfalcon/esp-open-sdk)\n\nYou can put that anywhere you like (/opt/local/esp-open-sdk, /esptools etc etc)\n\nThen you could create a small ```setenv.sh``` file, containing the location of your newly compiled sdk and other platform specific info;\n```\nexport SDK_BASE=/opt/local/esp-open-sdk/sdk\nexport PATH=${SDK_BASE}/../xtensa-lx106-elf/bin:${PATH}\nexport ESPPORT=/dev/ttyO0  \n```\n(or setup your IDE to do the same)\n\nYou will have to edit the ```include/user_config.h``` file to suit your WiFi and mqtt settings. Alternatively you can copy ```include/user_config.h``` into ```localinclude/user_config.h``` and git will not bother you about modified files.\n\nTo make a clean build, flash and connect to the esp console you just do this in a shell:\n```\nsource setenv.sh # This is only needed once per session\nmake clean \u0026\u0026 make test\n```\n\nYou won't be needing esptool, the makefile only uses esptool.py (provided by [esp_open_sdk](https://github.com/pfalcon/esp-open-sdk))\n\nI have tested this with sdk v0.9.5 and v0.9.4 (linux \u0026 mac)\n\n### Processing demo\n\nI've created a simple processing sketch that sends mqtt messages to the esp.\nYou will have to adjust the address of your mqtt broker and the topic your esp listens to.\n\nThe sketch uses [ControlP5](http://www.sojamo.de/libraries/controlP5/) and [processing-mqtt](https://github.com/256dpi/processing-mqtt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feadf%2Fesp_mqtt_ports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feadf%2Fesp_mqtt_ports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feadf%2Fesp_mqtt_ports/lists"}