Phoscon.de/pwa/login.html does not work anymore

Can you please check if when opening the page in another browser (or from another device) that the same error occurs. In my current tests it looks like the HTML/JS code itself isn’t the problem but that hard caching on some files can cause such problems.

some browsers work some others don’t:

  1. on my Chrome it doesn’t work, even after cleaning cookies and caches and everything (dev console → application → storage → clear site data with everything ticked)
  2. The same chrome in an incognito window works instead!
  3. Chrome on my phone works

not sure what’s the difference between 1 and 2, it should be the same. Tried multiple times, 1 just doesn’t work.

Thanks a lot, it’s really tricky to figure out what’s going on here. I’ve found one small bug but am not sure if that’s the problem. We already have cache invalidation in the code so that new files will be refreshed by browsers if they change. Beside file caching there is also localStorage in browsers which often is not cleared when cleaning the browser cache, perhaps this is in play here :thinking:

the way I do it described in the previous message I think it should, it’s mentioned as an option:

maybe the fact that in HA phoscon is displayed as an iframe plays a role?

Maybe, after all every layer in between which may cache could do something undesired.

I don’t know how this works in detail with the add-on, if the “real” deCONZ HTTP port is accessible outside HA, or if this always goes through an extra hop like internal nginx. The actual port used by deCONZ can also be seen under “deCONZ → Menu → Plugins → REST API Plugin”

Did a little test with my HA Virtualbox setup, here deCONZ is using 40850 internally and in the add-on configuration I’m using 8099 which is accessible to the outside.

there’s definitely an http server in the middle, when on Phoscon website, all http calls have the format:

http://{my-homeassistant-hostname}:{myhomeassistant-port}/api/hassio_ingress/{long-string}/api/{deconz-api-key}/sensors/147

Oha :slight_smile: right there is this ingress thing.

Do you also the the local (?) port exported?

With this I can access the Phoscon App via http://homeassistant:local:8099 and it doesn’t seem to go through ingress.

I’ve got the “show disabled ports” unticked. If I try to access through any of the ports written then I cannot access anything

You need to put the ports in. It seems that the ports are active but they are only recommendations.

Can you share a screen?

Looking at one of the requests going through ingress, it shows there is indeed nginx in between.
The max-age=259200 cache header comes from the original response from deCONZ, which caches up to 72 hours. In the Phoscon App cached files are invalidated by their Etag (hash over the file) not sure if that might still work here when the extra server sits in between :thinking:

Oh the Etags can indeed cause the caching problem here.
The following screenshot is the response directly from deCONZ internal HTTP server, it includes the Etag which is used by browsers to check if there is something new.

Here is the same response but from the ingress nginx server, looks like the Etag isn’t forwarded.
From my understanding this means that files may be cached by nginx up to 72 hours in our case.

Most of our files also contain ?<timestamp> in the URLs which allows cache invalidation without the Etag, but not all our files do.

but, if the eTag was the problem, shouldn’t cleaning the browser caches and storages fix the issue? It’s not in my case. Unless you think that the nginx in between is caching?

Clearing the cache doesn’t help in my case either (Brave browser).

no idea what changed, but my gateway page is now back working also in my desktop browser :face_with_diagonal_mouth:

Yes, I also confirm that it works for me - on phone and also on desktop pc.

Updated to Phoscon 2.24.1 and now iPadOS and iOS can see the Gateway!

I can’t say anything about the HA problems, @manup is in deeper there. But the initial issue of this thread that you can’t access the gateway from phoscon.de/pwa and that the Phoscon App was not working in browsers on IPhones and IPads is now fixed in deCONZ beta 2.24.1.

2 Likes

So I guess we (speaking as “we, the HA users”) need to wait for
a) the fix currently in deCONZ beta 2.24.1 will make it to a new stable release and
b) that new stable release will be made available in the HA deCONZ addon (as there’s still no option to switch to a beta release with the HA addon)?

Seems like this would take few weeks, maybe even months… right?
My personal update section starts to bore me already…

That’s right. I can help on the HA deconz plugin update, it’s an easy change in HA codebase, the problem there is more the testing. But we need a new stable deconz version in the first place… which is the real blocker here.

1 Like