24_TPLinkHS110.pm: Support für TPLink HS100/HS110 v1/2/3 Steckdosen

Begonnen von Volker Kettenbach, 25 August 2016, 18:03:57

Vorheriges Thema - Nächstes Thema

BM030

Hallo Volker,

ist es möglich Deinen Code um auch LED Lampen zu erweitern?

Hier ist ein ähnliches Modul für Homebridge: https://github.com/plasticrake/homebridge-tplink-smarthome

würde mich freuen

Gruß Gordon

Lawrence

Hi,

I have bought one of these plugs in the UK and its model name is HS110(UK) which means the meter readings are ignored.

I have tried to put a patch on your Github page to fix this but failed, I am not authorised.

I tried to replace line 128 that reads:
   if ($json->{'system'}->{'get_sysinfo'}->{'model'} eq "HS110(EU)") {
to:
   if ($json->{'system'}->{'get_sysinfo'}->{'model'} =~ /HS110[(][A-Z]{2}[)]/) {
So it should work on any two character region version of this plug.

Regards,
Lawrence


Volker Kettenbach

Hi Lawrence,

thanks for submitting this code.
I added it to github a few seconds ago.

The fhem repository will be updated next day (afaik).

Concerning patches: you could have either sent me a patch-file (diff) or create a PullRequest on GitHub which can be done here:
https://github.com/kettenbach-it/FHEM-TPLink-HS110/pulls

by cloning the repository, modifying your branch and submitting the changes as a PpullRequest.

Best regards
Volker

Knuspertaler

Nach einspielen des heutigen Updates, kann das Modul bei mir nicht mehr geladen werden (HS100) ...

2017.12.01 10:28:33 1: PERL WARNING: Subroutine TPLinkHS110_Initialize redefined at ./FHEM/24_TPLinkHS110.pm line 40.
2017.12.01 10:28:33 1: PERL WARNING: Subroutine TPLinkHS110_Define redefined at ./FHEM/24_TPLinkHS110.pm line 58.
2017.12.01 10:28:33 1: PERL WARNING: "my" variable $socket masks earlier declaration in same scope at ./FHEM/24_TPLinkHS110.pm line 131.
2017.12.01 10:28:33 1: PERL WARNING: "my" variable $command masks earlier declaration in same scope at ./FHEM/24_TPLinkHS110.pm line 159.
2017.12.01 10:28:33 1: PERL WARNING: "my" variable $c masks earlier declaration in same scope at ./FHEM/24_TPLinkHS110.pm line 160.
2017.12.01 10:28:33 1: PERL WARNING: "my" variable $data masks earlier declaration in same scope at ./FHEM/24_TPLinkHS110.pm line 168.
2017.12.01 10:28:33 1: PERL WARNING: "my" variable $hash masks earlier declaration in same scope at ./FHEM/24_TPLinkHS110.pm line 251.
2017.12.01 10:28:33 1: reload: Error:Modul 24_TPLinkHS110 deactivated:
syntax error at ./FHEM/24_TPLinkHS110.pm line 128, near ")) "
Global symbol "$realtimejcommand" requires explicit package name at ./FHEM/24_TPLinkHS110.pm line 130.
Global symbol "$hash" requires explicit package name at ./FHEM/24_TPLinkHS110.pm line 194.
Global symbol "$hash" requires explicit package name at ./FHEM/24_TPLinkHS110.pm line 195.
Global symbol "$name" requires explicit package name at ./FHEM/24_TPLinkHS110.pm line 195.
syntax error at ./FHEM/24_TPLinkHS110.pm line 196, near "}"
Can't use global @_ in "my" at ./FHEM/24_TPLinkHS110.pm line 202, near "= @_"
Global symbol "$hash" requires explicit package name at ./FHEM/24_TPLinkHS110.pm line 203.
syntax error at ./FHEM/24_TPLinkHS110.pm line 245, near "}"
Can't use global @_ in "my" at ./FHEM/24_TPLinkHS110.pm line 251, near "= @_"
./FHEM/24_TPLinkHS110.pm has too many errors.

2017.12.01 10:28:33 0: syntax error at ./FHEM/24_TPLinkHS110.pm line 128, near ")) "
Global symbol "$realtimejcommand" requires explicit package name at ./FHEM/24_TPLinkHS110.pm line 130.
Global symbol "$hash" requires explicit package name at ./FHEM/24_TPLinkHS110.pm line 194.
Global symbol "$hash" requires explicit package name at ./FHEM/24_TPLinkHS110.pm line 195.
Global symbol "$name" requires explicit package name at ./FHEM/24_TPLinkHS110.pm line 195.
syntax error at ./FHEM/24_TPLinkHS110.pm line 196, near "}"
Can't use global @_ in "my" at ./FHEM/24_TPLinkHS110.pm line 202, near "= @_"
Global symbol "$hash" requires explicit package name at ./FHEM/24_TPLinkHS110.pm line 203.
syntax error at ./FHEM/24_TPLinkHS110.pm line 245, near "}"
Can't use global @_ in "my" at ./FHEM/24_TPLinkHS110.pm line 251, near "= @_"
./FHEM/24_TPLinkHS110.pm has too many errors.

bjoernbo

Dem schließe ich mich an !  :-\

ZitatMessages collected while initializing FHEM:
configfile: Cannot load module TPLinkHS110

Autosave deactivated
Raspberry Pi 3 - FB6490C - Synology NAS DS916+ - NETATMO - HUE - SIEMENS G-Tag'S - FTUI - EchoDOT -

pte

Lichtenstein/Sa. grüßt den Rest der Welt

pumabaer

Ich hatte vorhin nach dem Update von FHEM das gleiche Problem, FHEM wieder hergestellt aus dem Backup und dann lief es wieder.

Ich mache erstmal kein Update
FHEM auf IntlNUC, 2xCUL868, MAX! Heizkörperthermostate/Wandthermostate, Homematic, LD382A (LED Contoller WIFI), Echo Dot, Homebridge/Homekit, Denon AVR-X1300W, Xiaomi Mi Robot Vacuum, Xiaomi Flower Sensor, Xiaomi2MQTT, Xiaomi Melder usw

Mave


Volker Kettenbach




heisly

Wollte die Tage testweise eine HS110 in fhem einbinden und habe das gleiche Problem:
Messages collected while initializing FHEM:
configfile: Cannot load module TPLinkHS110


Kann es sein, dass ich noch die benötigten Module nachinstallieren muss?

  • Perl Module: IO::Socket::Timeout
  • Perl Module: IO::Socket::INET

Edit:
Ja so einfach ist es, wer lesen kann ist...

sudo apt-get install libio-socket-timeout-perl


und schon läufts!

steff555

Zitat von: CBSnake am 27 November 2017, 16:13:55
Hi,

kaum bin ich ne Woche weg spinnt die Dose ;-( Meine Frau meldet Fehler bei den Lampen, verantwortlich ist evtl die TP Link, diese füllt den Log mit

json-decoding failed. Problem decoding getting statistical data

Oder doch ein Netzwerkproblem welches auch die TP Link Spinnen lässt?

Mehr Infos könnte ich nachher liefern wenn ich mit nem PC aufs system komme.

Grüße
Achim

Hallo Achim,
hast Du bzgl. dieser Meldung etwas in Erfahrung bringen können? Ich bekomme die auch immer wieder - jedoch habe ich die Vermutung, es tritt NICHT sporadisch auf, sondern immer nach einer gewissen Zeit (vermute so 26 bis 27 Tage). Dann kommt die Meldung ein paar Tage lang und danach fängt sich das wieder.
Für mich hat es den Anschein, als ob hier eine Variable "überläuft" (was ich mir bei Perl zwar nicht nicht vorstellen kann - aber Meldung deutet ja auf json hin und das kenne ich quasi gar nicht).
Wäre super falls Du was hier eine Lösung gefunden hast, bzw. woran es bei Dir lag - würde mich sehr freuen, wenn Du das hier posten könntest.

Danke & viele Grüße
Steff

CBSnake

Guten Morgen,

Nicht wirklich, ich hab im Anschluss mein Netzwerk neu aufgebaut, der DHCP Server war bisher die Fritzbox der Nachbarin, war die nicht erreichbar lief das halbe smarthome Amok ;-) jetzt übernimmt den DHCP Job eine Fritzbox direkt in meinem Netzwerk.

Grüße
Achim
FHEM auf Debian 10, HM-Wlan, JeeLink-Wlan, Wlanduino, ConBee, TP-Link Steckdose, GHoma Steckdosen, Shelly Steckdosen

Mave

Hab ich jetzt auch im Log stehen:

json-decoding failed. Problem decoding getting statistical data


Außerdem heute zum ersten Mal folgendes Phänomen:
TPLink Dose wurde zeitgesteuert um 23 Uhr ausgeschaltet. Eingesteckt Lampe ging auch brav aus.

In FHEM erscheint die Dose aber noch als on.
Dabei fällt auf: das Reading state ist off, das Internal STATE ist on.