hella-info / onyx_api Goto Github PK
View Code? Open in Web Editor NEWSpecification of the public ONYX API
Specification of the public ONYX API
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'
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
?
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).
switch_drive_direction
.According to muhlba91/onyx-homeassistant-integration#8 (comment) we see a device type click
got exposed by the API v3 including a field offline
.
However, the field and device type is not documented. Could you please include this device type (and others if existing) including their fields and properties in the documentation?
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?
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.
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:
Is this behaviour working as designed or do I have a possibility to receive those value updates faster?
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:
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.
Documentation does not mention platform (Linux or Windows).
Data:
-d '{"code" : "H99xV2yT"}'
does not work for me
-d "{\"code\" : \"H99xV2yT\"}"
does work for me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.