HM-Anbindung für TP-Link-WLAN-Steckdosen HS1xx und -Leuchtmittel LB1xx (V5.3)
Moderator: Co-Administratoren
-
- Beiträge: 3
- Registriert: 14.08.2021, 13:54
- System: CCU
Re: HM-Anbindung für TP-Link-WLAN-Steckdosen HS1xx und -Leuchtmittel LB1xx (V5.3)
Hi,
ich verwende bereits die TP-Link HS110, würden mit dem Script auch die KP115 funktionieren?
Mit freundlichen Grüßen
Elmar
ich verwende bereits die TP-Link HS110, würden mit dem Script auch die KP115 funktionieren?
Mit freundlichen Grüßen
Elmar
-
- Beiträge: 222
- Registriert: 31.07.2011, 17:37
- System: CCU
- Wohnort: Czech Rep.
- Hat sich bedankt: 85 Mal
- Danksagung erhalten: 14 Mal
HM-Anbindung für TP-Link-WLAN-Steckdosen Tapo P100
I want to ask, is there any plan to modify this great script for TPlink sockets Tapo P100?
The HS1.. sockets are unfortunately no longer available as standard.
Thank you very much.
The HS1.. sockets are unfortunately no longer available as standard.
Thank you very much.
-
- Beiträge: 72
- Registriert: 09.10.2018, 08:49
- System: CCU und Access Point
- Hat sich bedankt: 16 Mal
Re: HM-Anbindung für TP-Link-WLAN-Steckdosen HS1xx und -Leuchtmittel LB1xx (V5.3)
@HM42
Hi, first I want to say thank you for your work and it's much appreciated. I wanted to ask if there is any possibility that you could add some functionality for the KP115 also. I have the KP115 and it does not work to switch them. I can test and give you more info but I am not a developer myself and don't know to implement this. Would appreciate it much. Here it's the output what I have
Thank you again for all you do.
Kind regards,
Sami
Hi, first I want to say thank you for your work and it's much appreciated. I wanted to ask if there is any possibility that you could add some functionality for the KP115 also. I have the KP115 and it does not work to switch them. I can test and give you more info but I am not a developer myself and don't know to implement this. Would appreciate it much. Here it's the output what I have
Code: Alles auswählen
Script: 'tplsh.tcl', Version: 5.3, 2020-05-04
Copyright: Thomas Marquard / Lubomir Stroetmann, softScheck GmbH (...2020)
MESSAGE SENT:
{"system":{"get_sysinfo":{}}}
MESSAGE RECEIVED:
{"system":{"get_sysinfo":{"sw_ver":"1.0.16 Build 210205 Rel.163735","hw_ver":"1.0","model":"KP115(EU)","deviceId":"xxxx","oemId":"xxxx","hwId":"xxxx","rssi":-46,"latitude_i":0,"longitude_i":0,"alias":"Prusa","status":"new","obd_src":"tplink","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"00:31:92:xx:xx:xx","updating":0,"led_off":0,"relay_state":0,"on_time":0,"icon_hash":"","dev_name":"Smart Wi-Fi Plug Mini","active_mode":"none","next_action":{"type":-1},"ntc_state":0,"err_code":0}}}
EXTRACTED DEVICE VALUES:
sw_ver= 1.0.16 Build 210205 Rel.163735
hw_ver= 1.0
model= KP115(EU)
alias= Prusa
on_off=
hue=
saturation=
brightness=
color_temp=
relay_state= 0
ERROR: Missing or wrong command `on` !
USAGE: tclsh /usr/local/etc/config/addons/tplsh/tplsh.tcl <hostname or ip-address> <command> <bulb_para>
COMMAND (plug sockets): [info|on|off|toggle|readdata]
COMMAND (bulbs): [info|dim|hue|on|off|sat|toggle|setdata <bulb_para>]
BULB_PARA: [o:<0|1>,h:<0...360>,s:<0...100>,d:<0...100>,c:<0|2500...9000>]
# tclsh /usr/local/etc/config/addons/tplsh/tplsh.tcl 192.168.200.32 on
Kind regards,
Sami
-
- Beiträge: 72
- Registriert: 09.10.2018, 08:49
- System: CCU und Access Point
- Hat sich bedankt: 16 Mal
Re: HM-Anbindung für TP-Link-WLAN-Steckdosen HS1xx und -Leuchtmittel LB1xx (V5.3)
Digging a bit deeper it seems all the functionality you have in place just need to add the device in the list. Here you can see all the values from the KP115
Here are the only 2 things I changed in your script.
This proves that your code works with this model also. In case you want me to do some further testing just let me know and I will do it for you.
Thanks again and really nice work
This are the values that are read from the device. Here are the only 2 things I changed in your script.
Code: Alles auswählen
..................
if {$modelShort == "HS100" || $modelShort == "HS110"|| $modelShort == "KP115"} {
if {($relay_state != 0) && ($relay_state != 1)} {
set msg "ERROR: Bad value `$relay_state` for `relay_state` read from device !"
handleErrorMessage $msg
puts ""
puts $msg
puts ""
exit
}
set relay_state_new -1
..................
if {$command == "readdata"} {
if {[catch {set sourceChnName $::env(CUXD_CHANNEL)}]} {
set msg "ERROR: No channel specified in environment variable `CUXD_CHANNEL` (script not called from CUxD) !"
handleErrorMessage $msg
puts ""
puts $msg
puts ""
exit
}
if {$modelShort == "KP115"} {
# readdata for HS110, HW version 1 ...
eval [extractFromJsonString $answer current "%.2f"]
eval [extractFromJsonString $answer voltage "%.2f"]
eval [extractFromJsonString $answer power "%.2f"]
eval [extractFromJsonString $answer total "%.3f"]
# readdata for HS110, HW version 2 ...
eval [extractFromJsonString $answer current_ma "%f"]
eval [extractFromJsonString $answer voltage_mv "%f"]
eval [extractFromJsonString $answer power_mw "%f"]
eval [extractFromJsonString $answer total_wh "%f"]
Thanks again and really nice work
-
- Beiträge: 72
- Registriert: 09.10.2018, 08:49
- System: CCU und Access Point
- Hat sich bedankt: 16 Mal
Re: HM-Anbindung für TP-Link-WLAN-Steckdosen HS1xx und -Leuchtmittel LB1xx (V5.3)
@mskrause
How did you do to display the consumption in here instead of the system variables? Thanks lots in advance
-
- Beiträge: 167
- Registriert: 13.10.2018, 20:02
- System: Alternative CCU (auf Basis OCCU)
- Hat sich bedankt: 13 Mal
- Danksagung erhalten: 19 Mal
Re: HM-Anbindung für TP-Link-WLAN-Steckdosen HS1xx und -Leuchtmittel LB1xx (V5.3)
durch die Kanalzuordnung SYSTEMVARIABLE+GERÄTsamuellazea hat geschrieben: ↑21.08.2021, 13:30
@mskrause
How did you do to display the consumption in here instead of the system variables? Thanks lots in advance
Gruß Marco
-
- Beiträge: 72
- Registriert: 09.10.2018, 08:49
- System: CCU und Access Point
- Hat sich bedankt: 16 Mal
Re: HM-Anbindung für TP-Link-WLAN-Steckdosen HS1xx und -Leuchtmittel LB1xx (V5.3)
This is so cool. Thanks lots for it. Much appreciatedmskrause hat geschrieben: ↑26.08.2021, 16:46durch die Kanalzuordnung SYSTEMVARIABLE+GERÄTsamuellazea hat geschrieben: ↑21.08.2021, 13:30
@mskrause
How did you do to display the consumption in here instead of the system variables? Thanks lots in advance
kanal.PNG
Gruß Marco
Re: HM-Anbindung für TP-Link-WLAN-Steckdosen HS1xx und -Leuchtmittel LB1xx (V5.3)
Hallo Zusammen,
ich habe eine CCU3 und einige HS110 in Betrieb - funktioniert alles Tadellos ...
habe nun mein System etwas erweitert ... es gab keine HS110 zu kaufen und es waren zuhause alle aufgebraucht somit mehrere KP115 bestellt ...
habe diese auch eingebunden - funktioniert (schalttechnisch) alles einwandfrei ... dann habe ich wie in den vorherigen Postings das "tplsh.tcl" file angepasst ... das KP115 in der Geräteliste erweitert ... (vorher schon mal das KP105) ...
Zeile323:
"if {$modelShort == "HS100" || $modelShort == "HS110" || $modelShort == "KP105" || $modelShort == "KP115"} { "
Schalten einwandfrei ...
----------------------------------
dann habe ich in Zeile 592: "if {$modelShort == "KP115"} { "
das "HS110" in das "KP115" geändert ...
einwanfreie funktion ...
---
Leider läuft seitdem das Leistungsmessen bei den HS110 nicht mehr ... (jetzt hinterher logischerweise nicht mehr) ...
Welche Zeilen muss ich kopieren bzw. wie das skript umschreiben , das die HS110 "readdata" und die KP115 "Readdata" - also beide funktionieren?
Habe zwar versucht mehrere Teile des scripts zu kopieren ... dann einmal KP115 und einmals HS110 ... leider ohne Erfolg ...
Vl. liegt es irgendwo an den Klammern? oder zuwenig/zuviel kopiert?!? oder braucht es irgendwo ein "else"
Kann mir bitte jemand helfen, welche bzw. wieviele Zeilen ich kopien muss und wo/wie einfügen?
oder mir ein funktionierendes script hier hochladen oder per mail schicken?
bin am verzweifeln ...
Danke für Eure Hilfe und Bemühungen im Voraus !!! , LG Marco
ich habe eine CCU3 und einige HS110 in Betrieb - funktioniert alles Tadellos ...
habe nun mein System etwas erweitert ... es gab keine HS110 zu kaufen und es waren zuhause alle aufgebraucht somit mehrere KP115 bestellt ...
habe diese auch eingebunden - funktioniert (schalttechnisch) alles einwandfrei ... dann habe ich wie in den vorherigen Postings das "tplsh.tcl" file angepasst ... das KP115 in der Geräteliste erweitert ... (vorher schon mal das KP105) ...
Zeile323:
"if {$modelShort == "HS100" || $modelShort == "HS110" || $modelShort == "KP105" || $modelShort == "KP115"} { "
Schalten einwandfrei ...
----------------------------------
dann habe ich in Zeile 592: "if {$modelShort == "KP115"} { "
das "HS110" in das "KP115" geändert ...
einwanfreie funktion ...
---
Leider läuft seitdem das Leistungsmessen bei den HS110 nicht mehr ... (jetzt hinterher logischerweise nicht mehr) ...
Welche Zeilen muss ich kopieren bzw. wie das skript umschreiben , das die HS110 "readdata" und die KP115 "Readdata" - also beide funktionieren?
Habe zwar versucht mehrere Teile des scripts zu kopieren ... dann einmal KP115 und einmals HS110 ... leider ohne Erfolg ...
Vl. liegt es irgendwo an den Klammern? oder zuwenig/zuviel kopiert?!? oder braucht es irgendwo ein "else"
Kann mir bitte jemand helfen, welche bzw. wieviele Zeilen ich kopien muss und wo/wie einfügen?
oder mir ein funktionierendes script hier hochladen oder per mail schicken?
bin am verzweifeln ...
Danke für Eure Hilfe und Bemühungen im Voraus !!! , LG Marco
-
- Beiträge: 167
- Registriert: 13.10.2018, 20:02
- System: Alternative CCU (auf Basis OCCU)
- Hat sich bedankt: 13 Mal
- Danksagung erhalten: 19 Mal
Re: HM-Anbindung für TP-Link-WLAN-Steckdosen HS1xx und -Leuchtmittel LB1xx (V5.3)
ungetestet, hab keine KP115...
schon versucht, die Zeile 592 so zu erweitern wie Zeile 323?
Gruß Marco
Re: HM-Anbindung für TP-Link-WLAN-Steckdosen HS1xx und -Leuchtmittel LB1xx (V5.3)
Hi,
ja habe ich versucht - leider ohne erfolg
Danke trotzdem ...
Hat noch jemand eine Idee? ... eine 2te Schleife - 1x mit HS110 und 1x mit KP115 ... aber komme mit den geschwungenen Klammern nicht zurecht ... vl. braucht es ein IF?
DANKE für Wure Hilfe
LG Marco
ja habe ich versucht - leider ohne erfolg
Danke trotzdem ...
Hat noch jemand eine Idee? ... eine 2te Schleife - 1x mit HS110 und 1x mit KP115 ... aber komme mit den geschwungenen Klammern nicht zurecht ... vl. braucht es ein IF?
DANKE für Wure Hilfe
LG Marco