Skip to content
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

Unable to get color lights recognized #5

Closed
whyidie opened this issue Jan 10, 2019 · 6 comments
Closed

Unable to get color lights recognized #5

whyidie opened this issue Jan 10, 2019 · 6 comments

Comments

@whyidie
Copy link

whyidie commented Jan 10, 2019

Really odd problem as I was able to get these lights configured and half working (without color) using combination of other tuya modules. Loved the simplicity of this module and wanted to give it a shot. If I delete cache this is what I get upon launching homebridge in debug mode (DEBUG=* homebridge -D)

[2019-1-9 17:21:30] [TuyaLan] Initializing TuyaLan platform... [2019-1-9 17:21:30] Loading 0 accessories... Thu, 10 Jan 2019 00:21:30 GMT Accessory [Homebridge] Creating new AccessoryInfo for our HAP server

Followed by :

[2019-1-9 17:21:30] [TuyaLan] Starting discovery... Thu, 10 Jan 2019 00:21:30 GMT EventedHTTPServer Server listening on port 51826 [2019-1-9 17:21:30] Homebridge is running on port 51826. [TuyaAccessory] Discovery started. [2019-1-9 17:21:32] [TuyaLan] Discovered bulb 3 (03854024807d3a26d8a3) [2019-1-9 17:21:32] [TuyaLan] Connected to bulb 3 [2019-1-9 17:21:32] [TuyaLan] Discovered bulb 2 (03854024807d3a270b25) [2019-1-9 17:21:32] [TuyaLan] Connected to bulb 2 [2019-1-9 17:21:32] [TuyaLan] Discovered bulb 1 (03854024807d3a2705d6) [TuyaAccessory] Discovery ended. [2019-1-9 17:21:34] [TuyaLan] Connected to bulb 1

And thats it. Devices show up in Homekit, with good status, but when I try to turn on or off, nothing happens except below output :

Thu, 10 Jan 2019 00:31:32 GMT HAPServer [CC:22:3D:E3:CE:30] HAP Request: PUT /characteristics Thu, 10 Jan 2019 00:31:32 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":2,"iid":10,"value":1}] Thu, 10 Jan 2019 00:31:32 GMT Accessory [Homebridge] Setting Characteristic "On" to value 1 Thu, 10 Jan 2019 00:31:32 GMT EventedHTTPServer [::ffff:192.168.1.112] Muting event '2.10' notification for this connection since it originated here. Thu, 10 Jan 2019 00:31:32 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP Response is finished Thu, 10 Jan 2019 00:31:45 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP request: /characteristics Thu, 10 Jan 2019 00:31:45 GMT HAPServer [CC:22:3D:E3:CE:30] HAP Request: PUT /characteristics Thu, 10 Jan 2019 00:31:45 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":2,"iid":10,"value":0}] Thu, 10 Jan 2019 00:31:45 GMT Accessory [Homebridge] Setting Characteristic "On" to value 0 Thu, 10 Jan 2019 00:31:45 GMT EventedHTTPServer [::ffff:192.168.1.112] Muting event '2.10' notification for this connection since it originated here. Thu, 10 Jan 2019 00:31:45 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP Response is finished Thu, 10 Jan 2019 00:31:48 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP request: /characteristics Thu, 10 Jan 2019 00:31:48 GMT HAPServer [CC:22:3D:E3:CE:30] HAP Request: PUT /characteristics Thu, 10 Jan 2019 00:31:48 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":3,"iid":10,"value":1}] Thu, 10 Jan 2019 00:31:48 GMT Accessory [Homebridge] Setting Characteristic "On" to value 1 Thu, 10 Jan 2019 00:31:48 GMT EventedHTTPServer [::ffff:192.168.1.112] Muting event '3.10' notification for this connection since it originated here. Thu, 10 Jan 2019 00:31:48 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP Response is finished Thu, 10 Jan 2019 00:31:49 GMT EventedHTTPServer [::ffff:192.168.1.126] Client connection error: read ECONNRESET Thu, 10 Jan 2019 00:31:49 GMT EventedHTTPServer [::ffff:192.168.1.126] Client connection closed Thu, 10 Jan 2019 00:31:49 GMT EventedHTTPServer [::ffff:192.168.1.126] HTTP connection was closed Thu, 10 Jan 2019 00:31:49 GMT EventedHTTPServer [::ffff:192.168.1.126] HTTP server was closed Thu, 10 Jan 2019 00:32:18 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP request: /characteristics Thu, 10 Jan 2019 00:32:18 GMT HAPServer [CC:22:3D:E3:CE:30] HAP Request: PUT /characteristics Thu, 10 Jan 2019 00:32:18 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":4,"iid":10,"value":1}] Thu, 10 Jan 2019 00:32:18 GMT Accessory [Homebridge] Setting Characteristic "On" to value 1 Thu, 10 Jan 2019 00:32:18 GMT EventedHTTPServer [::ffff:192.168.1.112] Muting event '4.10' notification for this connection since it originated here. Thu, 10 Jan 2019 00:32:18 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP Response is finished Thu, 10 Jan 2019 00:32:24 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP request: /characteristics Thu, 10 Jan 2019 00:32:24 GMT HAPServer [CC:22:3D:E3:CE:30] HAP Request: PUT /characteristics Thu, 10 Jan 2019 00:32:24 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":4,"iid":10,"value":0}] Thu, 10 Jan 2019 00:32:24 GMT Accessory [Homebridge] Setting Characteristic "On" to value 0 Thu, 10 Jan 2019 00:32:24 GMT EventedHTTPServer [::ffff:192.168.1.112] Muting event '4.10' notification for this connection since it originated here. Thu, 10 Jan 2019 00:32:24 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP Response is finished Thu, 10 Jan 2019 00:32:27 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP request: /characteristics Thu, 10 Jan 2019 00:32:27 GMT HAPServer [CC:22:3D:E3:CE:30] HAP Request: PUT /characteristics Thu, 10 Jan 2019 00:32:27 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":3,"iid":10,"value":0}] Thu, 10 Jan 2019 00:32:27 GMT Accessory [Homebridge] Setting Characteristic "On" to value 0 Thu, 10 Jan 2019 00:32:27 GMT EventedHTTPServer [::ffff:192.168.1.112] Muting event '3.10' notification for this connection since it originated here. Thu, 10 Jan 2019 00:32:27 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP Response is finished Thu, 10 Jan 2019 00:32:33 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP request: /characteristics Thu, 10 Jan 2019 00:32:33 GMT HAPServer [CC:22:3D:E3:CE:30] HAP Request: PUT /characteristics Thu, 10 Jan 2019 00:32:33 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":2,"iid":10,"value":1}] Thu, 10 Jan 2019 00:32:33 GMT Accessory [Homebridge] Setting Characteristic "On" to value 1 Thu, 10 Jan 2019 00:32:33 GMT EventedHTTPServer [::ffff:192.168.1.112] Muting event '2.10' notification for this connection since it originated here. Thu, 10 Jan 2019 00:32:33 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP Response is finished Thu, 10 Jan 2019 00:32:36 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP request: /characteristics Thu, 10 Jan 2019 00:32:36 GMT HAPServer [CC:22:3D:E3:CE:30] HAP Request: PUT /characteristics Thu, 10 Jan 2019 00:32:36 GMT Accessory [Homebridge] Processing characteristic set: [{"aid":2,"iid":10,"value":0}] Thu, 10 Jan 2019 00:32:36 GMT Accessory [Homebridge] Setting Characteristic "On" to value 0 Thu, 10 Jan 2019 00:32:36 GMT EventedHTTPServer [::ffff:192.168.1.112] Muting event '2.10' notification for this connection since it originated here. Thu, 10 Jan 2019 00:32:36 GMT EventedHTTPServer [::ffff:192.168.1.112] HTTP Response is finished

If I relaunch without deleting device cache I get below errors and the devices now show up in home as "No repsonse" :

[2019-1-9 17:35:18] [TuyaLan] Initializing TuyaLan platform... [2019-1-9 17:35:18] Loading 0 accessories... [2019-1-9 17:35:18] [TuyaLan] Marked bulb 3 unreachable by faulting Service.bulb 3.On [2019-1-9 17:35:18] [TuyaLan] Marked bulb 2 unreachable by faulting Service.bulb 2.On [2019-1-9 17:35:18] [TuyaLan] Marked bulb 1 unreachable by faulting Service.bulb 1.On

Will post config file next, although I really trimmed it down to bare bones to try to isolate the problem.

@whyidie
Copy link
Author

whyidie commented Jan 10, 2019

Config below :

        "platform": "TuyaLan",
        "devices": [
            {
                "name": "bulb 1",
                "type": "SimpleLight",
                "manufacturer": "Zizou Company",
                "model": "Addi 5000",
                "id": "foo",
                "key": "foo"
            },
            {
                "name": "bulb 2",
                "type": "Outlet",
                "manufacturer": "Zizou Company",
                "model": "Addi 5000",
                "id": "foo",
                "key": "foo"
            },
            {
                "name": "bulb 3",
                "type": "RGBTWLight",
                "manufacturer": "Zizou Company",
                "model": "Addi 5000",
                "id": "foo",
                "key": "foo"
            }

@AMoo-Miki
Copy link
Owner

The Marked <name> unreachable by faulting Service.<name>.On is not an error; it is the plugin consciously marking the devices unavailable until it actually makes contact with them.

Can you grep your logs for Tuya and see if there are any discovery errors?

@AMoo-Miki
Copy link
Owner

I just released an update to the plugin which includes additional logging. Give that a shot and see if your commands are being sent at all or not.

To update the plugin, run npm i -g homebridge-tuya-lan and then restart Homebridge.

@whyidie
Copy link
Author

whyidie commented Jan 13, 2019

Cool, that gave me some errors to work with. Unsuprising that bulb2 is giving "odd message" as its configured as a plug. Bulb3 and 1 are bulbs and configured as such :

[TuyaAccessory] Odd message from bulb 3 with command 8: { cmd: 8, data: '¡ÐuïÀ$�\u0010PËåþtèù½�\u000b½®! 9üP·ÿf)µ� \|�I}US\u0018Ò��ôÒ�ÀêoÅ\u0017Ó©V\u0017tfQo�§.Ç8õ%ÒB!\u001e\u001c=gËJôã3�' } [TuyaAccessory] Odd message from bulb 1 with command 8: { cmd: 8, data: 'EI­�Ëh,ëÙq�=\|ç§ÆêñÈÇ·+\u0013�Ô�¼öæîW¥%\u001dÆ.-�\u0019�ý�hÞ£H\b%\\B\u0007¬à' } [TuyaAccessory] Odd message from bulb 2 with command 8: { cmd: 8, data: '¢\u0012«_ÿV²sã6@fѺõ\u000f\u00048±Ôê#Ãé1Ð\u001d¡ß¤h\u0019�\u000f\'T<ôãÛ\bØ�¥\u0018âT~Ù�\u0007Ù¡°\bHBëÛ\u0010ÿ½\u0013Ôc\u0004�n�×¾ýl­­W��Sß' }

For the record, using these bulbs :

https://www.amazon.com/Novostella-Dimmable-Multicolored-Required-Equivalent/dp/B07CNKJLLY

@AMoo-Miki
Copy link
Owner

AMoo-Miki commented Jan 13, 2019

That indicates that decryption failed. Check your key for those bulbs; maybe you accidentally swapped the id/key. I would recommend you extract the keys again to make sure you have the right combination.

PS. I use Novostella bulbs myself and love them (for their price).

@AMoo-Miki
Copy link
Owner

Closed for inactivity. Please reopen if you need more help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants