# Private Add-on, Auto Install, Remote Update on R Pi

**URL:** <https://discourse.mozilla.org/t/private-add-on-auto-install-remote-update-on-r-pi/42571>\
**Category:** WebThings\
**Created:** [July 15, 2019, 11:44am UTC](https://discourse.mozilla.org/t/private-add-on-auto-install-remote-update-on-r-pi/42571 "2019-07-15T11:44:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![james.malvi](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@james.malvi](https://discourse.mozilla.org/u/james.malvi)\
**Post date:** [July 15, 2019, 11:44am UTC](https://discourse.mozilla.org/t/private-add-on-auto-install-remote-update-on-r-pi/42571/1 "2019-07-15T11:44:04Z")

</div>

Hello All,

I am working on creating custom solution using Mozilla Web Things.

Here are the Futures I am trying to add using Private Add-on.

- It reads data from sensors and send it to Custom Cloud AWS /Azure /IBM
- Auto Update the Add-on to bug fixes or new features, May be via File api?
- Custom Registration server to access gateway via internet.

I have few questions about doing this functionality.

1. Can I create custom image to with custom domain along with private add-on? if yes, How?
2. How it will affect private add-on in case of Mozilla Web Thing update?
3. How can I remotely update the private add-on?

Thanks,  
James

---

<div class="post-metadata">

**Author:** ![mstegeman](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mstegeman](https://discourse.mozilla.org/u/mstegeman)\
**Post date:** [July 15, 2019, 4:08pm UTC](https://discourse.mozilla.org/t/private-add-on-auto-install-remote-update-on-r-pi/42571/2 "2019-07-15T16:08:55Z")

</div>

Hi James,

- We have an add-on that uploads data to Azure IoT already, so you could use that as a starting point: [https://github.com/tim-hellhake/azure-iot-bridge](https://github.com/tim-hellhake/azure-iot-bridge)
- Add-ons are already auto-updated by the gateway, so that’s not something that you need to handle yourself.
- You can definitely run your own registration server. Here are a couple resources:
  - [How does remote access work](https://discourse.mozilla.org/t/how-does-remote-access-work/25612)
  - [https://github.com/mozilla-iot/registration-server-docker/](https://github.com/mozilla-iot/registration-server-docker/)

- Our Raspbian distribution includes a few add-ons by default, so you could just use the existing logic to do the same. See here: [https://github.com/mozilla-iot/gateway/blob/master/image/add-gateway.sh#L189-L206](https://github.com/mozilla-iot/gateway/blob/master/image/add-gateway.sh#L189-L206)
- Add-ons are updated separately from the gateway, so you should have no issues. If you want, you can even run your own add-on server with this code: [https://github.com/mozilla-iot/addon-proxy](https://github.com/mozilla-iot/addon-proxy)
  - That server pulls from this list: [https://github.com/mozilla-iot/addon-list](https://github.com/mozilla-iot/addon-list)

---

<div class="post-metadata">

**Author:** ![james.malvi](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@james.malvi](https://discourse.mozilla.org/u/james.malvi)\
**Post date:** [July 17, 2019, 1:52pm UTC](https://discourse.mozilla.org/t/private-add-on-auto-install-remote-update-on-r-pi/42571/3 "2019-07-17T13:52:47Z")

</div>

Thank you, Michael, for great insight and how to extends the functionality of Mozilla WebThings.

I have another question about what add-on can do.

- Is it possible to create a Rest API via an add-on to get Health or Diagnosis data by reading text/log files and send it as JSON? I would like to pull this data remotely using Curl or Python/Java.

- Also need to create an API to set API keys for AWS/Azure/Google IOT via curl or another application.

Can this functionality possible, can we create API which can be accessed via Registration server?

Thanks again for the previous answer.

Thanks,  
James

---

<div class="post-metadata">

**Author:** ![mstegeman](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mstegeman](https://discourse.mozilla.org/u/mstegeman)\
**Post date:** [July 18, 2019, 5:29pm UTC](https://discourse.mozilla.org/t/private-add-on-auto-install-remote-update-on-r-pi/42571/4 "2019-07-18T17:29:02Z")

</div>

The registration server is not intended for such things. Its entire purpose is to provide tunneling to your gateway.

If you want to run a server, that’s possible (see [this add-on](https://github.com/createcandle/Candle-manager-addon)), but it’s not really advisable. While you’ll be able to access your API locally, we currently have no way to proxy that through the tunnel.

You’ll probably want to wait until we add support for [extension](https://github.com/mozilla-iot/gateway/issues/1505) and [service](https://github.com/mozilla-iot/gateway/issues/1840) add-ons (hopefully in the next couple months). Those add-on types should allow you to easily do what you’re asking.
