Myopenhab.org multiple pi's

Hi there

I have a few of raspberry pi’s connected around the house for different projects. Now I would like to connect all my raspberry pi devices to a single myopenhab.org account so I’ve got complete remote control over everything.

Is this possible? If not, will this be an upcoming cloud feature?

thanks,
Tony.

just to be sure I understand, you want to have multiple instances of openhab running at the same time?
What is your goal of that? Why not one openhab?

I also recommend 1 local OH2 installation (that is then linked to myopenhab.org)

You can also try something else, but it will become so complex that you will not be able to maintain:

Slave(s) OH2 -> MQTT -> Master OH2 -> myopenhab

Items in Slaves publish states to MQTT and Items in Master subscribe to these topics
The reverse is also possible (for sending commands from myopenhab->Master->MQTT->Slaves)
There is also the MQTT-Event Bus integration available

but… again… too complex to maintain

1 Like

I am also interested in this, its just easier to maintain different pis in one myopenhab account instead of several accounts. It is possible to maintain them in one account if you name all your items unique, i.e kitchen_light can not be present in two pi’s…

I have one openhab at my boat, one at home another and one at the basement(public network)

1 Like

wouldn’t multiple sitemaps work for that?

To answer your question: from what I know: No

I personally wouldn’t support such “feature”… It can be abused by people who want to use OH2 commercially…

Yes, i have different sitemaps, but you need to have unique item names!!

Yes - the reason is that I have 3 rpi’s Around the house that run different projects.

So ideally, having just 1 myopenhab account could unify all my rpi devices, and I could create a single control panel.

I have also hard wired my projects for security and health reasons.

Thanks for your deeper insights! Do you have an code example of this?

So your saying having my 2 other rpi’s as slave devices publishing events to the master rpi?

Hi Dim - you can’t stop people using this tech for commercial reasons.

But, I don’t see how 1 rpi device can control a whole smart home? For example, what happens when you run out of rpi pins?

So I think a feature like this would make it way more practical.

to be more specific: the Items in the Slave(s) would publish their state to defined MQTT topics and the Items in the Master would subscribe to these topics.

In this way, whenever the Item in the Slave is getting updated, the Item in the Master would also get updated.

The reverse will work also (send command to Master Item, this goes to MQTT, Item in Slave is subscribed to that, gets the command)

You can use the MQTT binding to publish and subscribe to such setup in parallel to whatever binding the Items in the Slave(s) are currently bound to (an Item can be configured to use more than 1 binding)

A more “massive” approach is the MQTT<->Event Bus integration. Check: https://www.openhab.org/addons/bindings/mqtt1/#event-bus-binding-configuration

I don’t understand what you mean with
“the reason is that I have 3 rpi’s Around the house that run different projects.”
What do you mean with projects?

1 Like

I don’t see how 1 rpi device can control a whole smart home?

I think most people on this forum have one openhab instances controling their full house.
F ex: I have +30 item files, where most of these files have about 16 items in it.
so that means I controle about 500 different things in my house with openHAB.

In my case most of these items are connected to the openHAB computer over the network.
At this moment I have one arduino that I send messages to, over MQTT as @Angelos suggest.
I will have at least 7 arduinos in the house.

The idea of Openhab, is to have one brain omputer, that controls all different kind of what I think you call projects. Because of it’s open system, it can control things you make yourself or commercial products like tesla, netatmo, KNX systems, etc etc …

It looks like you want the cloud to be the master, where you need to look at a local openhab as the controller.

If you explain what these projects are and what is your goal, there are enough smarter people then me on this forum that can explain you what could be a better architecture.

1 Like

Thanks for your great insights! I have not enabled wireless. Everything is run via Ethernet cables and ports in each room. This means it’s difficult to centralize all project wires to one location, to one raspberry pi. So because of this architecture (by design), I need more than one raspberry pi - one for each room, for each project depending on its physical location.

I have a passive house and I don’t use wireless at all.
Many people on this forum love zwave and swear with it. I don’t use it.

Everything with me is connected with ethernet.
One device(Pine64) with Openhab
Raspberry PI has DHCP
another raspberry PI fro MQTT
Etc etc all using ethernet.
All of them on a local network.

If the device have ethernet, you can have them all talk to one openhab server.

Yeah, but what about two houses? I have to openhab installations that are ~ 1000km apart. However, I still thought it is a good idea to connect them both to the same myopenhab-account.
But this seems to be impossible for now?

So my second installation needs its own email account just to create another myopenhab account?

i have two OH…

Main: for all items and hosue stuff

slave: My PC , coomands , status of the hardware , and more PC stuff

i connect both with Node Red its pretty simple…

1 Like

This is a really great setup you have yves, and it seems scaleable! I’m new to MQTT master/slave server setups and development. I have all my scripts written on python now. Can you recommend a good article for me to set setting this up as per your config?

I’m not sure what you are looking for.
What I did was as far as I know pretty standard Openhab.
Except that I don’t use zwave, I use wired connections.

I know that in 2.4, a lot has changed for MQTT, I would recommend to start immediately with the new way of working. (which I don’t use yet.)
it will avoid that you learn something that is already outdated now.

https://www.openhab.org/addons/bindings/mqtt/ is the new .

As always start with something small:

Write a hard coded MQTT on “one machine” and read that on another machine.

If you are looking how I set up a MQTT server, I used
raspberry PI jessie with mosquitto

I understand that, that was not the original request.

with two houses, I would personally not put them on one account, if for one reason an account is hacked (which is always possible) you have trouble at both sides.
Also I wonder if you upgrade one house to a new version of openhab, it will at least be one day later you will upgrade the other house.
Supporting two different versions of openhab on the same account, at the server level sounds very hard.
It would also mean that it’s impossible to reuse things between the two houses, which would probably the main advantage of wanting this.

Also if you did something wrong, there is the risk that one button in house 1, changes a state in house 2. It an extreme case, debugging that, would need people in both houses on the phone to fix that.

Before we go into solution, please try to explain what exactly would be the thing you want to accomplish with two houses in one account.