Help enabling iot-gateway addons

hobinjk and others on IRC have been helping me diagnose this problem, but I thought it best to jump over to discourse as I was failing to stay logged in a missing messages.

My setup

  • fresh image of iot-gateway on a fresh pi 3b+
  • connected to wifi
  • accessible on local network
  • rules setup and working for a chromecast audio and some tp-link switches
  • ssh enabled

My Problem

I’m looking try and get this addon to work https://github.com/hobinjk/clap-sensor-adapter

However, I can’t get any addons installed via source to show up in http://gateway.local/settings/addons/discovered

I’ve tried

  • clap-sensor-adapter
  • example-adapter
  • virtual-things-adapter
  • forked virtual-things-adapter with a different name in package.json

All installed using a combination of git clone and npm install (and restarting the gateway)

You can see them along side the other enabled addons I have working

But they don’t appear in http://gateway.local/settings/addons/discovered (which does list all the bundled addons)

In the logs

I’m seeing some logs that looks normal

2019-05-01 22:05:14.076 INFO   : Not updating clap-sensor-adapter since a .git directory was detected
2019-05-01 22:05:14.079 INFO   : Not updating pete-test since a .git directory was detected
2019-05-01 22:05:14.085 INFO   : Not updating virtual-things-adapter since a .git directory was detected

and some logs that also look normal but maybe could mean they’re crashing?

2019-05-01 08:02:03.912 INFO   : Package not enabled: example-adapter
2019-05-01 08:02:03.914 ERROR  : Failed to load add-on: example-adapter
Package not enabled: example-adapter

More information

On IRC today hobinjk has tested example-adaptor

pete: I tested this locally and just cloning theh example-adapter, restarting the gateway, then going to https://hobinjk.mozilla-iot.org/settings/addons to enable the example adapter worked

What next

I was thinking of starting from a fresh re-image of the pi, but before I do that, does anybody have any suggestions?

If not, are there any docs on how to back up the rules I’ve setup so far?

Thanks so much for your help already!

Update on this

I had a poke around in the sqlite db and found my addon attempts listed in the settings key value table.

As you’d expect, the config JSON had enabled: false.

After updating this to true my addons now show up as discovered.

So it looks like it is only the discovery page that isn’t working for me.