iobroker-community-adapters / ioBroker.shelly

Integrate your Shelly devices into ioBroker via MQTT or CoIoT
Other
162 stars 66 forks source link

[Bug]: Wrong http username or http password! Please enter user credentials for restricted login. #872

Open Fortune95 opened 11 months ago

Fortune95 commented 11 months ago

I'm sure that

Shelly device

Shelly Plus HT

Protocol

MQTT

The problem

In the Shelly Plus HT is the same password configured as in the Gen 1 devices. But I still got the message of wrong password setting.

iobroker.current.log (in debug mode!)

[httpIoBrokerState] HTTP request error for 192.168.95.245 (shellyplusht / shellyplusht-xxxxxxxxxx / shellyplusht#xxxxxxxxxxx#1) "/rpc/Humidity.GetConfig?id=0": Wrong http username or http password! Please enter user credentials for restricted login.

Version of nodejs

v18.18.2

Version of ioBroker js-controller

5.0.15

Version of adapter

6.6.1

github-actions[bot] commented 11 months ago

Thanks for reporting a new issue @Fortune95!

  1. Please make sure your topic is not covered in the documentation
  2. Ensure that you use the latest beta version (not the current stable version): 6.6.1
  3. Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue
  4. Search for the issue topic in other/closed issues to avoid duplicates!

    Otherwise this issue will be closed.

klein0r commented 11 months ago

Which firmware version is installed?

Fortune95 commented 11 months ago

updated today to 1.0.7 from yesterday

olli-r commented 11 months ago

I am having the same issue, the login error occurs randomly on my devices (I have 16 shelly devices connected to the adapter), in total 2 per day.

BooosesThaSnipper commented 11 months ago

is the issue still available in 1.0.8?

BooosesThaSnipper commented 11 months ago

After Updating a Shelly 1, a Shelly 2 and a Shelly Plug S (all from Plus Series) to version 1.0.8 I cannot recognize any issues within the iobroker log. Could you check if an update fom 1.0.7 to 1.0.8 will solve this issue?

Fortune95 commented 11 months ago

I have updated the HT PLUS to 1.0.8. As the error message only appeared irregularly, it may take a while. I will actively monitor it over the next few days.

Fortune95 commented 11 months ago

Error comes again.

[httpIoBrokerState] HTTP request error for 192.168.xxx.xxx (shellyplusht / shellyplusht-c049ef870xxx / shellyplusht#c049ef870xxx#1) "/rpc/Humidity.GetConfig?id=0": Wrong http username or http password! Please enter user credentials for restricted login.

BooosesThaSnipper commented 11 months ago

Which error level do you use within the adapter settings? Is Eco Mode enabled on the shellies?

Fortune95 commented 11 months ago

I don‘t find this option in the Plus HT. Only in other devices like dimmer or Plug S this option is available.

Loglevel in Adapter is WARNING

Matis-11 commented 9 months ago

Still having the same issue.

olli-r commented 9 months ago

Same here. The issue, btw. occurs on every Shelly device here, as well on those -without- an "eco mode". So I guess it's not an issue because of the eco mode switched on.

disaster123 commented 9 months ago

same here with shelly4propm:

    [httpIoBrokerState] HTTP request error for 192.168.178.82 (shellypro4pm / shellypro4pm-30c6f78352fc / shellypro4pm#30c6f78352fc#1) "/rpc/Switch.GetConfig?id=1": Wrong http username or http password! Please enter user credentials for restricted login.

Was auffällt - ich muss User und PW im Adapter konfigurieren. Im Webinterface muss man aber nur ein PW angeben.

klein0r commented 9 months ago

Was auffällt - ich muss User und PW im Adapter konfigurieren. Im Webinterface muss man aber nur ein PW angeben.

An welcher Stelle ist die Dokumentation des Adapters da unverständlich? Dann bessere ich gerne nach.

Fortune95 commented 9 months ago

Muss man eine weitere Instanz für Gen 2 Geräte angelegen, oder kann man eine Instanz für beide verwenden? Das ist mir bei der Passwort Thematik nicht ganz klar. Habe das Passwort via copy Paste vom Adapter im HT Plus eingetragen und trotzdem diese Fehlermeldungen. Hatte es so verstanden das der Adapter erkennt ob es ein Gen 1 oder 2 Gerät ist und dann selber entscheidet ob der username verwendet wird. Oder geht der HT Plus zu schnell in den „Schlafmodus“ wenn er seine Werte an die Instanz gesendet hat und der Adapter seine Abfrage startet?

klein0r commented 9 months ago

Muss man eine weitere Instanz für Gen 2 Geräte angelegen, oder kann man eine Instanz für beide verwenden?

https://github.com/iobroker-community-adapters/ioBroker.shelly/blob/10bb282faa3bf2a4bb4354c15a2d7637b68be9f8/docs/de/faq.md?plain=1#L7-L9

Das ist mir bei der Passwort Thematik nicht ganz klar.

https://github.com/iobroker-community-adapters/ioBroker.shelly/blob/10bb282faa3bf2a4bb4354c15a2d7637b68be9f8/docs/de/restricted-login.md?plain=1#L13-L18

Hatte es so verstanden das der Adapter erkennt ob es ein Gen 1 oder 2 Gerät ist und dann selber entscheidet ob der username verwendet wird.

Richtig

Fortune95 commented 8 months ago

Vielen Dank für die Antworten, leider helfen sie mir nicht das Problem zu lösen. Könnte man die Prüfung oder Abfrage via http bei bestimmten Geräten abschalten? Hab auch mit der neusten FW immer noch die Fehlermeldungen im Log.

Esixs-Floh commented 7 months ago

Hallo zusammen, gibt es vieleicht neue Erkenntnisse? Grüße

Matis-11 commented 7 months ago

Die obigen Lösungsvorschläge bringen nichts. Weder eine zweite Instand noch sonst was, der Fehler taucht immer wieder auf. Bei mir vor allem vom shellyplusht. Da stimmt irgendwas in der Kommunikation oder dem Adapter nicht.

olli-r commented 7 months ago

Same here - for several days nothing, then within a couple of hours lots of error messages.

BenAhrdt commented 6 months ago

for some devices with batterie eg. Shelly H&T the message [httpIoBrokerState] HTTP request error for 192.168.2.47 (shellyplusht / shellyplusht-80646fcbec78 / shellyplusht#80646fcbec78#1) "/rpc/HT_UI.GetConfig": Wrong http username or http password! Please enter user credentials for restricted login.

is loged.

Is it possible to generate a "blacklist" of devices? So for this devices the error will not loged?

BenAhrdt commented 5 months ago

is somethnig planed on this issue? On my ioBroker instance this "error" comes very often on devices with battery

BenAhrdt commented 4 months ago

Bei mir kommt immer noch mehrfach Täglich diese Meldung:

[httpIoBrokerState] HTTP request error for 192.168.2.47 (shellyplusht / shellyplusht-80646fcbec78 / shellyplusht#80646fcbec78#1) "/rpc/Shelly.GetStatus": Wrong http username or http password! Please enter user credentials for restricted login.

Es ist wie gesagt ein Shelly Plus H&T

Wäre es nicht wie vorgeschlagen eine Idee, dass man Geräte in einer Whitelist von dieem Errorlog befreien kann, oder zumindest eine Anzahl X hintereinander zulassen kann?

mcm1957 commented 3 months ago

@klein0r

In diesem Topic https://forum.iobroker.net/topic/75195/herausfiltern-von-errorlogs/4 sieht es so aus als würde dieser Fehler hier in Zusammenhang mit Geräten stehen die nicht ständig online sind - z.B. ein im Batteriemodus laufender HT.

Kann das sein? Könnte es sein, dass bei nicht erreichbarkeit des Gerätes eine Wrong Username / Passwort meldung kommt? Klingt irgendwie nicht gerade logisch - aber ich möchte die INfo trotzdem mal ablegen. Mangels HW kann ich das leider nicht testen.

In jedem Fall sollte primär der Fehler gefunden / gefixed werden als Problemmeldungen zu unterdrücken.

disaster123 commented 3 months ago

Tritt auch bei 24/7 Geräten auf.

FNIO commented 3 months ago

habe das gleiche Problem mit dem angeblichen falschen Username oder Passwort.

Der Fehler tritt immer nur dann auf, wenn die Zeitabweichung zu groß wird. Log:

2024-03-20 18:48:36.552 - debug: shelly.0 (355) [MQTT] Publish: 192.168.200.157 (shellyplusi4 / shellyplusi4-xxxxxxxxxxx / shellyplusi4#xxxxxxxxxxx#1) - topic: shellyplusi4-xxxxxxxxxxx/debug/log, qos: 0, payload: shellyplusi4-xxxxxxxxxxx 3183324 1710956918.063 1|shos_sntp.c:84 New SNTP time: 1710956916.393249 (delta -1.662620)

2024-03-20 18:48:36.580 - merror: shelly.0 (355) [httpIoBrokerState] HTTP request error for 192.168.200.157 (shellyplusi4 / shellyplusi4-xxxxxxxxxxx / shellyplusi4#xxxxxxxxxxx#1) "/rpc/Input.GetConfig?id=1": Wrong http username or http password! Please enter user credentials for restricted login.

2024-03-20 18:48:36.592 - mdebug: shelly.0 (355) [MQTT] Publish: 192.168.200.157 (shellyplusi4 / shellyplusi4-xxxxxxxxxxx / shellyplusi4#xxxxxxxxxxx#1) - topic: shellyplusi4-xxxxxxxxxxx/debug/log, qos: 0, payload: shellyplusi4-xxxxxxxxxxx 3183325 1710956916.399 1|shelly_sys.cpp:208 Time is set

klein0r commented 3 months ago

Der Fehler tritt immer nur dann auf, wenn die Zeitabweichung zu groß wird.

Ja, das hatte im Forum auch schon jemand ermittelt. Immer wenn per NTP die neue Zeit geholt wird (oder dazwischen?).

BenAhrdt commented 2 months ago

Also beim meinem Shelly Plus H&T meldet er das ca. 10 mal am Tag. Der kann ja nicht 10 mal am Tag eine fasche Uhrzeit haben, oder? Und sonst richtig.

BenAhrdt commented 2 months ago

Der Fehler tritt immer nur dann auf, wenn die Zeitabweichung zu groß wird.

Ja, das hatte im Forum auch schon jemand ermittelt. Immer wenn per NTP die neue Zeit geholt wird (oder dazwischen?).

@klein0r also sollte das Problem nicht mehr auftreten, wenn ich den ntp server aus der Konfiguration des shellys raus lösche?

klein0r commented 2 months ago

@BenAhrdt Müsste man testen. Dann läuft die Zeit ggf. einfach immer weiter auseinander. Schön ist das auch nicht.

BenAhrdt commented 2 months ago

Stimmt. Die Frage ist halt, ob die wirklich so wichtig bei dem Gerät ist, da es "nur" Temperaturwerte sind. Ich könnte das mal testen, wenn Du magst.

BenAhrdt commented 2 months ago

@klein0r also ich habe jetzt seit 2 Tagen den Zeitserver im Shelly H&T Plus von "time.google.com" auf "time" gestellt. (ganz leer wollte er nicht). Seit dem habe ich zumindest keine Fehlermeldung mehr, aber trotzdem Werte. Die Frage ist nun, inwiefern spielt die Zeit des H&T eine Rolle?

Kaiman77 commented 1 month ago

Hi Zusammen, ich habe den Effekt auch mit diversen 2PM und einem Plus Plug S - also auch Geräte im Dauerbetrieb. Ich habe allerdings überall einen eigenen Zeitserver eingetragen. Aber selbst wenn das die Ursache ist, dürfte das ein Bug sein ;-)

BenAhrdt commented 1 month ago

Hi Zusammen, ich habe den Effekt auch mit diversen 2PM und einem Plus Plug S - also auch Geräte im Dauerbetrieb. Ich habe allerdings überall einen eigenen Zeitserver eingetragen. Aber selbst wenn das die Ursache ist, dürfte das ein Bug sein ;-)

OK, seit ich den Zeitserver raus genommen habe, habe ich keine Meldungen mehr dies bezüglich.

Kaiman77 commented 1 month ago

Das kann gut sein, aber das ist ja keine Lösung. Der Shelly sollte ja schon die Zeit regelmässig justieren.