milo526 / homebridge-tuya-web

Hoobs and Homebridge plugin for Tuya devices using Home Assistant Tuya Web Api
MIT License
219 stars 95 forks source link

Tuya WaterValve support as device type. #241

Open sirwasaeed opened 3 years ago

sirwasaeed commented 3 years ago

Hi, thanks for the plugin, it works like a charm!

I recently purchased and added a valve smart device from Tuya to my collection. Unfortunately the valve icon isnโ€™t available with the plugin in HomeKit, i tried to ID it as waterValve, but with no luck.

Will there be a future update to support this device? Or can i edit the config for this?

Thanks in advance!

milo526 commented 3 years ago

Please post the result of the steps under "How to check whether the api this library uses can control your device".

Without this it is hard for me to help you with regards to this specific issue.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

sirwasaeed commented 3 years ago

Hi Milo, thanks for the quick response. sorry for my late update.

I tried steps for how to check whether the api can control the device. i'm not sure if i did it correctly, but the output got the valve read as: "Buitenkraan".

Let me know if it's correct or whether i needed to provide a different output?

Thanks again!

Tuya

milo526 commented 3 years ago

No problem, Lately I'm also not the quickest to respond ๐Ÿ˜‰ (Next time please paste the raw text instead of an image, makes it significantly easier for developers to work with)

This is exactly the output I was looking for.

Given the valve device definition in HomeKit it should be possible to create some form of support for this. The valve device type does have an "in use" property that is supposed to get if water is currently actively flowing (or maybe to indicate if a hose is connected?). Since Tuya exposes a switch, it is not possible for me to get this state and thus it would probably always be equal to whether the valve is turned open or not (i.e. the switch state).

sirwasaeed commented 3 years ago

Thank you for the explanation and for the tip, next time i'll paste the raw text. My mistake!

I didn't know my request would make it this complicated. I should have taken in account that Homekit supported device, for example the Eve Aqua. Would indeed have a feedback function.

I just wished that the icon for the valve would be visible with this Tuya homebridge intergration. As just a "switch". Have it turn blue when 'on / opened' and turn grey if 'off / closed'.

The Tuya device i am using now has no feedback option either, just turns the valve open in side the house to be able to shut off water supply outside the home.

Thanks again for your time!

H74a9d7512e7845a7a2bdca8624d3eca94

Aekung commented 3 years ago

I'm also interested in this. Not sure if @milo526 is still working on implementing the water valve type accessory to this plugin.

Thank you =)

dpamping commented 2 years ago

interested as well ;))

milo526 commented 2 years ago

Development is currently slower than I'd hope it would be but everything tagged with the label has my attention ๐Ÿ˜„

dpamping commented 2 years ago

Smoke, water and gas sensors also

milo526 commented 2 years ago

Smoke, water and gas sensors also

Please follow the steps under How to check whether the API this library uses can control your device to see if this is possible and if so, please open a new issue per device for requesting access. (Given the fact that they are sensors I expect them not to be possible though, that is my experience with other Tuya sensors at least)

dpamping commented 2 years ago

Any news on the valve support?

homersdonut commented 1 year ago

Hello, also just wondering if valve support will be added, I have an indoor irrigation device I would like to add to Homekit.

waltersobchak40 commented 1 year ago

@milo526 below is an abbreviated form of the script's results. What I need (and believe others are asking for) is support for a manipulator arm that turns off the valve. The water valve operates like a switch that's either on or off. In the Tuya Development Platform, it is listed under Electrical > Valve Pump > Smart Manipulator Arm. Two other related types in their API are "Water Valve Controller" and "Indoor Smart Water Valve."

I just emailed Tuya support to ask them to add support to /homeassistant for valves. Today, the only way to identify these devices would be to inspect the icon returned.

Finally, here's the HomeKit doc for reference of what we're looking for: https://developer.apple.com/documentation/homekit/hmcharacteristictypevalvetype And here's a related project for a dummy water valve: https://github.com/satrik/homebridge-dummy-valve#readme

{ u"data": {u"online": True, u"state": True}, u"dev_type": u"switch", u"ha_type": u"switch", u"icon": u"https://images.tuyaus.com/smart/icon/ay1541487337020lAqrO/1611125385a1625d26be1.jpg", u"id": u"eb63933630a3d508a3nZZZ", u"name": u"Basement valve controller", }, { u"data": {u"online": True, u"state": False}, u"dev_type": u"switch", u"ha_type": u"switch", u"icon": u"https://images.tuyaus.com/smart/icon/socket_new2.png", u"id": u"624685562cf432614ZZZ", u"name": u"Lava Lamp", },

milo526 commented 1 year ago

@milo526 below is an abbreviated form of the script's results. What I need (and believe others are asking for) is support for a manipulator arm that turns off the valve. The water valve operates like a switch that's either on or off. In the Tuya Development Platform, it is listed under Electrical > Valve Pump > Smart Manipulator Arm. Two other related types in their API are "Water Valve Controller" and "Indoor Smart Water Valve."

I just emailed Tuya support to ask them to add support to /homeassistant for valves. Today, the only way to identify these devices would be to inspect the icon returned.

Finally, here's the HomeKit doc for reference of what we're looking for: https://developer.apple.com/documentation/homekit/hmcharacteristictypevalvetype And here's a related project for a dummy water valve: https://github.com/satrik/homebridge-dummy-valve#readme

{ u"data": {u"online": True, u"state": True}, u"dev_type": u"switch", u"ha_type": u"switch", u"icon": u"https://images.tuyaus.com/smart/icon/ay1541487337020lAqrO/1611125385a1625d26be1.jpg", u"id": u"eb63933630a3d508a3nZZZ", u"name": u"Basement valve controller", }, { u"data": {u"online": True, u"state": False}, u"dev_type": u"switch", u"ha_type": u"switch", u"icon": u"https://images.tuyaus.com/smart/icon/socket_new2.png", u"id": u"624685562cf432614ZZZ", u"name": u"Lava Lamp", },

Thank you for this information! Feel free to send a PR with support for this device type ๐Ÿ˜„

fratinize commented 8 months ago

https://github.com/milo526/homebridge-tuya-web/issues/241#issuecomment-816277536 sirwasaeed What is this Model?

Thank you for the explanation and for the tip, next time i'll paste the raw text. My mistake!

I didn't know my request would make it this complicated. I should have taken in account that Homekit supported device, for example the Eve Aqua. Would indeed have a feedback function.

I just wished that the icon for the valve would be visible with this Tuya homebridge intergration. As just a "switch". Have it turn blue when 'on / opened' and turn grey if 'off / closed'.

The Tuya device i am using now has no feedback option either, just turns the valve open in side the house to be able to shut off water supply outside the home.

Thanks again for your time!

H74a9d7512e7845a7a2bdca8624d3eca94