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

Support for Honeywell humidity sensors (HIHxxxx) #6808

Closed
thepotoo opened this issue Nov 1, 2019 · 19 comments
Closed

Support for Honeywell humidity sensors (HIHxxxx) #6808

thepotoo opened this issue Nov 1, 2019 · 19 comments
Assignees
Labels
awaiting feedback Action - Waiting for response or more information enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Milestone

Comments

@thepotoo
Copy link

thepotoo commented Nov 1, 2019

Have you looked for this feature in other issues and in the wiki?
Yes
Is your feature request related to a problem? Please describe.
The current go-to humidity sensor for DIYers is the DHT22, which performs very poorly in high humidity conditions (like a bathroom). I am looking for a good, reliable sensor that will perform in damp/very humid environments.

The HIH7121 works over a range of 0-100% humidity, and includes a hydrophobic filter that prevents condensation, which on paper seems like it would be ideal for my application (bathroom fan control).

Describe the solution you'd like
Add support for Honeywell humidity sensors on an I2C interface. It looks like some code exists here that may help: https://github.com/ControlEverythingCommunity/HIH6130/blob/master/Arduino/HIH6130.ino

As far as I can tell, all of these HIHxxxx sensors use the same address (0x27) and protocol, so adding support for any of them should add support for all of them.

I don't see a particular need for command mode (changing address, setting alarms).

Describe alternatives you've considered
I've spent quite a bit of time looking at different humidity sensors and these seem a bit better than the ones Tasmota currently supports.

Additional context
Here is a datasheet: https://www.mouser.com/datasheet/2/187/honeywell-sensing-humidicon-hih7000-series-product-1140774.pdf

(Please, remember to close the issue when the problem has been addressed)

@andrethomas
Copy link
Contributor

Have you tried the Si7021?

I can't find any breakout/module boards for the HIH7121 so it may not be likely for someone to add support for it at this time.

@thepotoo
Copy link
Author

thepotoo commented Nov 1, 2019

From the datasheet for the Si7021:

Recommended humidity operating range is 20% to 80% RH (non-condensing) over –10 °C to 60 °C. Prolonged operation beyond these ranges may result in a shift of sensor reading, with slow recovery time.

This suggests that it won't meet my needs (area with 80-95% humidity).

The HIH7121 doesn't need a breakout board, just a .22uF cap. I have ordered some and will play around with them when they get here.

@andrethomas
Copy link
Contributor

Sure, if you get it working you're welcome to make a PR :)

@ascillato2 ascillato2 added the feature request (devs?) Action - awaiting response from developers label Nov 1, 2019
@arendst arendst self-assigned this Nov 2, 2019
arendst added a commit that referenced this issue Nov 2, 2019
Add support for Honeywell I2C HIH series Humidity and Temperetaure sensor (#6808)
@arendst arendst added awaiting feedback Action - Waiting for response or more information fixed Result - The work on the issue has ended and removed feature request (devs?) Action - awaiting response from developers labels Nov 2, 2019
@arendst
Copy link
Owner

arendst commented Nov 2, 2019

Give it a try and report back please.

@ascillato2 ascillato2 added the enhancement Type - Enhancement that will be worked on label Nov 2, 2019
@thepotoo
Copy link
Author

thepotoo commented Nov 2, 2019

@arendst Thank you! I can't believe how quickly you added this. I will test it when the sensors arrive (in a week or so) and let you know if there are any issues.

Will this be available in the default sensors build?

@andrethomas
Copy link
Contributor

Will this be available in the default sensors build?

It's not included at the moment - The driver is very small though so I'm guessing it will be as soon as you're able to test it and provide feedback :)

@arendst
Copy link
Owner

arendst commented Nov 2, 2019

It probably will not as it has the same address as PCF82xx

@ascillato2 ascillato2 added the on hold Result - User can't continue with issue label Nov 6, 2019
@ascillato2
Copy link
Collaborator

@thepotoo

Please, after you perform the tests with this sensor, tell us how it works. Thanks.

@thepotoo
Copy link
Author

thepotoo commented Nov 7, 2019

@arendst Sensors arrived today. The original sketch I linked to works fine, but for some reason in Tasmota I am getting:
20:02:17 MQT: tele/sonoff/SENSOR = {"Time":"2019-11-06T20:02:17","HIH":{"Temperature":256.982,"Humidity":100.0},"TempUnit":"F"}

The temp is always 256.982 and the humidity is always 100; neither ever change. I notice delay(300);
in the example sketch, which is there to prevent the module from going into command mode - could this be happening with Tasmota? Edit: command mode

The module is detected fine and shows up correctly, so that is great.

Any suggestions here?

@thepotoo
Copy link
Author

thepotoo commented Nov 7, 2019

This sketch also works fine, and has some extra diagnostic stuff in it.

@ascillato2 ascillato2 reopened this Nov 7, 2019
@ascillato2 ascillato2 removed awaiting feedback Action - Waiting for response or more information fixed Result - The work on the issue has ended on hold Result - User can't continue with issue labels Nov 7, 2019
@ascillato2 ascillato2 added this to the v7.1.0 milestone Nov 7, 2019
arendst added a commit that referenced this issue Nov 7, 2019
Fix sensor power on command mode (#6808)
@arendst
Copy link
Owner

arendst commented Nov 7, 2019

Thx for testing.

Pls report back with the latest fix.

@arendst arendst added awaiting feedback Action - Waiting for response or more information fixed Result - The work on the issue has ended labels Nov 7, 2019
@thepotoo
Copy link
Author

thepotoo commented Nov 7, 2019

@arendst Latest changes do NOT work - same problem with the sensor readings maxed out.

However, when I uncomment the line:
delay(40); // Wait for Valid data or use Stale data
it works fine.

Thank you very much for putting this together. You made my week!

@arendst
Copy link
Owner

arendst commented Nov 7, 2019

OK thx for testing. I hate to add delays but as this is within my limits (;-)) I'll insert it.

Will release soon.

arendst added a commit that referenced this issue Nov 7, 2019
Fix Valid data reading (#6808)
@arendst
Copy link
Owner

arendst commented Nov 7, 2019

Final test please.

@thepotoo
Copy link
Author

thepotoo commented Nov 7, 2019

Gotta go to work, will test tonight and close this if everything works.

I would love for there to be some option to toggle between these and the PCF82xx so I don't have to make my own build. But I understand if that's asking too much :)

Again thank you so much for this!

@arendst
Copy link
Owner

arendst commented Nov 7, 2019

The toggle is already in place but probably not documented yet.

Use command I2cDriver2 0 to disable PCF8574 support. It will restart and should pick up your Honeywell sensor. Unless you have a LCD display also configured. Then you will have to use command I2CDriver3 0 too.

See document I2CDEVICES.md in the root what I2cDriver indexes you can use to disable as there could be more before the HIH sensor is reached within the I2C startup sequence.

@thepotoo
Copy link
Author

thepotoo commented Nov 7, 2019

Works like a charm!

It does not seem to be enabled in the standard tasmota-senors build; i2cdriver2 0 does not seem to have any effect. Obviously once I enable #define USE_HIH6 everything works.

I am still experimenting with these sensors, and will try to update the wiki with how things go. So far it does not seem like the two 2.2k pullup resistors shown in the wiring diagram are needed.

@thepotoo
Copy link
Author

thepotoo commented Nov 8, 2019

I wrote this up in the wiki here. I deployed 8 of these yesterday in various wet areas and so far there have been no issues at all.

@thepotoo thepotoo closed this as completed Nov 8, 2019
@andrethomas
Copy link
Contributor

@thepotoo Good to hear & thanks for the feedback and writing up the wiki article - I think @meingraham will most likely integrate it into the rest of the wiki :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Action - Waiting for response or more information enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

No branches or pull requests

4 participants