{"id":38151993,"url":"https://github.com/block-foundation/solidity-smart-home","last_synced_at":"2026-01-16T23:02:36.112Z","repository":{"id":183415784,"uuid":"669945515","full_name":"block-foundation/solidity-smart-home","owner":"block-foundation","description":"Solidity Smart Contract: Smart Home","archived":false,"fork":false,"pushed_at":"2024-10-28T08:35:57.000Z","size":234,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-05T02:26:22.348Z","etag":null,"topics":["architecture","block-foundation","blockchain","blockfoundation","chainlink","dapp","eth","ethereum","housing","internet-of-things","iot","oracle","real-estate","smart-contract","smart-home","sol","solidity"],"latest_commit_sha":null,"homepage":"https://www.blockfoundation.io","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/block-foundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":".github/GOVERNANCE.md","roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"block-foundation","open_collective":"block"}},"created_at":"2023-07-24T00:00:08.000Z","updated_at":"2025-05-14T20:19:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"470bcd8a-fbf8-4e01-b778-6d14d3fa5758","html_url":"https://github.com/block-foundation/solidity-smart-home","commit_stats":null,"previous_names":["block-foundation/solidity-smart-home"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/block-foundation/solidity-smart-home","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-smart-home","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-smart-home/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-smart-home/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-smart-home/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/block-foundation","download_url":"https://codeload.github.com/block-foundation/solidity-smart-home/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-smart-home/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28487098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T22:54:02.790Z","status":"ssl_error","status_checked_at":"2026-01-16T22:50:10.344Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["architecture","block-foundation","blockchain","blockfoundation","chainlink","dapp","eth","ethereum","housing","internet-of-things","iot","oracle","real-estate","smart-contract","smart-home","sol","solidity"],"created_at":"2026-01-16T23:02:35.183Z","updated_at":"2026-01-16T23:02:36.087Z","avatar_url":"https://github.com/block-foundation.png","language":"Solidity","funding_links":["https://github.com/sponsors/block-foundation","https://opencollective.com/block"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"right\"\u003e\n\n[![GitHub License](https://img.shields.io/github/license/block-foundation/blocktxt?style=flat-square\u0026logo=readthedocs\u0026logoColor=FFFFFF\u0026label=\u0026labelColor=%23041B26\u0026color=%23041B26\u0026link=LICENSE)](https://github.com/block-foundation/solidity-smart-home/blob/main/LICENSE)\n[![devContainer](https://img.shields.io/badge/Container-Remote?style=flat-square\u0026logo=visualstudiocode\u0026logoColor=%23FFFFFF\u0026label=Remote\u0026labelColor=%23041B26\u0026color=%23041B26)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/block-foundation/solidity-smart-home)\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv\u003e\n    \u003cimg align=\"right\" src=\"https://raw.githubusercontent.com/block-foundation/brand/master/src/logo/logo_gray.png\" width=\"96\" alt=\"Block Foundation Logo\"\u003e\n    \u003ch1 align=\"left\"\u003eBlockchain Enabled Smart Home\u003c/h1\u003e\n    \u003ch3 align=\"left\"\u003eBlock Foundation Smart Contract Series [Solidity]\u003c/h3\u003e\n\u003c/div\u003e\n\n---\n\n\u003cimg align=\"right\" width=\"75%\" src=\"https://raw.githubusercontent.com/block-foundation/brand/master/src/image/repository_cover/block_foundation-structure-03-accent.jpg\"  alt=\"Block Foundation Brand\"\u003e\n\n### Contents\n\n- [Introduction](#introduction)\n- [Colophon](#colophon)\n\n\u003cbr clear=\"both\"/\u003e\n\n---\n\n\u003cdiv align=\"right\"\u003e\n\n[![Report a Bug](https://img.shields.io/badge/Report%20a%20Bug-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-smart-home/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=bug_report.yml)\n[![Request a Feature](https://img.shields.io/badge/Request%20a%20Feature-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-smart-home/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=feature_request.yml)\n[![Ask a Question](https://img.shields.io/badge/Ask%20a%20Question-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-smart-home/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=question.yml)\n[![Make a Suggestion](https://img.shields.io/badge/Make%20a%20Suggestion-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-smart-home/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=suggestion.yml)\n[![Start a Discussion](https://img.shields.io/badge/Start%20a%20Discussion-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-smart-home/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=discussion.yml)\n\n\u003c/div\u003e\n\n**Welcome to the Blockchain Enabled Smart Home project, where we leverage the power of blockchain technology to bring automation, security, and efficiency to your home environment.**\n\n## Introduction\n\nIn the era of the Internet of Things (IoT), where all devices are becoming smarter and interconnected, our homes are not left behind. The concept of smart homes has rapidly emerged, providing people with increased comfort, energy efficiency, and home security. However, the integration of blockchain in this domain is still relatively new and opens up a myriad of opportunities.\n\nOur project aims to harness the benefits of blockchain, specifically Ethereum and Algorand platforms, to enhance the functionality and efficiency of a smart home. We employ smart contracts to automate home functions such as temperature control, light intensity regulation, and security alert systems based on external data inputs. These data inputs are provided by oracle services, which fetch real-world data and bring them onto the blockchain.\n\nIn our Ethereum-based implementation, we utilize the Solidity programming language to write smart contracts that interact with Chainlink oracles for fetching external data. These smart contracts are designed to react when certain thresholds, such as temperature or light intensity, are crossed, triggering corresponding actions like adjusting the temperature or light intensity, or sending a security alert.\n\nIn the Algorand version, we use PyTeal, a Python language binding for Algorand's smart contract language, TEAL. Due to Algorand's UTXO-based model and the stateful nature of its smart contracts, we construct a simplified version of a state machine to track variables such as temperature.\n\nAlthough the idea of integrating blockchain technology into smart homes may seem complex, it brings forth numerous advantages, such as enhanced security, transparency, and automation. Through our project, we aim to provide a robust, decentralized, and secure smart home system that paves the way for the future of home automation.\n\n## Quick Start\n\n\u003e Install\n\n``` sh\nnpm i\n```\n\n\u003e Compile\n\n``` sh\nnpm run compile\n```\n\n## Contract\n\nIn a smart home scenario, we could imagine a smart contract that regulates and automates various functions like temperature control, light control, security etc. based on external data feeds provided by oracles. This is an oversimplified version to demonstrate the concept. In the real-world, access controls would be required for these functions to prevent anyone other than the contract owner or authorized parties from invoking these actions. Additionally, these external contract calls could fail and the smart contract should handle these failures gracefully. The oracles also need to be trusted and secure.\n\nThis example utilizes **Chainlink's Oracle** solution to retrieve external data. The three functions `checkTemperature`, `checkLightIntensity` and `checkSecurityAlert` fetches the latest data from each respective oracle feed and checks if it crosses a certain threshold. If it does, it emits an event, which can be listened to and acted upon.\n\nFor real world usage, you may want the smart contract to also have the ability to act on this information, such as by interacting with other smart contracts to automatically adjust the temperature, light intensity or alert the security company in case of a security alert.\n\nWe use three external contracts as examples: `TemperatureControlContract`, `LightControlContract` and `SecurityAlertContract`. These contracts should include the `setTemperature`, `setLightIntensity` and `setAlertStatus` methods respectively, that we could call to change the house's state.\n\n*Note: Due to the complexity and security considerations in smart contract development, especially when oracles or any form of external data is involved, this contract should not be used as is. It's a rudimentary demonstration and actual deployment would require additional features like error handling, security precautions (like checking the source of the oracle data), efficiency optimizations, etc.*\n\n## Development Resources\n\n### Other Repositories\n\n#### Block Foundation Smart Contract Series\n\n|                                   | `Solidity`  | `Teal`      |\n| --------------------------------- | ----------- | ----------- |\n| **Template**                      | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-template) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-template) |\n| **Architectural Design**          | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-architectural-design) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-architectural-design) |\n| **Architecture Competition**      | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-architecture-competition) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-architecture-competition) |\n| **Housing Cooporative**           | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-housing-cooperative) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-housing-cooperative) |\n| **Land Registry**                 | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-land-registry) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-land-registry) |\n| **Real-Estate Crowdfunding**      | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-real-estate-crowdfunding) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-real-estate-crowdfunding) |\n| **Rent-to-Own**                   | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-rent-to-own) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-rent-to-own) |\n| **Self-Owning Building**          | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-self-owning-building) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-self-owning-building) |\n| **Smart Home**                    | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-smart-home) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-smart-home) |\n\n\n---\n\n## Colophon\n\n### Authors\n\nThis is an open-source project by the **[Block Foundation](https://www.blockfoundation.io \"Block Foundation website\")**.\n\nThe Block Foundation mission is enabling architects to take back initiative and contribute in solving the mismatch in housing through blockchain technology. Therefore the Block Foundation seeks to unschackle the traditional constraints and construct middle ground between rent and the rigidity of traditional mortgages.\n\nwebsite: [www.blockfoundation.io](https://www.blockfoundation.io \"Block Foundation website\")\n\n### Development Resources\n\n#### Contributing\n\nWe'd love for you to contribute and to make this project even better than it is today!\nPlease refer to the [contribution guidelines](.github/CONTRIBUTING.md) for information.\n\n### Legal Information\n\n#### Copyright\n\nCopyright \u0026copy; 2023 [Stichting Block Foundation](https://www.blockfoundation.io/ \"Block Foundation website\"). All Rights Reserved.\n\n#### License\n\nExcept as otherwise noted, the content in this repository is licensed under the\n[Creative Commons Attribution 4.0 International (CC BY 4.0) License](https://creativecommons.org/licenses/by/4.0/), and\ncode samples are licensed under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).\n\nAlso see [LICENSE](https://github.com/block-foundation/community/blob/master/src/LICENSE) and [LICENSE-CODE](https://github.com/block-foundation/community/blob/master/src/LICENSE-CODE).\n\n#### Disclaimer\n\n**THIS SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-foundation%2Fsolidity-smart-home","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblock-foundation%2Fsolidity-smart-home","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-foundation%2Fsolidity-smart-home/lists"}