Skip to content

Ubuntu Core appliance with Theengs Gateway pre-installed

License

Notifications You must be signed in to change notification settings

theengs/gateway-appliance

Repository files navigation

Build status Check status GitHub license GitHub tag (latest SemVer) amd64 arm64 armhf

Theengs Gateway Appliance

Ubuntu Core appliance with Theengs Gateway pre-installed

How to install

Download the .img.xz file from the latest release of this repository.

There are three files to choose from:

  • theengs-gateway-core22-amd64.img.xz: for Intel NUC
  • theengs-gateway-core22-pi-arm64.img.xz: for Raspberry Pi 3, 4, 400, CM4 and Zero 2 W
  • theengs-gateway-core22-pi-armhf.img.xz: for Raspberry Pi 2, 3, 4, 400, CM4 and Zero 2 W

Note that the Raspberry Pi 2 only supports 32-bits, so you need the armhf image for this model. You also need a separate Bluetooth USB dongle (Bluetooth 4.0 or higher) to be able to use Theengs Gateway, because this model doesn't have a built-in Bluetooth chip.

See the instructions for Installing Ubuntu Core 22 on a Raspberry Pi, but use one of the images of this repository instead of the default Ubuntu Core 22 image.

After installing the appliance, the operating system and Theengs Gateway should automatically upgrade when a newer release is available.

Make sure to set the correct timezone for the appliance, e.g.:

snap set system system.timezone="Europe/Brussels"

How to configure

First give the snap access to Bluetooth:

snap connect theengs-gateway:bluez-client bluez:service

You can show the Theengs Gateway snap's configuration with:

$ snap get -d theengs-gateway
{
        "ble": {
                "adapter": "",
                "scan-duration": 5,
                "time-between": 5
        },
        "ha": {
                "discovery": 1,
                "discovery-device-name": "TheengsGateway",
                "discovery-filter": "IBEACON",
                "discovery-topic": "homeassistant/sensor",
                "hass-discovery": 1
        },
        "log-level": "WARNING",
        "mqtt": {
                "host": "",
                "pass": "",
                "port": 1883,
                "pub-topic": "home/TheengsGateway/BTtoMQTT",
                "lwt-topic": "home/TheengsGateway/LWT",
                "sub-topic": "home/+/BTtoMQTT/undecoded",
                "publish-advdata": 0,
                "user": ""
        },
        "time-sync": {
                "addresses": "",
                "format": 0
        },
        "presence": {
                "topic": "home/TheengsGateway/presence",
                "enable": 0
        }
}

You need to set at least the MQTT configuration, for instance:

snap set theengs-gateway mqtt.host=MYBROKER mqtt.user=MYUSER mqtt.pass=MYPASS

Have a look at Theengs Gateway's documentation for the meaning of all configuration options.

After changing the configuration, Theengs Gateway should now run as a service. If you want it to start automatically after booting your appliance, enable the service with:

snap start --enable theengs-gateway

How to build new images

If you want to build the images yourself, you can do this in one command:

./scripts/build-images.sh