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

Add Temperature and Humidity Sensor support (device type 'wsdcg') #105

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

macecchi
Copy link

Hi there! First of all, thanks for creating this project! \o/

This PR adds support for the Temperature and Humidity Sensor like this one (device type wsdcg). This closes issue #92 and this item on the vote discussion page.

Here's what it looks like on the Home app:

Status bar:
IMG_E7702B4CB550-1

When expanding it:
IMG_2170

By the way, I wasn't able to build it the same way of other accessories that have subServices. I had some issues in base_accessory when adding the service and ended up creating the secondary service directly on the accessory class. Please feel free to refactor this if necessary :)

@chiefcw
Copy link

chiefcw commented Oct 6, 2021

Can someone please review this and approve? I would really like to have this integration.

@macecchi
Copy link
Author

@chiefcw If you want to try this before the authors merge it, you can install the plugin from my fork directly. Do a npm install -g macecchi/tuya-homebridge on the device you are running Homebridge.

@chiefcw
Copy link

chiefcw commented Oct 13, 2021

@macecchi Thanks for the info. It reports the temperature but the humidity always shows 0%.

@EmJayDubbs
Copy link

EmJayDubbs commented Oct 19, 2021

I have a dual temp/humidity sensor which shows up as a wsdcg climate sensor in the homebridge logs:

Adding: Climate Sensor (wsdcg / "device ID")

However it's actually connected through a Tuya BLE WiFi Gateway (branded as ARLEC, "Grid Connect", Australia, links below) so I am pretty excited about exposing this and possibly other sensors to homekit!

Sensor:
https://www.bunnings.com.au/arlec-grid-connect-smart-temperature-sensor_p0148574?

BLE gateway shows up as:
Adding: Smart Hub (wfcon / "device id")

https://www.bunnings.com.au/arlec-grid-connect-smart-home-hub_p0148571

@macecchi
Copy link
Author

macecchi commented Oct 19, 2021

@chiefcw are you on Homebridge version 1.3.5? I had the same issue when after upgrading from 1.3.4 to 1.3.5 (with other Tuya sensors as well). For the meantime I just downgraded it but I'll try to have a look at it.

@chiefcw
Copy link

chiefcw commented Oct 19, 2021

@macecchi Yes, I'm on 1.3.5 , I tried downgrading to 1.3.4 and still the same issue, no humidity reading. It's ok with me for now as I really only wanted the temperature reading. Thanks for your work on this.

@dipakparmar
Copy link

dipakparmar commented Oct 30, 2021

@macecchi Yes, I'm on 1.3.5 , I tried downgrading to 1.3.4 and still the same issue, no humidity reading. It's ok with me for now as I really only wanted the temperature reading. Thanks for your work on this.

@chiefcw this will fix the humidity value reading. macecchi#2

@arturlukosek
Copy link

Hi, may I ask when temperature and humidity support will be available ?

@gonzechevnublit
Copy link

Hello, I'm my zigbee temperature humidity sensor I use this values:

refreshAccessoryServiceIfNeed(stateArr, isRefresh) { this.isRefresh = isRefresh; for (const statusMap of stateArr) { if (statusMap.code === 'va_temperature') { const temperature = statusMap.value / 10; this.normalAsync(this.service, Characteristic.CurrentTemperature, temperature); } else if (statusMap.code === 'va_humidity') { const humidity = statusMap.value / 10; this.normalAsync(this.humidityService, Characteristic.CurrentRelativeHumidity, humidity); } } }

@Magna66
Copy link

Magna66 commented Feb 22, 2022

Hi Mario,when will it be merged to the tuya:master? as till now the Temperature and Humidity Sensor support (device type 'wsdcg') is not yet supported in tuya:master.

@macecchi
Copy link
Author

Hi Mario,when will it be merged to the tuya:master? as till now the Temperature and Humidity Sensor support (device type 'wsdcg') is not yet supported in tuya:master.

Hey @Magna66, I wish I knew :/ it looks like the project maintainers aren't really acknowledging many contributions. :(

@Magna66
Copy link

Magna66 commented Feb 23, 2022

Thank you Mario for your reply. Cant you make it as a separate project for homebridge if you have the time? At the moment I am using your master (npm install -g macecchi/tuya-homebridge), and it is working great thank you so much for your contribution.

@macecchi
Copy link
Author

Thank you Mario for your reply. Cant you make it as a separate project for homebridge if you have the time? At the moment I am using your master (npm install -g macecchi/tuya-homebridge), and it is working great thank you so much for your contribution.

I wish I had the time hahaha but I'll occasionally update my fork with the latest updates from here so you can keep using it if you like. I've been using it for a while and with the latest updates from the main repo it's been pretty stable for me.

@Magna66
Copy link

Magna66 commented Mar 12, 2022

Thanks a lot, that was my real worry, if there is an update, and yes I am using yours, it is stable. Really appreciate your contribution.

@arturlukosek
Copy link

arturlukosek commented Mar 24, 2022

@macecchi are you able to advice what will be the way to try replace this plugin with yours and not losing devices from homekit in the meantime. Just don't want to set all devices and automations as from beginning. How homebridge / homekit will behave if both plugins installed? Im waiting for ability to see temperature and humidity in HK for months and looks like can't count that original plugin will be updated. Thanks in advance

@Hitower78
Copy link

I am Unable to use my sensor. i didnt know if its workuing, because the Plugin and the Cloud isnt easy to understand :-/
So: is this Sensor wsdcg at this moment official working?
In the App (Smartlife) and Cloud (https://eu.iot.tuya.com/cloud) it seems to work... but not in the Homebridge, Please help

@nbasharn
Copy link

nbasharn commented Sep 7, 2022

@chiefcw If you want to try this before the authors merge it, you can install the plugin from my fork directly. Do a npm install -g macecchi/tuya-homebridge on the device you are running Homebridge.

when i do this nothing happens. i dont see the plugin in my plugins

@eillouz
Copy link

eillouz commented Sep 27, 2022

@macecchi - i've tried your version of tuya-homebridge,
the temperature and humidty not refreshing (gets the value when homebridge restarted only)

@macecchi
Copy link
Author

For anyone still trying to use this, check out this fork instead: https://github.com/0x5e/homebridge-tuya-platform
It has this sensor support as well as many other improvements, and it's being recommended by the official team.

@ashish-tandon
Copy link

Hi Please can we approve this.

@ashish-tandon
Copy link

#238 (comment) Its a regularly requested feature

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

Successfully merging this pull request may close these issues.