Update to 0.10 broke connection to all of my Iot Devices

Woke up this morning (US PST) and the IoT gateway is completely unable to connect to any of my TP-link/Kasa and LIFX devices. I have verified that the issue is with the IoT gateway as i can still access devices separately with their native apps.

I have rebooted all of my wifi equipment to reset leases and DNS listings, and the IoT gateway as well, but am unable to even remove and re-add devices, the will not list upon a scan.

Is anyone else having this issue this morning?

Hi @spd,

Sorry about this. The OTA update for version 0.10 went out last night and it looks like something has broken some of your add-ons.

Do you see any errors in the browser logs or gateway logs? You can find the gateway logs under Settings -> Developers -> View Internal Logs

Yes, lots of errors, here are some that look pertinent to the problem:

manifest.json did not exist for add-on lifx-adapter
manifest.json did not exist for add-on tplink-adapter

Error getting value for thingId: tplink-8006A3C32575CB3B9A0BCA81443B675B1A86D339

getProperty: device: tplink-8006A3C32575CB3B9A0BCA81443B675B1A86D339 not found.

lifx: IpcClient: Connected to server, registering…
2019-11-14 00:06:13.172 ERROR : Invalid message received: { data: { pluginId: ‘lifx-adapter’ },
messageType: ‘registerPlugin’ }

2019-11-14 00:06:17.012 INFO : date-time: main.py:27 INFO CLEANUP exception handler
2019-11-14 00:06:17.728 WARN : manifest.json did not exist for add-on date-time-adapter

I can post a full log if needed

@spd Could you email me the following files? mstegeman@mozilla.com

  • ~/mozilla-iot/gateway/package.json
  • ~/.mozilla-iot/log/run-app.log
  • /usr/local/lib/python3.7/dist-packages/gateway_addon/__init__.py

Sent.

run-app.log was 1.7 gig but i sent the log for 11-14-2019 which is just a few hundred kb.

Also no Python 3.7 on my device, only 3.5. Which i only discovered when browsing to the directory you requested, as it didn’t exist.

Thanks, I’ll start looking through those files and get back to you.

Since you have Python 3.5, the file should be:
/usr/local/lib/python3.5/dist-packages/gateway_addon/__init__.py

@spd One (unrelated) thing I noticed in your logs is that you have your DateTime add-on set to “PST” time, but that’s not actually valid. You may want to try something like “America/Los_Angeles”.

I did reset the timezone stuff via the web interface this morning to America/Los_Angeles but it didn’t solve the problem.

I was referring specifically the DateTime adapter. You’ll set that through Settings -> Add-ons, then click the “Configure” button for DateTime. But yes, that was unrelated to your problem.

Per my email with mrstegeman:

Ok, my assumption was correct. For some reason, one of your Python libraries failed to update. Please run the following commands:

sudo pip3 install -U "git+https://github.com/mozilla-iot/gateway-addon-python@v0.10.0#egg=gateway_addon”

sudo systemctl restart mozilla-iot-gateway

Let me know if that works!

This above fixes the problem!

Just to make sure formatting is right:

sudo pip3 install -U "git+https://github.com/mozilla-iot/gateway-addon-python@v0.10.0#egg=gateway_addon"
sudo systemctl restart mozilla-iot-gateway

Same issue here. Attempted the fix above and got the attached error.

pi@gateway:~ $ sudo pip3 install -U “git+https://github.com/mozilla-iot/gateway-addon-python@v0.10.0#egg=gateway_addon”
Collecting gateway_addon from git+https://github.com/mozilla-iot/gateway-addon-python@v0.10.0#egg=gateway_addon
Cloning https://github.com/mozilla-iot/gateway-addon-python (to v0.10.0) to /tmp/pip-build-eers2i21/gateway-addon
Requirement already up-to-date: nnpy==1.4.2 in /usr/local/lib/python3.5/dist-packages (from gateway_addon)
Collecting jsonschema==3.1.1 (from gateway_addon)
Downloading https://files.pythonhosted.org/packages/ce/6c/888d7c3c1fce3974c88a01a6bc553528c99d3586e098eee23e8383dd11c3/jsonschema-3.1.1-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 544kB/s
Collecting singleton-decorator==1.0.0 (from gateway_addon)
Downloading https://www.piwheels.org/simple/singleton-decorator/singleton_decorator-1.0.0-py3-none-any.whl
Exception:
Traceback (most recent call last):
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 594, in urlopen
chunked=chunked)
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 391, in _make_request
six.raise_from(e, None)
File “”, line 2, in raise_from
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 387, in _make_request
httplib_response = conn.getresponse()
File “/usr/lib/python3.5/http/client.py”, line 1198, in getresponse
response.begin()
File “/usr/lib/python3.5/http/client.py”, line 297, in begin
version, status, reason = self._read_status()
File “/usr/lib/python3.5/http/client.py”, line 266, in _read_status
raise RemoteDisconnected(“Remote end closed connection without”
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/usr/lib/python3/dist-packages/pip/commands/install.py”, line 353, in run
wb.build(autobuilding=True)
File “/usr/lib/python3/dist-packages/pip/wheel.py”, line 749, in build
self.requirement_set.prepare_files(self.finder)
File “/usr/lib/python3/dist-packages/pip/req/req_set.py”, line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File “/usr/lib/python3/dist-packages/pip/req/req_set.py”, line 487, in _prepare_file
req_to_install, finder)
File “/usr/lib/python3/dist-packages/pip/req/req_set.py”, line 428, in _check_skip_installed
req_to_install, upgrade_allowed)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File “/usr/lib/python3/dist-packages/pip/index.py”, line 568, in _get_pages
page = self._get_page(location)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 792, in get_page
“Cache-Control”: “max-age=600”,
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 501, in get
return self.request(‘GET’, url, **kwargs)
File “/usr/lib/python3/dist-packages/pip/download.py”, line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 488, in request
resp = self.send(prep, **send_kwargs)
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 609, in send
r = adapter.send(request, **kwargs)
File “/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py”, line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py”, line 423, in send
timeout=timeout
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 643, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py”, line 315, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: ‘Retry’ and ‘int’

I wonder if PyPI is having issues or something. I’d just keep trying, as that’s the only way to resolve this issue.

That was right on. Tried your instructions tonight - back to normal. Thanks!