# Replacing SmartThings API with OpenHAB + OpenHAB-cloud

**URL:** <https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766>\
**Category:** Off-Topic\
**Created:** [November 6, 2020, 1:43am UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766 "2020-11-06T01:43:17Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![mstormi](https://community.openhab.org/user_avatar/community.openhab.org/mstormi/32/55857_2.png) [@mstormi](https://community.openhab.org/u/mstormi)\
**Post date:** [November 8, 2020, 10:12am UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/21 "2020-11-08T10:12:13Z")

</div>

> [@azcoppen](#):
>
> Personally i have a huge problem with these big tech companies

Tailscale a big tech company ??  
It’s a couple of nerds trying to turn their contribution to the Open Source world into some money. The identity provider is for your admin ID only. Just create a functional account and you’re set there.

---

<div class="post-metadata">

**Author:** ![Lolodomo](https://community.openhab.org/letter_avatar_proxy/v4/letter/l/ac91a4/32.png) [@Lolodomo](https://community.openhab.org/u/Lolodomo)\
**Post date:** [November 8, 2020, 10:13am UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/22 "2020-11-08T10:13:08Z")

</div>

> [@Bruce\_Osborne](#):
>
> I am not sure it is fully baked yet. No encryption.

HTTPS is now supported.

> <https://github.com/openhab/openhab-addons/pull/8909>
>
> Also fix #8977 
> 
> Signed-off-by: Laurent Garnier \<lg.hc@free.fr\>
> 
> \- \[x\] Disco…very of remote things
> \- \[x\] Mapping of the remote thing status
> \- \[x\] Automatic creation of one trigger channel for each trigger channel on the remote thing
> \- \[x\] Mapping of the local trigger channel to the emote trigger channel
> \- \[x\] Enhance documentation
> \- \[x\] Support for HTTPS communication

> [@Bruce\_Osborne](#):
>
> I have OH2 and OH3 running in Docker containers on the same host. The remote OpenHAB binding keeps losing connection.

As mentioned in the Git issue, DEBUG logs could probably help the analysis.

---

<div class="post-metadata">

**Author:** ![azcoppen](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@azcoppen](https://community.openhab.org/u/azcoppen)\
**Post date:** [November 8, 2020, 7:41pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/23 "2020-11-08T19:41:28Z")

</div>

Not Tailscale. Google, Microsoft, etc. I’m all for what Tailscale is doing. Just don’t want to deal with big “identity providers” like these now their true colours are on full display. I’m actively removing them from projects we work on and services we use.

---

<div class="post-metadata">

**Author:** ![Bruce\_Osborne](https://community.openhab.org/user_avatar/community.openhab.org/bruce_osborne/32/38531_2.png) [@Bruce\_Osborne](https://community.openhab.org/u/Bruce_Osborne)\
**Post date:** [November 8, 2020, 8:43pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/24 "2020-11-08T20:43:59Z")

</div>

It appears you are using this in the enterprise.

There are people here (developers) that offer enterprise level services apart from this forum. some use OH based solutions. PM me if you want me to connect you with a couple of them.

There are very few here on the forum experienced with using smart home technologies in a commercial setting.

---

<div class="post-metadata">

**Author:** ![azcoppen](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@azcoppen](https://community.openhab.org/u/azcoppen)\
**Post date:** [November 8, 2020, 8:48pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/25 "2020-11-08T20:48:20Z")

</div>

Not yet, but soon. We have a lab set up to toy with some of this to figure out better ways to do things. The offer is appreciated though!

---

<div class="post-metadata">

**Author:** ![azcoppen](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@azcoppen](https://community.openhab.org/u/azcoppen)\
**Post date:** [November 8, 2020, 9:16pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/26 "2020-11-08T21:16:28Z")

</div>

Interesting article for those interested in doing more with OH:

_“Scaling Home Automation to Public Buildings: A Distributed Multiuser Setup for OpenHAB 2”_ by Florian Heimgaertner, Stefan Hettich, Oliver Kohlbacher, and Michael Menth  
(University of Tuebingen, Department of Computer Science, Tuebingen, Germany)

> **[Menth17i.pdf](https://atlas.cs.uni-tuebingen.de/~menth/papers/Menth17i.pdf)**
>
> 1048.20 KB

---

<div class="post-metadata">

**Author:** ![Bruce\_Osborne](https://community.openhab.org/user_avatar/community.openhab.org/bruce_osborne/32/38531_2.png) [@Bruce\_Osborne](https://community.openhab.org/u/Bruce_Osborne)\
**Post date:** [November 8, 2020, 9:53pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/27 "2020-11-08T21:53:22Z")

</div>

Looking at the University site it was envisioned to interconnect several campus buildings. so the public Internet was not involved from a security perspective.

---

<div class="post-metadata">

**Author:** ![azcoppen](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@azcoppen](https://community.openhab.org/u/azcoppen)\
**Post date:** [November 8, 2020, 10:07pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/28 "2020-11-08T22:07:31Z")

</div>

The principle should be the same though if the boxes are configured to only communicate over a VPN. That solves the issue of being able to access multiple device REST APIs from one application, although it may not necessarily be the best option in the long term (a distributed or federated bus of some kind is going to be essential if you pushed over 10,000 nodes).

Not saying it’s a blueprint, but the comments earlier have pointed out there’s not a huge amount of data related to building multiple instances out into a wider network.

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [November 9, 2020, 4:10pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/29 "2020-11-09T16:10:09Z")

</div>

I’ve shared it elsewhere and even have posted some tutorials. At a high level:

- I’ve two OH instances, one at my home and one at my dad’s home.

- I run pfSense as my firewall and use the openVPN server built into that. If I were not running that I’d probably set up a Wireguard service on a VPS somewhere using one of the several scripts that makes that easy. So I do have a port exposed on the internet on this pfSense box so that I can connect to the VPN when not at home so I also have a bunch of other stuff to monitor and generate alerts also running. I also require certificate based authentication.

- My remote openHAB RPi machine connects to this VPN at boot time. The routing is configured so that all the machines connected to the pfSense machine and all the machines connected to the VPN can see each other. Therefore, for all intents and purposes, that remote openHAB instance is on my LAN.

- All our phones are configured with an openVPN client and using Tasker they automatically connect to the VPN when not on the home network. Therefore even the phones can see both instances of openHAB as if they were local.

- However, to get push notifications the openHAB instances either need to be connected to [myopenhab.org](http://myopenhab.org) or one needs to use something other than the built in notifications (email, email to SMS gateway, Telegram, etc.).

> [@azcoppen](#):
>
> Remote persistence: how easy is it to get OpenHAB to store its settings remotely in something like Mongo or Redis? Should be just a case of changing the host? Or better to store locally and mirror/replica to a remote?

No possible. openHAB has text file based configs which are stored in /etc/openhab (for OH 3, $OH\_CONF) and /var/lib/openhab (for OH 3 $OH\_USERDATA). A lot of people, myself included, check all of $OH\_CONF and most of $OH\_USERDATA into source control.

As an aside, if you haven’t yet, you should look into Ansible for building and deploying all this stuff.

openHAB can persist it’s Item states for analysis and charting to any supported database that can be reached on the network the openHAB instance is connected to.

> [@azcoppen](#):
>
> Remote logging: does the logger support anything like Graylog Extended Log Format (GELF) so you can send output to a server like Seq

openHAB uses log4j2 as it’s logger. There are a number of appenders that can be configured.

> [@azcoppen](#):
>
> I’ve got the Z-Wave Me Pi module (no Zigbee, buggy) to test, and have been running with the GoControl USB (ugly as hell, discontinued, Zigbee doesn’t work).

I’ve been using the GoControl HUSZB-1 for years for both zwave and zigbee. I’ve never had a complaint. It works and is rock solid in my experience. Keep in mind that zigbee is prone to interference from WiFi. In an apartment situation that could become more of a problem.

> [@azcoppen](#):
>
> Interesting article for those interested in doing more with OH:

That journal article went nowhere. The authors did not work with us and did not contribute anything back to the community. It’s a dead end and was based on an old version of openHAB when the paper was published. It would have been wonderful but once they go their publication they disappeared. They didn’t even try to contribute it back.

Some potentially relevant tutorials:

- [Remote Access: pfSense + HAProxy + LetsEncrypt](https://community.openhab.org/t/remote-access-pfsense-haproxy-letsencrypt/77415)
- [A quick intro to Ansible](https://community.openhab.org/t/a-quick-intro-to-ansible/78409)
- [An Ansible 'Getting Started' Guide](https://community.openhab.org/t/an-ansible-getting-started-guide/101642)
- [Ansible Revisited](https://community.openhab.org/t/ansible-revisited/105754)
- [Guacamole for remote access to your machines](https://community.openhab.org/t/guacamole-for-remote-access-to-your-machines/100760)
- [Marketplace MQTT Event Bus](https://community.openhab.org/t/mqtt-2-5-event-bus/76938)
- [HOW To setup remote logging (ELK stack) and reduce MicroSD writes](https://community.openhab.org/t/how-to-setup-remote-logging-elk-stack-and-reduce-microsd-writes/60828)
- [New Add-on bundle for Prometheus health Metrics](https://community.openhab.org/t/new-add-on-bundle-for-prometheus-health-metrics/48094)
- [Git based non-public versioning and deploy workflow](https://community.openhab.org/t/git-based-non-public-versioning-and-deploy-workflow/78067)

---

<div class="post-metadata">

**Author:** ![mstormi](https://community.openhab.org/user_avatar/community.openhab.org/mstormi/32/55857_2.png) [@mstormi](https://community.openhab.org/u/mstormi)\
**Post date:** [November 9, 2020, 4:59pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/30 "2020-11-09T16:59:36Z")

</div>

> [@azcoppen](#):
>
> Not Tailscale. Google, Microsoft, etc. I’m all for what Tailscale is doing.

You can log into Tailscale with your email. No need to feed the big data leechers. [or what do you call them in English? Krakens ?]

---

<div class="post-metadata">

**Author:** ![azcoppen](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@azcoppen](https://community.openhab.org/u/azcoppen)\
**Post date:** [November 9, 2020, 9:03pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/31 "2020-11-09T21:03:58Z")

</div>

I wish! → [Supported SSO identity providers · Tailscale Docs](https://tailscale.com/kb/1013/sso-providers)

Can I sign up with an email address?

We don’t support sign-up with email addresses. By design Tailscale is not an identity provider: there are no Tailscale passwords, account recovery, etc.

---

<div class="post-metadata">

**Author:** ![Bruce\_Osborne](https://community.openhab.org/user_avatar/community.openhab.org/bruce_osborne/32/38531_2.png) [@Bruce\_Osborne](https://community.openhab.org/u/Bruce_Osborne)\
**Post date:** [November 9, 2020, 9:24pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/32 "2020-11-09T21:24:45Z")

</div>

> [@azcoppen](#):
>
> We don’t support sign-up with email addresses.

Except for `gmail.com` You missed that part of the page.

> [gmail.com](http://gmail.com) addresses are treated specially: they always authenticate through Google without needing to be configured first.

---

<div class="post-metadata">

**Author:** ![azcoppen](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@azcoppen](https://community.openhab.org/u/azcoppen)\
**Post date:** [November 9, 2020, 9:27pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/33 "2020-11-09T21:27:39Z")

</div>

Legendary reply - thank you! I know Ansible very well. As fun as it will be to get into the detail of OpenHAB, we’re looking at a fairly straightforward template we can use for multiple OpenHABian devices and generally work upstream. The battle is to get the boxes reporting their data and receiving commands.

It seems [GitHub - mp911de/logstash-gelf: Graylog Extended Log Format (GELF) implementation in Java for all major logging frameworks: log4j, log4j2, java.util.logging, logback, JBossAS7 and WildFly 8-12](https://github.com/mp911de/logstash-gelf/) can connect log4j2 to Graylog and Seq, but there’s no native appender for the latter: [An Overview of Seq](https://docs.datalust.co/discuss/577edbb1c6a4f00e0052de58)

I’ve found Z-Wave on HUSZB is generally OK. But the Zigbee just won’t work. It’s stubborn about how it won’t work on OpenHABian. It’s ugly and slightly prone to being knocked over with that thing sticking out of it. That said, I’m now on our second Razberry because the first has exhausted all avenues to work other than a hardware fault. What i’d love is a component shield for the v4 Pi which did what the USSZB does, right out of the box without needing configuration.

In terms of MQTT, i’m having a bit of trouble configuring a local Pi to replicate SmartThings’ webhook events (post i added was here [Logging changes/events to remote MQTT server as JSON payloads - #2 by denominator](https://community.openhab.org/t/logging-changes-events-to-remote-mqtt-server/107923/2)). The trick is to get the 20 boxes sending up their activity onto the cloud server so a bunch of other things to subscribe to the data stream. Then we have a MongoDB cluster, load-balanced web app to read from it, and a Centrifugo server ([GitHub - centrifugal/centrifugo: Scalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably, socket.io, Phoenix.PubSub, SignalR. Set up once and forever.](https://github.com/centrifugal/centrifugo)) and REST API to talk to API clients. The part which is proving difficult is connecting these things together to ensure scalability as we go.

HiveMQ looks good for joint brokerage and storage, but there’s no MongoDB plugin openly available yet for cloud persistence. And there’s no reliable FOSS CLI tool i can find to subscribe to the MQTT channels and forward them as HTTP POST payloads to a web app (mosquitto\_sub + curl is a no-go because of the concurrency).

Another concern i have is breaking changes in versioning. Is there a release date for the stable branch of OH3? It looks good, but i’m wondering about the overhead of re-flashing a bunch of Pi boxes to something new.

---

<div class="post-metadata">

**Author:** ![mstormi](https://community.openhab.org/user_avatar/community.openhab.org/mstormi/32/55857_2.png) [@mstormi](https://community.openhab.org/u/mstormi)\
**Post date:** [November 9, 2020, 9:34pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/34 "2020-11-09T21:34:25Z")

</div>

> [@azcoppen](#):
>
> [Supported SSO identity providers · Tailscale Docs](https://tailscale.com/kb/1013/sso-providers)

As I suggested then get a dummy account. Or explicitly choose one of those smaller ID providers help them fight big G.

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [November 9, 2020, 9:38pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/35 "2020-11-09T21:38:38Z")

</div>

> [@azcoppen](#):
>
> And there’s no reliable FOSS CLI tool i can find to subscribe to the MQTT channels and forward them as HTTP POST payloads to a web app (mosquitto\_sub + curl is a no-go because of the concurrency).

I can’t imagine it would take more than a few hours to code something up in Python. I’m a little concerned that you are building this relatively massive and complex system and the lack of a FOSS script to publish MQTT messages to Mongo is the sticking point.

> [@azcoppen](#):
>
> Another concern i have is breaking changes in versioning. Is there a release date for the stable branch of OH3?

Last I saw it was December, but released doesn’t mean bug free and sometimes it doesn’t necessarily mean complete.

> [@azcoppen](#):
>
> but i’m wondering about the overhead of re-flashing a bunch of Pi boxes to something new.

Hence Ansible…

---

<div class="post-metadata">

**Author:** ![azcoppen](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@azcoppen](https://community.openhab.org/u/azcoppen)\
**Post date:** [November 9, 2020, 9:42pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/36 "2020-11-09T21:42:03Z")

</div>

Appreciated! Self-hosted OpenVPN seems to be the way to go here, even if Tailscale claim Wireguard performance is better. They seem very enterprise-orientated (understandably) rather than M2M.

OpenVPN is a lot more up-front config, but there seems to be more long-term control. The other providers are just as expensive. Deploy 100 boxes and you’re looking at $200/month, or you’re sharing account devices you have trouble separating. OpenVPN Cloud itself is $75/month for 10 user accounts.

With that kind of money, you’re better off spending it on a few VPS nodes you can have IT people monitoring.

---

<div class="post-metadata">

**Author:** ![azcoppen](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@azcoppen](https://community.openhab.org/u/azcoppen)\
**Post date:** [November 9, 2020, 9:50pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/37 "2020-11-09T21:50:35Z")

</div>

We’re tinkering with the architecture, not building out just yet. We could easily build something in Go or Python, naturally, but it would be easier to have a CLI tool which takes a nice .conf file on boot and runs without much interference - first rule is never to build for yourself what someone else has already built. It’s a really simple thing, which is why it’s surprising there is no CLI tool for it! We had a similar issue when playing with Crossbar ([crossbar.io](http://crossbar.io)) but it includes a REST bridge: the problem there was authentication between the browser Websocket client and the API. It was just a maze.

HiveMQ takes care of a lot of that (e.g. [GitHub - ckurze/mongodb-hivemq-iot-demo: Demo how to integrate MongoDB and HiveMQ with the example of fleet management, i.e. trucks driving between random warehouses in Germany.](https://github.com/ckurze/mongodb-hivemq-iot-demo)), as if we can get the MQTT messages into cloud storage, we can simply read from it as we go. The issue is separation between the backend and frontend processes, so the whole thing doesn’t go down if there’s a network problem. What we’re sending to a Websocket client or what they’re reading from the API is different from what the devices are streaming to the Bus/DB.

---

<div class="post-metadata">

**Author:** ![system](https://community-openhab-org.s3-eu-central-1.amazonaws.com/original/2X/6/6a52f2ac5d00e4c7b50471a354b3a9221188be90.png) [@system](https://community.openhab.org/u/system)\
**Post date:** [December 21, 2020, 1:50pm UTC](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766/38 "2020-12-21T13:50:35Z")

</div>

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.

[Previous page](https://community.openhab.org/t/replacing-smartthings-api-with-openhab-openhab-cloud/107766.md?page=1)
