WebApp - TizenTeam/webthing-iotjs GitHub Wiki
WEBAPP
Mozilla's IoT Gateway is providing a UI (using SVG widgets), it's pretty usable on any modern devices, but nothing prevent to create other webapps to control webthings.
WEBTHINGS-WEBAPP:
Users can also install and use a standalone webapp (disconnected from the internet), check repo's README for up to date info:
TIZEN:MOBILE
Originally designed as Tizen app (wgt) using Tizen Advanced UI Framework (TAU)
It was tested on Tizen:5 on TM1, WiFi needs to be enabled again, it's not trivial but I shared some hints on Tizen's wiki:
Some patches are still under review:
Earlier Tizen's version might not work because mozilla's gateway UI is expecting recent browsers.
Technically, While online app can rely on Oauth flow, for locally loaded pages it will not work due to security restrictions, so some fallack options can be used:
- Parse token page using a XPATH query
- https://github.com/mozilla-iot/gateway/pull/1149# (Status: Released in 0.8.0)
PROGRESSIVE WEB APPLICATION: (PWA)
Then the application was then "ported" to Android using Progressive Web App (PWA) for Samsung Internet browser, just open those links:
Since PWA was supported in Tizen, so I should worth a try on updated version.
Used repository:
GATEWAY
It should be configured to allow third party application:
app_url="https://$username.mozilla-iot.org/"
token_name="$username.mozilla-iot.org"
secrect="$token_name"
tail /home/pi/mozilla-iot/gateway/src/models/oauthclients.ts
// (...)
oauthClients.register(
new ClientRegistry(new URL('$appurl'),
'$tokenname',
'WebApp Token Service',
'$secret',
'/things:readwrite'));
export default oauthClients;
For example:
Resources:
XR
Check XR page
NOTES
Apply this patch for passing token when application is loaded from filesystem (file:// scheme)
curl https://github.com/TizenTeam/gateway/commit/a0fbcdcc7a62d23d7b3430d4e8d5007a0d71133e.patch | patch -p1
#| patching file src/views/local-token-service.handlebars
RESOURCES:
- https://s-opensource.org/2018/06/21/webthing-iotjs/
- https://stackoverflow.com/questions/41636754/how-to-clear-a-service-worker-cache-in-firefox