-
Notifications
You must be signed in to change notification settings - Fork 165
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
Missing motion sensor type #33
Comments
I also have same question with a door sensor that uses the Tuya app. All my Tuya lights work fine but the sensor in my config.json file just returns an error and seems to get ignored, does not show up on homekit with all my Tuya lights. Hoping to be able to see status (open/close) of sensor on HomeKit. |
I don't think the sensors will work properly, as other users have reported that sensor-type devices only connect to WiFi when their state is changed or at a static interval - so it's not possible to query them whenever. It may be possible to set up some kind of MITM MQTT thing to capture the updates, I'm not sure. Sorry about that, but it's more a limitation of the device rather than a limitation of this plugin. If you have any ideas for supporting sensors, I'm open to hearing them. |
Max, I’m thinking that motion sensors and contact sensors should work really similar to my wifi dimmers, where they generate an event in real time for each change. If the people that have these devices have some time collect logs etc we should be able to add them similar to the wifi dimmers. |
I have a door sensor and am willing to help to further the cause. I’m a newbie and not quite sure how to “collect logs”. Can you point me in the right direction? |
Same here! |
@boatboy12 @experimint Okay I'm assuming that these devices generate events on the local API the same as my wifi dimmers that generate events when the button on the switch is pressed or they are dimmed. If they work the same as the dimmer, it is pretty straight forward to create them as Motion or contact device instead. To test this working theory out, please change your config.json to have the device be a dimmer, see the config example in the README ( don't worry about the options section, as we need to determine what they are ). Then run homebridge with the -D command line option, ie homebridge -D, this will enable enhanced debugging output, and have the device generate an event ( ie open the door or trigger a motion event ). ( Don't worry about discovering or adding devices in the Home app etc as we only are interested in the device communications ) What I'm interested in is the output from these lines in the code and If these are generated when an event occurs, it should be straight forward to add them Also, if you could supply the output from the script in issue #16 that will help as well, but it is only needed if they generate events. |
I've got my sensor configed as follows:
And when I run
A couple of these:
And then I keep getting:
Hope this helps :) |
Looks like they don’t work similar to the wifi dimmers and support a similar api interface ;-(
… On Dec 31, 2018, at 11:31 AM, experimint ***@***.***> wrote:
[TuyaPlatform] ERROR: not responding Motion Sensor configed as dimmer
|
Does the Tuya Api supports sensors at all? |
Couldn't find a list of supported devices in their documentation |
These are all great questions, but without having access to a device it is all speculation for me. Maybe one of the other devs who has access to one can determine if a local interface is available. I was assuming it was very similar to the wifi dimmers...
… On Dec 31, 2018, at 11:38 AM, experimint ***@***.***> wrote:
Does the Tuya Api supports sensors at all?
Couldn't find a list of supported devices in their documentation
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#33 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AS5CmIJAWiHyDVa3vOLpIyRI_mS42NWZks5u-j1zgaJpZM4Zi-yd>.
|
I have a sensor registered on my Tuya iOS app.
Brad
… On Dec 31, 2018, at 11:38 AM, experimint ***@***.***> wrote:
Does the Tuya Api supports sensors at all?
Couldn't find a list of supported devices in their documentation
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@experimint @boatboy12 are either of you able to send me a Wireshark log of your sensor reacting to a change in state and/or communicating with the app? |
I am away for a couple days but I will figure out how to do this upon return.
Thanks
Brad
… On Dec 31, 2018, at 11:58 AM, Max Isom ***@***.***> wrote:
@experimint @boatboy12 are either of you able to send me a Wireshark log of your sensor reacting to a change in state and/or communicating with the app?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Okay, please share what you can find out. |
If Wireshark logs are still needed, I can try to provide them. If someone could guide me through the process of retrieving them (I've never used Wireshark before); I'd be happy to help :) |
So I downloaded Wireshark and “listened” while sensor was activated. I have a lot of network activity so trying to pinpoint the sensor isn’t easy. I did find the sensor MAC address in one of the entries.
… On Dec 31, 2018, at 11:58 AM, Max Isom ***@***.***> wrote:
@experimint @boatboy12 are either of you able to send me a Wireshark log of your sensor reacting to a change in state and/or communicating with the app?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@boatboy12 if you open the Tuya app it shows the device's IP address on the details page. |
The issue is closed, but I do not understand why. It seems that there are still possibilities to get this to work. Hi all, I'm still very keen to help! Thanks |
Not sure what other info I can provide other than the wireshark scan info I shared. The scan was not showing the IP of the door sensor when it was activated.
… On Feb 6, 2019, at 7:16 AM, experimint ***@***.***> wrote:
The issue is closed, but I do not understand why. It seems that there are still possibilities to get this to work. Hi all, I'm still very keen to help! Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The IP address is the first thing I looked for after doing the scan but it did not show up in the list of IP's in the source or destination column. I only see the sensor MAC address in a "DHCP Request" and a "DHCP Discover", if that means anything. |
@boatboy12 sounds like your router or some other device on your network is trying to find the sensor's IP; doesn't mean much unfortunately. @experimint I'm happy to reopen it if more information is given that allows me to implement it. From what I've heard so far, it sounds like these sensors only contact the cloud API (which this library is not equipped to deal with). If you want to do some more tinkering, you may want to take a look at this project. I believe it allows you to capture requests to Tuya's cloud services. |
Thanks for your insights and advice, @codetheweb |
Sorry I couldn't help more, @experimint. Someone else has created a schematic of a Tuya water detection sensor, and it appears it only turns on when it detects a change in state. I suspect something similar is happening with yours. |
Hi guys, I'm planing to get a some motion & contact sensors. Has anyone got this working in 2020? What will be the best option to go with WIFI or Zigbee? |
Hi there,
I've added my motion sensor to homebridge; thanks a lot for the detailed information provided in this repo :)
However; the device is registered as a 'general' type; I can set the device to be a 'power point', 'Light' or a 'fan' in it's homekit settings.
Is there a type I can register the device as, to let HomeKit see/use it as a sensor?
The text was updated successfully, but these errors were encountered: