Open Sisimoski opened 4 years ago
I'm interested in that device-support too. I have a bunch of these LS- Devices, only the bulbs work partly.
Smart Ceiling Light throws that message. (3.3) didn't respond with its current state.
I could also post the schema of the bulbs and Ceiling Light, but i Think, that the ceiling light schema would be the same.
Support for this devices wourd be great!
Config:
{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "###-##-###" }, "description": "Home Smart Home", "platforms": [ { "name": "Config", "port": 8081, "auth": "form", "theme": "red", "restart": "sudo -n systemctl restart homebridge", "temp": "/sys/class/thermal/thermal_zone0/temp", "tempUnits": "c", "sudo": true, "log": { "method": "custom", "command": "journalctl -o cat -n 500 -f -u homebridge" }, "platform": "config" }, { "platform": "TuyaLan", "devices": [ { "name": "test1", "type": "SimpleLight", "manufacturer": "Iotton", "model": "Smart White Bulb", "id": "###########", "key": "###########", "ip": "###.###.###.##" } ] }, { "name": "Alexa", "username": "#####", "password": "#####", "pin": "###-##-###", "routines": true, "platform": "Alexa" } ], "accessories": [ { "accessory": "RaspberryPi", "name": "Raspberry Pi", "interval": 60 }, { "accessory": "FakeBulb", "name": "-Wohnungstür", "bulb_name": "-wohnungstuer" }, { "accessory": "FakeBulb", "name": "-Küchentür", "bulb_name": "-kuechentuer" }, { "accessory": "FakeBulb", "name": "-Küchenschiebetür", "bulb_name": "-kuechenschiebetuer" } ] }
Log:
`[10/28/2019, 2:51:03 PM] Loaded config.json with 4 accessories and 3 platforms.
[10/28/2019, 2:51:03 PM] ---
[10/28/2019, 2:51:12 PM] Loaded plugin: homebridge-alexa
[10/28/2019, 2:51:12 PM] Registering platform 'homebridge-alexa.Alexa'
[10/28/2019, 2:51:12 PM] ---
[10/28/2019, 2:51:12 PM] Loaded plugin: homebridge-config-ui-x
[10/28/2019, 2:51:12 PM] Registering platform 'homebridge-config-ui-x.config'
[10/28/2019, 2:51:12 PM] ---
[10/28/2019, 2:51:13 PM] Loaded plugin: homebridge-fakebulb
[10/28/2019, 2:51:13 PM] Registering accessory 'homebridge-fakebulb.FakeBulb'
[10/28/2019, 2:51:13 PM] ---
[10/28/2019, 2:51:24 PM] Loaded plugin: homebridge-raspberrypi
[10/28/2019, 2:51:24 PM] Registering accessory 'homebridge-raspberrypi.RaspberryPi'
[10/28/2019, 2:51:24 PM] ---
[10/28/2019, 2:51:24 PM] Loaded plugin: homebridge-tuya-lan
[10/28/2019, 2:51:24 PM] Registering platform 'homebridge-tuya-lan.TuyaLan'
[10/28/2019, 2:51:24 PM] ---
[10/28/2019, 2:51:26 PM] Loaded plugin: homebridge-tuya-web
[10/28/2019, 2:51:26 PM] Registering platform 'homebridge-tuya-web.TuyaWebPlatform'
[10/28/2019, 2:51:26 PM] ---
[10/28/2019, 2:51:26 PM] Loading 3 platforms...
[10/28/2019, 2:51:26 PM] [Config] Initializing config platform...
[10/28/2019, 2:51:26 PM] [Config] Spawning homebridge-config-ui-x with PID 11948
[10/28/2019, 2:51:26 PM] [TuyaLan] Initializing TuyaLan platform...
[10/28/2019, 2:51:26 PM] [Alexa] Initializing Alexa platform...
[10/28/2019, 2:51:26 PM] [Alexa] homebridge-alexa v0.4.39, node v10.16.3, homebridge v0.4.50
[10/28/2019, 2:51:26 PM] Loading 4 accessories...
[10/28/2019, 2:51:26 PM] [Raspberry Pi] Initializing RaspberryPi accessory...
[10/28/2019, 2:51:27 PM] [Raspberry Pi] Raspberry Pi temperature is: 47.1 C
[10/28/2019, 2:51:27 PM] [Raspberry Pi] Raspberry Pi voltage is: 1.35 V
[10/28/2019, 2:51:27 PM] [-Wohnungstür] Initializing FakeBulb accessory...
[10/28/2019, 2:51:27 PM] [-Wohnungstür] Starting a fake bulb device with name '-wohnungstuer'...
[10/28/2019, 2:51:27 PM] [-Küchentür] Initializing FakeBulb accessory...
[10/28/2019, 2:51:27 PM] [-Küchentür] Starting a fake bulb device with name '-kuechentuer'...
[10/28/2019, 2:51:27 PM] [-Küchenschiebetür] Initializing FakeBulb accessory...
[10/28/2019, 2:51:27 PM] [-Küchenschiebetür] Starting a fake bulb device with name '-kuechenschiebetuer'...
Load homebridge-tuya-web.TuyaWebPlatform
[10/28/2019, 2:51:27 PM] [homebridge-tuya-web.TuyaWebPlatform] No config found, disabling plugin.
[10/28/2019, 2:51:27 PM] [TuyaLan] Marked TEST unreachable by faulting Service.test1.On
Setup Payload:
X-HM://0023ISYWYFF9J
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
┌────────────┐
│ ###-##-###│
└────────────┘
[10/28/2019, 2:51:28 PM] [TuyaLan] Starting discovery... [10/28/2019, 2:51:30 PM] Homebridge is running on port 51826. [TuyaDiscovery] Discovery started on port 6666. [TuyaDiscovery] Discovery started on port 6667. [10/28/2019, 2:51:30 PM] [TuyaLan] Unregistering test [10/28/2019, 2:51:30 PM] [TuyaLan] Unregistering test2 [10/28/2019, 2:51:31 PM] [TuyaLan] Discovered a device that has not been configured yet (########@###.###.###.##). [10/28/2019, 2:51:32 PM] [TuyaLan] Discovered test1 (#########) identified as SimpleLight (3.3) [TuyaAccessory] Changing ping gap for test1 to 9s [10/28/2019, 2:51:33 PM] [TuyaLan] Discovered a device that has not been configured yet (########@###.###.###.##). [10/28/2019, 2:51:33 PM] [TuyaLan] Discovered a device that has not been configured yet (########@###.###.###.##). [10/28/2019, 2:51:33 PM] [TuyaLan] Connected to test1 [TuyaAccessory] Sending first query to test1 (3.3) [TuyaAccessory] test1 (3.3) didn't respond with its current state. [10/28/2019, 2:51:33 PM] [TuyaLan] Ready to handle test1 (SimpleLight:3.3) with signature {} [10/28/2019, 2:51:33 PM] [TuyaLan] Discovered a device that has not been configured yet (########@###.###.###.##). [10/28/2019, 2:51:34 PM] [TuyaLan] Discovered a device that has not been configured yet (########@###.###.###.##). [10/28/2019, 2:51:34 PM] [TuyaLan] Discovered a device that has not been configured yet (########@###.###.###.##). [10/28/2019, 2:51:49 PM] [Alexa] alexaDiscovery - returned 5 devices [10/28/2019, 2:51:51 PM] [Config] Homebridge Config UI X v4.6.2 is listening on :: port 8081`
My Smart Ceiling Light is now working with following Config:
{ "name": "Badezimmer Licht", "type": "TWLight", "manufacturer": "Iotton", "model": "Smart White Bulb", "id": "###########", "key": "###########", "ip": "192.168.178.43", "dpPower": 20, "dpBrightness": 22, "dpColorTemperature": 23, "minWhiteColor": 140, "maxWhiteColor": 400, "scaleBrightness": 1000, "scaleWhiteColor": 1000 },
I use homebridge-tuya-lan v1.5.0-rc.12
The problem is, that the device does not respond with its current state. On/Off, brightness and colortemperature is working correctly
IS there any way to fix that?
@ibitas I pasted your config into my config file and my Smart Ceiling Lamp finally works with Home app and it also responds with its current state. If I change some values (brightness, color temperature, on/off state) in Tuya App then it changes in Home app and vice versa. Big thank you for sending this snippet here.
I made similar changes in my config file to LED Strip. Unfortunately, only on/off is working. Changing colors in Home app doesn't change color on strip itself. Brightness isn't also working. Someone does know why is that and is there any way to make it work properly?
My configuration is as follows for the Smart Ceiling Light (so without the IP address, I did not need it):
{
"name": "Ceilling Light C",
"type": "TWLight",
"manufacturer": "LSC",
"model": "Smart Ceiling Light",
"id": "xxxxxxxxxxxxxxxxxxxxxxx",
"key": "xxxxxxxxxxxxxxxx",
"dpPower": 20,
"dpBrightness": 22,
"dpColorTemperature": 23,
"minWhiteColor": 140,
"maxWhiteColor": 400,
"scaleBrightness": 1000,
"scaleWhiteColor": 1000
}
Initially this was not working, but @codyc1515 mentioned in https://github.com/AMoo-Miki/homebridge-tuya-lan/issues/112#issuecomment-550496218 that it might be worth trying the latest RC version using: npm i -g homebridge-tuya-lan@rc
In the release version (1.4.0) this configuration did not work: discovery failed and hardcoding the IP resulted in complaints about command 8
.
After the update (1.5.0-rc.12), discovery and control did work, but I still see messages about command 8 and an unknown state.
In the logs I see that it is not reporting the current state on start up:
0|homebridge | [1/4/2020, 12:29:10 AM] [TuyaLan] Discovered Ceilling Light C (xxxxxxxxxxxxxxxxxxxxxxx) identified as TWLight (3.3)
0|homebridge | [TuyaAccessory] Changing ping gap for Ceilling Light C to 9s
0|homebridge | [1/4/2020, 12:29:10 AM] [TuyaLan] Connected to Ceilling Light C
0|homebridge | [TuyaAccessory] Sending first query to Ceilling Light C (3.3)
0|homebridge | [TuyaAccessory] Ceilling Light C (3.3) didn't respond with its current state.
In the logs I also see messages like this:
0|homebridge | [TuyaAccessory] Sending Ceilling Light B {"20":true}
0|homebridge | [TuyaAccessory] Sending Ceilling Light A {"20":true}
0|homebridge | [TuyaAccessory] Sending Ceilling Light C {"20":true}
0|homebridge | [TuyaAccessory] Heard back from Ceilling Light B with command 8
0|homebridge | [TuyaAccessory] Heard back from Ceilling Light A with command 8
0|homebridge | [TuyaAccessory] Heard back from Ceilling Light C with command 8
Currently looking in the decompiled sources of the APK to see if I can figure out the protocol for this message.
Apparently command 8 is a Status message. The sources contain acom.tuya.sdk.hardware.enums.FrameTypeEnum
which mentions the following types (amongst others):
public enum FrameTypeEnum {
UDP(0),
AP_CONFIG(1),
ACTIVE(2),
BIND(3),
RENAME_GW(4),
RENAME_DEVICE(5),
UNBIND(6),
CONTROL(7),
STATUS(8),
HEART_BEAT(9),
DP_QUERY(10),
QUERY_WIFI(11),
TOKEN_BIND(12),
CONTROL_NEW(13),
ENABLE_WIFI(14),
DP_QUERY_NEW(16),
SCENE_EXECUTE(17),
DP_QUERY_GENERAL(18),
SCENE_EXECUTE_NEW(19),
AP_CONFIG_NEW(20),
AP_CONFIG_ACK(21),
IPC_LAN_302(32),
LAN_GW_ACTIVE(AVIOCTRLDEFs.AVIOCTRL_RECORD_PLAY_NEXT),
LAN_SUB_DEV_REQUEST(241),
LAN_DELETE_SUB_DEV(TuyaZigBeeLocalSceneModel.WHAT_ALLOC_SCENEID_FAILURE),
LAN_REPORT_SUB_DEV(243),
LAN_SCENE(MeshLogin.WHAT_LOGIN_FAILURE),
LAN_PUBLISH_CLOUD_CONFIG(MeshLogin.WHAT_CONNECT_FAILURE),
LAN_PUBLISH_APP_CONFIG(MeshLogin.WHAT_LOGIN_SUCCESS),
LAN_EXPORT_APP_CONFIG(247),
LAN_PUBLISH_SCENE_PANEL(MeshLogin.WHAT_SEARCH_CANCEL),
LAN_REMOVE_GW(249),
LAN_CHECK_GW_UPDATE(250),
LAN_GW_UPDATE(251),
LAN_SET_GW_CHANNEL(252),
LAN_GET_GW_CHANNEL(253),
LAN_REQUEST_GW_LOG(254),
LAN_SUB_DEV_STAUS_REQUEST(224),
LAN_SUB_DEV_STAUS(JfifUtil.MARKER_APP1),
LAN_REQUEST_SCENE_RULES(226),
LAN_GW_RESET(227),
LAN_SUB_DEV_RESET(228),
LAN_CHECK_SUB_DEV_UPDATE(229),
LAN_REQUEST_DEV_UPDATE(230),
LAN_DOWNLOAD_OTA_PACKAGE(231),
LAN_OTA_PROGRESS_CHANGED(232),
LAN_DEV_VERSION_REPORT(233);
public int type;
private FrameTypeEnum(int i) {
this.type = i;
}
/* ... */
}
There is an easy way to do it now just use the TuyaSmart app register your light and then use the tuya web api only think that doesn’t work correctly are the colors
@jensDL I was under the impression that that one always uses the cloud and never communicates directly with the device. I prefer direct communication so I can still control the device if my internet connection is down or who knows, the Tuya web service is down (or they decide to no longer support it).
Also I briefly tried the other one in the past and noticed weird behavior if I was controlling multiple lights at once (as a group within HomeKit). At random, one or two of the three lights I was controlling would actually switch off instead of changing brightness or color. So far I haven't seen this issue when using this integration.
I prefer the lan version to but I can’t see to get that working
@jensDL For me it works well using the release candidate and the configuration mentioned above (see my first comment on this issue).
@itavero I just cant control my light. I have "Odd message from test light with command 10". I used the config example from you.
Your log mentions that it is an RGBTW light, not a TW light like the ceiling light I have.
Do you have a log from the tuya-lan-find
command?
It might be that your device uses different identifiers.
Just to double check: you did install the 1.5.0-rc.12 version (so npm i -g homebridge-tuya-lan@rc
)?
i get this back and yes i installed the rc version.
Error: ERR_SSL_SSLV3_ALERT_CERTIFICATE_UNKNOWN [Error: 7920:error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1544:SSL alert number 46 ] { library: 'SSL routines', function: 'ssl3_read_bytes', reason: 'sslv3 alert certificate unknown', code: 'ERR_SSL_SSLV3_ALERT_CERTIFICATE_UNKNOWN' }
Hi! I recently bought cheap smart things from LSC Smart Connect brand in Action (it's a Dutch shop) and I saw that I can make them connect to HomeKit by setting Homebridge with plugins. I'm trying to connect Smart Ceiling Light and Smart RGB LED Strip with Homebridge via this plugin. I have LSC Smart Connect app (which is Tuya-powered app) and Tuya app on my iPhone. I paired these things with Tuya app, since there is more probability to work with Tuya than LSC. I configured config.json and it these Light and Strip showed in my Home app on iPhone but plugin said that
failed to discover ... in time but will keep looking
. In Common Problems page I found that I need to addip
to my config, so I did that, but since then it says:Failed to discover ... in time but will connect via
the IP that I written and then immediately connects and closes connection.I can't make them to connect properly, nothing in Home app works really. Tuya app works with no problems, turns on and off my devices.
Here's my
config.json
:I pasted IP - if it is necessary, I can send it to you.
Here's
schema
:Here's recent Homebridge log I guess:
Here's screen from Home app:![image](https://user-images.githubusercontent.com/49586005/67569122-47670180-f72e-11e9-9979-1db57319de72.png)
I would be very grateful if you can help me with connecting these devices with Homebridge.