Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
aframe-smart-home
Advanced tools
Aframe-smart-home is a demo project illustrating digital twins, using different technologies:
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).
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:
Default application is a simulator that mock sensor(s) values.
$ npm install aframe-smart-home
$ cd node_modules/aframe-smart-home/
$ npm install && npm start
$ curl http://localhost:8888/
{ "id": "urn:dev:ops:smarthome-1234", (...)
"properties": {
"level": {
"description": "Solar sensor level",
"links": [ {
"rel": "property",
"href": "/properties/level" (...)
$ curl http://localhost:8888/properties
{"level":42}
cd aframe
npm install && PORT=42080 npm start
x-www-browser http://localhost:42080/aframe/
Glitch can run this previous simulator
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
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
Mozilla gateway could be also used with additional bearer token.
FAQs
Digital twin smart home proof of concept
We found that aframe-smart-home demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.