Skip to content
Philippe Coval edited this page Mar 4, 2020 · 22 revisions

TODO

Work in progress to be documented in separate pages.

XR

Check XR page

PYTHON

Compare performance to python and uPy

DOCKER COMPOSE

Or if using docker-compose:

docker-compose --verbose run start/board/artik530

Recreating webthingnode_web_1
Attaching to webthingnode_web_1
web_1  | log: Loading platform: artik710
web_1  | Usage:
web_1  | /usr/bin/iotjs example/platform/index.js [port]
web_1  | Try:
web_1  | curl -H "Accept: application/json" http://localhost:8888
web_1  |
web_1  | log: SW404 ready:null
web_1  | log: SW403 ready:null
web_1  | log: gpio: RedLed: ready? (null expected): null
web_1  | log: gpio: BlueLed: ready? (null expected): null
web_1  | log: gpio: SW404: update: true
(...)
web_1  | log: gpio: BlueLed: writing: true
(...)
(... user hit Ctrl+C ...)
Gracefully stopping... (press Ctrl+C again to force)
Stopping webthingnode_web_1 ...
Stopping webthingnode_web_1 ... done

WINDOWS

ADAPTER

SENSOR:

PWM:

OPENDATA:

COMMUNITY:

 stats

ARMBIAN:

Alternatively:

. /etc/os-release
image="${NAME,,}:${VERSION_ID}" # or debian:latest ...
sed -e "s|^FROM [^ ]*|FROM $image|g" -i Dockerfile
script

time $sudo docker build -t webthings-gateway-deb .
Sending build context to Docker daemon  562.2kB
Step 1/18 : FROM ubuntu:18.04 as webthings-gateway-builder
18.04: Pulling from library/ubuntu
(...)

EXTRACT PACKAGE:

time $sudo docker build -t webthings-gateway-deb .

   (...)
   dpkg-buildpackage: info: full upload (original source is included)
+ cd ..
++ ls webthings-gateway_0.11.0-1_armhf.deb
+ _deb=webthings-gateway_0.11.0-1_armhf.deb
++ lsb_release -is
++ tr '[A-Z]' '[a-z]'
++ lsb_release -cs
++ tr '[A-Z]' '[a-z]'
+ _renamed=webthings-gateway_0.11.0-1_armhf-ubuntu-bionic.deb
+ mv webthings-gateway_0.11.0-1_armhf.deb webthings-gateway_0.11.0-1_armhf-ubuntu-bionic.deb
+ ln -s webthings-gateway_0.11.0-1_armhf-ubuntu-bionic.deb webthings-gateway.deb
+ echo ''

+ echo 'Done building: webthings-gateway_0.11.0-1_armhf-ubuntu-bionic.deb'
Done building: webthings-gateway_0.11.0-1_armhf-ubuntu-bionic.deb
+ sync
Removing intermediate container a08e79d08892
 ---> 95c126961d48
Successfully built 95c126961d48
Successfully tagged gateway-deb:latest # TODO

real    76m18.885s
user    0m4.366s
sys     0m1.483s

docker image ls
gatewaydeb_default   latest              32e5bdf8321c        8 hours ago         843MB


project=webthings-gateway
dir=/usr/local/opt/${project}/dist
repository=webthings-gateway-deb
tag="latest"
image="$repository:$tag"

#docker commit "$image" "$repository"
container=$(docker create "$image")
# ad10b93f6b19801a958021ee60808eca376c15b25d4036a9ce52ea8cae88180c
mkdir -p tmp/output
docker cp "$container:$dir/" ../

RUN CONTAINER

sudo apt-get install docker-compose # 1.21.0-3
time docker-compose up

#| Creating network "gatewaydeb_default" with the default driver
#| Building default
#| Step 1/18 : FROM ubuntu:18.04 as webthings-gateway-builder
#| 18.04: Pulling from library/ubuntu
#| (...)
#| 

MISC

apt-get remove webthings-gateway docker.io
 
sudo apt install --install-recommends  ./dist/webthings-gateway_*.deb

sudo chmod -Rv 700 /var/cache/apt/archives/partial/

reboot



https://odroid.com/dokuwiki/doku.php?id=en:xu4_hardware#expansion_connectors




 remote.sh  [email protected]

 apt-get install alsa-utils

https://github.com/mozilla-iot/gateway-deb/pull/9







some are adapting


Let's check 

Add radio

http://odroidxu4.local:8080/things

Radio
Save
Done


https://github.com/flatsiedatsie/internet-radio/blob/master/pkg/internet_radio.py


install -d -o webthings  /var/run/webthings-gateway/.mozilla-iot/data/internet-radio
chmod a+rwX -R  /var/run/webthings-gateway/.mozilla-iot/data/internet-radio

root@odroidxu4:/etc/webthings-gateway/addons/internet-radio# ffplay -nodisp  /usr/share/sounds/alsa/Front_Center.wav
root@odroidxu4:/etc/webthings-gateway/addons/internet-radio# addgroup webthings audio


## MISC ##

* <https://gitlab.com/webthings/all-webthings/tree/master/webthings/system-resources#>

INDEX

Clone this wiki locally