Things dashboard does not find devices

Hi,
I’m using Webthings Gateway (version 0.12.0) on a Raspberry Pi3. Downloaded directly from github (https://github.com/mozilla-iot/gateway/releases/download/0.12.0/gateway-0.12.0.img.zip) to an SD card and booted the Pi.

I did the startup, create account and ensured the time/timezone was set correctly. I added the Weather 0.5.0 addon, configured my city.

When I try to have the Weather thing show up on the Things Dashboard, it says “Scanning for new devices…” and then “No new things found. Try adding some add-ons”

What am I missing or doing wrong?

Well, the code (version 0.12.0) for the Raspberry Pi is officially broken, out-of-the-box.

To test this, I did the following:

Debian: Things work
I installed the Debian Webthings version ( webthings-gateway-debian-buster-amd64.deb) on a VM. Added the Weather add-on. Then clicked the Things Dashboard, clicked the ‘plus’ sign to add a thing and the Weather panel immediately showed up and I could add a Weather thing for my city.

The log:

2020-05-12 20:35:42.227 INFO   : Fetching add-on https://github.com/mozilla-iot/weather-adapter/releases/download/v0.5.0/weather-adapter-0.5.0.tgz as /tmp/jQjd6d/weather-adapter.tar.gz
2020-05-12 20:35:43.547 INFO   : Expanding add-on /tmp/jQjd6d/weather-adapter.tar.gz
2020-05-12 20:35:47.099 INFO   : Loading add-on: weather-adapter
2020-05-12 20:35:47.873 INFO   : weather-adapter: Opening database: /etc/webthings-gateway/config/db.sqlite3
2020-05-12 20:35:48.037 INFO   : weather-adapter: Loading add-on weather-adapter from /etc/webthings-gateway/addons/weather-adapter
2020-05-12 20:35:57.447 INFO   : Unloading WeatherAdapter
2020-05-12 20:35:57.449 INFO   : weather-adapter: Adapter: WeatherAdapter unloaded
2020-05-12 20:36:00.957 INFO   : Loading add-on: weather-adapter
2020-05-12 20:36:01.765 INFO   : weather-adapter: Opening database: /etc/webthings-gateway/config/db.sqlite3
2020-05-12 20:36:01.914 INFO   : weather-adapter: Loading add-on weather-adapter from /etc/webthings-gateway/addons/weather-adapter
2020-05-12 20:36:04.582 INFO   : Opened a new things socket
2020-05-12 20:36:04.587 INFO   : About to call startPairing on WeatherAdapter
2020-05-12 20:36:14.539 INFO   : getValue for property temperature for: Weather (The Hague) returning 10
2020-05-12 20:36:14.539 INFO   : getValue for property feelsLike for: Weather (The Hague) returning 6
2020-05-12 20:36:14.539 INFO   : getValue for property humidity for: Weather (The Hague) returning 53
2020-05-12 20:36:14.539 INFO   : getValue for property cloudCover for: Weather (The Hague) returning 2
2020-05-12 20:36:14.540 INFO   : getValue for property pressure for: Weather (The Hague) returning 1016
2020-05-12 20:36:14.540 INFO   : getValue for property windSpeed for: Weather (The Hague) returning 4
2020-05-12 20:36:14.540 INFO   : getValue for property windDirection for: Weather (The Hague) returning 300
2020-05-12 20:36:14.540 INFO   : getValue for property description for: Weather (The Hague) returning clear sky
2020-05-12 20:36:14.540 INFO   : getValue for property raining for: Weather (The Hague) returning false
2020-05-12 20:36:14.540 INFO   : getValue for property snowing for: Weather (The Hague) returning false
2020-05-12 20:36:14.542 INFO   : Successfully created new thing Weather (The Hague)

Raspberry: Things do not work
I did exactly the same but now on a fresh Raspberry Pi 3, with a fresh 0.12 webthings raspberry image (https://github.com/mozilla-iot/gateway/releases/download/0.12.0/gateway-0.12.0.img.zip). Added the Weather add-on. Then clicked the Things Dashboard, clicked the ‘plus’ sign to add a thing and … wait … wait … wait … “No new things found. Try adding some add-ons”.

The log:

2020-05-12 20:23:33.478 INFO   : Fetching add-on https://github.com/mozilla-iot/weather-adapter/releases/download/v0.5.0/weather-adapter-0.5.0.tgz as /tmp/QpN7JI/weather-adapter.tar.gz
2020-05-12 20:23:34.575 INFO   : Expanding add-on /tmp/QpN7JI/weather-adapter.tar.gz
2020-05-12 20:23:38.659 INFO   : Loading add-on: weather-adapter
2020-05-12 20:23:40.858 INFO   : weather-adapter: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3
2020-05-12 20:23:41.870 INFO   : weather-adapter: Loading add-on weather-adapter from /home/pi/.mozilla-iot/addons/weather-adapter
2020-05-12 20:23:44.034 INFO   : About to call startPairing on ThingURLAdapter
2020-05-12 20:23:44.217 ERROR  : weather-adapter: Failed to start add-on weather-adapter: No locations configured.
2020-05-12 20:24:09.452 INFO   : thing-url-adapter: Adapter: ThingURLAdapter id thing-url-adapter pairing cancelled
2020-05-12 20:25:18.564 INFO   : Loading add-on: weather-adapter
2020-05-12 20:25:20.866 INFO   : weather-adapter: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3
2020-05-12 20:25:21.906 INFO   : weather-adapter: Loading add-on weather-adapter from /home/pi/.mozilla-iot/addons/weather-adapter
2020-05-12 20:25:25.298 INFO   : Unloading WeatherAdapter
2020-05-12 20:25:25.313 INFO   : weather-adapter: Adapter: WeatherAdapter unloaded
2020-05-12 20:25:28.852 INFO   : Loading add-on: weather-adapter
2020-05-12 20:25:31.091 INFO   : weather-adapter: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3
2020-05-12 20:25:32.084 INFO   : weather-adapter: Loading add-on weather-adapter from /home/pi/.mozilla-iot/addons/weather-adapter
2020-05-12 20:25:33.444 INFO   : About to call startPairing on ThingURLAdapter
2020-05-12 20:25:33.447 INFO   : About to call startPairing on WeatherAdapter
2020-05-12 20:26:33.452 INFO   : Pairing timeout
2020-05-12 20:26:33.461 INFO   : thing-url-adapter: Adapter: ThingURLAdapter id thing-url-adapter pairing cancelled
2020-05-12 20:26:33.468 INFO   : weather-adapter: Adapter: WeatherAdapter id weather-adapter pairing cancelled
2020-05-12 20:34:37.421 INFO   : About to call startPairing on ThingURLAdapter
2020-05-12 20:34:37.424 INFO   : About to call startPairing on WeatherAdapter
2020-05-12 20:35:37.428 INFO   : Pairing timeout
2020-05-12 20:35:37.435 INFO   : thing-url-adapter: Adapter: ThingURLAdapter id thing-url-adapter pairing cancelled
2020-05-12 20:35:37.436 INFO   : weather-adapter: Adapter: WeatherAdapter id weather-adapter pairing cancelled

You forgot to configure the add-on.

Hi mrstegeman, thx for your reply.

Yes I did, the first time at 20:23 , realized my mistake and cancelled the Thing discovery to add the location and tried it again (lateron in the logfile).

I’ve been at this particular issue for a couple of days now, just to be sure, I did this again:

Screen Shot 2020-05-13 at 7.16.29 AM

2020-05-13 07:16:18.004 INFO   : Loading add-on: weather-adapter
2020-05-13 07:16:20.354 INFO   : weather-adapter: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3
2020-05-13 07:16:21.340 INFO   : weather-adapter: Loading add-on weather-adapter from /home/pi/.mozilla-iot/addons/weather-adapter
2020-05-13 07:16:35.321 INFO   : About to call startPairing on WeatherAdapter
2020-05-13 07:17:35.332 INFO   : Pairing timeout
2020-05-13 07:17:35.343 INFO   : weather-adapter: Adapter: WeatherAdapter id weather-adapter pairing cancelled

Screen Shot 2020-05-13 at 7.18.00 AM

Ah, ok. Are you able to add any other devices to your gateway on the RPi? If you need something to test with, you can install the Virtual Things add-on.

Unfortunately no, none of the things from add-ons show up.

My main goal is to use the Candle Manager (and the MySensors add-on) to give all the cool RF Nano devices I have around the house a central place.

The devices did not show up in the Things Dashboard. I know they’re reporting their values as I can see the temperature or humidity in the logs on the RPi.

So I figured, let’s test with something that should work (the Weather Add-on). I tried with three different RPi 3’s (various releases over time) and three new SDcards with the 0.12.0 image.

I also tried various other add-ons which had the same ‘empty’ results.

After that, I tried a totally different OS (the Debian 10 version). The weather app worked immediately. Thing is, the Candle Manager add-on does not show up in the Add-ons Discovery list for some reason (everything else seems to be there).

I cloned the Candle Manager addon to /etc/webthings-gateway/addons on Debian but that led to a whole bunch of other errors (I guess that’s not the way to install an add-on that’s not on the list…)

Anyway, it’s an adventure so far…

Hmm, are you using the tunneling service (e.g. <domain>.mozilla-iot.org) or are you doing things locally? Have you tried a different browser and/or a private window? It seems like the WebSocket isn’t connecting between your browser and the gateway.

Right now, the Candle Manager add-on is only built for linux-arm (e.g. Raspberry Pi, 32-bit). I recently added support for all other architectures, but it is waiting on a new release by @createcandle .

I’m doing things locally only. Normally I use Safari on Mac but I have also tried the latest Chrome and Firefox (both normal and private/incognito).

How can I see/test if it is the WebSocket? Can I increase the loglevel to possibly track it?

Thx for adding in other architectures for the Candle Manager. I do love the little Pi’s but running Webthings on my cluster would be more convenient (for me).

Also thx for taking the time to help me figure this out. This is one of those ‘itches’ that just needs to be scratched.

Thinking about it, it’s most likely not a browser issue as it does work for the Debian 10 Webthings install. I’m using the same browser for that one and the Pi. They’re also both in the same network.

If you open your browser’s developer tools, you can view the network traffic. There is a WebSocket request to /things, as well as to /new_things (during pairing). Both of those should connect and receive a 101 status code.

1 Like

That’s it, very helpful!

First of all, my apologies, it is is not the 0.12.0 image that is broken but the issue is on my network.

So the Raspberry did not get a 101 but shows a whole list of ‘things’ trying to connect. The Debian 10 image worked and I see the 101 on ‘things’ and ‘new_things’. Because it connects successfully on the first attempt, there is only one entry.

The install and the images and the testing I did was the same however the port on which I connect was not.

The Raspberry connects on 80/TCP, the Debian connects on 8080/TCP (both these ports are the defaults for each image, it seems). And that’s the important difference because 80/TCP on my network gets redirected to go over a proxy. The 8080/TCP connects directly. The Mikrotik Web Proxy does not seem to handle the full URL after /things

(e.g. URL: ws://xxx.xxx.xxx.xxx/things?jwt=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI8ImVlNTAxYWY0LTJkMjEtNGU0My05OWIzLTM0MDg3TYUkYWE2NiJ9.eyJyb3xlIjoidXNlcl90b2tlbiIsImlhdCI6MTU4ODk0MTU5NSwiaXNzIjoiTm90IHNldC4ifQ.fXz0kI9BSkG0syFUXB-XhIJ8KaQTZAmMAl8SjIsTqNqUGfWX3gBlwrEfEgUBdXtfJ5SS-z3_cFHqG2_BxnUzAg)

So after putting in a NAT proxy bypass, it works.

mrstegeman, thx for your help and troubleshoot direction

itch -> scratched :slight_smile:

Glad it’s working now!