IP camera OR Remote camera

I have been using openhab2 for little while now. Using it as home automation till recently i added my ps3 camera to be my security cam on my habpenal UI and everything went well with instillation of Motion into my RPI3 when i start my motion it works for a bit like less than a minute and than it freeze my whole entier pi including the OH2… With that i think my openhab2 is killing my port that im using for cam… Using port 8080 for OH2 and 8081 For ip cam…please help to resolve this…my pi is connected to 16 chennal realy board and im only using 4 out of 16…
Please help ??!

Well, if you think the OH port and Motion ports are colliding, you can change one or the other to something else.

I run on Docker so am not sure the “right” way to make the change. I think there might be an openhab2 file in /etc/defaults where you can change the ports.

But I do know you can change the ports by setting the OPENHAB_HTTP_PORT (defaults to 8080) and OPENHAB_HTTP2_PORT (defaults to 8443) environment variables.

Also, be aware that OH also opens ports 5000 and 1901 I think.


I am new to openhaab, I have not got it running yet. I belive the problem is that I dont have the sitemap file installed. My plan is to start very basic and only ad my IP camera and later try ti install bindings for my sensors.

What is the easyes way to install a sitemap file for one IP camera?

Is it something more then the Sitemap that I need to do before a can login to my Open hab?

Kind regards Alan

Not sure what systen you doing here but the best option is to go on OH2
site and check what device and it will show you how or you can check
MK-Smart house on youtube for more details… I have done both to get to
where i am now

Please start with the Beginner’s Tutorial.


Then read about sitemaps here:


I have already done changing my cam port from 8081 to 8083 since the cam
http taking 8082 and tried the other eay around and still … Im wondering
noe mybe my relay board and the voltage going throu is effecting my cam or
somthing like this… Its really confusing coz i did all the steps perfctly
many times and i even had new SD card and burned new Jessy into it many
times !!

Hi Ramy,
Has this started all the time you were using Motion?

Yes. Had motion installed by itself and work 100% and same with OH2 by
itself and works 100%

The only reasons I could think of for a camera crashing are:
Bandwidth - Trying to run a 4K stream over WiFi for example is going to be tricky…

Storage Permissions - If you are running Motion on an RPi then chances are that you are recording to a NAS or other external storage. Do you have the correct permissions to write to it?

Resources allocated to decoding (if required) - Depending on your camera and setup, the RPi may be required to decode the video stream before passing it on… Have you allocated enough resources?

Also, under the assumption that you have installed OpenHABian have you taken into account that the account that you will be using to make changes will be openhabian but the account that the server runs under is openhab?


I’ve used motioneye package with OpenHab2 concurrently on RPI2 and RPI3 without issues. There is no port conflict when the default port assignments are used. I’ve connected 1 Vivitar action cam via USB and 3 iCamera 1000 IP cameras on a RPI3 and was able to monitor them via the motion web page ui and via sitemap, with the restrictions listed in the next paragraph. Obviously, memory and CPU constraints are an issue and an RPI2 will be less capable.

As far as I can determine, only one camera can be viewed as a Video stream within a sitemap in the openhab android app. Additional Video streams are blank. My workaround to this was to create a separate sitemap for each ip camera separate from my my main sitemap. I switch sitemaps within the app to view each camera. The following example should work. Substitute your desired sitemap name, labels, and ip/port combination. Note that the encoding entry is required since motion provides a mjpeg stream. If you use the Eclipse Smarthome Designer, it will incorrectly report the encoding entry as an error, but you can ignore it.

sitemap Camera label="My Camera" {
        Video url="192.168.x.xxx:808x" encoding="mjpeg"

installed with openhab2 in my RPI3, I did not yet tried to use openhabian
as a main system but ill give it a go

Thanks I did try MK-smart house tutoril for the site map, but i did never get it ti work. Do you know if its some pre made basic sitemap files I can download and CTRL+C and CTRL+P to the right folder?

Regards Alan

Thanks rikoshak

I read the beginners tutorial a few times, and I belie everything is accordingly, however my sitemap folder is empty after the installation. So I believe I need to download some sitemap file who I can adjust for my “things” Or do you belie its better to delete my installation again and do a fresh install off openhab to get i working start setup? As i dont understand how to create a new customized sitemap file for my start setup.

Thanks Alan

Create a file named default.sitemap in the sitemaps folder.

Populate the file based on


There is a simple example file at the top of that link.

Of course, now that you have this same question spread across four different postings no one in the future will be able to benefit from these answers.

I am sure a lot of peaple will benfit form the same problems that I have. As I assume am wil not be the only one who dont get my openhab working directly.

A made a copy of the text in a blank text document and named it test.sitemap but I dont have permission to save it on openhab2/sitemap Why is my sitemap folder locked and how do I unlock it in ubuntu.

Thanks for all help so far. Alan

Alan ! Start with a fresh install and make sure your system is update and
upgrade and than if you try to save somthing but the system dosn’t allow
you than try to save it as a root. For your sitemap you need to make sure
fist that your OH2 is worling first by this command (sudo systemctl status
openhab2) First option : if you get an error than you have to read what is
it and google the error # . 2nd option : If your no error and your OH2
status is Active than try to stop your OH2 than up update your system than
upgrade that start your OH2 and make sure no error shwoing and than wait
for a good 5 minutes mybe longer mybe less… To set up your sitemap,
habpenal or whatever option you gonna use than you need to go to you
LOCALHOST for your OH2 and choise option for your Binding and you will see
where you can change Binding location from (/Default )to (home) and than in
your system create a txt file as in (cd /etc/openhab2/items or whatever
option you looking for than /home.items ) and your script code will go in,
save and exit and restart your OH2.


Thanks Ramy.

I did as you suggested and did a full re installation, but now on my windows platform. And it worked directly. So i belive i got some issues with my Linux platform installation.

So my nest step is to try to hock up my IP camera as my first thing.

So I assume a need to adjust my things file and my sitemap file?

But they won’t be able to find it. You are getting all sorts of information on four separate threads, NONE of which is a thread that is actually about your specific problem.

Post a new question in the Beginners section.