-
Notifications
You must be signed in to change notification settings - Fork 530
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
Introducing support for Zigbee devices #1493
base: master
Are you sure you want to change the base?
Conversation
Been testing (with and without cloud) this PR and I always get a "Connection to device succeeded but no datapoints found". After manually introducing them, they get a -1 value. On a side note, DPS gets listed with its correct value on tinytuya |
You should provide some logging please. Also, are you trying to add the device, right? You cannot add the gateway, you should find the attached devices, with the same IP address as the gateway. Let me know |
Only trying to add the device. It gets added properly, only failing to fetch the datapoints. Find attached the diagnostics. On top of that, the tuyadebug.tgz might not contain zigbee-related code config_entry-localtuya-8bb82a9fcfdd8088dde1bc8f31fba15d.json.txt |
You should check the "Enable debug" button, and post the relevant parts you find in home-assistant.log . |
Got this:
|
...
Looks like the device is not online/reachable... is it working with the Tuya integration, or with the app? |
Yes, works when only one consumer access to it. Tinytuya dumps:
|
Could be a device that doesn't allow multiple connections, can you try closing/disabling the app or put other devices in Flight mode maybe? |
Same timeout on flight mode. On tinytuya, I'm specifying the version on the gateway (if it helps):
|
OK, it looks like the gateway is using 3.4 protocol, mine is 3.3 and it is the only one I can test.
|
This is the debug output from tinytuya. The one from tuya-cli will take some more time |
@rospogrigio |
Additionally, after adding the hub and relay, I started adding motion sensors, one was added without problems, the second was added, but became unavailable, and when the second sensor detected motion, I was shown that the relay was turned on |
OK I admit that I have tested with my environment with only one gateway and one device, maybe if you add more devices there are problems, I will try in the next days. It's strange, however. Please keep trying and tell me any progress should you make. |
If I can help with anything, tell me, I'll try |
Of course, give me some days to refactor the code a bit, I have a couple of ideas. Thank you in the meantime! |
@witokondoria and @vanek-865 I have been working on supporting multiple devices and I am at a good stage, but there is something weird going on with my gateway so, since you are the only ones who provided feedback so far, I need to ask you if you experience the same behavior too.
Can you please test the above and let me know the outcome? Thank you! |
@rospogrigio
|
Oh, crap, it looks like it's a standard Zigbee behavior then. I'll wait also @witokondoria 's feedback but this makes the communication very unreliable since there seems to be no way to tell whether a subdevice has gone offline. I am trying to do some research but cannot find a way to ask for a real status of the offline device, the gateway always responds with the cached status. Unbelievable. |
I don’t know much about this, but here (#628) the command is indicated (When requesting a status update (0x0A) with a cid, the gateway will query that particular sub-device and return its status) updates the device status and it seems that the gateway should poll the devices, maybe this will help somehow |
That is what I already do, and that keeps reporting the cached status. Just to make it clearer, can you repeat the above steps using tuya-cli instead of my tuyadebug? Like this:
You will probably get the same behavior... |
Additionally, #739 may help: |
@rospogrigio |
Sorry for the late answer: my device (the gateway) still dumps DPs while being powered off. Moreover, tuya.com displayed the device as online, the whole time it was powered off. Additionally, the smart life app displayed a nice (and fake) signal detection from the device (a ggq one if that matters). |
For how long? I saw that usually it takes one minute or so for the cloud to report that a device went offline. |
More than one minute for sure. Will leave the device powered off and measure the time properly. |
@rospogrigio , by the current stage to fix It you think it will be possible? I'm waiting the delivery of my Gateway and a couple devices and just now I realize that maybe I should sell the Gateway asap and get some local tasmota/zb2mqtt solution. I've watching you working together to find a solution and would prefer to keep my devices but only If there is some light at the end of the tunnel.
@witokondoria , any news on that? |
@ddpsft , I'm nearly there I guess. The devices basically work as expected, I have set up the config flow and it seems to be working fine, the only missing thing is the detection of whether the subdevices go offline, and this can be done, VERY UNFORTUNATELY, only using the cloud API calls. Or at least, I couldn't find a way to detect when the subdevices go offline, not even using other tools different from localtuya (tuya-cli for example)... any suggestion on this would be very welcome but I highly doubt that there'll be a way. |
As soon as I get my stuff I'll come back, test and report. |
I've 4 BRT100 thermostatic valve to test ...where can I download localtuya with zigbee support to test? |
I have something almost ready to test but I need to finalize it and I'm having personal issues these days... Give me some more days and I'll publish something. |
Hi, thanks for the great work done here. Just wanted to check if there has been any progress on this? I ordered few devices including a Tuya multi-mode gateway and trying to have them setup so I can use them through Home Assistant. I had posted in Reddit to get feedback about having my Zigbee devices which are connected to Tuya Gateway added to HA but most of the feedback I get is to abandon Tuya gateway and buy a stick/dongle from Sonoff which I am really not in favor for as I believe there are different options and some hope that I can use the gateway from Tuya. Again, thanks for the great work and keep it up... |
Hi, is there any progress on this PR? |
You can download https://github.com/rospogrigio/localtuya/tree/zigbee_support it's branch version but only 2 zigbee device can be added... Now I'm using a fork of this project and it's ok https://github.com/xZetsubou/hass-localtuya |
I tried to set up my TRVs, the integration was able to add them to devices, but all of my entities were unavailable. Did you succeed to set up a climate entity? |
I've 5 Moes BRT-100 through Moes Hub zigbee connected as climate entity with xZetsubou fork and i had only 2 connected with rospogrigio version. never have problem. |
I have opened an issue and all of my problems are now solved by the developer. My 5 Zigbee TRVs are working fine, thanks for the recomnendation. 👍🏻 |
unfortunatelly, not working for me...I can see the zigbee gateway, but that's all. I'm not able to do anything about control it or any device behing the gateway. What do you suggest? Thanks |
Introducing support for Zigbee devices.
Devices are automatically detected if the Cloud APIs are used.
These devices must be configured setting the dedicated "sub_device" protocol.
PLEASE NOTE: the gateway can be added/configured only if it provides any entity, so it might not be possible to add it, it depends on the specific model.