davegut / test-code Goto Github PK
View Code? Open in Web Editor NEWTest Code
Test Code
TP-Link Engr Mon Plug version "4.1.01"
I think line 204 in energyThisMonthResponse() is throwing errors in my log
def monthList = cmdResponse["smartlife.iot.common.emeter"]["get_monthstat"].month_list
should it be something like:
def monthList = cmdResponse["emeter"]["get_monthstat"].month_list
PS.
Thanks for all the work you have done so far getting TPLink plugs into Hubitat!
quick polling of Kasa EM Plug was not working
I removed the ! operator from the condition on line 292 of DeviceDrivers/TP-LinkEM-Plug(Hubitat).groovy and it seems to be running correctly now
I cannot get the App to work at all if the Google Home/Assistant integration on Hubitat is on. I actually wasn't even able to turn the Google Home integration on (using Google Assistant on my phone) while I had the TP-Link devices and App added to my Hubitat. On advice of Hubitat support I removed all the TP-Link devices and the App and once I did I was able to get the Google Home integration working, but now that it is working, I can no longer add my TP-Link devices with the App. I get to the point where I can select the devices, but once that dropdown box closes, it just jumps to the "Apps" screen.
Steps to reproduce:
Hubitat support mentioned that they saw a lot of UDP traffic that they attributed to the interference w/ the Google Home App.
Hi
I had added the Application code.
Then I added a device driver code I thought was the plug but wasn't.
When I went to add the 2 devices the App found, they didn't get added to the Devices list.
I didn't know what was going on until I checked the logs and it said that the plug switch driver wasn't found.
I installed the correct driver and one device was added immediately without further intervention.
Upon trying to access the App again to get it to register the 2nd device, it errored with the following in the log.
java.lang.NullPointerException: Cannot get property 'value' on null object on line 225 (mainPage)
I tried restarting the hub but got the same error.
I'm not a Java dev but I was poking around the code and I noticed that upon init if selectedAddDevices was defined? (don't know enough Java) it would call addDevices.
I assume that one of the devices in that list? was null somehow so I cp'd the
app?.removeSetting("selectedAddDevices")
code I found down in addDevices into initialize instead of the call to addDevices.
That got the init to work properly and after searching again it found the 1 remaining device which I was able to add.
Not sure if anyone else has managed to screw it up in this manner. Also not sure if you prefer this vs the hubitat forum.
Thanks for all your work.
If I tried to register my HS110 I got an error from the app.
com.hubitat.app.exception.UnknownDeviceTypeException: Device type 'TP-Link Engr Mon Plug' in namespace 'davegut' not found on line 333 (installed)
I hacked in
def deviceType() { return "Engr Mon Plug" }
and now it shows ..
Just raising as this seems like a quick thing to change to allow partial functionality.
I can see the energy monitoring part hasn't yet been ported from the ST version, so not expecting energy monitoring - if I have time I'll try and do that and create a pull request, but time is limited unfortunately.
Hello. Firstly let me say that I appreciate the time you've taken to create, document, and publish this work. I have no experience with development related to home automation, but it seems like this code operates on a polling model to drive events called "rules".
What I have done is installed an HS200 switch in my backyard shed to control the flood light, and another HS200 switch on my house which functions solely to control the shed switch -- no fixture or anything else is wired into it. I have a rule setup to sync state between the two switches. The end result is what I want: a second switch for my shed light.
However because the hubitat is polling at the devices at 60 second intervals, there is a very noticeable delay between the activation by me of one switch and the corresponding automatic activation of the other.
I assume that since it is the only option available, that there is no way to tell the HS200 to report to the hubitat when it is toggled, allowing the rules to run on an event-based system rather than a polling-based one. Is this correct? And what are the implications of lowering the polling frequency to minimize the delay?
I sort of feel like I might be accomplishing my goal with a round-about way. Is there a better solution that what I have done?
Version "4.1.01"
Line 69 --
def updated() {
...
if (!infoLog || infoLog == true) {
device.updateSetting("infoLog", [type:"bool", value: true])
} else ...
My groovy is very poor, but for a false value doesn't this evaluate to !false aka "true" which means it turns on infoLog even if you turn it off in preferences?
It looks like the ip scan does not take into account is you have a network larger than a /24.
If your network is a /23 then you miss half of the ips.
Shows up in available to install but will not actually install.
I have random devices which work fine and are being listed in Kasa app, that don't get pulled over into Hubitat. More than happy to help if you can get me some debug "how to".
I see the project has been changed to deprecated. Has it been replaced by another project, is it just in a currently unmaintained but working state, or has it been abandoned because some change with Hubitat/TP-Link has made it unusable?
A short comment on the current known state would help others with large investments in TP-Link Kasa devices know whether to proceed with a migration to Hubitat.
Thanks.
Hey, so i notice this uses the UDP interface to the smart plugs, which has the fun issue of fragmentation (and it looks like you hit it on the forums).
The tp-link switches also respond on TCP port 9999, and there is now a raw TCP socket interface on hubitat that lets you control the sockets (and so you don't have to worry about multiple responses or fragmentation).
Any reason not to move over to using it?
(I'm happy to do porting work, just want to make sure i'm not missing something)
Unfortunately, discovery is still UDP broadcast only, which hubitat can't really do.
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.