Git Product home page Git Product logo

hatch_rest_api's People

Contributors

bmcclure avatar brentdur avatar chriscarini avatar dahlb avatar kmstumpff avatar kylebjordahl avatar ripgixxer avatar trevorglaser avatar w1ll1am23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hatch_rest_api's Issues

Two sound machines went offline

Describe the bug
Entities in Home Assistant didn't report unavailable but no interactions worked. Wasn't running debug logs :(

To Reproduce
Unknown. Maybe my token expired?

Expected behavior
Devices continue to work without needing a HA reboot.

Screenshots
None

Additional context
Also noticed the wifi sensor stated disconnected so some sensors got created but some of the entities failed to function specifically the media player.

Did look at full log but noticed this.

Logger: homeassistant.components.media_player
Source: custom_components/ha_hatch/riot_media_entity.py:48
Integration: Media player (documentation, issues)
First occurred: January 22, 2023 at 9:04:49 PM (4 occurrences)
Last logged: January 22, 2023 at 9:09:10 PM

Error adding entities for domain media_player with platform ha_hatch
Error while setting up ha_hatch platform for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 438, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 709, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 803, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/ha_hatch/rest_entity.py", line 52, in async_added_to_hass
    self._update_local_state()
  File "/config/custom_components/ha_hatch/riot_media_entity.py", line 48, in _update_local_state
    _LOGGER.debug(f"updating state:{self.rest_device}")
  File "/usr/local/lib/python3.10/site-packages/hatch_rest_api/riot.py", line 120, in __str__
    return f"{self.__repr__()}"
  File "/usr/local/lib/python3.10/site-packages/hatch_rest_api/riot.py", line 113, in __repr__
    "is_clock_on": self.is_clock_on,
  File "/usr/local/lib/python3.10/site-packages/hatch_rest_api/riot.py", line 136, in is_clock_on
    return self.flags & RIOT_FLAGS_CLOCK_ON
TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'

Example on Using API

Hi,

Would be great if there was a simple example on how to use the package to make requests against the Hatch Rest.

Thanks,
M.

Request Storm

I work at Hatch. We are being alerted by our production systems of some possible bugs in your project. MQTT client connection attempts are being throttled by AWS:
image

AWS have strict limits on the number of connection attempts from a single client id:
image
https://docs.aws.amazon.com/general/latest/gr/iot-core.html
image
https://docs.aws.amazon.com/iot/latest/developerguide/metrics_dimensions.html

From the Cloudwatch graph, it looks like connect requests are coming in at over 1/second, resulting in ClientIdThrottle events (resulting in my pager going off during the night :-)

I hope you can track down this bug and prevent the code from issuing so many client connection requests to MQTT.

Support for gen 2 products

Is your feature request related to a problem? Please describe.
I'd like to use this library and associated custom component with the gen 2 hatch products

Describe the solution you'd like
I have created Home Assistant integrations and their backing libraries in the past (several years back) but have very little experience with async/newer Home Assistant integrations so would like to see if we could get this support added together.

Do you have/or could you create a guide on how I might go about using this library to investigate what might be needed? For example, is there a testing script that could be added that would allow manually interacting with this library and the hatch API? I tried manually installed this library and importing from hatch_rest_api import get_rest_devices but that is throwing an error.

Looking at homebridge-hatch the first thing I think would need to happen is adding riot and riotPlus as device types in the iotProducts url params.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.