Proposed New Appliance: WebThings Gateway

Your interest and involvement

I am the founder of the WebThings open source project, and the founder of Krellian Ltd. who have been sponsoring the project since it was spun out of Mozilla.

Assuming the Ubuntu Appliance programme is still active, I would like to propose an Ubuntu Appliance for WebThings Gateway, which is a software distribution for smart home hubs focused on privacy, security and interoperability - built on W3C Web of Things standards.

Audience

The current user base of WebThings Gateway is predominantly DIY smart home users, but it may also be used in commercial applications in the future and so the appliance would need to be of a high production quality.

Software considerations

WebThings Gateway is currently distributed as a Raspbian-based operating system image, and as a docker image. It has also been distributed as a .deb, .rpm and .tar.gz in the past. We would ideally like to replace the current Raspbian-based image with a more production quality image based on Ubuntu Core, which benefits from automatic OTA updates of both the application and the underlying OS.

There is not currently a working snap package, but Krellian has secured funding to create one with professional support from Canonical.

WebThings Gateway is open source, licensed under the Mozilla Public License Version 2.0.

The application is a self-hosted web application written in Node.js/TypeScript and as far as I know would not require the use of any other snaps (other than vanilla kernel and gadget snaps).

Hardware considerations

WebThings Gateway currently runs on Raspberry Pi and we would also like to target Intel NUC (and eventually ASUS NUC) with the appliance. Common accessories include Zigbee and Z-Wave USB dongles which use a serial connection, but some gateway add-ons (of which there currently around a hundred) may also have additional requirements (e.g. access to Bluetooth, audio and GPIO).

Security considerations

The appliance does not require secure boot or full disk encryption but could benefit from them.

Interfaces that are likely to be needed (ideally auto-connected on the appliance) include (but may not be limited to):

  • avahi-control - to broadcast the availability of the webserver over mDNS, and the Thing Description of the gateway as per the WoT Discovery specification
  • avahi-observe - to discover web things as per the WoT Discovery specification
  • home - possibly needed to store data such as the internal SQLite database, logs and installed add-ons
  • hostname-control - to set the system hostname for mDNS
  • network/network-bind/network-control - To access the network, expose a web server on ports 80/443, and configure Wi-Fi and Ethernet settings
  • serial-port/raw-usb - May be needed to access Zigbee & Z-Wave dongles?
  • snap-refresh-control - Would be nice to manually check for updates to the gateway snap, which is a current feature of the Raspbian-based image
  • time-control/timezone-control - To set the system time/timezone (a current feature of the Raspbian-based image)

Additional interfaces which are not needed by the core gateway application but may be required by add-ons include:

  • bluez/bluetooth-control (e.g. for the HomeKit add-on and/or for Bluetooth beacons)
  • gpio/gpio-control (for the GPIO add-on)
  • pulseaudio (for playback and recording of audio, e.g. by voice control add-ons)

Privacy

The privacy policy for WebThings can be found at https://webthings.io/privacy/

Maintenance considerations

The core dependencies of WebThings Gateway are Node.js, Python and Express - all of which are very actively maintained. A full list of dependencies can be found at https://github.com/WebThingsIO/gateway/blob/master/README.md#install-dependencies and https://github.com/WebThingsIO/gateway/blob/master/package.json

The project to create a snap package of WebThings Gateway will be starting in June/July 2024 and we would be looking to complete the appliance implementation at the start of September.

Creating a custom OS image which bundles the WebThings Gateway snap is one of the core deliverables of the project. I would like to assess whether, given WebThings Gateway is an open source application available for anyone to install and use, an Ubuntu Appliance bundling a snap from the public Snap Store would be a viable way to achieve this.

Please let me know what you think.

Thanks

Ben

1 Like