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

Upgrade Adafruit-DHT to 1.3.3 #15706

Merged
merged 4 commits into from
Jul 30, 2018
Merged

Upgrade Adafruit-DHT to 1.3.3 #15706

merged 4 commits into from
Jul 30, 2018

Conversation

superpuffin
Copy link
Contributor

@superpuffin superpuffin commented Jul 27, 2018

The package Adafruit_Python_DHT==1.3.2 was broken and would not install, breaking DHT sensor support in Home assistant. It has since been fixed in Adafruit-DHT==1.3.3.

See: adafruit/Adafruit_Python_DHT#99

Description:

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

The package Adafruit_Python_DHT==1.3.2 was broken and would not install, breaking DHT sensor support in Home assistant. It has since been fixed in Adafruit-DHT==1.3.3.

See: adafruit/Adafruit_Python_DHT#99
@homeassistant
Copy link
Contributor

Hi @superpuffin,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copy link
Member

@fabaff fabaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See checklist:

  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.

@awarecan awarecan changed the title Change to newer pip package Upgrade Adafruit-DHT to 1.3.3 Jul 27, 2018
New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
Adafruit_Python_DHT changed name to Adafruit-DHT, which still need pyx support breaking our CI, need to be comment out.
@ghost ghost assigned awarecan Jul 27, 2018
@pvizeli
Copy link
Member

pvizeli commented Jul 28, 2018

After this is merged, we need add the changes also to Hass.io

@awarecan
Copy link
Contributor

awarecan commented Jul 30, 2018

@fabaff will you approve this?

@Vanuan
Copy link

Vanuan commented Aug 2, 2018

@pvizeli Could you please look at #15788 regarding support of DHT in hassio?

@kaiomatico
Copy link

So is this fix included in 0.75? If not, is there any way to run dev on hassOS to have the fix included / to test it? Thanks in advance

@awarecan
Copy link
Contributor

awarecan commented Aug 3, 2018

Not in 0.75, it missed train. hassOS/hass.io problem please ask in forum or discord, not under this PR.

@balloob balloob modified the milestones: 0.75, 0.75.1 Aug 4, 2018
balloob pushed a commit that referenced this pull request Aug 4, 2018
* Change to newer pip package

The package Adafruit_Python_DHT==1.3.2 was broken and would not install, breaking DHT sensor support in Home assistant. It has since been fixed in Adafruit-DHT==1.3.3.

See: adafruit/Adafruit_Python_DHT#99

* Update requirements_all.txt

New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.

* Comment out Adafruit-DHT

Adafruit_Python_DHT changed name to Adafruit-DHT, which still need pyx support breaking our CI, need to be comment out.

* Update requirements_all.txt
@balloob balloob mentioned this pull request Aug 4, 2018
@RssFra97
Copy link

RssFra97 commented Aug 5, 2018

Buongirno, I return these errors, how do I solve?

2018-08-05 07:51:58 ERROR (MainThread) [homeassistant.components.sensor] dht: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 322, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/dht.py", line 122, in update
    self.dht_client.update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 325, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/dht.py", line 157, in update
    self.sensor, self.pin)
  File "/usr/local/lib/python3.6/site-packages/Adafruit_DHT/common.py", line 94, in read_retry
    humidity, temperature = read(sensor, pin, platform)
  File "/usr/local/lib/python3.6/site-packages/Adafruit_DHT/common.py", line 80, in read
    platform = get_platform()
  File "/usr/local/lib/python3.6/site-packages/Adafruit_DHT/common.py", line 63, in get_platform
    raise RuntimeError('Unknown platform.')
RuntimeError: Unknown platform.

my config

sensor:
    - platform: dht
      sensor: DHT11
      pin: 24
      monitored_conditions:
         - temperature
         - humidity

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Aug 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants