Add-on API Description missing

Hey there,
I am new to Mozilla IoT and just set up my gateway. On the long run I would like to connect my Homeatic IP devices to the gateway through an homeatic Access point. Since there is no fitting adapter I would like to write one using python. I am wondering wether there is an Api description for the gateway-addon?
I found the following link:
https://github.com/mozilla-iot/addon-list,
which links to an wiki-page that does not seem to be available.

Any help would be much appreciated.

First, we do have a HomeMatic add-on available in the add-on list. It was created by @t1m1 and the code lives here.

As for the README, apologies, it’s been updated. See here for a good list of resources.

Generally speaking, there are not external API docs available, but the code is well documented, and there are a good number of Python add-ons you could use as a starting point (if you still have a need to create one).

Thanks for your reply. I am aware of the available add-on. However, the existing add-on handles a CCU, whereas I would like to connect an access point. There is a python api for this so I think it should be doable to integrate.

I used the existing adapters and started today with a simple adapter, which connects a DHT22 sensor to the GPIO of a Raspberry Pi. The adapter is running. However, somehow the thing view is not updating.
I am updating the properties using the following functions, within a polling thread:

self.set_cached_value(value)
self.device.notify_property_changed(self)

However, the thing-view keeps the values which were set during property creation.

Is there anything else to do, in order to update the things view?
My Code is here

Hmm, your code looks ok. Are you seeing your new values get logged in the update() method?

Yes, the log file shows the correct values for temperature and humidty. What I find suspicious is, that I can change the values in the Thing view, even though on of them is set to “readonly”

The read-only issue is because you used readonly rather than readOnly. The case matters.

True, changing to readOnly helped in that manner. Thanks!
However, I still do not get the view to update. I tried to downgrade the gateway to 0.11.0, to see if the behaviour changes. It is still the same. From the log I can see that the property value is updated once (“getValue for property”), when calling the consctructor. After this the properties update method is being called and logs the values. However, the gateway doesn’t seem attempting to collect the new values anymore.

Blockquote 2020-04-29 23:15:45.439 INFO : Not updating dht22-adapter since a .git directory was detected
2020-04-29 23:15:45.485 INFO : Finished updating add-ons
2020-04-29 23:15:48.371 INFO : thing-url-adapter: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3
2020-04-29 23:15:50.922 INFO : dht22-adapter: Wed Apr 29 23:15:50 2020 Value of temperature sensor on pin 4 has changed from 0 to 1
2020-04-29 23:15:52.811 INFO : thing-url-adapter: Loading add-on thing-url-adapter from /home/pi/.mozilla-iot/addons/thing-url-adapter
2020-04-29 23:15:53.799 INFO : thing-url-adapter: Starting mDNS discovery
2020-04-29 23:15:55.918 INFO : dht22-adapter: Wed Apr 29 23:15:55 2020 Value of temperature sensor on pin 4 has changed from 1 to 2
2020-04-29 23:16:00.934 INFO : dht22-adapter: Wed Apr 29 23:16:00 2020 Value of temperature sensor on pin 4 has changed from 2 to 3
2020-04-29 23:16:05.946 INFO : dht22-adapter: Wed Apr 29 23:16:05 2020 Value of temperature sensor on pin 4 has changed from 3 to 4
2020-04-29 23:16:07.130 INFO : getValue for property temp for: returning 0
2020-04-29 23:16:10.950 INFO : dht22-adapter: Wed Apr 29 23:16:10 2020 Value of temperature sensor on pin 4 has changed from 4 to 5
2020-04-29 23:16:15.959 INFO : dht22-adapter: Wed Apr 29 23:16:15 2020 Value of temperature sensor on pin 4 has changed from 5 to 6
2020-04-29 23:16:20.968 INFO : dht22-adapter: Wed Apr 29 23:16:20 2020 Value of temperature sensor on pin 4 has changed from 6 to 7

Is there any configuration which is required in order to require the Gateway to update?

Works for me with this PR: https://github.com/Marv-plc/dht22-adapter/pull/1