{"id":18563385,"url":"https://github.com/compulim/codeaholics-iot-demo","last_synced_at":"2026-04-13T23:02:10.297Z","repository":{"id":82478839,"uuid":"79770563","full_name":"compulim/codeaholics-iot-demo","owner":"compulim","description":"Codeaholics meetup: Alexa + Azure IoT + Arduino","archived":false,"fork":false,"pushed_at":"2017-02-02T17:39:59.000Z","size":13000,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T18:13:27.461Z","etag":null,"topics":["alexa","arduino-ide","aws-lambda","azure","azure-iot","iot"],"latest_commit_sha":null,"homepage":null,"language":"Arduino","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/compulim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2017-01-23T04:38:19.000Z","updated_at":"2017-02-16T11:15:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6e7ec88-3fe1-47e2-8b72-27376aea52f0","html_url":"https://github.com/compulim/codeaholics-iot-demo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/compulim/codeaholics-iot-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fcodeaholics-iot-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fcodeaholics-iot-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fcodeaholics-iot-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fcodeaholics-iot-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compulim","download_url":"https://codeload.github.com/compulim/codeaholics-iot-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Fcodeaholics-iot-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264092373,"owners_count":23556284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["alexa","arduino-ide","aws-lambda","azure","azure-iot","iot"],"created_at":"2024-11-06T22:12:29.390Z","updated_at":"2026-04-13T23:02:10.210Z","avatar_url":"https://github.com/compulim.png","language":"Arduino","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codeaholics meetup: Alexa + Azure IoT + Arduino\n\nThis is the repository for Codeaholics meetup on 2017 January, presented by [William Wong](https://github.com/compulim).\n\n## Devices\n\n| Device name      | Description                                  |\n| ---------------- | -------------------------------------------- |\n| `bridge`         | Bridge for device discovery and health check |\n| `powerStrip1`    | Power strip controller                       |\n\n## Preparation\n\n### Install Arduino IDE\n\n1. Install [Arduino IDE](https://www.arduino.cc/en/Main/Software)\n2. Install Sparkfun ESP8266 Thing Dev board by following these [steps](https://learn.sparkfun.com/tutorials/esp8266-thing-development-board-hookup-guide/all#setting-up-arduino)\n\n### Prepare Azure IoT Hub\n\n1. Create Azure Iot Hub, write down the connection string for `iothubowner`\n2. Log into IoT hub\n   * `iothub-explorer login HostName=\u003ciot hub name\u003e.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=\u003ciot hub key\u003e`\n3. Create `bridge` device\n   * `iothub-explorer create bridge`\n4. Create `powerStrip1` device\n   * `iothub-explorer create powerStrip1`\n\n## How to use\n\n### Setup Sparkfun ESP8266 Thing Dev\n\n1. Run Arduino IDE\n2. Open [`arduino/StandardFirmataWiFi/StandardFirmataWiFi.ino`](arduino/StandardFirmataWiFi/StandardFirmataWiFi.ino)\n3. Modify [`arduino/StandardFirmataWiFi/wifiConfig.h`](arduino/StandardFirmataWiFi/wifiConfig.h)\n   1. Modify [line 122](arduino/StandardFirmataWiFi/wifiConfig.h#L122), update `char ssid[] = \"\u003cYour SSID\u003e\";`\n   2. Modify [line 129](arduino/StandardFirmataWiFi/wifiConfig.h#L129), update `#define STATIC_IP_ADDRESS  192,168,0,123`\n   3. Modify [line 154](arduino/StandardFirmataWiFi/wifiConfig.h#L154), update `char wpa_passphrase[] = \"\u003cYour password\u003e\";`\n4. Upload the sketch to your [Sparkfun ESP8266 Thing Dev](https://www.sparkfun.com/products/13711)\n\n### Setup AWS Lambda\n\nAWS Lambda is required for using [Alexa Smart Home Skill API](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/smart-home-skill-api-reference#health-check-messages).\n\n1. Follow Alexa instructions to setup Alexa app and AWS Lambda\n2. Compress the folder [lambda](lambda) and upload it to AWS Lambda\n\n### Setup local Node.js bridge\n\n1. Modify [`bridge/lib/config.js`](bridge/lib/config.js) to provide connection strings\n2. Modify [`bridge/lib/powerStrip1.js`](bridge/lib/powerStrip1.js) if you are using different pin for control and status, default is pin 15 and 4 respectively\n3. Under [`bridge/`](bridge/), run `npm start`\n\n### Build the board\n\n![Board design](https://raw.githubusercontent.com/compulim/codeaholics-iot-demo/master/sketch.png)\n\n## Development points\n\n### Sparkfun ESP8266 Thing Dev\n\n* The board is 3.3V logic\n* [Pins](https://learn.sparkfun.com/tutorials/esp8266-thing-development-board-hookup-guide/using-the-esp8266-in-arduino) are very limited, some numbered pins has special feature\n* Prefer leaving [boot up pins] alone, pin 0, 2, 15(http://www.forward.com.au/pfod/ESP8266/GPIOpins/index.html), otherwise, the ESP8266 may not boot up\n* Pin 5 will flash on device boot\n\n### AWS Lambda\n\n* Make sure all dependencies are in [`lambda/package.json`](lambda/package.json)\n\n### Local Node.js bridge\n\n* Set environment variable `DEBUG` to `device*` for debugging\n\n### Azure IoT Hub explorer\n\nCurrently `iothub-explorer` is buggy and does not work with device methods, we wrote some [CLI scripts](cli/) to invoke device methods for testing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Fcodeaholics-iot-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompulim%2Fcodeaholics-iot-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Fcodeaholics-iot-demo/lists"}