{"id":25602780,"url":"https://github.com/nithingowda16/iot-application-management","last_synced_at":"2026-04-15T14:04:04.131Z","repository":{"id":278589763,"uuid":"936081866","full_name":"Nithingowda16/IoT-Application-Management","owner":"Nithingowda16","description":"Smart Order Processing \u0026 IoT Alerts is a robust automation system that integrates order processing with IoT notifications. It utilizes Node.js, SendGrid, OpenWhisk, and IBM Watson IoT to automate workflows. Orders are validated and processed efficiently, triggering real-time email notifications and IoT events. ","archived":false,"fork":false,"pushed_at":"2025-02-20T16:16:55.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T16:28:04.130Z","etag":null,"topics":["curl","ibm-cloud","ibm-watson","javascript","openwhisk","python3","sendgrid-api","sendgrid-mail","shell-script"],"latest_commit_sha":null,"homepage":"https://nithingowda16.github.io/IoT-Application-Management/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nithingowda16.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-02-20T13:56:34.000Z","updated_at":"2025-02-20T15:56:28.000Z","dependencies_parsed_at":"2025-02-20T16:28:10.050Z","dependency_job_id":"bb999097-ee4e-402c-ac48-e85864c4d2e3","html_url":"https://github.com/Nithingowda16/IoT-Application-Management","commit_stats":null,"previous_names":["nithingowda16/iot-application-management"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nithingowda16%2FIoT-Application-Management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nithingowda16%2FIoT-Application-Management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nithingowda16%2FIoT-Application-Management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nithingowda16%2FIoT-Application-Management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nithingowda16","download_url":"https://codeload.github.com/Nithingowda16/IoT-Application-Management/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240056028,"owners_count":19741058,"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":["curl","ibm-cloud","ibm-watson","javascript","openwhisk","python3","sendgrid-api","sendgrid-mail","shell-script"],"created_at":"2025-02-21T17:24:01.100Z","updated_at":"2025-11-11T14:33:17.045Z","avatar_url":"https://github.com/Nithingowda16.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Order Notification \u0026 IoT Automation\n\nThis project provides a Node.js-based service for processing orders and sending notifications based on order value.\n\n## Features\n- Processes orders and verifies required parameters (`order` and `manager`).\n- Sends an email notification for high-value orders using SendGrid.\n- Provides an email sending functionality using SendGrid API.\n- Logs order processing and email notification details to the console.\n- Provides a cURL command for invoking the service via OpenWhisk.\n- Supports IBM Watson IoT Platform for event-based automation.\n\n## Installation\n1. Clone this repository:\n   ```sh\n   git clone \u003cREPO_URL\u003e\n   ```\n2. Navigate to the project directory:\n   ```sh\n   cd \u003cPROJECT_FOLDER\u003e\n   ```\n3. Install dependencies:\n   ```sh\n   npm install\n   ```\n\n## Usage\nCall the `main` function with parameters:\n```javascript\nconst params = { from: \"FROM_EMAIL\", to: \"TO_EMAIL\", subject: \"Test Subject\", content: \"Email content here\" };\nmain(params)\n  .then(response =\u003e console.log(response))\n  .catch(error =\u003e console.error(error));\n```\n\n## Environment Variables\nReplace `\u003cSENDGRID_API_KEY\u003e`, `\u003cFROM_EMAIL\u003e`, and `\u003cTO_EMAIL\u003e` in the code with actual values.\n\n## OpenWhisk Integration\nExport required environment variables and invoke the service using cURL:\n```sh\nexport TYPE='Content-Type: application/json'\nexport AUTH='Authorization: Basic '`bx wsk property get --auth | awk '{printf(\"%s\", $3)}' | base64 `\nexport NAMESPACE=\u003cOW_NAMESPACE\u003e\nexport API_ENDPOINT=\u003cAPI_ENDPOINT\u003e\ncurl -k -s -X POST -d '{\"from\": \"FROM_EMAIL_ID\", \"to\": \"TO_EMAIL_ID\",\"subject\":\"OpenWhisk Alert\",\"content\":\"Hello from Serverless\"}' -H \"$TYPE\" -H \"$AUTH\" https://$API_ENDPOINT/api/v1/namespaces/$NAMESPACE/actions/sendMail?blocking=true\n```\n\n## IBM Watson IoT Platform Integration\n### Button to Bulb Communication\n1. The button sends an event to Watson IoT Platform.\n2. The subscribed application processes the event and triggers an action.\n3. The action sends a command to turn the bulb on/off.\n\n## Dependencies\n- Node.js\n- SendGrid API\n- OpenWhisk CLI\n- UUID package (v3.0.1)\n- IBM Watson IoT Platform\n- Paho MQTT Library\n- GrovePi Sensor Library\n\n## Package.json Configuration\nBelow is the package.json configuration for the project:\n```json\n{\n  \"name\": \"sendgrid\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" \u0026\u0026 exit 1\"\n  },\n  \"dependencies\": {\n    \"sendgrid\": \"file:\",\n    \"uuid\": \"3.0.1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\"\n}\n```\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnithingowda16%2Fiot-application-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnithingowda16%2Fiot-application-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnithingowda16%2Fiot-application-management/lists"}