Comments (17)
awesome! i just saw that your dimmable light is registered in the same onyx.center instance? maybe that was the cause of this issue and not the awning itself… 😃
cool! yes, please open an issue there. additionally, i openend an issue already for the lights and tagged you in a comment for additional information, if you are happy to support with data. 😉
from onyx_api.
I just called /events
and narrowed it down to "Terrasse 1 links" as before:
event: snapshot
data: {"devices":{"32d88906-1d53-4eb8-be89-225c570c8625":{"name":"Terrasse 1 links","type":"pergola_awning_roof","actions":["close","open","stop","wink"],"properties":{"actual_angle":{"type":"numeric","minimum":0,"maximum":360,"value":0,"readonly":true},"actual_position":{"type":"numeric","minimum":0,"maximum":100,"value":100,"readonly":true},"system_state":{"type":"enumeration","value":"ok","values":["collision","collision_not_calibrated","not_calibrated","ok"],"readonly":true},"target_angle":{"type":"numeric","minimum":0,"maximum":360,"value":0,"readonly":false},"target_position":{"type":"numeric","minimum":0,"maximum":100,"value":100,"readonly":false}}}
event: patch
data: {"devices":{"32d88906-1d53-4eb8-be89-225c570c8625":{"properties":{"actual_position":{"animation":{"current_value":100,"keyframes":[{"delay":0,"duration":79.757,"interpolation":"linear","value":0}],"start":1702285632.9585707}},"target_position":{"value":0}}}}}
event: patch
data: {"devices":{"32d88906-1d53-4eb8-be89-225c570c8625":{"properties":{"actual_position":{"animation":{"current_value":96,"keyframes":[{"delay":0.5,"duration":3.125,"interpolation":"linear","value":100}],"start":1702285636.2502365},"value":96},"target_position":{"value":100}}}}}
Unfortunately I see no difference when comparing it to /devices/32d88906-1d53-4eb8-be89-225c570c8625
from onyx_api.
could you check how the JSON of the pergola roof looks like?
to me the error looks like the ONYX API doesn‘t return a device_type
property, and, hence, the HA integration/Python client doesn‘t set the property upon which i‘m performing the is_shutter
check.
reading that Google Home also doesn‘t show that device, i presume this is the root cause there as well.
so the questions from my side are how the actual JSON looks and if all values are intended by Hella as they are and, in fact, that the API is changing, or whether there‘s a bug they need to fix in order to populate this missing field correctly for all devices.
as for the HA integration, i assume this error renders it kinda non-funtioning? it probably makes sense for me to catch such errors and make sure the integration works with such devices being ignored…
from onyx_api.
Hi @muhlba91,
for the JSON i could see the following in the debug logs of the onyx app:
"device_type": { "type": "enumeration", "name": "device_type", "default": "rollershutter", "value": "pergola_awning_roof", "values": [ "awning", "basic_light", "pergola_awning_roof", "pergola_side", "pergola_slat_roof", "raffstore_180", "raffstore_90", "rollershutter", "veneer" ],
Regarding your assumption, I was thinking the same thing.
Furthermore, I assume that the fact that the is_shutter check returns no devices, the whole onyx center is dropped. This is because three dimmable lamps and an ONYX.Weather are also connected to the ONYX.Centre, which are supported in principle, but are also not transferred to HA.
from onyx_api.
if this is the official JSON without any mutation by the app which gets returned by the API as well, then this is not expected/is different to what other devices return.
the full JSON return value of the actual API request would be useful though but from that log excerpt i believe there was/is an API change that is not consistently done over all devices…
a sample format of how a rollershutter/awning looks like is tested in the underlying Python client: https://github.com/muhlba91/onyx-client/blob/main/tests/test_client.py#L294
looking at the properties of the device type, they are inherently different to all other shutters.
the weather device should be showing up in HA by now. i added support for that device a couple of weeks ago as it was requested by 2 other users which also beta-tested it since i don‘t have a device myself to test.
the lamps are unsupported by the integration as i don‘t have a testing device either. since those lamps are dimmable it‘ll be more work to add those, especially without any device at hand, because the integration also needs to support the dimming function correctly (e.g. for the shutters i had to do some interesting conversion from Hella values to HA value range).
you could open an issue in the HA integration repository with the results of the API response for a sample device, if you are happy to beta-test such devices. i need the actualy JSON response of the API call to the device‘s endpoint to make sure i have a real world value at hand. best would be to get multiple ones like „off“, „10%“, „80%, „100%“ to see how the values change with the dimming.
i‘ll try to add better error handling in the next week to ensure the integration drops this device and all other supported devices are still working.
from onyx_api.
Below the full JSON return of the API request when calling /devices
(hope that helps in any way?):
{ "21e6048b-adf1-41b0-833f-82452cdc5fad": { "name": "Licht links", "type": "dimmable_light" }, "2609269a-cc71-4a72-8d58-db72ec733dbc": { "name": "Licht mitte", "type": "dimmable_light" }, "32d88906-1d53-4eb8-be89-225c570c8625": { "name": "Terrasse 1 links", "type": "pergola_awning_roof" }, "4cc8635e-808c-44a1-aca5-7c670497665e": { "name": "Terrasse 3 rechts", "type": "pergola_awning_roof" }, "835857a1-304b-44b4-b4ea-586f0875462b": { "name": "Terrasse 2 Mitte", "type": "pergola_awning_roof" }, "8cfc071f-e522-40f7-a7da-58f8108b2f4a": { "name": "Handsender", "type": "click" }, "9194c6c2-3c28-46c8-975b-5dc286f07c3a": { "name": "WEATHER 01-00-0B-04", "type": "weather" }, "b1dcfe00-9fb0-470a-8c78-f9da47af3995": { "name": "Licht rechts", "type": "dimmable_light" } }
For the lights I will head over to HA integration repository, but that is secondary
from onyx_api.
could you also call /devices/32d88906-1d53-4eb8-be89-225c570c8625
as that should return the entire entity state of that specific pergola awning.
and i think the type
and different device_type
is an interesting one now. let‘s wait for Hella‘s official feedback to see if they changed their API or are up to fixing the device_type
to match the other devices.
from onyx_api.
Here you go :)
{ "name": "Terrasse 1 links", "type": "pergola_awning_roof", "actions": ["close", "open", "stop", "wink"], "properties": { "actual_angle": { "type": "numeric", "minimum": 0, "maximum": 360, "value": 0, "readonly": true }, "actual_position": { "type": "numeric", "minimum": 0, "maximum": 100, "value": 100, "readonly": true }, "system_state": { "type": "enumeration", "value": "ok", "values": ["collision", "collision_not_calibrated", "not_calibrated", "ok"], "readonly": true }, "target_angle": { "type": "numeric", "minimum": 0, "maximum": 360, "value": 0, "readonly": false }, "target_position": { "type": "numeric", "minimum": 0, "maximum": 100, "value": 100, "readonly": false } } }
from onyx_api.
For a better comparison, I also called the API from the working ONYX.Center where there are three awnings connected and working in HA, you#ll find the return below:
{ "name": "REMISENBAR - links", "type": "awning", "actions": ["close", "open", "stop", "wink"], "properties": { "actual_angle": { "type": "numeric", "minimum": 0, "maximum": 360, "value": 0, "readonly": true }, "actual_position": { "type": "numeric", "minimum": 0, "maximum": 100, "value": 0, "readonly": true }, "system_state": { "type": "enumeration", "value": "ok", "values": ["collision", "collision_not_calibrated", "not_calibrated", "ok"], "readonly": true }, "target_angle": { "type": "numeric", "minimum": 0, "maximum": 360, "value": 0, "readonly": false }, "target_position": { "type": "numeric", "minimum": 0, "maximum": 100, "value": 0, "readonly": false } } }
from onyx_api.
thank you for this data!
it‘s quite interesting because seeing that entire device state i wouldn‘t spot the reason for it not working - that particular type is actually already supported by the Python client.
it was working as well because this mapping was added by a contributor who tested it back then. @MitterdorferMathias do you have inputs here since you added the support for those devices? do you spot a weird behaviour, ir a broken integration, too?
from onyx_api.
I assume that the problem is the missing device type for dimmable_light
.
I created a pull request and added the Implementation: muhlba91/onyx-client#89
Unfortunately I can not test the implementation on a real system.
from onyx_api.
I think that there is another bug somewhere as in the error description the device_type
attribute is None
, which should be DeviceType.UNKNOWN
in my opinion.
from onyx_api.
i just created a unit test for the return values @clostermannshof posted - the mapping to the correct device_type
works in the Python client (see https://github.com/muhlba91/onyx-client/blob/main/tests/test_client.py#L399).
there's another point where this could fail, too: the /events
endpoint used by the HA integration itself.
this endpoint should return the full device states upon opening the connection. based on this, the client creates the devices used by the integration. if this endpoint doesn't return the same device state as in the /devices/xyz
endpoint, it could lead to a different device type mapping. basically, for the integration, this is the source of truth. @clostermannshof, can you post the response to this endpoint as well (truncating it to include only the pergola)?
from onyx_api.
i published a new version v8.0.0-beta.3
of the integration which should ignore all devices without a device_type
. this should also get the integration working again instead of crashing if it encounters such a device.
just so you know, though, this version also includes a new way of handling the device updates in the background, which is currently being tested and WIP. i didn't encounter any unknown issues so far.
@clostermannshof would you care to test it? i do assume that you won't see the pergola awnings in HA since they threw the error but the integration should start working again at least.
from onyx_api.
@clostermannshof FYI:
Since October 2023 the products should also be visible in Google Home. Could you please recheck this? (Maybe you have to remove / add the Google Home Integration again in the Home App)
from onyx_api.
@muhlba91 I just installed v8.0.0-beta.3
, I don't know what exactly made a difference regarding pergola_awning_roof
, but I see it in HA now! 😍 weather sensor appeared as expected.
I have checked the functionality, basic functions like open and close work. Even if I enter a certain percentage of the opening in HA, e.g. 25% open, the pergola executes the command correctly. However, the value reached is not fed back into HA, i.e. I select 25% opening, the pergola moves to the correct position, but is still displayed as closed in HA. However regarding this I will also head over to HA integration repository as that is not a point for here
@MitterdorferMathias thats new to me, I'll have a look at this
from onyx_api.
@muhlba91 for sure, thanks a lot already!!
from onyx_api.
Related Issues (9)
- Provides samples wont work under Windows and curl 7.55.1 HOT 1
- actual_angle and target_angle maximum is always 360 HOT 2
- actual_position/actual_angle not reported as target_position/target_angle HOT 2
- Documentation: API version v1/v2 HOT 4
- sun_brightness_class was removed HOT 1
- API v3: switch_drive_direction property removed HOT 4
- API v3: documentation about click devices HOT 2
- API v3 /events - Timeout HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onyx_api.