davegut / hubitatactive Goto Github PK
View Code? Open in Web Editor NEWHubitat Environment Developments
Hubitat Environment Developments
I have a Kasa KP125, which supports energy monitoring. My goal is to have hubitat send me alerts whenever the power draw drops below a threshold (i.e., the downstream device is turned off).
I have configured a static IP (via DHCP lease) on my router for my Kasa plug, which has driver version 6.6.0, and the plug is set to control via LOCAL (not cloud). However, I'm seeing a couple of things I can't quite make sense of -- and the troubleshooting guide didn't really help with.
(1) I tried to change the setPollInterval in the dropdown to something other than 30 minutes, but it seems I can't. After changing the dropdown, I've tried to hit 'save device' or 'save preferences' to lock in a new time window, but upon refresh, the setting is still set to 'default' in the dropdown, and 30 minutes in the "State Variables" section.
(2) In the event logs, I saw a few log entries for power and energy usage, but the last one was over a week ago - I'm not sure how to troubleshoot this (I don't see any failure events either). Would log values show up if the switch was in the 'off' state? What if it were switched on manually (at the plug)?
In the course of troubleshooting, I tried to use the IP Comms test tool - but it showed no Kasa devices installed (???). However, when I go to the switch in Hubitat, I can still turn it on/off (the switch responds accordingly, and the logs show a switch on/off event). Note: I didn't reset the device DB, since I still have basic communication with the devices (but am happy to if that would make a difference here).
I can enable debug logs and try some things if that helps - but how would I retrieve those debug logs -- are they written to the same events view, or are they in a different location to retrieve?
I've only had the kasa plugs for a couple weeks - looking forward to getting them to be more stable. Any wisdom here?
Sorry for all these questions but I can seem to find where I "create the device" option is. I see the Samsung TV Remote after importing the driver but no where do I see to create a device. In Hubitat there is a devices link but that just shows what currently exists. Searching within the raw code show no place to enter an ip "samsung tv ip."
Thanks for keeping this integration up-to-date. I swear every single time there's a Hubitat release (which is about once-twice a week), it breaks the Kasa integration. Thanks for keeping things in line and working like they are supposed to!
Any support or plan to add this new motion actived dimmer switch? Kasa ES20M. ๐ค
https://www.kasasmart.com/us/products/smart-switches/smart-wifi-dimmer-switch-es20m
Kasa Local Hubitat Integration, version 6.4.3-rel1
I receive the following errors when I try to perform an upgrade via Package Manager.
app:172021-12-09 04:41:33.555 pm infoFatal error occurred, rolling back
app:172021-12-09 04:41:33.549 pm errorError upgrading app: groovyx.net.http.HttpResponseException: status code: 500, reason phrase: Server Error
app:172021-12-09 04:41:33.347 pm infoUpgrading Kasa Integration
app:172021-12-09 04:41:33.345 pm errorError retrieving app source: groovyx.net.http.HttpResponseException: status code: 500, reason phrase: Server Error
app:172021-12-09 04:41:32.704 pm infoDownloading Kasa Integration error
Automatic update failure: [success:false, succeeded:[], failed:[https://raw.githubusercontent.com/DaveGut/HubitatActive/master/KasaDevices/packageManifest.json], message:An error occurred while installing the package: Failed to upgrade app https://raw.githubusercontent.com/DaveGut/HubitatActive/master/KasaDevices/Application/KasaIntegrationApp.groovy.]
dev:13162024-02-17 05:17:37.402 PMerrorjava.lang.NullPointerException: Cannot invoke method leftShift() on null object on line 839 (method getAppDataParse)
dev:13162024-02-17 05:17:43.268 PMerrorgroovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.util.ArrayList#getAt. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [interface groovy.lang.Range] [interface java.util.Collection] on line 874 (method findNextApp)
After this, there's nothing that looks like the app is running or scannig, then I see
dev:13162024-02-17 05:18:38.805 PMdebugLiving: Samsung TV-4.1-2: webSocketStatus: [status: closed, message: status: closing]
dev:13162024-02-17 05:18:38.742 PMdebugLiving: Samsung TV-4.1-2: clos
In my home, I have assigned 10.0.0.0/8 to my IoT network and the DHCP address range spans across all of these addresses. The way KasaDevices is constructing the hosts to scan when adding devices is such that it is impossible to enter values into the "Lan Segments" and "Host Address Range" fields that would properly construct a class A network address to scan for in the findDevices() function.
I am not familiar enough with Groovy to go ahead and just adjust this myself, but it seems to me that allowing to scan a network based on the network and a mask would solve this problem?
The old drivers used to update status in the dashboard nearly in real-time. When I operate a physical Kasa switch, the status of the device is not shown in the Habitat dashboard. There is a serious delay, unless I set polling on the device to 5 seconds. Even this delay is less than desirable. Is this behavior intended? All of my Kasa devices used to provide very fast feedback except for a 3way switch model HS210. I had assumed this was a limitation of the device or the firmware on that device.
I have had an LB130 color bulb as a lamp in my office. The KASA app shows it just find and works thru that app, but does not get added in Hubitat. I upgraded the drivers and application to version 6.3. When I attempt to add the lamp i can see it listed but it does not add. I have rebooted several times but see nothing. At one point I did see something, but now it seems to have disappeared. In looking at the logs, I do not see that lamp listed, but on previous log it was there. this was from the log:
dev:132021-06-12 09:45:23.633 am warn[Color Bulb / 6.3.2 / Desklamp]| sendCmd: attribute connection not set.
dev:132021-06-12 09:39:44.437 am warn[Color Bulb / 6.3.2 / Desklamp]| sendCmd: attribute connection not set.
dev:132021-06-12 09:37:03.333 am warn[Color Bulb / 6.3.2 / Desklamp]| sendCmd: attribute connection not set.
dev:132021-06-12 09:14:19.770 am errorjava.lang.IllegalArgumentException: null on line 668 (off)
dev:132021-06-12 09:14:18.739 am warn[Color Bulb/6.1.1] Desklamp rawSocketTimeout: Quick Poll and Refresh Disabled.
dev:132021-06-12 09:14:18.711 am warn[Color Bulb/6.1.1] Desklamp rawSocketTimeout: Retry on error limit exceeded. Error count = 77. Run Application to update IP.
dev:132021-06-12 09:11:29.848 am errorjava.lang.IllegalArgumentException: null on line 668 (on)
dev:132021-06-12 09:11:28.777 am warn[Color Bulb/6.1.1] Desklamp rawSocketTimeout: Quick Poll and Refresh Disabled.
dev:132021-06-12 09:11:28.753 am warn[Color Bulb/6.1.1] Desklamp rawSocketTimeout: Retry on error limit exceeded. Error count = 76. Run Application to update IP.
I am new to hubitat and adding code or checking on all the settings. so any guidance will be appreciated. Thanks
since updating last week to the 4.0 version from 3.3.8, my Samsung R1 speaker stopped working..
I received many errors, including
Speaker 4.0 groupStop: Not a Grouped speaker.
Speaker 4.0 addToQueue: [status:aborted, reason:Speaker not on LAN]
So I uninstalled and reinstalled the app and ran the app in hubitat
and I had some success ...
Speaker 4.0 sendSyncCmd: [cmd:/UIC?cmd=%3Cname%3EGetFunc%3C/name%3E, host:http://192.168.1.3:55001, method:CurrentFunc, data:wifidlna]
Speaker 4.0 extractData: method = CurrentFunc, data = wifidlna
Speaker 4.0 refreshParse: [isConnected:yes]
but then anytime a "speak" command is given...
I get Speaker 4.0 addToQueue: [status:aborted, reason:Speaker not on LAN]
So I manually copied the v 3.3.8 of driver..
and everything started to work immediately.
I have another hubitat hub that I use for dev purposes..
which is completely clean..
so I installed the whole thing from HPM..
and enabled debug logs..
ran the app and found my speaker and added it..
but if I click speak .. etc it doesnt play/speak.
here are all the logs from the clean install
dev:11 2022-12-05 08:46:55.828 AMdebugSpeaker 4.0 playTextAndResume: [status:addToQueue, text:test, volume:null]
dev:11 2022-12-05 08:46:55.827 AMdebugSpeaker 4.0 addToQueue: [status:aborted, reason:Speaker not on LAN]
dev:11 2022-12-05 08:46:55.826 AMwarnSpeaker 4.0 addToQueue: [status:aborted, reason:Speaker not on LAN]
dev:11 2022-12-05 08:46:46.382 AMdebugSpeaker 4.0 setTrackDescription: [subMode:dlna, trackData:{"trackLength":0,"artist":"unknown","album":"unknown","title":"unknown","type":"unknown"}]
dev:11 2022-12-05 08:46:46.380 AMdebugSpeaker 4.0 scheduleSetTrackDescription: [updateTrackDescription:true, status:notScheduled, reason:null or 0 timelength]
dev:11 2022-12-05 08:46:46.377 AMdebugSpeaker 4.0 sendSyncCmd: [cmd:/UIC?cmd=%3Cname%3EGetCurrentPlayTime%3C/name%3E, host:http://192.168.12.3:55001, method:MusicPlayTime, data:00]
dev:11 2022-12-05 08:46:46.375 AMdebugSpeaker 4.0 extractData: method = MusicPlayTime, data = 00
dev:11 2022-12-05 08:46:46.249 AMdebugSpeaker 4.0 sendSyncCmd: [cmd:/UIC?cmd=%3Cname%3EGetMusicInfo%3C/name%3E, host:http://192.168.12.3:55001, method:MusicInfo, data:Playing Status is not valid or MusicDB is NULL]
dev:11 2022-12-05 08:46:46.246 AMdebugSpeaker 4.0 extractData: method = MusicInfo, data = Playing Status is not valid or MusicDB is NULL
dev:11 2022-12-05 08:46:46.133 AMdebugSpeaker 4.0 sendSyncCmd: [cmd:/UIC?cmd=%3Cname%3EGetFunc%3C/name%3E, host:http://192.168.12.3:55001, method:CurrentFunc, data:wifidlna]
dev:11 2022-12-05 08:46:46.127 AMdebugSpeaker 4.0 extractData: method = CurrentFunc, data = wifidlna
dev:11 2022-12-05 08:46:44.114 AMdebugSpeaker 4.0 extractData: method = AcmMode, data = aasync00:00:00:00:00:00none
dev:11 2022-12-05 08:46:44.092 AMdebugSpeaker 4.0 refreshParse: [isConnected:yes]
dev:11 2022-12-05 08:46:44.019 AMdebugSpeaker 4.0 extractData: method = CurrentFunc, data = wifidlna
dev:11 2022-12-05 08:46:44.000 AMdebugSpeaker 4.0 sendCmd: [command: /UIC?cmd=%3Cname%3EGetAcmMode%3C/name%3E, host: 192.168.12.3:55001]
dev:11 2022-12-05 08:46:43.989 AMdebugSpeaker 4.0 getPlayStatus: [source: wifi, submode: dlna]
dev:11 2022-12-05 08:46:43.987 AMdebugSpeaker 4.0 sendSyncCmd: [cmd:/UIC?cmd=%3Cname%3EGetPlayStatus%3C/name%3E, host:http://192.168.12.3:55001, method:CurrentFunc, data:wifidlna]
dev:11 2022-12-05 08:46:43.985 AMdebugSpeaker 4.0 extractData: method = CurrentFunc, data = wifidlna
dev:11 2022-12-05 08:46:43.976 AMdebugSpeaker 4.0 extractData: method = CurrentFunc, data = wifidlna
dev:11 2022-12-05 08:46:43.882 AMdebugSpeaker 4.0 sendCmd: [command: /UIC?cmd=%3Cname%3EGetVolume%3C/name%3E, host: 192.168.12.3:55001]
dev:11 2022-12-05 08:46:43.875 AMdebugSpeaker 4.0 sendCmd: [command: /UIC?cmd=%3Cname%3EGetFunc%3C/name%3E, host: 192.168.12.3:55001]
dev:11 2022-12-05 08:46:38.749 AMinfoupdated: [status:updating, infoLog:null, debugLog:true, refreshInt:refresh]
dev:11 2022-12-05 08:46:38.609 AMdebugSpeaker 4.0 clearQueue
dev:11 2022-12-05 08:46:38.308 AMwarnSpeaker 4.0 addToQueue: [status:aborted, reason:Speaker not on LAN]
dev:11 2022-12-05 08:46:14.044 AMinfoupdated: [status:updating, infoLog:null, debugLog:false, refreshInt:refresh]
dev:11 2022-12-05 08:46:13.980 AMinfoInstalling ..
Hi Dave,
I am looking for a command to open the ws connection. Currently, when I send a command, for example, "power off", if the ws is closed, it connects the ws but seems to drop the command so I have to send again.
The use case would be to connect the ws when the display is selected in my user interface and enable the control buttons when the ws is open.
Unless I totally missed it in the docs, it happens.
Thanks in advance.
tried importing and got this line error. Any suggestions?
Hi Dave, first of all: AMAZING job on writing and sharing these drivers with HE community!
I'd like to know if there are any plans to make a feature to set the display OFF on the HVAC driver, I know its is in beta state but that would be great!
Thank You!
Hello -
My HS210 3way switch is no longer responding in Hubitat. I have tried removing/re-adding the switch, including doing a factory reset and Hubitat will not control the device.
Here are some logs....
dev:11532021-03-25 05:42:52.517 pm info[Plug Switch/6.2] Hall distResp: Led On/Off response = [err_code:0]
dev:11532021-03-25 05:42:51.317 pm warn[Plug Switch/6.2] Hall handleCommsError: 1 consecutive communications errors. Type = Socket Comms Timeout
Retry 1 for command.
dev:11532021-03-25 05:42:47.307 pm warn[Plug Switch/6.2] Hall handleCommsError: 1 consecutive communications errors. Type = Socket Comms Timeout
Retry 1 for command.
dev:11532021-03-25 05:42:46.868 pm errorjava.lang.RuntimeException: java.lang.InterruptedException (socketStatus)
dev:11532021-03-25 05:41:48.201 pm info[Plug Switch/6.2] Hall updated: Setting Led off to 0.
dev:11532021-03-25 05:41:46.122 pm info[Plug Switch/6.2] Hall updated: Attempting to Unbind the Device from the Kasa Cloud.
dev:11532021-03-25 05:41:45.077 pm info[Plug Switch/6.2] Hall updated: device already set use LAN communications.
dev:11532021-03-25 05:41:45.071 pm info[Plug Switch/6.2] Hall updated: poll Interval set to 30 minutes minutes.
dev:11532021-03-25 05:41:45.058 pm info[Plug Switch/6.2] Hall updated: Driver version and data already correct.
dev:11532021-03-25 05:41:45.056 pm info[Plug Switch/6.2] Hall updated: Debug logging is false
dev:11532021-03-25 05:41:45.036 pm info[Plug Switch/6.2] Hall updated: Updating device preferences and settings.
dev:11532021-03-25 05:41:41.848 pm warn[Plug Switch/6.2] Hall handleCommsError: 1 consecutive communications errors. Type = Socket Comms Timeout
Retry 1 for command.
dev:11532021-03-25 05:41:40.772 pm info[Plug Switch/6.2] Hall updated: Setting Led off to 0.
dev:11532021-03-25 05:41:38.723 pm info[Plug Switch/6.2] Hall updated: Attempting to Unbind the Device from the Kasa Cloud.
dev:11532021-03-25 05:41:38.156 pm warn[Plug Switch/6.2] Hall handleCommsError: 1 consecutive communications errors. Type = Socket Comms Timeout
Retry 1 for command.
dev:11532021-03-25 05:41:37.667 pm errorjava.lang.RuntimeException: java.lang.InterruptedException (socketStatus)
dev:11532021-03-25 05:41:04.354 pm info[Plug Switch/6.2] Hall updated: device already set use LAN communications.
Hello,
Was wondering if a controllable switch for the "Oven Light" (called 'lamp') can be added to the "Samsung Oven" or "Cavity"
I looked through the "ST Data Collect" and added the code for getting the status of the lamp, but I am unsure how the code works.. so dont understand yet on how to add a lamp on/off switch..
Hello Dave, is there a way to add a tile for the kasa lamps to the dashboard. I could not find a way to do that.
I'd like some help troubleshooting this.
I have an HS100 switch with a hard-coded IP. I can control the switch in Hubitat using the On/Off buttons (The switch actually turns on/off as expected), but the 'switch' field in Current State stays 'off'. I also no longer see setSysinfo logs in the past logs, even though 'Enable Information Logging' has been enabled for the last week+. (Events are logging properly, it seems).
I changed the polling interval from 1 min to 30 sec today (to avoid re-calling connect) - so far, that hasn't helped.
I also checked that the HS 100 has firmware 1.2.5 in the Kasa app (I wasn't prompted to update it, so I'm guessing that's latest).
Any ideas?
driverVersion: 6.6.0
feature: TIM
model: HS100
Hello,
When I set the oven setpoint and "Run Oven" I am getting
Cooking Range: setMachineState: [comp: main, state: running, status: [status:FAILED, httpCode:Timeout, errorMsg:groovyx.net.http.HttpResponseException: status code: 422, reason phrase: Unprocessable Entity]]
I am getting all the current states correctly.. with the Smartthings device ID for the cooking range
Not able to turn on or off EM Multi Plug devices and showing this log error:
Yehuda Monitor Left-2.3.5-1: parseUdp: [error: error, reason: not LAN_TYPE_UDPCLIENT, respType: LAN_TYPE_UDPCLIENT_ERROR]
Hi, I was wondering if it would be possible to add the Sabbath Mode state toggle to your driver (for refrigerator and oven)? Not sure if it is possible since Samsung does not expose it even for Smartthings routine automation.
Hey is there any way to have the buttons in the HE Samsung TV Remote device exported to Apple HomeKit? All I get is a switch that turns the TV on/off.
I have 5 total Kasa plugs. They were added last night and all 5 seemed to work ok. Looks like the 2 that I can control through Hubitat desktop screen and through the app are the ones that show "LAN" connection. They were all 5 found from cloud install, and I didn't change any variables. They worked last night (all of them)
The 3 that do not work today are model HS103 (mini plugs).
Logs say "6.6.0: sendKasaCmd: Cloud interface not properly set up." However, the cloud is finding them when I go back to my user ID and PW and get a new token.
They show - Current States
commsError : false
connection : CLOUD
led : on
switch : on
The 2 that do work are HS100 (Larger appliance plugs). They show - Current States
commsError : false
connection : LAN
led : on
switch : on
I do not have "Use Kasa cloud for device control on for any of them. I have "Kasa" cloud binding on for all of them...
ANY ideas on what to do here? Thanks in advance
in https://github.com/DaveGut/HubitatActive/blob/master/KasaDevices/README.md, the last two links fail because they aren't using the raw variant as the ones directly above them do.
Should instead be linked to:
I have 16 kasa switch plugs working for over a year now. I bought an EM-plug and while they look identical, didn't realize it needed different drivers. I added the emplug.groovy driver and when I go into the kasa integration user app to update my list and find my new EM plug, I get a crashed page instead of the kasa interface.
Unexpected Error
An unexpected error has occurred trying to load the app. Check Logs for more information.
Error: Cannot get property 'value' on null object
The log shows this is happening:
app:9092021-12-01 08:21:45.107 am errorjava.lang.NullPointerException: Cannot get property 'value' on null object on line 629 (method startPage)
app:9092021-12-01 08:21:45.087 am info[KasaInt/6.4.3-r2] starting Kasa Integration
app:9092021-12-01 08:21:12.812 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Garage Camera Outlet 2 (192.168.1.185) added to devices array.
app:9092021-12-01 08:21:10.155 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Shed Camera Outlet (192.168.1.167) added to devices array.
app:9092021-12-01 08:21:09.945 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Treadmill Apple TV Outlet (192.168.1.171) added to devices array.
app:9092021-12-01 08:21:09.520 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Living Room Apple TV Outlet (192.168.1.169) added to devices array.
app:9092021-12-01 08:21:09.335 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Trampoline Camera Outlet (192.168.1.168) added to devices array.
app:9092021-12-01 08:21:08.856 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Deck Camera Outlet (192.168.1.165) added to devices array.
app:9092021-12-01 08:21:08.311 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Ravine Samsung camera (192.168.1.163) added to devices array.
app:9092021-12-01 08:21:07.393 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Server Monitor (192.168.1.153) added to devices array.
app:9092021-12-01 08:21:04.726 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa EM Plug HP Monitor (192.168.1.145) added to devices array.
app:9092021-12-01 08:21:03.981 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Pool Side camera (192.168.1.141) added to devices array.
app:9092021-12-01 08:21:03.709 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Front Yard camera (192.168.1.140) added to devices array.
app:9092021-12-01 08:21:03.296 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Living Room camera (192.168.1.138) added to devices array.
app:9092021-12-01 08:21:01.675 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Theatre Apple TV Outlet (192.168.1.130) added to devices array.
app:9092021-12-01 08:21:00.940 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Computer Monitors (192.168.1.126) added to devices array.
app:9092021-12-01 08:21:00.245 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Garage Lights (192.168.1.123) added to devices array.
app:9092021-12-01 08:20:57.634 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Microwave (192.168.1.110) added to devices array.
app:9092021-12-01 08:20:57.465 am info[KasaInt/6.4.3-r2] parseDeviceData: Kasa Plug Switch Puter Room Camera Outlet (192.168.1.109) added to devices array.
I tried deleting the user app and re-adding it - and it allows me to see the interface until I add my devices and click next, then it crashes to the same error page again.
after creating the Kasa Integration app with imported code, the app can not initialize and throws the error
java.lang.NullPointerException: Cannot get property 'version' on null object on line 1147 (method initInstance)
Replica Oven does not look like it take into account the Flex ovens, I have the divider that when removed it one oven, when added its upper and lower over independent of each other.
Also any Idea when you might bring the Flex Washer and Flex Dryer over to replica?
In the old version, I could turn off the LED indicator for all Kasa devices. I have HS200, HS210, S220 and HS103. None are honoring the LED setting with this newest driver - 6.1.0.
Recently purchased a KL125 Color bulb and when I went to add it, it did not show as a new device. Thanks in advance.
I have 75 Kasa devices on my network, representing over a dozen products. The drivers are working fine.
The only unsupported device is the KL430 RGB LED strip. I can offer to test drivers on mine if you do not have one to test with.
Brandon
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.