{"id":15687933,"url":"https://github.com/rzr/aframe-smart-home","last_synced_at":"2025-05-07T18:09:20.326Z","repository":{"id":35063466,"uuid":"202191598","full_name":"rzr/aframe-smart-home","owner":"rzr","description":"Web Of Twin Example","archived":false,"fork":false,"pushed_at":"2024-03-28T17:39:55.000Z","size":234,"stargazers_count":8,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-21T18:29:37.656Z","etag":null,"topics":["aframe","digitaltwin","digitaltwins","solar","webthing","webthings"],"latest_commit_sha":null,"homepage":"http://purl.org/aframe-smart-home","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rzr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-13T17:19:57.000Z","updated_at":"2024-02-07T19:23:51.000Z","dependencies_parsed_at":"2024-10-23T20:43:16.971Z","dependency_job_id":null,"html_url":"https://github.com/rzr/aframe-smart-home","commit_stats":{"total_commits":61,"total_committers":4,"mean_commits":15.25,"dds":0.3770491803278688,"last_synced_commit":"2d960390cc7641f16322a8ac4f6f630eda3ba54c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzr%2Faframe-smart-home","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzr%2Faframe-smart-home/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzr%2Faframe-smart-home/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzr%2Faframe-smart-home/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rzr","download_url":"https://codeload.github.com/rzr/aframe-smart-home/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252694333,"owners_count":21789846,"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":["aframe","digitaltwin","digitaltwins","solar","webthing","webthings"],"created_at":"2024-10-03T17:51:39.227Z","updated_at":"2025-05-07T18:09:20.298Z","avatar_url":"https://github.com/rzr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AFRAME-SMART-HOME #\n\n[![GitHub forks](\nhttps://img.shields.io/github/forks/rzr/aframe-smart-home.svg?style=social\u0026label=Fork\u0026maxAge=2592000\n)](\nhttps://GitHub.com/rzr/aframe-smart-home/network/\n)\n[![license](\nhttps://img.shields.io/badge/license-MPL--2.0-blue.svg\n)](LICENSE)\n[![GitHub version](\nhttps://badge.fury.io/gh/rzr%2Faframe-smart-home.svg\n)](\nhttp://badge.fury.io/gh/rzr%2Faframe-smart-home\n)\n[![NPM](\nhttps://img.shields.io/npm/v/aframe-smart-home.svg\n)](\nhttps://www.npmjs.com/package/aframe-smart-home\n)\n\nAframe-smart-home is a demo project illustrating digital twins, using different technologies:\n\n* WoT/Mozilla's WebThing schema to describe resources\n* webthing-iotjs to simulate some sensors (only one here)\n* aframe for rendering to XR devices\n* aframe-webthing to update XR view from webthing\n\n\n## EXPLANATION: ##\n\nToday, the smart house is empty but has a solar pannel on the roof\nand we are monitoring the voltage in real time.\n\nFor demo purposes a real model of the house was used along\na tiny but real solar pannel (item found in garden lamp).\n\n[![Real](\nhttps://cf.mastohost.com/v1/AUTH_91eb37814936490c95da7b85993cc2ff/socialsamsunginternet/media_attachments/files/000/017/390/original/2e6e5f0db7a2e189.jpg\n)](\nhttps://purl.org/aframe-smart-home#\n\"#aframe-smart-home\")\n\nThe output voltage of the solar panel is measured using on board analog input and value is shared to the web using WebThing API.\n\nThen a model can be updated by reading the actual value, the device's color is updated according to an heatmap palette:\n\n\n[![Demo](\nhttps://repository-images.githubusercontent.com/202191598/26accf00-2da3-11ea-8e6a-f8fdba75e86a#./file/aframe-smart-home.gif\n)](\nhttps://rzr.github.io/aframe-smart-home/aframe\n\"#aframe-smart-home\")\n\n\n## USAGE: ##\n\n\n### SIMULATOR: ###\n\nDefault application is a simulator that mock sensor(s) values.\n\n```sh\n$ npm install aframe-smart-home\n$ cd node_modules/aframe-smart-home/\n$ npm install \u0026\u0026 npm start\n$ curl http://localhost:8888/\n{ \"id\": \"urn:dev:ops:smarthome-1234\", (...)\n  \"properties\": {\n    \"level\": {\n      \"description\": \"Solar sensor level\",\n      \"links\": [ {\n          \"rel\": \"property\",\n          \"href\": \"/properties/level\" (...)\n$ curl http://localhost:8888/properties\n{\"level\":42}\ncd aframe\nnpm install \u0026\u0026 PORT=42080 npm start\nx-www-browser http://localhost:42080/aframe/\n```\n\n### CLOUD: ###\n\nGlitch can run this previous simulator\n\n* \u003chttps://glitch.com/edit/#!/aframe-smart-home\u003e\n\n### NODE TARGET: ###\n\nAny board with ADC port could be used.\n\nHere an example on ARTIK1020 using webthing-node:\n\n```sh\ngit clone --depth=1 --recursive https://github.com/rzr/aframe-smart-home\ncd aframe-smart-home\nmake -C example/artik1020/ start\n#| Listening:\n#| http://localhost:8888/\n#| log: ADC: level: open: null (null expected)\n#| log: ADC: level: update: 0x2a : 40\n#| 0.03515625 V\n#| log: ADC: level: change: 48%\n#| (...)\n```\n\nIn other shell value can be queried:\n\n```sh\ncurl http://artik1020.local:8888/properties\n#| {\"level\":36.69597260346487}p\n```\n\nFor convenience this can be enabled on boot:\n```sh\nsudo ln -fs $PWD /usr/local/opt/aframe-smart-home\nunit=aframe-smart-home\nservice=/usr/local/opt/aframe-smart-home/example/artik1020/aframe-smart-home.service\nsudo ln -fs $service /usr/lib/systemd/system/\nsudo systemctl restart $unit\nsudo journalctl -xu $unit\n```\n\n### IOTJS TARGET: ###\n\nAny board with ADC port could be used.\n\nIt should be easy to adapt from supported boards of webthing-iotjs,\nsee STM32F7 platform example.\n\nAnyway it's possible to use it on Linux using the same simulator:\n\n```sh\nmake start\n```\n\n### GATEWAY: ###\n\nMozilla gateway could be also used with additional bearer token.\n\n\n## RESOURCES: ##\n\n* \u003chttps://purl.org/aframe-smart-home\u003e\n* \u003chttps://rzr.github.io/aframe-smart-home/aframe\u003e\n* \u003chttps://www.npmjs.com/package/aframe-webthing\u003e\n* \u003chttps://www.npmjs.com/package/webthing-iotjs\u003e\n* \u003chttps://www.npmjs.com/package/webthing\u003e\n* \u003chttps://fosdem.org/2020/schedule/event/web_of_twins/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frzr%2Faframe-smart-home","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frzr%2Faframe-smart-home","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frzr%2Faframe-smart-home/lists"}