UPDATE:
I have renamed this thread as the issue is to do with the requests for an SSE stream from REST API are not going through (see my post here).
END UPDATE
Relevant Info (I think)
I am not sure what information about my OpenHAB setup and my PC to include, or how to format it, so please tell me if you need anything more.
Server is an Rpi 3B connected to Internet router using Ethernet.
My laptop:
- Windows 10 Dell laptop
Working clients:
- My father’s Windows 10 Dell laptop
- My Android 10 Samsung phone
- My Pi 3B+ I use as a desktop
- A VirtualBox Windows 10 emulator
I have looked at the only other threads on here that are about this, and have made a bit of progress using the info I have found.
The threads:
- Not getting past first base on OH3 Main UI
- [OH3] state of items set to { “state”: “-” } in MainUI when accessing from macOS
- No Data visible in Widgets /Pages
I have the same problem as the first and second threads.
I included the third thread because I think the following is relevant:
It turns out that my antivirus program (avira Pro) blockes some mime types, what are essential for the widgets => text/event-stream
After i add the Mime Type to the exception list everything is working on my PC too…
I find a website where the problem is descripted.
Link
It seems that the source code of OH3 is not 100% compatible with W3C Standards
Background
I have dabbled with OpenHAB 2, and when I saw OpenHAB 3 was stable, I set up an instance using OpenHABian.
I started setting up stuff using my laptop. After fiddling around for a while, I got the Model and some Things and Items set up. However I did things, I absolutely could not get the Main UI to display Item states on cards. I could see their states in the Item config menu and HABPanel, but not on cards.
Thinking I had made a configuration error, I deleted my Things and Items, and set up an HTTP URL Thing called OpenHABForumAbout
and an Item linked to called OpenHABForumAbout_TopicCount
, as done in the OpenHAB Virtual Meet Up.
I opened it the Main UI on my phone, and voila, everything was working fine. I decided to check if it was a Windows thing, and opened it on my father’s laptop. Also working.
Further Investigation
I thought it may be because of stuff I had installed on my laptop, so I set up a Windows 10 emulator in VirtualBox (I will refer to this as ‘the emulator’). I loaded up the Main UI in the emulator, and it worked fine.
It is definitely something to do with my laptop.
I tried with multiple browsers on my laptop, and none worked.
On my laptop:
- Chrome (standard, Beta, Dev, and Canary)
- Firefox
- Edge
I tried on my phone, and every one I tried worked:
- Chrome (standard and Canary)
- Samsung Internet
In the emulator:
- Chrome
- Edge
Chromium, the only browser on my desktop Pi, also worked.
Chrome on my father’s laptop worked (I did not try other browsers).
I investigated further:
The following are not working on my laptop:
- Accessing items and groups using expressions (e.g.
=items.OpenHABForumAbout_TopicCount
) - Showing item states on cards
- Showing item states on HABot Cards (EDIT: on the Main UI chatbox. Normal HABot works fine)
- Event Streaming
It may be to do with the above functionality using MIME type text/event-stream
somewhere, and it getting blocked. Other people using or writing other software get the identical errors in Chrome and Firefox due to this being blocked by AV software.
I have tried with all (as far as I know…) my antivirus and ad-blocking software disabled, to no avail.
I have tried debugging the JS in Chrome to see when things go wrong, and found out a little: HABot (on the Main UI) returns the correct item, and the correct item states are being got from the REST API, but it seems that the cards use something else, which is not working.
My current conclusions
What it is not:
- It is not a browser issue: I have tried the same browser on multiple platforms.
- Nor is it a browser-extension issue: My extensions synced on my emulator’s Chrome when I signed in.
- It is not a Windows-wide thing: It works on a real Windows 10 laptop and an emulator.
My only semi-definite conclusion is that it is something to do with my network configuration or AV software.
Side Note: HTTPS is also not working on my laptop (when trying in Insomnia I get Error: SSL peer certificate or SSH remote key was not OK
; disabling SSL Certificate Validation makes it work), but fine on everything else. This may be related. Should I start another topic?
Sorry if this is all a bit long ;).