Brand New IOT Gateway Is Missing Add-Ons and Other Things

First, I need to apologize for any dumb statements as I am a complete noob to Pi, Linux and IOT.

I have been attempting to get Mozilla Gateway running for 3 days now. I’ve flashed a clean version of gateway-0.7.0.img (using balenaEtcher) numerous times so that I can re-try from scratch each time. While I have been able to get the gateway to connect to a Z-Wave switch, there are numerous features that simply aren’t working. These are:

  1. After configuring a wi-fi network and connecting to it, I can get to the http://gateway.local site (but only because I added a manual hosts entry as mDNS isn’t available on my router). However, for the first screen when it prompts to “Choose a secure web address for your gateway” I put in my chosen name (one word) and my email address then click on {Create]. It then shows “processing”, but then hangs there. I’ve waited for 10 minutes and still nothing happens, so finally I click on [Skip]. I’ve tried this with a 3 iterations of a brand-new clean image on my SD card.

  2. Once I skip the initial config, I can get to the main interface and I can scan and add my Z-Wave switch (by using the Z-Stick Gen5 USB dongle). However, when I go to Settings, the following pages don’t work:

    a. Clicking on “Add-ons” > (+) goes to http://gateway.local/settings/addons/discovered, but it’s just a dark blue background with a title of “Discover New Add-ons” and nothing is ever displayed.

    b. When I go to “Updates” it shows “Updates” in the title, but then with just two dark blue boxes with no text in them.

Any input as to why I can’t get this thing to work would be greatly appreciated.

That sounds like it’s having trouble connecting to the internet. Do you have DHCP available in your network?

Martin, DCHP is enabled and the Pi gets an IP address. I did move it into the DMZ so that no ports are being blocked and then I re-flashed the SD card and tried again. This time was almost the same result (can’t “Choose a secure web address for your gateway” and can’t see anything under Add-ons, but now I do see the Update version info. That’s the only change I see by moving it to the DMZ. I can’t think of anything else to try.

BTW, do you know how to install add-on’s via the Pi command line? If so, that might at least help me get over some of my hurdles.

I wonder if there’s anything in the logs (Settings → Developer → View Logs).

To load the available add-ons however can also fail in your client (the browser), since it will try to load https://api.mozilla-iot.org:8443/addons?api=2&arch=linux-arm&version=0.7.0&node=57&python=2.7,3.5 from the client. You can see that if you hit F12 and go to network, then go to the install add-ons screen.

I encountered that “Processing…” (never finishing) bug and reported it and @mstegeman fixed it. As a workaround, you can just open a new tab and enter the new subdomain url. But first wait a few minutes for the secure cert to be installed. If you don’t see add-ons listed, then either the RPi can’t get to the Internet or the special port it uses to fetch the add-ons is blocked.

May that be related to firewall restrictions, I remember from mozfest that all ports but ttp/s 80/443 were closed, so the addons list was not able to be retrieved and we were stuck to use some adapters… I might have reported this somewhere…

Hi,
I am having similar issues as @bigmac.
I am new to Mozilla WebThings and have succesullt flashed my microSD using balenaEtcher with gateway-0.12.0.img but I get several issues duing the setup:

  1. I can get to http://gateway.local no problem, but when I get to setting up a subdomain I always get the error ‘failed to get certificate, please try again’ no matter what I try I can’t get this to work so click ‘skip’.
  2. I can’t see any available smart devices which are all Wi-Fi based and connected to the same 2.4GHz network as the pi. I tried to search the Add-ons > + to see if I was missing one but the list of available Add-ons never populates. I see that the page is attempting to connect to https://api.mozilla-iot.org:8443/addons?arch=linux-arm&version=0.12.0&node=64&python=2.7,3.7 but still no list of Add-ons.

Any ideas? I note that @rzr mentions possible firewall restrictions on the port, does anyone know which port is needed so I can ensure it is open to the pi?

Any other help greatly appreciated as I’d love to give this a go as it seems like a great project.

Hi,

I think you are using the old mozilla image. The current webthings.io image is here --> https://webthings.io/gateway/

I believe the backend for mozilla-iot has been shut down.

I get exactly the same issue as sutcliffe.ben
There are no Add-Ons listed, on a brand-new gateway with the webthings.io setup.

Was anyone able to resolve this?

I have a fresh RPi gateway install with the image from here. The configuration went fine and I was able to config the domain, and I can hit both the domain, and the gateway.local, but the Add-ons page is blank?

Did you happen to check the log file for errors/issues?

Hi Eric, thanks for the response.

I just checked the logs and I am seeing a ‘Failed to ping registration server’ error

2023-01-15 10:56:50.892 INFO : Failed to ping registration server: { FetchError: request to https://api.webthings.io:8443/ping?token=87932c81-7589-4757-9587-02f54bbe4f19 failed, reason: connect EHOSTUNREACH 44.240.205.60:8443

Based on another post, from SSH I also tried running ./run-app.sh in the ~/webthings/gateway folder and I see the following near the end of the output:

2023-01-14 15:54:13.389 INFO : Opening database: /home/pi/.webthings/log/logs.sqlite3
events.js:174
throw er; // Unhandled ‘error’ event
^

Error: listen EADDRINUSE: address already in use :::4443
at Server.setupListenHandle [as _listen2] (net.js:1280:14)
at listenInCluster (net.js:1328:12)
at Server.listen (net.js:1415:7)
at promises.push.Promise (/home/pi/webthings/gateway/build/app.js:125:31)
at new Promise ()
at startHttpsGateway (/home/pi/webthings/gateway/build/app.js:124:19)
at exports.serverStartup.promise.tunnel_service_1.default.userSkipped.then (/home/pi/webthings/gateway/build/app.js:291:29)

Hi @Warren_Medernach,

It’s possible the add-ons server was down at the time you tried, or something on your network is preventing the gateway from reaching it.

Are you able to fetch the add-ons list from the command line?

$ curl https://api.webthings.io:8443/addons

This just means that the gateway can’t use port 4443 because another instance of the gateway is already running and using that port.

This is what is returned:

$ curl https://api.webthings.io:8443/addons
curl: (7) Failed to connect to api.webthings.io port 8443: No route to host

That’s strange, I’m unable to reproduce that. Does your gateway have access to the Internet?

$ ping google.com

Yes, I can successfully ping other sites:

$ ping google.com
PING google.com(sea09s35-in-x0e.1e100.net (2607:f8b0:400a:800::200e)) 56 data bytes
64 bytes from sea09s35-in-x0e.1e100.net (2607:f8b0:400a:800::200e): icmp_seq=1 ttl=59 time=72.5 ms
64 bytes from sea09s35-in-x0e.1e100.net (2607:f8b0:400a:800::200e): icmp_seq=2 ttl=59 time=74.6 ms
64 bytes from sea09s35-in-x0e.1e100.net (2607:f8b0:400a:800::200e): icmp_seq=3 ttl=59 time=77.0 ms
64 bytes from sea09s35-in-x0e.1e100.net (2607:f8b0:400a:800::200e): icmp_seq=4 ttl=59 time=74.3 ms
64 bytes from sea09s35-in-x0e.1e100.net (2607:f8b0:400a:800::200e): icmp_seq=5 ttl=59 time=74.3 ms
^C
google.com ping statistics —
5 packets transmitted, 5 received, 0% packet loss, time 10ms
rtt min/avg/max/mdev = 72.537/74.555/76.986/1.452 ms

That’s even more strange. Do you mind me asking whether you are geographically closer to Oregon (US) or Frankfurt (Germany)?

What happens if you run that curl command on another computer on your network?

$ curl https://api.webthings.io:8443/addons

What happens if you dig the API from your gateway?

$ dig api.webthings.io +trace

I would be closer to Oregon.

$ curl https://api.webthings.io:8443/addons
curl: (7) Failed to connect to api.webthings.io port 8443: No route to host

$ dig api.webthings.io +trace

; <<>> DiG 9.11.5-P4-5.1+deb10u8-Raspbian <<>> api.webthings.io +trace
;; global options: +cmd
. 26180 IN NS h.root-servers.net.
. 26180 IN NS k.root-servers.net.
. 26180 IN NS l.root-servers.net.
. 26180 IN NS a.root-servers.net.
. 26180 IN NS g.root-servers.net.
. 26180 IN NS e.root-servers.net.
. 26180 IN NS d.root-servers.net.
. 26180 IN NS f.root-servers.net.
. 26180 IN NS m.root-servers.net.
. 26180 IN NS b.root-servers.net.
. 26180 IN NS c.root-servers.net.
. 26180 IN NS i.root-servers.net.
. 26180 IN NS j.root-servers.net.
;; Received 239 bytes from 64.59.176.14#53(64.59.176.14) in 25 ms

io. 172800 IN NS a0.nic.io.
io. 172800 IN NS a2.nic.io.
io. 172800 IN NS b0.nic.io.
io. 172800 IN NS c0.nic.io.
io. 86400 IN DS 57355 8 2 95A57C3BAB7849DBCDDF7C72ADA71A88146B141110318CA5BE672057 E865C3E2
io. 86400 IN RRSIG DS 8 1 86400 20230129050000 20230116040000 951 . qJTaVXER0FkvG3yDvWunfJtHlqYbGxZmBFcoMC/b3fzZEGg9YAYWTm91 bRzO3Y74lJaAW4gCp3eWPfDSR5PvFYPMRAwxx9Fne5cRNtSSoIH0SrQS B2hGGeOiLdM8yTyfgqN2wFglfqqtdwcmqXaJjuLVjRbunq6luC83GwNA Htv/Uq0T6XHhEUJt5Vej1Gdx3MzBjmM95AHR7+5TpRDJCFq5bAu2XzT8 b0V64zHmWUNW7VuVzPIuHnXYsYM3JCYftusqj8K6Ir6LWEaz2N9+pb2B nI+lcO+IsDIYnQyRlTw4wqkutJwghl1jR+pLY/nru8DaMuI6sZlCHxcL 8RT7Hg==
;; Received 628 bytes from 199.7.83.42#53(l.root-servers.net) in 31 ms

webthings.io. 3600 IN NS ns2.webthings.io.
webthings.io. 3600 IN NS ns1.webthings.io.
0d790076pp5pfktg2hrthj5bj6ckckcb.io. 3600 IN NSEC3 1 1 10 332539EE7F95C32A 0D7BD4G2J0SLS1QJ0OVHK6NSRI6V9MIK NS SOA RRSIG DNSKEY NSEC3PARAM
0d790076pp5pfktg2hrthj5bj6ckckcb.io. 3600 IN RRSIG NSEC3 8 2 3600 20230206160155 20230116150155 63585 io. AAfNKJ9DSCBKFFfcalpHSwjcR/HGpACh9PcNT8mMy1/GOY0yOR7V0csF 9U5Et27axRdczG9bUxTFHcSD3CCzM1FovKl4cXIkmSowbHaptU//wFms 85o7b0h2uSdSpOXOZj6dybqu3zI5DUDHjnXcZU4jgLSIDwzmoVlUiAlQ hOs=
9t6uqd6rco9hhg5g5mu80sb329bh3su0.io. 3600 IN NSEC3 1 1 10 332539EE7F95C32A 9T7FIJJSJU496GG9PS0LQVGVJL5DMBD8 NS DS RRSIG
9t6uqd6rco9hhg5g5mu80sb329bh3su0.io. 3600 IN RRSIG NSEC3 8 2 3600 20230130160025 20230109150025 63585 io. YQZXhWZ+B++MqgMqa669lJeuVRj9mZMteHfo8Wa4JYRDFZwFgrIy1tSQ D+mxvy0aWlqjJ2aQvY86L5yjdMcXqY+rML9mpotBQgRW0IYOvVxxWfN/ wj36xqRVFTCG4Hvh9Jh/jvsuolIDi6jNQQkkbNKRMPApJGMhtcevQy5O uQ4=
;; Received 612 bytes from 65.22.160.17#53(a0.nic.io) in 197 ms

api.webthings.io. 1 IN A 44.240.205.60
;; Received 61 bytes from 44.240.205.60#53(ns1.webthings.io) in 65 ms