Open avenger11 opened 6 years ago
Is it connected to an Alexa Skill by chance?
Also, try to increase your timeout levels in the config.json
No alexa. what your suggestion for api min and api max ?
I use on my network:
{
"accessory": "TuyaColorLight",
"name": "Fountain Light",
"ip": "192.168.104.30",
"productId":"IcS079IpUJb333whW",
"devId": "xxxxxxx",
"localKey": "xxx",
"apiMinTimeout" : 100,
"apiMaxTimeout" : 3000,
"apiRetries": 2,
"apiDebug" : true,
"refreshInterval" : 360,
"debugPrefix" : "~~ ColorLight ",
"debug" : true,
"deviceEnabled" : true
}
You can tweak those values out but the big one is the apiDebug so you can see what's going on. Show me some logs, comment out your localKey when you share.
Thanks!
here are a log file.
Ahhh!!!
Humidifier] ˜---Humidifier { '[object Object]': undefined } [4/1/2018, 12:42:42 PM] [Oittm Humidifier - Humidifier] ˜---Humidifier DPS Values: {} [4/1/2018, 12:42:42 PM] [Oittm Humidifier - Humidifier] ˜---Humidifier
Look at the dps values you’re sending. It’s really silly but....
dps[“1”] is how it’s required, not dps[1] like we would assume...
I had hell with this, and that’s why I forked the tuyapi in the first place.
Next, if you send a bad value to the device function points (dps) it will cause the light to not respond. Open up the original app, change the values then completely exit the Tuya app and try to change the settings again. Repeat until you figure it out... this was a blast to “hack” into the Tuya color lights.
I hope you get it working!
also look in my homebridge-tuya-colorlight code, I believe I switched the dps to an object..
So it constructs like this:
var dps = {};
dps[‘“1”’] = false; dps[‘“2”’] = something
I’m on mobile at the moment but if you can’t figure it out I’ll look when I get back...
colorlight code:
var dpsTmp = { '1' : true, '2' : this.colorMode, '3' : apiBrightness, '4' : temperature, '5' : lightColor // '6' : hexColor + hexColor + 'ff' };
this.tuyaColorLight.set(this, {'id': this.devId, 'dps' : dpsTmp}).then(result => { // foo })....
I updated index.js with the latest change I made and your suggestion. I think i'm closer but still doesn't work
here the latest log homebridge.log
When was the last time you synced the homebridge-tuyapi-extended package? I did some work a few days back before you forked the light project... maybe update that and go from there!
On Apr 1, 2018, at 8:08 PM, avenger11 notifications@github.com wrote:
I updated index.js with the latest change I made. I think i'm closer but still doesn't work
here the latest log homebridge.log
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I'm able to get the status of the device and discuss with it.
But I receive this error when I try to set a value. NB: apps closed, try timeout, removed persist and accessories folder
I see two options: