OH3 Windows App does not find OH3 server on the same machine

Hi,
I use a Windows 10 tablet to run OH3. Works all well. I want to use the same device also for showing the UI for OH, but as the tablet is old and slow I don’t want to use the browser, but the native OH-App for Windows.

I can start the app and connect to the demo server, but not to the local server. I tried everything and only get errors like this:

...
13:17:00;INFO;OpenHAB.Core.Services.SettingsService.Load;Load settings from disk;;
13:17:00;ERROR;OpenHAB.Core.SDK.OpenHABClient+<CheckUrlReachability>d__7.MoveNext;CheckUrlReachability failed;"System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Exception: Der Text zu diesem Fehlercode wurde nicht gefunden.

Die Serververbindung konnte nicht hergestellt werden.

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x1c
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x60
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x36
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x16
   at System.Net.Http.HttpHandlerToFilter.<SendAsync>d__15.MoveNext() + 0x6c5
...
13:17:20;INFO;OpenHAB.Core.Services.SettingsService.Load;Load settings from disk;;
13:17:20;INFO;OpenHAB.Core.Services.SettingsService.Load;Load settings from disk;;
13:17:20;ERROR;OpenHAB.Core.SDK.OpenHABClient+<CheckUrlReachability>d__7.MoveNext;CheckUrlReachability failed;"System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Exception: Der Text zu diesem Fehlercode wurde nicht gefunden.
...

Any idea what’s going wrong? Thanks.

The Windows app is really just a browser too so I wouldn’t expect any better performance from the app than from a browser in kiosk mode.

Windows will often have firewall rules that prevent connections to certain ports so that’s probably the first thing to check.

Thank you. Firewall can not be the case, because from other computers in the same net I can see the pages.

Do you recommend any browser for windows which does not consume that much resources? Thanks.

That doesn’t mean that the firewall doesn’t block access for connections from the same machine.

But if you are certain that it’s not a firewall issue then you’ve possibly misconfigured the app. Also it might be possible that the Windows App doesn’t support OH 3. I don’t know if it’s been kept up to date.

I don’t use Windows so I don’t have any suggestions. But I doubt that even Chrome or Firefox just showing the one OH web page is going to use significantly more resources than the OH App will.

I disabled the firewall. In the settings I added as server http://192.168.100.5:8080

I also tested http://localhost:8080 and http://smarthome:8080. All of these work in any browser on the same machine, but not in the app. Really strange.

Since today I use Opera, which is quite fast and does not eat many resources, it works really nice.

The reasons why I am using Windows:

  • Raspberrys are barely available or are extremely expensive (>>100 €), my tablet did cost only 55 € and it is my server AND display in one device
  • I am not very experienced with Linux
  • I don’t want a mini server and another display, because this Windows tablet only uses about 3-8W of power, otherwise this would be doubled. Energy is like gold in Germany these (“green”) days…
  • An all in one machine is quite comfortable and it has its own battery backup

The issues:

  • The tablet is very slow and has only 2GB RAM
  • I have to restart OH3 often when adding links or bindings or deleting them, then the browser hangs or shows errors.Service restart lasts about 5min, that’s bad

For now I hope it works. OH3 is very new for me, but I am working hard :wink:

Using an old Windows machine is perfectly reasonable for openHAB. The only issue is that most of us don’t do that, so it limits our ability to help you in a lot of cases. The same can be said for MacOS or any other system that we don’t know well.

You could perhaps put Linux on the tablet, which would likely be faster than Windows, but there are still a lot of variables due to the unusual platform. It might actually be harder for us to help you when we don’t know what’s going on with your Linux system and you don’t feel confident in Linux.

(For what it’s worth, I don’t know a lot about Linux either.)

That’s not great, but the real question is how long it can run without hanging/crashing. It’s not a good platform if you have to restart it every few days.

Yes, you are right, Linux would be better. But is there any cheap alternative at the moment? Can you recommend any (used) hardware? I read about thin-clients, but I am not sure about it.

This morning I noticed that the contents of my widget webpage are still updating with the measurement data, but the webserver itself, e.g. the admin pages, are not reachable. This is interesting. Are there 2 webservers running with OH?

How can the measures still be updating, but the webfrontend of OH itself does not run? And how could I restart the webfrontend without restarting the whole service?

Thank you.

Hey @Nadalio
The configuration with IP “http://192.168.100.5:8080” looks good to me when you have entered the address as local configuration (see screenshot).

Regarding the issue with the widgets, what kind of installation type do you using for your OH instance (openHabian, Docker, Windows,…)?

I am running OH3 on Windows 10. Last night I wanted to open the sensorpage on my mobile and got an error. But this morning on the tablet the sensorpage was still updating every second.

When opening the adminpanel on my PC I only get loading bars and the panel does not load. So when the sensorpage is loaded in the browser, the update are still comming.

How can this be? Are there a webserver for the pages and another service for JSON-updates? Strange.

Is it possible to only restart the webserver without the whole service?

Is your sensor page a sitemap? If so then the sitemap servlet is working but MainUI servlet is not. The logs will likely give some clue.

There is only the one webserver but that’s only a tiny part of what drives the UIs.

You could restart just MainUI through the karaf console but without knowing why it’s not working I have low hopes that it will work. I’d guess that this machine simply does not have enough resources to run OH and you will forever be fighting these sorts of issues.

No, I am using Layouts.

The logs did not state an issue, that’s the issue :wink:

Could be too less resources, mostly RAM (normally are 1,8GB of 2GB is used), because CPU is in idle most of the time, although it’s only an ATOM 5. I noticed that when editing pages often the server strikes and is not responding. Sometimes he keeps up again some minutes later, sometimes only service restart helps.

I probably will have to check out other hardware, but as mentioned I don’t know what kind of and what would affordable and of course is available. Do you have any recommendations?

I chave no recommendations because I don’t know what’s available in your part of the world. A Raspberry Pi/Pine64/OrangePi or some other ARM based single board computer would be my first choice. A NUC or other similar small passively cooled small intel/amd based machine would be my second choice.

But ultimately, you’ll probably have to spend more than you have now and you have to decide how much you are willing to spend on this.

Thanks. Hopefully my Windows tablet will decide to run better :grin:

Hi @Nadalio,
A few questions if you do not mind.
Did the tablet come with windows 10 preinstalled?
Have you insured that it is updated with the latest patches and drivers for your device?
Have you configured it to disable power management and keep it on its charger to validate that it is not going into a sleep or hibernation mode?
Have you reviewed the task schedular for windows to insure you r not hitting a resource constraint due to windows maintenance events occurring?
Perhaps you could pull down the windows tools like Systernal suite Sysinternals - Windows Sysinternals | Microsoft Learn to better understand what is happening during the time you have these issues.

No, I did a fresh install.

Yes, only the acceleration driver can’t be found - I don’t need this.

It’s on charger the whole time. In the morning I set powercfg to never turn the screen off and in the night I set it to 1min. So the machine is running all the time.

As mentioned the CPU is quite often idle. Normal load is between 5% and 20%. RAM is about 1.8GB of 2.0GB. I show these data in the OH widget to always keep an eye on.

I believe it has to do with editing. When doing often changes in the page code editor (which is really slow), saving and testing, OH hangs up, although I don’t see this, because changing between code and Design is still working. Perhaps some errors I make during editing crashes the server?

What about swap?

Highly unlikely.

Swap is set to auto, about 2GB.

It is so strange. Today I was testing and programming a page, then again page reloads led to server not responding error page. Then I started start.bat instead of restarting the service and although the batch still did not react, the sever finally ran again.

I have no clue, what is happening here, but I get frustrated. The system is a completely fresh install (ok, the tablet is old and slow, but it does its job well within Windows), I did all other OH installations as in the manual, and nevertheless it does not work. On the same machine I run Mosquitto which had no problem at all since its installation. But this Java-stuff… I never felt in love with this (sorry) crap on Windows.

What are the minimum requirements for openHABian? Pi 3 with 2GB and USB-SSD? Would it run on Pi3 with 1GB? Or Pi 2? I am really annoyed, because I have to restart the server again and again instead of programming. :pensive:

It’s not about how much is allocated, it’s about how much is being used. If any of it is being used, your machine is going to behave like you describe as data is swapped in and out of memory to the excruciatingly slow storage that is on these types of machines.

The docs used to be much more explicit. Basically the minimum requirements used to be a RPi 2B or better. That was for OH 2 but I don’t think OH 3 requires more resources than OH 2.

It definitely runs on a RPi 3 (RPi 3 only comes with 1 GB RAM) and an RPi 4 in almost any configuration, though I think the memory options there start at 2 GB. Assuming you are only running OH and a couple of related services like Mosquitto, 1GB is enough on Linux.

Thank you.

Hm, swapping could be an issue, but the tablet really has nothing else installed, I removed everything possible. Sadly it’s nearly impossible to debug this thing. When OH runs, it runs fast and well. But then suddenly these bad server failures…

So an Pi 3 with 1GB would work, also a Pi 2 with 1GB and openHABian? I could get an Pi 4, but it would cost 150 €, this is insane. I could buy my Windows tablet 3 times for this money and with Pi 4 I also had a lot of power costs in addition. Also I have to get several additions to the Pis, like an SSD, a wifi stick, a box and a power supply. This would be at least 200 €.

Hope to find another solution.

So, you are seeing slowness, but you do not think you need the hardware acceleration driver?