-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lightbulbs appear offline but work fine with Tapo app. #23
Comments
I am not sure what is going on. I have 6 devices on my network, to test, only 1 says offline, but it's similar to your situation (checked are good):
Here is the code I used: import KasaControl from 'kasa_control'
const kasa = new KasaControl()
const { KASA_EMAIL, KASA_PASSWORD } = process.env
if (!KASA_EMAIL || !KASA_PASSWORD) {
console.error('Set KASA_EMAIL & KASA_PASSWORD in your environment.')
process.exit(1)
}
await kasa.login(KASA_EMAIL, KASA_PASSWORD)
// turn all lights off
for (const { deviceId, deviceModel, fwVer } of await kasa.getDevices()) {
try {
await kasa.power(deviceId, false)
console.log(`- [X] ${deviceModel} - ${fwVer}`)
}catch(e) {
console.log(`- [ ] ${deviceModel} - ${fwVer}`)
}
} So maybe it is a problem with the specific device/firmware. If you are cool with controlling it directly (not running via Kasa Cloud) you might have better luck with my other lib: tplink-lightbulb. It sends messages over wifi directly, instead of routing through Kasa Cloud. I prefer this method because it doesn't require the internet/external-servers (still needs local wifi, though) |
I just tested with local, and see that the light that is showing up offline for me, is indeed offline (old light I added to app.) So it seems I can't reproduce, with any devices I have for testing. Running local I did this:
(no LB120) but all the others seems to work fine with local or kasa. What is the model-number? What version of firmware does the device use? |
This library only works for Kasa-compatible devices (I am testing with tplink bulbs/switches/outlets, that send you to the Kasa ap) not sure what tapo is (they look similar, but it is a different brand) maybe try the regular kasa app and see if it works, first, then we might be able to add support to this lib, if it's similar (sounds similar.) The output from According to this they don't work together, but maybe in the future. I am really not sure, since I don't have any Tapo test-devices. |
As another test, I installed Tapo app, and it seems to control the same lights I have for testing, and I see all the same stuff with kasa app, and even used the same auth-credentials, so I have a strong feeling they are compatible, just need more info for testing. I will buy a 2-pack of Tapo bulbs (it's only $12 and I could use a couple more RGBW lights, anyway) and I will see if I can reverse the (similar) protocol. |
I have 4 Tapo Lightbulbs connected, all 4 are working fine with Tapo app,
kasa.getDevices()
works but every Lightbulb I try to connect to returns the errorDevice is offline
, any idea why or how to fix?The text was updated successfully, but these errors were encountered: