Support-Thread Modul 36_Shelly.pm

Begonnen von Prof. Dr. Peter Henning, 03 Februar 2021, 08:03:09

Vorheriges Thema - Nächstes Thema

gvzdus

Genau die Code-Stelle ist mir auch aufgefallen!
Wenn Du aber shelly-user irgendwie auf "" stehen hast, würde das Default nicht greifen.

"Mein" FHEM kann Digest-Auth, das dürfte ein Feature der HttpUtils sein - vielleicht brauchst Du ein Gesamtupdate?

Hier der Mitschnitt zum Shelly PlusPlugS mit PW-Schutz:
15:10:03.853265 IP openwb-2.fritz.box.39590 > shellyplusplugs-e465b8b8004c.fritz.box.http: Flags [P.], seq 1:152, ack 1, win 64240, length 151: HTTP: GET /rpc/Switch.GetStatus?id=0 HTTP/1.0
0x0000:  4500 00bf bbce 4000 4006 fcbb c0a8 0005  E.....@.@.......
0x0010:  c0a8 0059 9aa6 0050 f0b1 e278 cc44 7b0d  ...Y...P...x.D{.
0x0020:  5018 faf0 8260 0000 4745 5420 2f72 7063  P....`..GET./rpc
0x0030:  2f53 7769 7463 682e 4765 7453 7461 7475  /Switch.GetStatu
0x0040:  733f 6964 3d30 2048 5454 502f 312e 300d  s?id=0.HTTP/1.0.
0x0050:  0a48 6f73 743a 2031 3932 2e31 3638 2e30  .Host:.192.168.0
0x0060:  2e38 390d 0a55 7365 722d 4167 656e 743a  .89..User-Agent:
0x0070:  2066 6865 6d0d 0a41 6363 6570 742d 456e  .fhem..Accept-En
0x0080:  636f 6469 6e67 3a20 677a 6970 2c64 6566  coding:.gzip,def
0x0090:  6c61 7465 0d0a 4175 7468 6f72 697a 6174  late..Authorizat
0x00a0:  696f 6e3a 2042 6173 6963 2059 5752 7461  ion:.Basic.YWRta
0x00b0:  5734 3663 3256 6a63 6d56 300d 0a0d 0a    W46c2VjcmV0....
15:10:03.865963 IP shellyplusplugs-e465b8b8004c.fritz.box.http > openwb-2.fritz.box.39590: Flags [P.], seq 1:208, ack 152, win 5609, length 207: HTTP: HTTP/1.0 401 Unauthorized
0x0000:  4500 00f7 0b53 0000 ff06 2dff c0a8 0059  E....S....-....Y
0x0010:  c0a8 0005 0050 9aa6 cc44 7b0d f0b1 e30f  .....P...D{.....
0x0020:  5018 15e9 d63b 0000 4854 5450 2f31 2e30  P....;..HTTP/1.0
0x0030:  2034 3031 2055 6e61 7574 686f 7269 7a65  .401.Unauthorize
0x0040:  640d 0a57 5757 2d41 7574 6865 6e74 6963  d..WWW-Authentic
0x0050:  6174 653a 2044 6967 6573 7420 716f 703d  ate:.Digest.qop=
0x0060:  2261 7574 6822 2c20 7265 616c 6d3d 2273  "auth",.realm="s
0x0070:  6865 6c6c 7970 6c75 7370 6c75 6773 2d65  hellyplusplugs-e
0x0080:  3436 3562 3862 3830 3034 6322 2c20 6e6f  465b8b8004c",.no
0x0090:  6e63 653d 2231 3730 3335 3133 3430 3322  nce="1703513403"
0x00a0:  2c20 616c 676f 7269 7468 6d3d 5348 412d  ,.algorithm=SHA-
0x00b0:  3235 360d 0a43 6f6e 7465 6e74 2d4c 656e  256..Content-Len
0x00c0:  6774 683a 2030 0d0a 5365 7276 6572 3a20  gth:.0..Server:.
0x00d0:  5368 656c 6c79 4854 5450 2f31 2e30 2e30  ShellyHTTP/1.0.0
0x00e0:  0d0a 436f 6e6e 6563 7469 6f6e 3a20 636c  ..Connection:.cl
0x00f0:  6f73 650d 0a0d 0a                        ose....
..
15:10:03.873400 IP openwb-2.fritz.box.39592 > shellyplusplugs-e465b8b8004c.fritz.box.http: Flags [P.], seq 1:411, ack 1, win 64240, length 410: HTTP: GET /rpc/Switch.GetStatus?id=0 HTTP/1.0
0x0000:  4500 01c2 3439 4000 4006 834e c0a8 0005  E...49@.@..N....
0x0010:  c0a8 0059 9aa8 0050 ba2a 01a3 f34f 5d9c  ...Y...P.*...O].
0x0020:  5018 faf0 8363 0000 4745 5420 2f72 7063  P....c..GET./rpc
0x0030:  2f53 7769 7463 682e 4765 7453 7461 7475  /Switch.GetStatu
0x0040:  733f 6964 3d30 2048 5454 502f 312e 300d  s?id=0.HTTP/1.0.
0x0050:  0a48 6f73 743a 2031 3932 2e31 3638 2e30  .Host:.192.168.0
0x0060:  2e38 390d 0a55 7365 722d 4167 656e 743a  .89..User-Agent:
0x0070:  2066 6865 6d0d 0a41 6363 6570 742d 456e  .fhem..Accept-En
0x0080:  636f 6469 6e67 3a20 677a 6970 2c64 6566  coding:.gzip,def
0x0090:  6c61 7465 0d0a 4175 7468 6f72 697a 6174  late..Authorizat
0x00a0:  696f 6e3a 2044 6967 6573 7420 6e6f 6e63  ion:.Digest.nonc
0x00b0:  653d 2231 3730 3335 3133 3430 3322 2c20  e="1703513403",.
0x00c0:  7265 7370 6f6e 7365 3d22 3039 6661 3533  response="09fa53
0x00d0:  3438 6133 3035 3065 6438 6530 6365 6662  48a3050ed8e0cefb
0x00e0:  6335 3561 3464 6635 6461 3739 3838 6131  c55a4df5da7988a1
0x00f0:  3730 3334 3832 6137 6166 3662 6638 3832  703482a7af6bf882
0x0100:  3966 3465 6335 3337 6239 222c 2063 6e6f  9f4ec537b9",.cno
0x0110:  6e63 653d 2263 6333 3865 6236 6538 3930  nce="cc38eb6e890
0x0120:  6634 6133 6133 6331 3938 6436 3032 6663  f4a3a3c198d602fc
0x0130:  6638 3037 6622 2c20 7265 616c 6d3d 2273  f807f",.realm="s
0x0140:  6865 6c6c 7970 6c75 7370 6c75 6773 2d65  hellyplusplugs-e
0x0150:  3436 3562 3862 3830 3034 6322 2c20 616c  465b8b8004c",.al
0x0160:  676f 7269 7468 6d3d 2253 4841 2d32 3536  gorithm="SHA-256
0x0170:  222c 2075 7365 726e 616d 653d 2261 646d  ",.username="adm
0x0180:  696e 222c 2071 6f70 3d22 6175 7468 222c  in",.qop="auth",
0x0190:  206e 633d 3030 3030 3030 3031 2c20 7572  .nc=00000001,.ur
0x01a0:  693d 222f 7270 632f 5377 6974 6368 2e47  i="/rpc/Switch.G
0x01b0:  6574 5374 6174 7573 3f69 643d 3022 0d0a  etStatus?id=0"..
0x01c0:  0d0a                                     ..
15:10:03.903782 IP shellyplusplugs-e465b8b8004c.fritz.box.http > openwb-2.fritz.box.39592: Flags [P.], seq 1:325, ack 411, win 5350, length 324: HTTP: HTTP/1.0 200 OK
0x0000:  4500 016c 0b57 0000 ff06 2d86 c0a8 0059  E..l.W....-....Y
0x0010:  c0a8 0005 0050 9aa8 f34f 5d9c ba2a 033d  .....P...O]..*.=
0x0020:  5018 14e6 5a61 0000 4854 5450 2f31 2e30  P...Za..HTTP/1.0
0x0030:  2032 3030 204f 4b0d 0a43 6f6e 7465 6e74  .200.OK..Content
0x0040:  2d54 7970 653a 2061 7070 6c69 6361 7469  -Type:.applicati
0x0050:  6f6e 2f6a 736f 6e0d 0a43 6f6e 7465 6e74  on/json..Content
0x0060:  2d4c 656e 6774 683a 2032 3037 0d0a 5365  -Length:.207..Se
0x0070:  7276 6572 3a20 5368 656c 6c79 4854 5450  rver:.ShellyHTTP
0x0080:  2f31 2e30 2e30 0d0a 436f 6e6e 6563 7469  /1.0.0..Connecti
0x0090:  6f6e 3a20 636c 6f73 650d 0a0d 0a7b 2269  on:.close....{"i
0x00a0:  6422 3a30 2c20 2273 6f75 7263 6522 3a22  d":0,."source":"
0x00b0:  5753 5f69 6e22 2c20 226f 7574 7075 7422  WS_in",."output"
0x00c0:  3a66 616c 7365 2c20 2261 706f 7765 7222  :false,."apower"
0x00d0:  3a30 2e30 2c20 2276 6f6c 7461 6765 223a  :0.0,."voltage":
0x00e0:  302e 302c 2022 6375 7272 656e 7422 3a30  0.0,."current":0
0x00f0:  2e30 3030 2c20 2261 656e 6572 6779 223a  .000,."aenergy":
0x0100:  7b22 746f 7461 6c22 3a30 2e30 3030 2c22  {"total":0.000,"
0x0110:  6279 5f6d 696e 7574 6522 3a5b 302e 3030  by_minute":[0.00
0x0120:  302c 302e 3030 302c 302e 3030 305d 2c22  0,0.000,0.000],"
....

olwaldi

Zitat von: loetmeister am 25 Dezember 2023, 14:59:38Mein PlusPlugS mit Passwort ist aber für FHEM nicht mehr erreichbar.. HTTP simple auth ist wohl nicht mehr möglich:
ZitatCommunication through HTTP and Websocket channels is secured by a digest authentication mechanism [...]
https://shelly-api-docs.shelly.cloud/gen2/General/Authentication/
Bei meinem (neuen) ShellyPlusPlugS hat's mit dem Authentifizieren geklappt wie oben beschrieben, d.h. in der Shelly-WebGUI ein Passwort vergeben, in fhem
attr ShellyPlug shellyuser admin
set ShellyPlug password Mein_Paßwort

Grüßle, Michael

loetmeister

#752
Hi,

habs noch mal explizit mit admin als shelly user probiert..... scheint nun zu klappen.

Nur password setzten erzeugte 50 bis 60 mal pro Sekunde die folgenden log Einträge:
2023.12.25 16:07:32 4: [Shelly_status] issue a non-blocking call to http://192.168.6.12/rpc/Switch.GetStatus?id=0, callback to proc2G for comp=relay
2023.12.25 16:07:32 4: [Shelly_status] issue a non-blocking call to http://192.168.6.12/rpc/Switch.GetStatus?id=0, callback to proc2G for comp=relay
2023.12.25 16:07:32 4: [Shelly_status] issue a non-blocking call to http://192.168.6.12/rpc/Switch.GetStatus?id=0, callback to proc2G for comp=relay
2023.12.25 16:07:32 4: [Shelly_status] issue a non-blocking call to http://192.168.6.12/rpc/Switch.GetStatus?id=0, callback to proc2G for comp=relay

olwaldi

#753
Zitat von: Starkstrombastler am 25 Dezember 2023, 12:50:49Es handelt sich hier um einen Taster, der immer nur kurz betätigt wird. Um den Taster im Device zu sehen, muss auf dem Shelly eine Action angelegt werden. Das geht manuell oder automatisiert mittels dem Attribut 'webhook'. Die URL muss z.B. so aussehen:
http://192.168.178.100:8083/fhem?cmd=set%20MyShelly%20button_on
Funktioniert scheinbar nur halb bis gar nicht: Habe zuerst eine Action namens button_on im Shell-WebGUI angelegt und dort "Execute when" auf "Switch toggled on" (gibt kein "toggle" an sich) gesetzt. Funktioniert und erzeugt ein Event in fhem, wenn ich den Taster drücke. Wie erwartet nur beim EINschalten. Also eine zweite Aktion ähnlicher Art mit "Switch toggled off" angelegt. Danach kommen keine Events mehr in fhem an.
Es gibt das Reading button im Device ShellyPlug. Und dessen Wert kann ich aus der Linux-Shell über
echo "set ShellyPlug button_on" | nc -w1 imurr9.fritz.box 7072
echo "set ShellyPlug button_off" | nc -w1 imurr9.fritz.box 7072
steuern. Aber dadurch ändert sich NICHT der on/off-Zustand des Device ShellyPlug. Funktioniert aber aus dem ShellyPlusPlugS heraus aber nur "manchmal" bis selten.

Habe auch mal webhook mit "WEB" probiert. Mir ist da aber nicht klar, wo ich in fhem dann die URL für den Shelly hinterlegen könnte. Diese Meldungen gibt's dann im Log:
2023.12.25 15:54:24 3: [Shelly_Attr:webhook] ShellyPlug command is set, attribute webhook old: NoVal  new: WEB
2023.12.25 15:54:24 3: [Shelly_Attr:webhook] the webhook attribute is now WEB, create webhooks
2023.12.25 15:54:24 3: [Shelly_Attr:webhook] we will call Shelly_webhook for device ShellyPlug, command is Create
2023.12.25 15:54:27 1: [Shelly_actionWebhook] calling url-builder with args: ShellyPlug relay ch:0 noe:0
2023.12.25 15:54:27 1: [Shelly_actionWebhook] ShellyPlug: &urls=["http://192.168.178.49:8083/fhem?cmd=set%2520ShellyPlug%2520out_on%25200%26fwcsrf=csrf_509181295696804"]
2023.12.25 15:54:27 1: [Shelly_webhook] ShellyPlug Create component=relay  count=0   event=0
2023.12.25 15:54:27 1: [Shelly_webhook] issue a non-blocking call to
http://admin:ShUg#o42lo@192.168.178.44/rpc/Webhook.Create?cid=0&name=%22_SWITCH.ON_%22&event=%22switch.on%22&enable=true&urls=["http://192.168.178.49:8083/fhem?cmd=set%2520ShellyPlug%2520out_on%25200%26fwcsrf=csrf_509181295696804"]
2023.12.25 15:54:27 1: [Shelly_actionWebhook] calling url-builder with args: ShellyPlug relay ch:0 noe:1
2023.12.25 15:54:27 1: [Shelly_actionWebhook] ShellyPlug: &urls=["http://192.168.178.49:8083/fhem?cmd=set%2520ShellyPlug%2520out_off%25200%26fwcsrf=csrf_509181295696804"]
2023.12.25 15:54:27 1: [Shelly_webhook] ShellyPlug Create component=relay  count=0   event=1
2023.12.25 15:54:27 1: [Shelly_webhook] issue a non-blocking call to
http://admin:ShUg#o42lo@192.168.178.44/rpc/Webhook.Create?cid=0&name=%22_SWITCH.OFF_%22&event=%22switch.off%22&enable=true&urls=["http://192.168.178.49:8083/fhem?cmd=set%2520ShellyPlug%2520out_off%25200%26fwcsrf=csrf_509181295696804"]
2023.12.25 15:54:27 3: [Shelly_webhook] ShellyPlug: Error: Reading 'input.*mode' not found
2023.12.25 16:03:05 3: [Shelly_Attr:webhook] ShellyPlug command is set, attribute webhook old: WEB  new: none
2023.12.25 16:03:05 3: [Shelly_Attr:webhook] delete all hooks forwarding to this host and name starts with _
2023.12.25 16:03:05 3: [Shelly_Attr:webhook] we will call Shelly_webhook for device ShellyPlug, command is Delete
2023.12.25 16:04:20 1: PERL WARNING: Use of uninitialized value $value in concatenation (.) or string at ./FHEM/36_Shelly.pm line 1706.
2023.12.25 16:21:34 3: [Shelly_Attr:webhook] ShellyPlug command is set, attribute webhook old: none  new: WEB
2023.12.25 16:21:34 3: [Shelly_Attr:webhook] the webhook attribute is now WEB, create webhooks
2023.12.25 16:21:34 3: [Shelly_Attr:webhook] we will call Shelly_webhook for device ShellyPlug, command is Create
2023.12.25 16:21:37 1: [Shelly_actionWebhook] calling url-builder with args: ShellyPlug relay ch:0 noe:0
2023.12.25 16:21:37 1: [Shelly_actionWebhook] ShellyPlug: &urls=["http://192.168.178.49:8083/fhem?cmd=set%2520ShellyPlug%2520out_on%25200%26fwcsrf=csrf_509181295696804"]
2023.12.25 16:21:37 1: [Shelly_webhook] ShellyPlug Create component=relay  count=0   event=0
2023.12.25 16:21:37 1: [Shelly_webhook] issue a non-blocking call to
http://admin:ShUg#o42lo@192.168.178.44/rpc/Webhook.Create?cid=0&name=%22_SWITCH.ON_%22&event=%22switch.on%22&enable=true&urls=["http://192.168.178.49:8083/fhem?cmd=set%2520ShellyPlug%2520out_on%25200%26fwcsrf=csrf_509181295696804"]
2023.12.25 16:21:37 1: [Shelly_actionWebhook] calling url-builder with args: ShellyPlug relay ch:0 noe:1
2023.12.25 16:21:37 1: [Shelly_actionWebhook] ShellyPlug: &urls=["http://192.168.178.49:8083/fhem?cmd=set%2520ShellyPlug%2520out_off%25200%26fwcsrf=csrf_509181295696804"]
2023.12.25 16:21:37 1: [Shelly_webhook] ShellyPlug Create component=relay  count=0   event=1
2023.12.25 16:21:37 1: [Shelly_webhook] issue a non-blocking call to
http://admin:ShUg#o42lo@192.168.178.44/rpc/Webhook.Create?cid=0&name=%22_SWITCH.OFF_%22&event=%22switch.off%22&enable=true&urls=["http://192.168.178.49:8083/fhem?cmd=set%2520ShellyPlug%2520out_off%25200%26fwcsrf=csrf_509181295696804"]
2023.12.25 16:21:37 3: [Shelly_webhook] ShellyPlug: Error: Reading 'input.*mode' not found
2023.12.25 16:22:08 3: [Shelly_Attr:webhook] ShellyPlug: delete all hooks forwarding to this host and name starts with _
2023.12.25 16:22:08 3: [Shelly_Attr:webhook] we will call Shelly_webhook for device ShellyPlug, command is Delete


Grüßle, Michael




gvzdus

Zitat von: loetmeister am 25 Dezember 2023, 16:31:00Hi,

habs noch mal explizit mit admin als shelly user probiert..... scheint nun zu klappen.

...

Jetzt kapiere ich auch den Knieschuss: Beim Setzen des Passwortes war eigentlich der Schutz implementiert: "Wenn kein 'shelly-user' gesetzt, dann moppern'. Der wird an der Codestelle, die Du zitiertest, aber durch das Default "admin" ausgehebelt. Da, wo die Credentials zur Verwendung abgerufen werden, nämlich in Shelly_pwd, dort ist das Default ein Leerstring. :-)

olwaldi

Zitat von: Starkstrombastler am 25 Dezember 2023, 12:50:49Das geht derzeit nur so wie hier beschrieben.
Danke für den Hinweis. Nach etwas Suchen bzgl. Authentifizieren klappt bei mir das Rücksetzen des energy-Counters durch
curl --anyauth -u admin:Mein_Paßwort_hier -X POST -d '{"id":1,"method":"Switch.ResetCounters","params":{"id":0,"type":["aenergy"]}}' http://IP_des_Plugs/rpc

Grüßle, Michael

olwaldi

Zitat von: olwaldi am 25 Dezember 2023, 16:38:11
Zitat von: Starkstrombastler am 25 Dezember 2023, 12:50:49Es handelt sich hier um einen Taster, der immer nur kurz betätigt wird. Um den Taster im Device zu sehen, muss auf dem Shelly eine Action angelegt werden. Das geht manuell oder automatisiert mittels dem Attribut 'webhook'. Die URL muss z.B. so aussehen:
http://192.168.178.100:8083/fhem?cmd=set%20MyShelly%20button_on
Bin etwas weiter - die Actions brauchen via HTTP "doppelte" Authentifizierung. Habe aber keine Idee, wie ich das in einer Action des ShellyPlusPlugS hinterlegen könnte. Aus der Shell heraus funktioniert z.B.
curl -v "http://fhem-user:fhem-Paßwort@fhem-Server:8083/fhem?cmd=set%20ShellyPlug%20button_on&fwcsrf=csrf_token"
Das Paßwort muß URL-codiert sein (habe Sonderzeichen drin). Leider funktioniert das so nicht in einer ShellyPlug-Action, da sich ja das csrf_token ändern kann. Selbst beim Testen in dieser Syntax kommt nix in fhem an.

Grüßle, Michael



MadMax-FHEM

Bzgl. csrf-Token: extra FhemWeb für Shelly-Hook und dort ein fixes csrf-Token setzen...

Evtl. auch dafür "einfachere" Passwörter aber zusätzlich Befehle einschränken und nur die IP(s) des/der Shelly zulassen...

Sollte ähnlich sicher sein...

Gruß, Joachim

P.S.: User/Passwort ohne https?
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

olwaldi

Zitat von: MadMax-FHEM am 26 Dezember 2023, 09:50:25P.S.: User/Passwort ohne https?
(Leider) yep. Alle Web-Server auf meinem Raspi sind "nur" http. Halte das aber für sicher genug, da mein Raspi nur im privaten Intranet erreichbar ist. Lasse mich aber gern eines Besseren belehren. Überhaupt bin ich eher unglücklich bzgl. Sicherheit meiner fhem-Installation - überall muß ich Klartext-Paßwörter hinterlegen, damit Aktivitäten automatisiert laufen (z. B. emails aus fhem heraus). Ist aber hier komplett OT.

Dann werde ich mal ein zusätzliches FHEMWEB anlegen und dann via webhook nutzen...


Grüßle, Michael

olwaldi

Irgendwie mag mein ShellyPlusPlugS das Drücken des Knopfs nicht richtig an fhem weiterzuleiten. Im Log sehe ich hie und da
2023.12.27 08:35:16 1: [Shelly_Set] parsed, outstanding call for device ShellyPlug with command 'buttton_off', no parametersIch habe dazu das FHEMWEB Device FHEMapi mit festem csrftoken angelegt und kann das auch via Shell nutzen, um das Reading button zwischen on bzw. off hin- und herzuschalten. Aber die Action button_off funktioniert vom ShellyPlug aus nicht.
define WEBapi FHEMWEB 8088 global
attr WEBapi csrfToken csrf_4711
allowedfrom habe ich bewußt nicht gesetzt, da alle meine lokalen IPs Zugang haben sollen (was ja für mich der richtige default ist).
Das funktionierende curl-Kommando sieht so aus:
curl -v "http://imurr9.fritz.box:8088/fhem?cmd=set%20ShellyPlug%20button_off&fwcsrf=csrf_4711"
BTW - wichtig sind die Anführungszeichen, damit das & wie gewünscht tut.

Könnte das dann vielleicht ein Bug in der Shelly-Software sein? Ist ja auch eigentlich merkwürdig, daß der Button in der Shelly-WebGUI zwischen "Switch toggeled on" und "Switch toggled off" unterscheidet.


Grüßle, Michael
PS: Das neue WEBapi werde ich dann auch nutzen, um das in fhem "offene" telnet loszuwerden.

Prof. Dr. Peter Henning

Immer wieder lustig zu sehen, dass man die Schuld in Bugs der "Shelly-Software" sucht...

Ich schlage stattdessen vor, in
Zitatbuttton_off
mal die 't'-Zeichen zu zählen.

LG

pah

olwaldi

Das ist ja peinlich^3. Danke für's Korrekturlesen. In letzter Zeit passiert mir das häufiger, das Mehrfach-Zeichen "dazwischengekommen". In guter Tradition würde ich das ja der Tastatur vorwerfen, aber vielleicht bin ich auch einfach nur älter geworden.

Ich halte mich selber für einen guten Korrekturleser, aber das ttt habe ich einfach nicht gesehen.


Vielen Dank, Michael

Starkstrombastler

Zitat von: loetmeister am 25 Dezember 2023, 16:31:00habs noch mal explizit mit admin als shelly user probiert..... scheint nun zu klappen.
Bei den Gen2-Devices lautet der Shellyuser per default 'admin'. Mit dem nächsten Update wird dies berücksichtigt - das Anlegen eines Attributes 'shellyuser' ist dann für Gen2-Devices obsolet, falls vorhanden wird es ignoriert.
IPC\Ubuntu + Fhem, 1wire, Shellies, Siemens Logo!, Z-Wave, PhilipsTV, Vu+duo2, KM200

Starkstrombastler

Mit dem nächsten Update wird es auch einen Reset-Befehl zum Zurücksetzen von Zählwerten geben:
set <name> reset disconnects  zum Zurücksetzen des Readings network_disconnects
set <name> reset energy zum Zurücksetzen der energy-Readings (nur bei Gen2-Devices)

Bug Fix: Bei den Gen2-Devices im Roller-Mode sind die Metering-Readings (energy, power, current, ..) singulär, d.h. es gibt im Gegensatz zum Relay-Mode jeweils nur ein Reading. Die Namen dieser Readings enthalten künftig keinen Index.
IPC\Ubuntu + Fhem, 1wire, Shellies, Siemens Logo!, Z-Wave, PhilipsTV, Vu+duo2, KM200

Xaneu

#764
Hallo Starkstrombastler,

'habe gestern einen Shelly Plus Plug S in Betrieb genommen.
Allerdings hat das nicht auf Anhieb funktioniert, da ich das Attribut model mit ,,shellyplug" nicht korrekt gesetzt hatte.
Ich habe mir dann den Quelltext des Modul angesehen und das Modell ,,shellyplusplug" gefunden, mit dem es dann funktionierte.
Kannst Du beim nächsten Update das Model ,,shellyplusplug" im HTML-Teil für die Commandref ergänzen, damit es schneller auffindbar ist oder willst Du das Modell evtl. noch nicht offiziell bekanntmachen, da noch daran gearbeitet wird?

Ansonsten danke für Deine Arbeit am Modul.

Grüße
Xaneu
FHEM 6.1 @ RPi4, raspbian (buster) auf USB-SSD, PIUSV+, HM-MOD-RPI-PCB und viele Homematic-Komponenten, OBIS, vclient, VBUS, Modbus, E3DC-Photovoltaikumrichter, 1-wire, Shelly und eigene Module

Machen ist wie wollen, nur krasser!