-
Notifications
You must be signed in to change notification settings - Fork 592
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
Is current code able to support gateway? #70
Comments
I'll need to look into what this entails further. Most likely it will need some upstream changes to the tinytuya library, as the current documentation does not mention gateways at all. |
I think it is just payload. There is some clue in localtuya repo in "zigbee gateway" branch. Tuya API shows gateway as this: [ { name: 'Tuya Alfresco', tuya-cli get --ip 192.168.0.1 --id XXXX tap ID --key KEY --cid 131 --full --protocol-version 3.3 |
I managed to alter localtuya to get it working. |
I looked today at tinytuya. It seems the same trick will work, section to change is in init, lines 350-400. Without changes there it won't work. |
Hi @make-all and @darek-margas , Just FYI: I added support for devices connected to zigbee gateway into tinytuya. I'm preparing PR which adds support for tuya-local, right now I made some changes in my fork and it looks good. I'll open PR when it is ready. |
tinytuya library is now updated to 1.9.1, so the support for making changes to support hubs is available in the underlying library. This will be useful also for #170 |
@LesTR I'm putting up my hand if you need a beta tester. I've got some Tuya Zigbee irrigation valves that I would love to get working with this. |
Hi @illuzn, |
Since I have made lots of conflicting changes over the past couple of releases, I took the opportunity to rebase your main branch in https://github.com/make-all/tuya-local/tree/LesTR/main But I don't have any suitable devices for testing, so I can't judge whether it is actually working or not. But I did fix the config and tests that you added so at least those pass now. |
Hi there, tried LesTR integration with the Holman WX1 water valve without luck. Log list attached |
I just rebased that branch again, as there are a number of fixes in main over the past week, including I think a fix for the "Detected blocking call..." |
Hi, I tested with tinytuya python package ver 1.10.1 and works the requests for temperature and humidity values. I created a configuration file for the AUBESS temperature/humidity sensor:
I replaced the contents in custom_components/tuya_local folder from this branch. The id after the KeyError ist from Sub device ID from new integration page. I don't know if the gateway should be added separately as a device, or if only the devices should be added to the integrations, I couldn't find a description for this. However, I was not able to add the gateway separately. Thank you for your time and consideration. Best regards, |
Hi, I managed to find the source of my problem: I changed the lines in device.py, I added keys to the function call parameters(changed parameter order in tinytuya lib), and I added the version to the parent device (my gateway device works only with version 3.3).
It works perfectly with the Aubeus zigbee temperature and humidity sensor config file from my previous post. Have a nice day! |
Hi @lovaselek , that's correct, and I can confirm it fixed getting data from my Zigbee temperature sensors. My fork is updated with this change but not rebased on top of the main branch. But there is still some issue because I'm not able to get data from other devices behind the same gateway which was working before - switch and thermostat. Most probably, it has something to do with persistent connection to the gateway. Sorry, I've been really busy for the last 2 months, really hard to find some time to fix this. Hopefully, it will be better soon. |
I did add an option to disable the persistent connection a few versions ago, so if you can update your branch again, it should be easy to test if the persistent connection is the cause. Looking at the code in tinytuya, they redirect to the parent device, so should be sharing the same persistent connection, but if this is not working for some reason, it may cause sub devices to block each other due to the limited number of connections tuya devices can handle. Maybe we need to do something in the integration to ensure the parent device is the same object for all sub devices. |
That's exactly my concern. I'll try to rebase my branch and do some tests, but probably not sooner than during this weekend. |
@LesTR any luck with the rebase of your branch? Adding Bluetooth devices through the gateway depends on this issue's progress. I can help with testing as I own the bridge with Bluetooth subdevices currently integrated with HA using tuya cloud. |
Hi, |
I believe currently the best option is: |
I am already using this one but I wasn't able to make it working with my water timer (even specifying manually the Pids). tried to ask help but didn't get any.. that's why I am looking at some alternatives |
Here is more at forum: https://community.home-assistant.io/t/holman-wifi-tap-timers-intergration/313920/140 |
Support was added with PR #651 |
I've got some unique gateway for irrigation but it works as zigbee (except it is not zigbee).
I've tested it with tuya-cli and it works perfectly if I specify cid for child device.
Thing is - would it be possible to pass cid over this code?
The text was updated successfully, but these errors were encountered: