homebridge-website-to-camera icon indicating copy to clipboard operation
homebridge-website-to-camera copied to clipboard

Installing Chromium leads to problems with Fritzbox

Open guitardoc opened this issue 1 year ago • 24 comments

First of all, thank you for providing this plugin.

However, there are a few issues with it. The installation of chromium-browser is no longer possible, it probably needs to be chromium (without "-browser"). But when you install this browser (I did so on a headless Debian Bullseye), you only have awfully slow access to the fritzbox admin user interface. Connecting to the fritzbox is only possible when stopping homebridge. Deinstalling chromium or the plugin does not remedy the problem - the only way to get back to normal fritzbox access is by erasing and new installation of Debian Bullseye.

Is there a possibility for you to have a look into it? Until this is fixed, I have to strongly discourage users to install the plugin. I had to reinstall Debian Bullseye three times while trying to figure out the problem and every time it came back to the installation of chromium.

Thank you!

guitardoc avatar Mar 11 '23 15:03 guitardoc

Hey, that sounds very strange.. what hardware are you running chromium on? Which version of chromium is being installed?

werthdavid avatar Mar 12 '23 12:03 werthdavid

Yes, I admit it sounds strange. However, I have been trying to find the problem for nearly a year and I could narrow it down to the website-to-camera plugin. The plugin itself does not introduce the strange behaviour (I restored a backup with the plugin included without prior chromium installation) but once I installed chromium the strange behaviour started. If it is due to chromium itself or one of its numerous dependencies I could not find out.

The machine I am running the system on is a Raspberry Pi 4B with 8GB RAM, the OS is headless Debian Bullseye. The version of chromium was the one that gets installed using the installation command sudo apt-get install chromium --yes

The Fritzbox is an FB 7590 AX.

guitardoc avatar Mar 12 '23 16:03 guitardoc

I have a RPi 4 but I'm using Raspbian non-headless. Can u run chromium-browser --version or chromium --version please. And also please share your homebridge config. Does the problem occur with other websites or only Fritzbox? I have a Fritzbox as well but not using it with the plugin..

werthdavid avatar Mar 12 '23 17:03 werthdavid

Here is my Homebridge website to camera config: { "platform": "website-camera", "cameras": [ { "name": "Auto", "url": "http://192.168.188.92:8082/vis/index.html?StandortFahrzeug#StandortFahrzeug", "height": 540, "width": 960, "timeout": 10000, "renderTimeout": 1, "chromiumPath": "/usr/bin/chromium", "live": "false", "liveSnapshotInterval": 1000, "livePort": 8554 } ], I do not have chromium any longer installed due to this very issue. I had to erase the whole Pi OS and start from scratch to remedy it. However, I think I do have an old copy of the system somewhere with chromium on it. I will have a look at it later. It may have to do with my system being headless. I think there is a new chromium version for headless systems but I am very reluctant to install it in fear of having the same issue again… Strangely, only the Fritzbox website is affected so far.

guitardoc avatar Mar 13 '23 10:03 guitardoc

So it should work with Chrome and/or Chromium, the plugin basically does control a Chrome browser via the API. Headless should not be an issue. I'm not sure what the /vis/ part of the FritzBox does as mine doesn't have that. Is the website you're trying to screenshot quite heavy? Like what does it contain? (Ich spreche btw. auch deutsch 😉 )

werthdavid avatar Mar 13 '23 10:03 werthdavid

Ahhh, Deutsch ist wesentlich einfacher… :-) Es geht um die Seite fritz.box. Normalerweise geht das Anmeldefenster ruckzuck auf wenn man fritz.box eingibt (bei mir auf einem MacBook Pro im gleichen Netzwerk). Wenn chromium installiert ist, dann dauert das manchmal schon eine Minute. Noch schlimmer dann nach der Anmeldung an der Fritzbox - einmal auf Heimnetz-Mesh gedrückt und vielleicht zeigt er nach 10 min was an. Kann auch passieren, dass ein Timeout kommt und man sich neu anmelden muss.

guitardoc avatar Mar 13 '23 11:03 guitardoc

Hmm ich verstehe es noch nicht ganz. Wie machst du denn die Anmeldung an der Fritzbox wenn du headless unterwegs bist? Du kannst mir vielleicht auch mal ein Video oder so auf Telegram schicken @werthd

werthdavid avatar Mar 13 '23 11:03 werthdavid

Auf dem Raspi laufen nur zwei Systeme, nämlich die Homebridge für HomeKit und der ioBroker. Der Raspi ist nur für die Verwaltung der Hausautomation und deren Komponenten zuständig. Auf dem Raspi wird nichts weiter gemacht. Aber alle anderen Geräte (z.B. mein MacBook - aber auch z.B. ein iPad oder das iPhone), haben dann das Problem mit dem Aufruf der Fritzbox, sobald Chromium auf dem Raspi läuft - obwohl das eine mit dem anderen ja scheinbar erst mal gar nichts zu tun hat. Ich hoffe, ich konnte es einigermaßen verständlich erklären? Da fällt mir ein - ich bin auch nicht der einzige der das Problem hatte. In einem Forum hat jemand über exakt das gleiche Problem berichtet und er konnte es auch nur durch Neuaufsetzen des Raspi ohne Chromium beheben. Wenn ich mich recht entsinne dann war das im SmartApfel Forum.

guitardoc avatar Mar 13 '23 12:03 guitardoc

Aber natürlich fängt das Problem erst an, wenn das Plugin für Homebridge Chromium nutzt um auf die Fritzbox zuzugreifen..?

werthdavid avatar Mar 13 '23 20:03 werthdavid

Nein, sofort nach der Installation.

guitardoc avatar Mar 13 '23 22:03 guitardoc

Du installierst ein Programm auf einem Raspberry, der ansonsten nichts mit der Fritzbox zu tun hat, außer dass er im selben LAN ist und sofort nach Installation ist die Fritzbox langsam?? Das widerspricht allem was ich über IT zu wissen glaubte.. 😝 Ist der ioBroker irgendwie an die Fritzbox gekoppelt mit einer Anbindung?

werthdavid avatar Mar 14 '23 06:03 werthdavid

Ja, das ist ja das Skurrile an der ganzen Geschichte. Ich denke auch nicht, dass es am Plugin liegt. Ich vermute, dass Chromium irgendwas mitbringt, was dann (durch einen Bug) die Fritz!Box mit Traffic bombardiert, so dass diese nicht mehr dazu kommt, die Anfragen zum User Interface zu beantworten (das User Interface sollte ja bei der FB ganz unten in der Priorität stehen). Anders kann ich es mir auch nicht erklären...

guitardoc avatar Mar 14 '23 09:03 guitardoc

Also hat der ioBroker eine Anbindung an die Fritzbox? Vielleicht reagiert der ioBroker auf Chromium. Wie sieht die CPU Auslastung auf RPi und Fritzbox (sieht man ja in der Oberfläche) aus, wenn Chromium installiert ist?

werthdavid avatar Mar 14 '23 09:03 werthdavid

Nein, ioBroker hat keine Anbindung an die Fritz!Box. Ich hab Chromium ja nicht mehr drauf, daher kann ich das nicht mit der Auslastung nicht testen... Ich schaue dann mal nach der alten Platte wo es noch drauf ist.

guitardoc avatar Mar 14 '23 09:03 guitardoc

Hab die alte Platte mal fix angeschlossen. Chromium läuft, Plugin auch - sehe auf der Karte, dass mein Auto tatsächlich dort steht wo es auch steht... :-) Fritz!Box Zugang ist jetzt extrem langsam, aber ich komme wenigstens noch drauf: Auslastung Raspi liegt bei ca. 25%, Fritz!Box bei ca. 85%. Hmm... Damit dürfte sich meine Theorie pulverisiert haben... :-) Ich habe keine Idee, woran es liegt. Wenn ich den ioBroker stoppe, dann ändert sich nichts. Wenn ich den hb-service stoppe, dann geht es wieder flott auf der Fritz!Box.

guitardoc avatar Mar 14 '23 09:03 guitardoc

Was passiert wenn du auf deinem Laptop die URL aufrufst die sonst das Plugin aufruft? Führt das auch zu hoher Last bei der Fritzbox?

werthdavid avatar Mar 14 '23 09:03 werthdavid

Nein, da ändert sich nichts. Zum Vergleich - wenn ich den Raspi ausschalte, dann ist die Auslastung der FB immer noch bei ca. 80%. Ich habe aber auch jede Menge Repeater und Hausautomationsgeräte dranhängen (ca. 100). Von daher kann das schon stimmen.

guitardoc avatar Mar 14 '23 10:03 guitardoc

Das sieht man ja auf System-->Energiemonitor wo die Last herkommt, kannst da mal schauen? Was ist denn das für eine Seite die da aufgerufen wird mit dem Fahrzeugstatus?

werthdavid avatar Mar 14 '23 10:03 werthdavid

image

guitardoc avatar Mar 14 '23 15:03 guitardoc

Ist das jetzt mit oder ohne Chromium? Sieht ja unauffällig aus

werthdavid avatar Mar 14 '23 16:03 werthdavid

Das ist mit Chromium. Hab es noch von der „alten“ Platte laufen, da ich den Zugang zur FB im Moment nicht so oft brauche…

guitardoc avatar Mar 14 '23 21:03 guitardoc

Wie sieht es aus, wenn du dir die Auslastung anschaust, kurz nachdem du auf dem iPhone die Home App geöffnet hast? (Hintergrund: Dann triggert das Plugin, dass Chromium ja die Seite besucht und einen Screenshot erstellt).

werthdavid avatar Mar 15 '23 08:03 werthdavid

Die Auslastung oben war schon mit offenem Plugin. Aber ich denke, dass das Plugin mit dem Problem gar nichts zu tun hat. Erst wenn man Chromium installiert geht es los. Ich müsste mal testen, ob das Problem auch auftritt, wenn man auf einem frischen Bullseye headless chromium installiert. Werde ich demnächst mal machen. Wenn bisher nur zwei Anwender das Problem hatten - wer weiß an welcher Konstellation der Installationen das tatsächlich liegt? Wenn es denn bei allen anderen funktioniert… Oder die haben keine Fritzbox - oder eine andere Fritzbox? Oder es ist nicht aufgefallen, weil wann greift man schon mal auf die Fritzbox zu wenn alles läuft? Ich werde es mal weiter beobachten und berichten wenn mir noch was auffällt. PS. Du solltest bei Gelegenheit mal ändern, dass die Installation mit chromium und nicht mit chromium-browser erfolgen muss. Bei dem Versuch der Installation von chromium-browser kommen Fehler, weil es diese Installation nicht mehr gibt.

guitardoc avatar Mar 15 '23 10:03 guitardoc

Guter Hinweis, mache ich.

werthdavid avatar Mar 15 '23 10:03 werthdavid