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

Dweep.io - dweep component - not working #5044

Closed
mik1893 opened this issue Dec 22, 2016 · 8 comments
Closed

Dweep.io - dweep component - not working #5044

mik1893 opened this issue Dec 22, 2016 · 8 comments
Assignees

Comments

@mik1893
Copy link

mik1893 commented Dec 22, 2016

Home Assistant release (hass --version):
0.34.5

Python release (python3 --version):
3.4.2

Component/platform:
dweep

Description of problem:
dweep component is not working. After being configured it just throws error
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/sensor/dweet.py#L118
"Device could not be found"

even if the device exists and can be retrieved from python bash directly

Expected:
dweep component retrieving values properly

Problem-relevant configuration.yaml entries and steps to reproduce:

  - platform: dweet
    name: Temperature
    device: mik1893MeteoStation
    value_template: '{{ value_json.temperature }}'
    unit_of_measurement: "°C"
  1. Install properly dweepy python library (pip install --upgrade dweepy) where needed (in virtualEnv if using it)
  2. Start hass service
  3. Get error in the log saying device cannot be found
  4. Running the same command used in https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/sensor/dweet.py works, directly from python
    e.g.
import dweepy
dweepy.get_latest_dweet_for('mik1893MeteoStation')

will return

[{'content': {'humidity': 30, 'temperature': 23.4125}, 'thing': 'mik1893MeteoStation', 'created': '2016-12-22T15:41:07.284Z'}]

Traceback (if applicable):

16-12-22 16:52:48 homeassistant.components.sensor.dweet: Device 'mik1893MeteoStation' could not be found

Additional info:

@fabaff fabaff self-assigned this Dec 22, 2016
@fabaff
Copy link
Member

fabaff commented Dec 22, 2016

I think that the problem is that we are hitting the API too fast. As fare as I remember is only one request per second allowed.

@pvizeli
Copy link
Member

pvizeli commented Dec 23, 2016

We can controll the update rate with scan_interval on platform config. And a platform developer can add SCAN_INTERVAL as static variable on top of his code.

@mik1893
Copy link
Author

mik1893 commented Dec 23, 2016

i'll try and see if that's the case! thanks!!!!!!!

@fabaff
Copy link
Member

fabaff commented Dec 25, 2016

It's the reason for the throttle in the Dweet.io exporter component.

@michaelarnauts
Copy link
Contributor

Also, it seems the dweepy library is having issues with python 3.5 due to a stupid encoding bug in their readme. See paddycarey/dweepy#8
I'm not sure if this library is maintained anymore...

@michaelarnauts
Copy link
Contributor

Never mind my remark, you need to pass the utf8 locale to tox whenever the tests needs to run.

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@balloobbot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@home-assistant home-assistant locked and limited conversation to collaborators Jul 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants