I have several Kasa switches all integrated through app some work on Hubitat and not Alexa and some work on Alexa but not on Hubitat. An example is if I ask Alexa to turn on the deck light it can't turn the light on. I have a Zigbee button to turn it on and off that works fine. I can live with that I just can't figure out how to control which one does what. Is that even possible?
I came up in my DIY learning starting with Kasa and ST. Used to run NodeJS etc - anyways. Kasa has a direct integration to Alexa via app, then as it evolved, some KASA devices started to have drivers in HE so it got to be a bit confusing. If you have KASA app tied to Alexa, then HE doesn't really know about it - so you have to use magic to tell HE whats going on with the Kasa devices (like a virtual switch or something).
If you have the KASA device in HE, but Alexa wont control the common stumble is the device isn't in the Alexa devices list HE is broadcasting up to Alexa through the Echo Skill app:
Another stumbling item is device type - certain KASA devices advertise themselves as switches or bulbs and I've never had trouble with them - but camera, led strip and buttons have caused me trouble. In the end, I stopped using KASA since I felt wifi devices were a seperate platform to me, I'm pure zigbee now.
Lastly I'll add my biggest troubles with Alexa and devices is naming. In Alexa, a device can get 'stuck'. it's improved over the last year but when you issue a 'discover' command, alexa looks for new devices. If you already have a device with that name, working or not it doesn't seem to reconnect them always.
It's painful - but I have picked out of my Alexa list all my devices and deleted them at the Alexa side, (I use an Android Emulator on my PC with the Alexa app to make it much easier) then I rediscover. that has always seemed to given me positive results on troubled devices as well as non-working devices alexa thinks it knows about that had been removed, renamed etc.
Mine are all switches and dimmers. They all are listed on both HE and Alexa. That Kasa app sounds like that would be a good place to look. I've had good luck with the Kasa switches never have problems with them till today I was testing out a motion sensor with the nearest switch and couldn't get it to work. After changing to a different switch and it worked I started looking around the Kasa integration app and in the utilitys it shows the switches that work and don't work but nothing about getting them to work. Thanks for your insight.
I believe it was hinted at above, but I would recommend setting up all your Kasa devices on the Hubitat integration. Use local control, do not even give the integration your cloud account credentials. Then, remove the Kasa "skill" from Alexa. Then in the "Amazon Echo Skill" app on Hubitat, share the Kasa devices to Alexa this way. Then if you control the device from Alexa the hub will know of the change right away without waiting for a poll to happen.
It would also be best if you give your devices static IPs in the router DHCP.
If you are having issues with integration app post some screenshots of the issues.
This is the lan test results. The switches that passed are paired with a zigbee device. But If I try to pair a failed switch it will pair to the zigbee device but it won't work. I'm going to try your suggestion if I can figure out how to move them all to HE.
List Kasa Devices by IP with Lan Test Results
Total Kasa devices: 9 [Ip:Port: [testResults, RSSI, Alias, Driver Version, Installed?] (Alias may not match the name on the device.)
192.168.4.50:9999: [PASSED, -38, Deck light, null, Yes] 192.168.4.51:9999: [PASSED, -23, garage ceiling light, null, Yes] 192.168.4.57:9999: [Failed, n/a, breakfast nook, null, Yes] 192.168.4.75:9999: [PASSED, -29, Back porch switch, null, Yes] 192.168.4.82:9999: [Failed, n/a, Bedroom 1 Hallway dimmer 2, null, Yes] 192.168.4.84:9999: [Failed, n/a, Bedroom 2 dimmer switch , null, Yes] 192.168.4.85:9999: [Failed, n/a, Front porch light switch, null, Yes] 192.168.4.91:9999: [PASSED, -45, Laundry Room light switch , null, Yes] 192.168.4.92:9999: [Failed, n/a, Basement Porch, null, Yes]
The ones that failed, are those the current IP of those devices as listed in your router?
Have you tried running a scan "Scan LAN For Kasa Devices to Add" ? This will re-scan and I think if the IP has changed for a device, it will update it.
Setting a reserved IP for each device on the router will eliminate the possibility of the IP changing and causing issues.
If you have not tied integrations to the devices yet, you could also try removing the problematic ones and then scanning again to see if they are even detected.
Yes they are the current Ip's I've ran a few scans and all devices are on the app. The failed devices are all assigned to a routine on Alexa I removed one from it's routine last night. I'll play with it later today see what I come up with. Thanks for your help you're giving me some great ideas.
Kasa Integration
Hubby 2
settings
help
List Kasa Devices from Add Devices
Total Kasa devices: 9
Alias: [Ip:Port, RSSI, Installed?]
Back porch switch - HS200: [192.168.4.75:9999, -29, Yes]
Deck light - HS210: [192.168.4.50:9999, -40, Yes]
garage ceiling light - HS210: [192.168.4.51:9999, -23, Yes]
Bedroom 2 dimmer switch - HS220: [192.168.4.84:9999, -47, Yes]
Front porch light switch - HS220: [192.168.4.85:9999, -37, Yes]
Basement Porch - HS200: [192.168.4.92:9999, -40, Yes]
Laundry Room light switch - HS200: [192.168.4.91:9999, -46, Yes]
breakfast nook - KS230: [192.168.4.57:9999, -37, Yes]
Bedroom 1 Hallway dimmer 2 - HS220: [192.168.4.82:9999, -36, Yes]
Are you using the built in integration that comes on the hub or did you install the custom code? They are the same thing, as the custom code recently got added as an official app, but if you installed the code yourself there is a greater possibility for mistakes.
For some reason it seems some of the devices are not reachable on the local LAN, but they were when you did the original scan.
You could try turning on the cloud integration option in the Hubitat app. Its not ideal but it will work around the problem for now. Each device has options to use cloud control or not.
This morning I deleted the Kasa skill since on Alexa after the switches that worked on HE read non responsive on Alexa. I rescanned the HE and only got the 4 that passed the test and the do work. None on Alexa work so I enabled the skill again and it said try again later. I'm thinking the skill crashed I thought they were playing together nicely. Also I was setting up reservations and the Alexa Kasa's were not on the router. Now I have to figure out how to get the missing devices on HE.
That is probably your issue then. You may need to factory reset the devices and join them back to your Wifi again using the Kasa app.
I would keep the TP Link skill in Alexa disabled, if you want the devices shared to Alexa, do that from the Amazon Echo app in Hubitat. Then all control goes through the hub and will be local from hub to devices.
I go them back online but still can't get the 5 switches back on HE. I removed and reinstalled from the Kasa app I have to use the app to pair them not Alexa. Used a backup on the HE and unplugged it for 30 mins. If I ever get it right I'll dump the Kasa app everything works alright now i can live with it just rather have local control. Thanks for your help I'll let you know if I fix it.
Did you try enabling the cloud control in the Hubitat Kasa app? Then at least you can control them from HE even if its not local. If the cloud control works but not local it might be some sort of networking issue preventing the hub from reaching them on the LAN.
I have cloud control on all of them. That's all I need till the network gets straightened out. I saw a lot of server unresponsive on my journey today. Thanks
Solved! I deleted all switches from everything. Then added them all on the Kasa app and reserved IP address's before pairing them to Alexa or Hubitat. I opened the Kasa Integration and searched for devices. All devices showed up on LAN and work great again on Hubitat. Now for Alexa after turning on cloud binding on each device on preferences in the Hubitat device app I can now communicate with Alexa again.
Ok now my next recommendation, that I mentioned originally.
REMOVE the TP Link Kasa skill from Alexa.
Turn OFF Cloud binding on all the devices.
Share the devices to Alexa from the Hubitat Amazon app.
This way if you control the devices via Alexa, it will go through HE so it will know about it right away without polling.
The hub is the central point of control this way.
Using the Alexa skill it goes like this:
Voice Command > Amazon Cloud > TP Link Cloud > DEVICE > Hub will find out eventually from polling
Using my suggestion it would go like this:
Voice Command > Amazon Cloud > HE Hub > DEVICE
One less cloud service to rely on.
Alexa can't find them without the Kasa skill. We don't use voice very much and it works fast enough as far as buttons and sensors they are faster now since that has local control. Cloud binding is a separate switch than the cloud control I need that on to communicate with Alexa also.
Well you can keep it how you have it, but it would would find them if you go to the Amazon Echo app on Hubitat, and select the switches there to share them to Alexa via that app. That's the only way Alexa will know about anything that you have integrated only to the hub.
That's how I have mine setup (and many other people as well) and it works great.
I don't really do it for speed, I do it to have one source of control (HE Hub), and to eliminate the Kasa cloud from the mix.
No harm in leaving it how you have it though, since you got it all working finally.
I do have the echo app running as soon as I killed the Kasa skill Alexa said it was disconnected when I asked it to do something. I'll keep playing with it and eventually figure it out.
Correct, you have to disable and remove the Kasa skill from Alexa, which should remove the devices as well. May want to uncheck them all in the Amazon echo app on HE also and press done, then confirm they are all gone from Alexa.
Then share the devices again from only the HE Hub using the Amazon app. They should show up as newly discovered devices and you would have to set them up again in rooms or however you had them setup before.
Success my Kasa switches are free from the tangled web! One more question I'm assuming if I install any more Kasa devices I will have to add the skill again? Thanks for your patients and help you guys are the backbone of the Hubitat.