I have two instances of openhab2 running, each in different houses. I have 2 myopenhab acounts, one for each house.
And 2 sitemaps, one for each house.
i would like to remove / delete one of the myopenhab accounts as I am aware that the number of myopenhab users is growing and I think two accounts are unnecesary.
i have googled for some time but can’t find an answer to how I can integrate the two houses into one sitemap… or easily switch between sitemaps from different accounts on habdroid.
It seems that some people use MQTT with a satellite broker to communicate between properties, I have also read that I could apply the same UUID and Secret to both openhab instances so that they use the same cloud account as long as all exposed items have unique names.
however, I am still unclear as to how I would connect the items into one sitemap?
I may have a solution but would appreciate some input from the more knowledgeable members.
House 1 and House 2 both have openhab2 instances running but all item names are unique
House 1 and House 2 share the same secret and UUID and connect to one openhab cloud account.
Each house has its own sitemap and I use the habdroid menu to select sitemap.
But I don’t want to control houses across the internet if I am sat inside the house and connected to the local network…
SO… Both houses will have the same subnet and IP, port address for openhab2. I will enter the local IP and port into habdroid settings and then it will decide whther local control is possible depending on which sitemap I call upon?
If you want the Item from both houses on one sitemap the only approach I know of is to use the MQTT Event Bus configuration where the Item states from one OH instance gets forwarded to the other instance of OH. Then you can have the one sitemap served from one “Master” OH instance, or you can have both instances be a peer of the other and have each serve out their own sitemap with Items from both instances.
Your second approach sounds like it could work, but you will only have access to both houses when not on either house’s LAN in that configuration. When you are on a LAN, your app will only be able to see the sitemaps served by that OH instance.
Thanks Rich, makes sense - i knew it sounded to easy to be true… most of the items that I wish to control are MQTT anyway. I just like the fat that I trusted the openhab cloud and didn’t really want to open extra ports myself for MQTT as I don’t know much about security. I will look into how I will send MQTT msgs from one house to another over the net.
Should I use a service such as cloudmqtt to act as a middle bridge between both instances of opehab (which each also have their own local broker)… or should i use myopenhab.org which apparently can parse the mqtt msgs through the rest API?
It does but mqtt has nothing to do with the rest API. It is completely separate.
You would have to write roles to make HTTP calls to publish the commands and updates from one OH to the other. You can install the interactive rest API docs listed under UIs or Misc I think to see how to make the calls and experiment.
You would then use the HTTP binding or the send http Actions.
Thank Rich for the info - my logic tells me that if I go down the route of using the same UUID and Secret for both openhab installs - as you pointed out - I will only have both sitemaps available when I am connected to the net ‘outside’ of either LAN. When I am at one house and connected to the LAN - only that sitemap will be available. I can live with this…
However - notifications (via habdroid and cloud) pushed to my android device are essential and my logic says that my android device will still receive notifications from ‘both’ openhab instances regardless of my being on ‘one’ local network?
Sorry to keep asking the questions, normally I would just try it but I am unable to setup 2nd home for another few weeks until I go there!
@Olymp - yes, I spent a few hours last night looking at openvpn and trying to understand the setup procedure - lots of certificates and config file editing! But this may be the route i go…