What's the structure of an openhab application

Hi guys

I’m trying to figure out a way to monitor my room temperature. The curtent solution is like this: An esp01 with dht11 to collect temperature and send data to a mqtt server. A mqtt server – I can’t get a public ip adress at home so I rent a vpc and set the mqtt server on it. I communicate with esp01 through mqtt server like this:
In studying espeasy I found openhab(and others like domosticz and home assistant) is frequently talked about. However all of them are tutorials about how to apply openhab rather than explaining what does it do and what’s the structure.

Does it work like this?
or like this?

If I want to deploy openhab, do I have to install it on a device such as rpi at my home? or it can share the vpc with mqtt? if it has to be installed at my home is it reachable with my cellphone or I’ll need a frp?

Why not just run mosquitto at home (rather an using a hosted internet version)

Works like the top one.
Esp >>> mqtt <<< openhab >>>> Cellphone
Thought technically to keep with teh directional icons.

Esp >>> mqtt <==> openhab <==> Cellphone

Openhab can send to mqtt and received, and you phone can receive information from openhab and operate on it (ie you set a switch).

You depley openhab on a raspberry pi, virtual machine or anything in your house, as it quite often has to talk to a hardware device (usb stick for zigbee or zwave). And then you’d install mosquitto on that same machine in your network, as it does not need to be exposed to the internet.

thanks for your kind reply. Now I get it. Openhab provides a much more user-friendly interface to integrate, organize and manage resources (sensors and actuators), right?

I can’t put the mqtt server in my house because I don’t have a public ip address, I can’t visit the server in my house when I’m out. The solution is either to rent a vpc and make it a frp server, or install the mqtt server on this vpc. The key is to get a vpc with public ip address which makes it reachable wherever I am. Either way will expose the service to the internet. It can only be protected by a password I think.

Since openhab works between the mqtt server and user, I think I’d better install it on the same vpc so I can reach it.

No, please don‘t expose openHAB to the internet.
For remote access, you can use our free myopeHAB cloud service. No fixed IP-Address needed…


This. And for local communication keep a local mosquito instance.

There’s no need for a internet facing (ie with public ip) mosquito instance.


Thanks, I’ll try the cloud service later and give some feedback. I’m a little concerning about the gfw.


What‘s that ???

great firewall

Well, if it is that, no reason for concerns. Using myopenHAB does not need to open any ports in your firewall.

Sorry guys, I tried openhab but got confused by concepts like item, channel or device. I failed finding a simple tutorial about just how to add my sensor/esp to it.
So after a total 3-4 hour studying(that’s all my spare time in last week), I turned to domoticz.
Thanks guys for your help.

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