Skip to content
JavaScript Makefile HTML Dockerfile Shell
Branch: master
Clone or download
rzr kube: Add ingress.yml writen manualy
Change-Id: I180a31d6e0cb0f42f65688809af96a3ca256760d
Signed-off-by: Philippe Coval <p.coval@samsung.com>
Latest commit 98905d7 Aug 31, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aframe
assets/smart-home
example npm: Update version Aug 14, 2019
extra/tools/kube
lib
.dockerignore
.gitignore git: Ignore IoT.js files Aug 14, 2019
.whitesource Add .whitesource configuration file Aug 14, 2019
Dockerfile
LICENSE
Makefile build: Add rules for docker Aug 30, 2019
README.md doc: Fix demo URL Aug 19, 2019
docker-compose.yml
index.js iotjs: Add index.js for package Aug 14, 2019
package-lock.json
package.json

README.md

AFRAME-SMART-HOME

GitHub forks license GitHub version NPM

Aframe-smart-home is a demo project illustrating digital twins, using different technologies:

  • WoT/Mozilla's WebThing schema to describe resources
  • webthing-iotjs to simulate some sensors (only one here)
  • aframe for rendering to XR devices
  • aframe-webthing to update XR view from webthing

EXPLANATION:

Today, the smart house is empty but has a solar pannel on the roof and we are monitoring the voltage in real time.

For demo purposes a real model of the house was used along a tiny but real solar pannel (item found in garden lamp).

Real

The output voltage of the solar panel is measured using on board analog input and value is shared to the web using WebThing API.

Then a model can be updated by reading the actual value, the device's color is updated according to an heatmap palette:

Demo

USAGE:

SIMULATOR:

Default application is a simulator that mock sensor(s) values.

CLOUD:

Glitch can run this previous simulator

NODE TARGET:

Any board with ADC port could be used.

Here an example on ARTIK1020 using webthing-node:

git clone --depth=1 --recursive https://github.com/rzr/aframe-smart-home
cd aframe-smart-home
make -C example/artik1020/ start
#| Listening:
#| http://localhost:8888/
#| log: ADC: level: open: null (null expected)
#| log: ADC: level: update: 0x2a : 40
#| 0.03515625 V
#| log: ADC: level: change: 48%
#| (...)

In other shell value can be queried:

curl http://artik1020.local:8888/properties
#| {"level":36.69597260346487}p

For convenience this can be enabled on boot:

sudo ln -fs $PWD /usr/local/opt/aframe-smart-home
unit=aframe-smart-home
service=/usr/local/opt/aframe-smart-home/example/artik1020/aframe-smart-home.service
sudo ln -fs $service /usr/lib/systemd/system/
sudo systemctl restart $unit
sudo journalctl -xu $unit

IOTJS TARGET:

Any board with ADC port could be used.

It should be easy to adapt from supported boards of webthing-iotjs, see STM32F7 platform example.

Anyway it's possible to use it on Linux using the same simulator:

make start

GATEWAY:

Mozilla gateway could be also used with additional bearer token.

RESOURCES:

You can’t perform that action at this time.