davegut / deprecated-tp-link-smartthings Goto Github PK
View Code? Open in Web Editor NEWSmartThings TP-Link (Kasa) Repository
SmartThings TP-Link (Kasa) Repository
I am just starting out with SmartThings and GitHub so I apologize if I am overreaching or asking a question that is against the rules.
The RES270K and the RE370K WiFi extenders physically resemble HS100 smart plugs but with a WiFi antenna. The smart plug configures in Kasa like other similar devices. What would it take to be able to control the smart plug aspect in SmartThings like we do other TP-Link smart plugs.=?
Would I blow everything up for myself if I just added them to the Cloud Connect Plug-Switch Devices (no energy monitor capability) list?
Thanks,
Phil
I'm able to get the SmartThings Manager added to the SmartApps and the TP-Link SmartPlug added to Device Handler in the SmartThings IDE site. I'm able to see the manager in SmartThings Classic. I tap on that, choose Kasa, enter my Kasa credentials and when I tap on Install devices to continue, I get a page that says "Something's Wrong. We can't load your screen right now" with a Retry button. I assume the server the app uses to authenticate the Kasa credentials may be down, but the Kasa app is working fine.
I have a Smarthings hub, 1 HS220 and 4 HS105s. KASA application has been installed and is working correctly on my Samsung 8 (and IPAD). Following Dave's instructions I have installed TP-Link Smartthings Manager in my SmartApps (IDE) (no device handlers are installed).
The TP-Link Smarthings Manager is also installed on Samsung and shows in Smartthings under Automation SmartApps.
when I select TP-Link Smarthings Manager and then Kasa Device installer Page, I can Select Devices to Add (says 5 are found). When I select there devices and Save, eventually message pops up saying "successful added TP-Link Manager" (or something similar).
Unfortunately, the added devices are nowhere to be found ! not on any page of Smartthings app or on IDE panels. If I go back to Device Installer Page, I see devices unchecked.
What am I doing wrong ?
Pls help, Walter
Repository
I'm trying to uninstall the SmartThings SmartApp on my phone, but it doesn't work. I'm having issues with my SmartThings App no longer being able to add any new devices ever since I installed the SmartThings SmartApp so that's why I'm tyring to uninstall it.
I did the Live Logging and this is what the Log shows:
66c3f70a-b90a-4f5e-bd18-d98f970d717b 6:40:47 PM: error org.springframework.dao.DataAccessResourceFailureException: could not execute query; nested exception is org.hibernate.exception.JDBCConnectionException: could not execute query
66c3f70a-b90a-4f5e-bd18-d98f970d717b 6:40:32 PM: error uninstManagerApp Exception: org.springframework.dao.DataAccessResourceFailureException: could not delete: [physicalgraph.app.InstalledSmartAppData#4ca00ffd-011a-41f6-b0e7-390864e0db4f]; nested exception is org.hibernate.exception.JDBCConnectionException: could not delete: [physicalgraph.app.InstalledSmartAppData#4ca00ffd-011a-41f6-b0e7-390864e0db4f] @line 1269 (settingRemove)
66c3f70a-b90a-4f5e-bd18-d98f970d717b 6:40:04 PM: trace settingRemove(userName)...
66c3f70a-b90a-4f5e-bd18-d98f970d717b 6:40:28 PM: trace settingRemove(userSelectedOptionTwo)...
66c3f70a-b90a-4f5e-bd18-d98f970d717b 6:40:28 PM: trace settingRemove(userSelectedOptionThree)...
66c3f70a-b90a-4f5e-bd18-d98f970d717b 6:40:28 PM: trace settingRemove(userSelectedDevicesToUpdate)...
66c3f70a-b90a-4f5e-bd18-d98f970d717b 6:40:28 PM: trace settingRemove(userSelectedDevicesAdd)...
66c3f70a-b90a-4f5e-bd18-d98f970d717b 6:40:28 PM: trace settingRemove(userSelectedDevicesRemove)...
66c3f70a-b90a-4f5e-bd18-d98f970d717b 6:40:28 PM: trace settingUpdate(userSelectedReload, false, bool)...
Dave,
I have numerous WebCoRE pistons that are supposed to turn off a TP-Link switch or plug after a wait delay. Recently my light switches stopped turning off once WC issues a "turn on" or level command.
I started troubleshooting by focusing on just one of the switches. The Debug log doesn't show the switch ever turning on, even though it physically turns on (both by a piston or through the app). I called ST support, and they were absolutely no help. Any suggestions?
Sunny
Dave, I tried to add new HS220 dimmers today and the old smart app is not working. I updated to the new smart app but am not getting any love.
I have 34 existing devices. Do I need to delete and reinstall them all? If so, do I need a new DH for them? If so, where are they? I only see a new service manager that was updated 8 days ago as of today. Thanks in advance.
Hi - I am receiving an error whenever I try to paste the code for TP-Link Switch.groovy
Not sure what I am doing wrong. Any advice on getting through this step would be appreciated. Error I am receiving is below:
No signature of method: script_app_metadata_939c3bc5_df35_4507_940f_bbaea1f0300e.metadata() is applicable for argument types: (script_app_metadata_939c3bc5_df35_4507_940f_bbaea1f0300e$_run_closure1) values: [script_app_metadata_939c3bc5_df35_4507_940f_bbaea1f0300e$_run_closure1@50a55dd2] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)
SmartThings has native GitHub support for importing (and updating) device handlers and smart apps, but requires the repo to be structured slightly differently. By restructuring, the install and update procedures are greatly simplified (the IDE lets you know when there are updates and there is no more copy-pasting of code).
I haven't completed testing, so I'm opening this as an issue for now, but so far everything appears to be working great.
# Create a devicetypes/davegut folder
for i in Device\ Handlers/* ; do file=$(basename "$i" | tr 'A-Z ' 'a-z-' | sed 's/tp-link-/tp-link-smart-/') ; mkdir -p "devicetypes/davegut/${file%%.groovy}.src" ; git mv "$i" "devicetypes/davegut/${file%%.groovy}.src/${file}" ; done
# Manual renames
git mv tp-link-smart-energy{,-}monitor-plug.src/
git mv tp-link-smart-energy-monitor-plug.src/tp-link-smart-energy{,-}monitor-plug.groovy
git mv tp-link-smart-soft{,-}white-bulb.src/
git mv tp-link-smart-soft-white-bulb.src/tp-link-smart-soft{,-}white-bulb.groovy
git mv tp-link-smart-tunable{,-}white-bulb.src/
git mv tp-link-smart-tunable-white-bulb.src/tp-link-smart-tunable{,-}white-bulb.groovy
# Create a smartapps/davegut folder
for i in Service\ Manager/* ; do file=$(basename "$i" | tr 'A-Z ' 'a-z-') ; mkdir -p "smartapps/davegut/${file%%.groovy}.src" ; git mv "$i" "smartapps/davegut/${file%%.groovy}.src/${file}" ; done
(assuming it is a clean upgrade; applies to both the SmartApp and the Device Handlers)
Hi,
I've been using your device handler and smartapp since you first published it (~an year ago). It works perfectly, and it's absolutely great. Great job on the coding/development!
One thing that I think can be improved is the README. Everyone of my friends with a tp-link plug/smartthings that I have told about this project has said the same thing -- they have no idea what's happening from the README, and it feels like multiple solutions are mixed into one README. I suspect that's due to the cloud vs hub and "nodejs" mixture. Eventually they all figure it out, but I think this might be an area where things can be improved.
You already have some fantastic documentation (ex: https://github.com/DaveGut/TP-Link-SmartThings/blob/master/Documentation/Cloud%20TP-Link%20to%20SmartThing%20Add%20Device.pdf)
I think literally just extracting it into a more simple form for your main page README (maybe a table of contents/something that can be easily followed) will be helpful.
Maybe something like this style, with a table of contents, and more "visual"/rather than code blocks?
https://github.com/Martinsos/edlib
I've tried installing the app in Kasa Account mode to work with some TP-Link HS100 WiFi plugs which are connected directly to the internet over WiFi.
After entering my username and password, I get an error saying " java.lang.NullPointerException: Cannot get property 'id' on null object @line 651 (getToken)".
Looking at that line of the code, it is trying to extract the id property of the hub object. I don't have an ST hub, so presumably this is the issue. I am a bit confused as to why an ST hub is needed in Kasa Account (cloud) mode. I thought TP-Link products don't need a hub as they all connect via WiFi to the Kasa cloud?
Am I missing something?
Thanks
Paul
Now, what I don't get at all is that I can control my switch from the Kasa app, but the IP address assigned to the switch is unreachable on the network. What am I missing here??
Hello,
I am working on a project where I will need to simultaneously record the power consumption of some electrical equipment installed at several locations across the UK and this remotely. I need to be able to go back in time and see the power consumption for the last say 7 days with a time resolution of at least one per hour.
I found this repository and am wondering whether it could solve my problem.
Going through the documentation, I can see that the HS110 and HS115 report the current power, today's usage, the 7 day total, the 7 day average, the 30 day total and the 30 day average. Is there any way via Smart Things to get a better data granularity/time resolution? I am new to Smart Things.
Thank you
Kind regards
Nicolas
It's actually deprecated not depreciated
Getting error:
java.lang.NullPointerException: Cannot get property 'id' on null object @line 531 (getToken)
this appears after I attempt to configure either full or lite app with user and password for Kasa (not node), and tap Install Devices to continue.
I did configure oauth as well.
App was imported via github from https://github.com/DaveGut/SmartThingsPublic/
I am new to Smartthings
Wondering if the HS210 is supported? Tryng to setup automation to switch on the HS210 via a Motion Sensor trigger, but success is inconsistent. There are no issues switching on an HS200 using the same Smart Lighting automation routine and motion sensor. When the automation does not work, the switch turns on and then off within 1 second.
I have a TP link HS110 added and working, and have just got 2 further HS100's. When trying to add, I get an error saving page, and this in the live log:
04:23:04: error physicalgraph.app.exception.UnknownDeviceTypeException: Device type '(Cloud) TP-Link Plug-Switch' in namespace 'davegut' not found. @line 206 (doCall)
Any ideas please?
When pasting contents of TP-Link Plug.groovy into my device handler TP-Link Smart Plug I get an error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
script_dth_metadata_ddcf0d3f_a2d3_4527_8d29_d0e9610b1bc2: 230: expecting EOF, found 'Plug' @ line 230, column 9.
TP-Link Plug and Switch Device Handler, 2018, Version 3
^
1 error
I just replaced a HS110 with a HS220. HS110 worked great, but the HS220 in the Kasa app does not have the option for "remote control."
Model: HS220
HW Ver: 1.0
Firmware: 1.5.7
Can anyone else confirm I should be seeing remote control? I have updated all device handlers and Smart Apps, but this is a Kasa app issue, correct? Any thoughts where to look?
Much appreciated!
I have just installed the device handler and smart app. I appreciate all the effort and it looks like it overall works great. I have a few thinks I am running into. Neither seems to be impacting the system from working, but wanted to see if there was a solution to either or something I have not set correctly.
If I loose power to a plug, I do not get any update in SmartThings noting that. In the log for each device this has happened to I get the error "
f1573196-3037-4a5d-8606-04ccd2baa7d5 5:16:50 AM: error groovy.lang.MissingMethodException: No signature of method: physicalgraph.device.DeviceTypeExecutorBase$_closure5.doCall() is applicable for argument types: (java.lang.String, java.lang.reflect.UndeclaredThrowableException) values: [Sending Command Exception: , java.lang.reflect.UndeclaredThrowableException]
Possible solutions: doCall(), doCall(java.lang.Object), call(), call([Ljava.lang.Object;), call(java.lang.Object), findAll() @line 193 (sendCmdtoServer)"
After 5 minutes I do get an update that it is unavailable in SmartThings and this is in the log. " Interface Error. See SmartApp and Device error message." This may be how it is designed, but wanted to check because of the error message.
Also, I seems to be having difficulty updating preferences. When update the preference in the SmartApp and save, I get this error.
" error java.lang.NullPointerException: Cannot get property 'value' on null object @line 903 (doCall)"
Any suggestions?
Thanks.
Tried to enter the Kasa account credentials with the Done button. However, no response is returned when clicked on the Get or Update Kasa Token tab. The scheduled job is shown as below:
Steps to reproduce the behavior:
getToken | 2019-04-30 10:30:00 PM EDT | ย | PENDING | 0 30 2 ? * WED UTC |
---|
1:13:01 AM: info Waiting on events...
I have searched all the documentation and had trouble finding any clear path from the Cloud Connect to the new SmartThings Manager app. I was able to set up and add my devices that would not add in the old app just fine (glad to get my dual plug finally on board!), but any device that is already in the old app will not install in the new. What's the best way to update to the new app and DH's? I have 44 devices in this situation, many tied to other apps, so I'm hoping I don't need to delete and reinstall the old devices! Apologies if this isn't the best place to post this question!
Hello,
Having an issue with the Get or Update Kasa Token Feature of the Manager.
I have gone through the setup confirming that I have my Home Hub selected prior to the install as saw a similar post with that issue.
Unfortunately I am not familiar with how to show the Live Logging for the My SmartApps but with instruction can definitely provide. Thanks for the awesome TP integration!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.