Closed Sleinous closed 1 month ago
Hey there @michsior14, mind taking a look at this issue as it has been labeled with an integration (kaiterra
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
kaiterra documentation kaiterra source (message by IssueLinks)
Same issue on my side:
Version | core-2023.4.2 Installation Type | Home Assistant OS
File "/usr/local/lib/python3.10/site-packages/yarl/_url.py", line 389, in origin raise ValueError("URL should be absolute") ValueError: URL should be absolute
@Sleinous, @jetblackDolphin I just checked and I can't reproduce it on my end. Can you ensure that all devices id's are just plain uuid? Meaning, they are not ending with /
?
Tested with official test device:
kaiterra:
api_key: api_key
devices:
- device_id: 00000000-0001-0001-0000-00007e57c0de
type: laseregg
- device_id: 00000000-0031-0001-0000-00007e57c0de
type: sensedge
Fyi my device is kaiterra sensedge mini and not the egg, worked flawlessly for months until recent ha update. No slash on my uuid
Envoyé à partir de Outlook pour Androidhttps://aka.ms/AAb9ysg
From: Michał Mrozek @.> Sent: Tuesday, April 11, 2023 6:50:45 PM To: home-assistant/core @.> Cc: Sleinous @.>; Mention @.> Subject: Re: [home-assistant/core] Kaiterra Integration no longer working - ValueError: URL should be absolute (Issue #91234)
@Sleinoushttps://github.com/Sleinous, @jetblackDolphinhttps://github.com/jetblackDolphin I just checked and I can't reproduce it on my end. Can you ensure that all devices id's are just plain uuid? Meaning, they are not ending with /?
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/91234#issuecomment-1503766771, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIAUWR3GVGCCBZ6GZDAOVTDXAWDWLANCNFSM6AAAAAAW2NIZN4. You are receiving this because you were mentioned.Message ID: @.***>
Out of curiosity could you check if it works with the test device I posted above? Maybe it has something to do with regional split kaiterra introduced last year.
Also are you by any chance setting preferred_units
?
@Michsior14 Same situation here, with that same final Value Error…..It worked for months but something broke up during the latest updates.
I’ve deleted my settings and put yours in order to test if it works and actually I can confirm that it works. I have a sensedge and the only added value I always had are:
aqi_standard: us scan_interval: 30
I’ve just tried deleting these value but nothing changed….it gives error again and I haven’t set preferred unit at all.
Since I don't own any of those devices, is anyone able to share with api key and device id for testing? If so, please send and email to address on my profile (you can also encrypt it if you want).
You can also try to debug directly on the lib by your own and make a PR with the fix if found.
Hi there, No worries I will setup an extra api key for you and send you one of my kaiterra device ids for testing. Will send today
From: Michał Mrozek @.> Sent: 12 April 2023 09:54 To: home-assistant/core @.> Cc: Sleinous @.>; Mention @.> Subject: Re: [home-assistant/core] Kaiterra Integration no longer working - ValueError: URL should be absolute (Issue #91234)
Since I don't own any of those devices, is anyone able to share with api key and device id for testing? If so, please send and email to address on my profile (you can also encrypt it if you wanthttps://github.com/Michsior14.gpg).
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/91234#issuecomment-1504826703, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIAUWR6J3XSGHWK2SJVAAWDXAZNQVANCNFSM6AAAAAAW2NIZN4. You are receiving this because you were mentioned.Message ID: @.**@.>>
Out of curiosity could you check if it works with the test device I posted above? Maybe it has something to do with regional split kaiterra introduced last year.
Also are you by any chance setting
preferred_units
?
Yes, I did : preferred_units: ppb
I've got test credentials from @Sleinous and can reproduce it now. Will work on the fix. In meantime it seems that setting the device type to laseregg
works as a workaround (probably without specific functionalities of sensedge).
Could someone test the fix by extracting this in custom_components folder? No config changes needed.
EDIT: new file kaiterra.tar.gz
Ok will test in 5mins, thanks
From: Michał Mrozek @.> Sent: 12 April 2023 14:50 To: home-assistant/core @.> Cc: Sleinous @.>; Mention @.> Subject: Re: [home-assistant/core] Kaiterra Integration no longer working - ValueError: URL should be absolute (Issue #91234)
Could someone test the fix by extracting this in custom_components folder? No config changes needed.
kaiterra.tar.gzhttps://github.com/home-assistant/core/files/11211557/kaiterra.tar.gz
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/91234#issuecomment-1505218911, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIAUWR2KIWKYNRZBMROBNCLXA2QGPANCNFSM6AAAAAAW2NIZN4. You are receiving this because you were mentioned.Message ID: @.**@.>>
I see no change upon restart of HA, all sensedge mini’s are still ‘unavailable’
From: Michał Mrozek @.> Sent: 12 April 2023 14:50 To: home-assistant/core @.> Cc: Sleinous @.>; Mention @.> Subject: Re: [home-assistant/core] Kaiterra Integration no longer working - ValueError: URL should be absolute (Issue #91234)
Could someone test the fix by extracting this in custom_components folder? No config changes needed.
kaiterra.tar.gzhttps://github.com/home-assistant/core/files/11211557/kaiterra.tar.gz
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/91234#issuecomment-1505218911, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIAUWR2KIWKYNRZBMROBNCLXA2QGPANCNFSM6AAAAAAW2NIZN4. You are receiving this because you were mentioned.Message ID: @.**@.>>
Looks like the version is required in the manifest for custom_components to work. Please try with this: kaiterra.tar.gz
Thanks! 😊 Latest custom_components is working :
@.***
From: Michał Mrozek @.> Sent: 12 April 2023 17:00 To: home-assistant/core @.> Cc: Sleinous @.>; Mention @.> Subject: Re: [home-assistant/core] Kaiterra Integration no longer working - ValueError: URL should be absolute (Issue #91234)
Looks like the version is required in the manifest for custom_components to work. Please try with this: kaiterra.tar.gzhttps://github.com/home-assistant/core/files/11212828/kaiterra.tar.gz
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/91234#issuecomment-1505430389, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIAUWRY63DWZ27O6KEQH4DLXA27QDANCNFSM6AAAAAAW2NIZN4. You are receiving this because you were mentioned.Message ID: @.**@.>>
Are there any news on this fix? From what I've understood the dev made it work but he still need to merge the final code into HA. Can we help in some way to speed it up?
+1
From: Undec0de @.> Sent: 27 April 2023 08:51 To: home-assistant/core @.> Cc: Sleinous @.>; Mention @.> Subject: Re: [home-assistant/core] Kaiterra Integration no longer working - ValueError: URL should be absolute (Issue #91234)
Are there any news on this fix? From what I've understood the dev made it work but he still need to merge the final code into HA. Can we help in some way to speed it up?
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/91234#issuecomment-1524887392, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIAUWR45YAT2VY7UNOM2YV3XDIJNLANCNFSM6AAAAAAW2NIZN4. You are receiving this because you were mentioned.Message ID: @.**@.>>
Are there any news on this fix? From what I've understood the dev made it work but he still need to merge the final code into HA. Can we help in some way to speed it up?
HA team requested to migrate the integration to config flow, unfortunately I don't have much time to work on this at the moment. If someone would be able to help it would speed this a lot ;)
Unfortunately I'm not a programmer otherwise I would have helped since the beginning. I hope someone could try to help you or you can find some extra time in order to finalize and release it.
I hope for the best...in the meantime thanks a lot and have a nice day.
Andrea
Il giorno gio 27 apr 2023 alle ore 10:05 Michał Mrozek < @.***> ha scritto:
Are there any news on this fix? From what I've understood the dev made it work but he still need to merge the final code into HA. Can we help in some way to speed it up?
HA team requested to migrate the integration to config flow, unfortunately I don't have much time to work on this at the moment. If someone would be able to help it would speed this a lot ;)
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/91234#issuecomment-1525054059, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3JTBBC7AQ33KEBO3IGF43TXDISEJANCNFSM6AAAAAAW2NIZN4 . You are receiving this because you commented.Message ID: @.***>
-- ANDREA AMEDEO Mobile - +39.3931187268 eMail - @.*** LinkedIn - www.linkedin.com/in/amedeoandrea Twitter - @AndreaAmedeo
AVVERTENZE AI SENSI DEL DLGS 196/2003 e del Regolamento UE 2016/679 Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema; costituisce comportamento contrario ai principi dettati dal Dlgs. 196/2003 e del Regolamento UE 2016/679 il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse.
CONFIDENTIALITY NOTICE This message and its attachments (if any) may contain confidential, proprietary or legally privileged information and is intended only for the use of the addressee named above. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient of this message you are hereby notified that you must not use, disseminate, copy it in any form or take any action in reliance on it. If you have received this message in error please delete it and kindly inform the sender of this e-mail by replying.
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 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Hello, is anyone able to help migrate the integration to config flow?
Hello, is anyone able to help migrate the integration to config flow?
I've made a start with it, but so far it has just been setting up the config flow. I haven't had success in connecting to the API so far.
I have a sensedge mini with the same problem. With the workarround device type: laseregg I got 3 entities: laseregg Humidity 59,02%, laseregg Temperature 26,72 °C, laseregg Air Quality 20 µg/m³ a. How kan I get the other entities? b. Is there already a solution for this problem?
I did put the kaiterra.tar in a new kaiterra folder in custom_components. This is not working for me.
What can I do?
Logger: homeassistant.setup Source: components/kaiterra/api_data.py:56 First occurred: 09:41:47 (1 occurrences) Last logged: 09:41:47
Error during setup of component kaiterra Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 288, in _async_setup_component result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/kaiterra/init.py", line 67, in async_setup await api.async_update() File "/usr/src/homeassistant/homeassistant/components/kaiterra/api_data.py", line 56, in async_update data = await self._api.get_latest_sensor_readings(self._devices) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/kaiterra_async_client/client.py", line 144, in get_latest_sensor_readings r = await self._do_request( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/kaiterra_async_client/client.py", line 199, in _do_request async with self._session.post(url, params=params, headers=headers, json=json, raise_for_status=True) as r: File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in aenter self._resp = await self._coro ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 628, in _request if url.origin() != parsed_url.origin(): ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yarl/_url.py", line 399, in origin raise ValueError("URL should be absolute") ValueError: URL should be absolute
Your error is not for the custom component. Did you directly place the kaiterra.tar
file in your custom_components
folder? You have to extract the .tar
file first (using something like 7-zip). There's a kaiterra
folder in there, which you should place in custom_components
. Doing that worked for me at least.
Thanks a lot. It works! but I still get only the laseregg entities. I tried a restart and a new Api key. Any idea how come?
Ah I'm afraid I don't. I only have a sensedge and those entities show up in my front end...
Tanks for the quick reply! I also have only a sensedge mini. I tried the work around and that gave these entities. And these entities are still there while I changed the name of my device in sensedge. You get all the entities from your sensedge?
I changed nothing, kinda just dragged and dropped (and was surprised it worked that easily haha). My current config is like this.
kaiterra:
api_key: !secret kaiterra_API
devices:
- device_id: !secret kaiterra_id
type: sensedge
However, it could be that because you did the workaround, home assistant has already set the entity id's with the laseregg. It may work if you remove the entire entity from your configuration.yaml
, restart home assistant and make sure the entities are gone, and then add the config like mine (with your own keys/id's ofc). Otherwise, I believe you should also be able to rename the entity_id's by hand from their info screen.
Thanks again. I have the same config. I removed that and a restart. The names are ok but I still got only 3 entities.
Hmm do you mean you wanted the other sensor values as well? I also only get 3 entities, though as far as I know that's how the integration is supposed to work. The other values the API retrieves are put in the attributes of the air quality entity.
Thanks a lot. I got it!
Hi all. I'm very new to Home Assistant (just a few days under my belt) and as novice as it comes for programming. I have a kaiterra sensedge mini, and I managed to get the device recognized by changing the type to 'laseregg'.
I see the following widget on my dashboard, which isn't really displaying anything of value... It looks like it is maybe defaulting to one of the PM readings (ug/m3)
But if I open it up and expand the attributes section, it does actually display all the sensor results:
What can I do to get these attributes displayed on the home screen dashboard?
Thanks Scott
Hi Scott
See: https://community.home-assistant.io/t/new-helper-entity-from-attribute/461078
This is working for me: in Configuration.yaml sensor: !include sensors.yaml kaiterra: api_key: xxxxxxxxxx devices:
in Sensors.yaml
platform sensors: sensedge_co2: value_template: "{{ state_attr('air_quality.sensedge_air_quality', 'carbon_dioxide') }}" device_class: carbon_dioxide unit_of_measurement: ppm
sensedge_pm2_5:
value_template: "{{ state_attr('air_quality.sensedge_air_quality', 'particulate_matter_2_5') }}"
device_class: pm25
unit_of_measurement: µg/m3
sensedge_tvoc:
value_template: "{{ state_attr('air_quality.sensedge_air_quality', 'volatile_organic_compounds') }}"
device_class: volatile_organic_compounds
unit_of_measurement: ppb
sensedge_overal_index:
value_template: "{{ state_attr('air_quality.sensedge_air_quality', 'air_quality_index') }}"
unit_of_measurement: US
sensedge_luchtkwaliteit:
value_template: "{{ state_attr('air_quality.sensedge_air_quality', 'air_quality_index_level') }}"
sensedge_pm10:
value_template: "{{ state_attr('air_quality.sensedge_air_quality', 'particulate_matter_10') }}"
device_class: pm10
unit_of_measurement: µg/m3
Hi Kees, Thanks for the reply. I don't want to belabor it and take away from this thread, but I do not see a sensors.yaml file in my list on File Editor. Is this a new file I should create myself and then use the code you've referenced above? Thanks, Scott
Yes. You can make a separate sensors.yaml file. Or you can put everything in the confogiration.yaml. Making a separate file is more organized. I am also a beginner. It works fine for me now but I have tried a lot. Regards Kees
Verzonden vanaf Outlook voor Androidhttps://aka.ms/AAb9ysg
From: scottfarbman @.> Sent: Wednesday, November 1, 2023 11:35:59 PM To: home-assistant/core @.> Cc: Kees48 @.>; Comment @.> Subject: Re: [home-assistant/core] Kaiterra Integration no longer working - ValueError: URL should be absolute (Issue #91234)
Hi Kees, Thanks for the reply. I don't want to belabor it and take away from this thread, but I do not see a sensors.yaml file in my list on File Editor. Is this a new file I should create myself and then use the code you've referenced above? Thanks, Scott
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/91234#issuecomment-1789783852, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BBCLBXE23DXDBLF5BY2WZ2DYCLFE7AVCNFSM6AAAAAAW2NIZN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBZG44DGOBVGI. You are receiving this because you commented.Message ID: @.***>
For what it is worth, I was able to pull out the 2 following attributes using the following code in the sensor.yaml
- platform: template
sensor:
sensedge_co2:
value_template: "{{ state_attr('air_quality.laseregg_air_quality', 'carbon_dioxide') }}"
device_class: carbon_dioxide
unit_of_measurement: ppm
- platform: template
sensor:
sensedge_tvoc:
value_template: "{{ state_attr('air_quality.laseregg_air_quality', 'volatile_organic_compounds') }}"
device_class: volatile_organic_compounds
unit_of_measurement: ppb
Now you must try to find a configuration with de sensedge and not the laseregg. See discussions in this topic of september.
@Kees48 - I was speaking with my contact at Kaiterra and he said that on their end, the Sensedge Mini (what I have) does need to use the 'laseregg' tag, and it is something they need to update some day.
You can use the solution I mentioned. That works fine for me.
Verzonden vanaf Outlook voor Androidhttps://aka.ms/AAb9ysg
From: scottfarbman @.> Sent: Thursday, November 2, 2023 9:04:09 PM To: home-assistant/core @.> Cc: Kees48 @.>; Mention @.> Subject: Re: [home-assistant/core] Kaiterra Integration no longer working - ValueError: URL should be absolute (Issue #91234)
@Kees48https://github.com/Kees48 - I was speaking with my contact at Kaiterra and he said that on their end, the Sensedge Mini (what I have) does need to use the 'laseregg' tag, and it is something they need to update some day.
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/91234#issuecomment-1791464166, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BBCLBXHTMCIEAO5R4BR6Y4TYCP4DTAVCNFSM6AAAAAAW2NIZN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJRGQ3DIMJWGY. You are receiving this because you were mentioned.Message ID: @.***>
@Kees48 I guess I don't really see why it matters. You aren't getting anything different, data wise, from the API, are you?
See solution of Slalamander] in this topic
The above info + humidity and temperature.
@Kees48 I'm getting all that with the 'laseregg' tag. We are receiving the exact same data...
In the beginning I thought that due to the "laseregg" solution I got not enough info. Then I found the "sensedge" solution but still not ok until I found out how to handle the attributes.
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 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Still not fixed.
Envoyé à partir de Outlook pour Androidhttps://aka.ms/AAb9ysg
From: issue-triage-workflows[bot] @.> Sent: Wednesday, January 31, 2024 10:06:21 PM To: home-assistant/core @.> Cc: Sleinous @.>; Mention @.> Subject: Re: [home-assistant/core] Kaiterra Integration no longer working - ValueError: URL should be absolute (Issue #91234)
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 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/91234#issuecomment-1919958334, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIAUWR4DBBSLBRUZGUAOGX3YRKW43AVCNFSM6AAAAAAW2NIZN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJZHE2TQMZTGQ. You are receiving this because you were mentioned.Message ID: @.***>
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 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
The Kaiterra integration no longer works since atleast a month (broke during an HA update) Logs found below point to the following : ValueError: URL should be absolute
What version of Home Assistant Core has the issue?
core-2023.4.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
kaiterra
Link to integration documentation on our website
https://www.home-assistant.io/integrations/kaiterra/
Diagnostics information
Logger: homeassistant.setup Source: components/kaiterra/api_data.py:57 First occurred: 9 April 2023 at 09:33:22 (1 occurrences) Last logged: 9 April 2023 at 09:33:22
Error during setup of component kaiterra Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 256, in _async_setup_component result = await task File "/usr/src/homeassistant/homeassistant/components/kaiterra/init.py", line 67, in async_setup await api.async_update() File "/usr/src/homeassistant/homeassistant/components/kaiterra/api_data.py", line 57, in async_update data = await self._api.get_latest_sensor_readings(self._devices) File "/usr/local/lib/python3.10/site-packages/kaiterra_async_client/client.py", line 144, in get_latest_sensor_readings r = await self._do_request( File "/usr/local/lib/python3.10/site-packages/kaiterra_async_client/client.py", line 199, in _do_request async with self._session.post(url, params=params, headers=headers, json=json, raise_for_status=True) as r: File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in aenter self._resp = await self._coro File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 628, in _request if url.origin() != parsed_url.origin(): File "/usr/local/lib/python3.10/site-packages/yarl/_url.py", line 389, in origin raise ValueError("URL should be absolute") ValueError: URL should be absolute
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
Error has crept up since a month or so ; all HA instances in the family using kaiterra integration are experiencing this issue