Giter VIP home page Giter VIP logo

onyx_api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

onyx_api's Issues

API v3: support for pergola_awning_roof

We are using two ONYX.Center, one with 3x device type = awning and one with 3x "pergola canvas roof"(?).
When using the ha integration from @muhlba91 the ONYX.Center with awnings connects perfectly fine, however the ONYX.Center with pergola canvas roof shows no entities. Since pergola canvas roof is also not visible in google home I assume the fault lies in onyx_api?

When reloading onyx-homeassistant-integration I get the following in return:

2023-12-08 11:38:44.271 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up hella_onyx platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/hella_onyx/sensor.py", line 39, in async_setup_entry sensors = [ ^ File "/config/custom_components/hella_onyx/sensor.py", line 39, in <listcomp> sensors = [ ^ File "/config/custom_components/hella_onyx/sensor.py", line 47, in <lambda> lambda item: item[1].device_type.is_shutter() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'is_shutter'

Documentation: API version v1/v2

According to the API /version the devices support API versions v1 and v2.
Is there an updated documentation available on what changed, or especially got added, in v2?

API v3: switch_drive_direction property removed

In the newly released API v3, animation got introduced instead of drivetime and rotationtime up/down.

However, the property switch_drive_direction seems to be still supported in the (iOS) application and was an indicator if the values of open/close (0, 100) are inverted.
For example, the Home Assistant integration relied on this property to invert the positions accordingly.

Will this property (or a successor) be exposed again, or is this being handled entirely differently now with API v3?

As a reference I can provide muhlba91/onyx-homeassistant-integration#8 (comment).

  • Shutters/Raffstores I use seem to have "inverted" values in comparison to how Home Assistant is expecting them.
  • Awnings (Markise) seems to have an inverted value (compared to v2 incl. inversion computation using switch_drive_direction.

API v3 /events - Timeout

Hi,

I created the Python client (https://github.com/muhlba91/onyx-client) and the Home Assistant integration (https://github.com/muhlba91/onyx-homeassistant-integration).

I rely on your provided /events endpoint for device updates. This works well as long as the connection is kept open.
In the client, I set an indefinite timeout, which should keep the connection open from the client side forever - see https://github.com/muhlba91/onyx-client/blob/main/onyx_client/helpers/url.py#L87.
Unfortunately, every ~10 minutes, the connection closes, and I need to reopen it, which is not the purpose of such an events endpoint to have to reopen it every 10 minutes.

So far, a server-side connection timeout could cause this. Could you look at this and, if true, possibly set a server timeout for this endpoint to a much higher one than 10 minutes?

sun_brightness_class was removed

The sun_brightness_class property was removed for ONYX.WEATHER in API v1 which will break customers code when using that property!

Such changes shouldn't be made for released APIs. That can be done in v2, but not in v1 so that the customers/developers having the choice to use (older API or update to newer API ...).

Also missing "What's new" and documentation for v1.

actual_position/actual_angle not reported as target_position/target_angle

When sending the command to set a certain target position or angle, the raffstore/shutter performs the action correctly.
However, polling the device's state through the API does not report back success by setting the actual_position/actual_angle to the new value (the target_position/target_angle).

Interestingly, it seems the value gets updated either:

  • on issuing a new command (e.g. sending a STOP or any other command updates the value immediately),
  • tests showed that the value seems to be updated periodically every ~5 minutes (value deducted from observation)

Is this behaviour working as designed or do I have a possibility to receive those value updates faster?

actual_angle and target_angle maximum is always 360

Checking on device data, the maximum value for actual_angle and target_angle is always 360.

From testing, the shutters/raffstores support only the following maximum value depending on their type:

  • rollershutter: 0 (setting an angle is simply ignored)
  • raffstore_90: 90
  • raffstore_180: 180

This limits the ability to rely on the reported properties and I have to calculate the maximum angle manually in relation to the set type.

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.