Closed flatsiedatsie closed 5 years ago
if I copy the asDict and asThing code into the add-on, then it does work. Which would negate this statement.
Is there a reason you're still copying the as_dict
and as_thing
methods? If you're testing locally, just install the 0.9 version of gateway_addon
from here: https://github.com/mozilla-iot/gateway-addon-python
But shouldn't the 0.9 version already be in the 0.9 beta?
And if that new code wasn't there yet, then why did it ignore the this.name
variable?
How do I install the new version of the gateway addon python
into my system?
Are you talking about the build from this thread? https://github.com/mozilla-iot/gateway/issues/1965
I forgot that existed.
sudo pip3 install git+https://github.com/mozilla-iot/gateway-addon-python.git
Yes, that's the build I'm talking about.
Please try the updated gateway-addon library and let me know if you still have issues.
There was an erorr with the adapt parser version?
But it says it was successful anyway.
pi@gateway:~$ sudo pip3 install git+https://github.com/mozilla-iot/gateway-addon-python.git
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting git+https://github.com/mozilla-iot/gateway-addon-python.git
Cloning https://github.com/mozilla-iot/gateway-addon-python.git to /tmp/pip-req-build-4iia9or1
Requirement already satisfied: jsonschema>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from gateway-addon==0.9.0) (3.0.1)
Requirement already satisfied: nnpy==1.4.2 in /usr/local/lib/python3.7/dist-packages (from gateway-addon==0.9.0) (1.4.2)
Collecting six>=1.11.0 (from jsonschema>=3.0.0->gateway-addon==0.9.0)
Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Requirement already satisfied: attrs>=17.4.0 in /usr/local/lib/python3.7/dist-packages (from jsonschema>=3.0.0->gateway-addon==0.9.0) (19.1.0)
Requirement already satisfied: pyrsistent>=0.14.0 in /usr/local/lib/python3.7/dist-packages (from jsonschema>=3.0.0->gateway-addon==0.9.0) (0.15.2)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from jsonschema>=3.0.0->gateway-addon==0.9.0) (40.8.0)
Requirement already satisfied: cffi in /usr/local/lib/python3.7/dist-packages (from nnpy==1.4.2->gateway-addon==0.9.0) (1.12.3)
Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi->nnpy==1.4.2->gateway-addon==0.9.0) (2.19)
Building wheels for collected packages: gateway-addon
Running setup.py bdist_wheel for gateway-addon ... done
Stored in directory: /tmp/pip-ephem-wheel-cache-qzst4fjn/wheels/7f/68/13/73d8ea6b8c75f67073720fc8697c7f8640d1d03038b5f40a5f
Successfully built gateway-addon
adapt-parser 0.3.3 has requirement six==1.10.0, but you'll have six 1.12.0 which is incompatible.
Installing collected packages: gateway-addon, six
Found existing installation: gateway-addon 0.8.0
Uninstalling gateway-addon-0.8.0:
Successfully uninstalled gateway-addon-0.8.0
Found existing installation: six 1.10.0
Uninstalling six-1.10.0:
Successfully uninstalled six-1.10.0
Successfully installed gateway-addon-0.9.0 six-1.12.0
It seems to work!
We've resolved that adapt issue upstream, but you should should have no issues in the current state either.
Glad things are working for you now!
The temperature value still shows no decimals, but that's probably not this issue.
Correct, that will require an updated UI.
I must be doing something wrong, but in the 0.9 beta I can't get any thing names to show up.
This leads to:
Even though according to the code the
asDict()
function should show the title attribute, it doesn't seem to.