Looks like it just populated some sensors with this morning’s test results after the most recent restart. Now the question is – Is there a way to pull in all the previous data? I have over 5 years in the app and 3 years on the cloud.
Home Assistant in general does not import past data (anywhere).
True, I guess I just need to figure out how to get it imported into something more useful for tracking long-term trends and not just running automatons. Thanks!
InfluxDB for storage. Grafana for display.
Already have those, so will just need figure out how to get it imported. Guessing it would be easier as a CSV and not the JSON.
Please ignore - my deleted post - it’s back to normal - seems that Poolmath changed my pool ID for some reason ![]()
Seeing this in my homeassistant logs: Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7f7c1f68d0>,) inside the event loop by custom integration ‘poolmath’ at custom_components/poolmath/client.py, line 69: async with httpx.AsyncClient() as client: (offender: /usr/local/lib/python3.12/site-packages/httpx/_config.py, line 149: context.load_verify_locations(cafile=cafile)), please create a bug report at [Custom Component] Pool Math sensors for pool chemicals and operations
Does the poolmath app keep changing the URL for sharing?
I find that it is constantly changing.
Seeing exactly the same here…
I am getting the same thing:
Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7f5596768200>,) inside the event loop by custom integration 'poolmath' at custom_components/poolmath/client.py, line 69: async with httpx.AsyncClient() as client: (offender: /usr/local/lib/python3.13/site-packages/httpx/_config.py, line 149: context.load_verify_locations(cafile=cafile)), please create a bug report at https://community.home-assistant.io/t/custom-component-pool-math-sensors-for-pool-chemicals-and-operations/435126 For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 708, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 679, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2027, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2366, in _async_forward_entry_setup result = await async_setup_component( File "/usr/src/homeassistant/homeassistant/setup.py", line 165, in async_setup_component result = await _async_setup_component(hass, domain, config) File "/usr/src/homeassistant/homeassistant/setup.py", line 416, in _async_setup_component result = await task File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 127, in async_setup await component.async_setup(config) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 150, in async_setup self.hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 841, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 311, in async_setup_platform await self._platforms[key].async_setup(platform_config, discovery_info) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 303, in async_setup await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in _async_setup_platform awaitable = create_eager_task(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/poolmath/sensor.py", line 72, in async_setup_platform async_add_entities_callback([sensor], True) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 508, in _async_schedule_add_entities task = self.hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 841, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 657, in async_add_entities await add_func(coros, entities, timeout) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 563, in _async_add_and_update_entities tasks = [create_eager_task(coro, loop=self.hass.loop) for coro in coros] File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 737, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1318, in async_device_update await self.async_update() File "/config/custom_components/poolmath/sensor.py", line 120, in async_update poolmath_json = await client.async_update() File "/config/custom_components/poolmath/client.py", line 69, in async_update async with httpx.AsyncClient() as client:
Ive installed HACS, downloaded this integration. When I go to install, I get a notice that this has to be done through configuration.yaml. I see in the instructions where there’s a path that has to be added to the repository, but unclear where/how I need to do that (dropping that path in the add repository only tells me this integration is already in the store). Is there more detailed instructions on that process somewhere? Thanks
Having the same problem. Any solution for this?
I believe this is just a warning, it doesn’t cause problems.
That said, just waiting on someone to fix this and submit a PR to merge the fix.
Yes, especially when you do the yearly renew. It’s frustrating and they don’t own up to it at all.
I love the app but the developer is … not great when it comes to warning people of breaking changes.
Hey folks, developer here… Apologies that things like the share code are causing some trouble, this was never really meant to be a stable identifier, it was meant to be for quickly sharing logs to other forum members to help analyze issues…
I used it mostly because I wanted a quick and easy way to provide a json endpoint for projects like this, but unfortunately the logic for calculating this value had to change due to one of the libraries I was using to calculate the value based on the pool’s id.
I’m planning on adding a slightly different endpoint to make integrations with things like this a bit more stable since it will use stable identifiers for the pool, and long story short, having the user id specified helps greatly with database queries so it is required in this new setup (you can find it in your app’s settings). It will have the following options:
/share/pool/?userId=X- returns all pools/share/pool/?userId=X&poolId=Y- returns the specified pool only (you can get the id from the call which returns all pools)
You can also optionally add recentLogs=10 to return recent logs as well, but it seems this is unnecessary by default for this component, and will default to 0.
Is this something someone is willing to help make changes to the component to use? I’m hoping to finish implementing this endpoint this weekend, and i’ll post back when I do. I’ll leave the old one up for awhile yet as to not break anyone, but I will likely start limiting the logs returned by it (again it seems they’re not used by this component at all anyway so that should not have an impact), and after some weeks or months work to remove it entirely.
Ok there’s a few changes that I’ve made just to be transparent:
1. Existing endpoint changes
By default the existing endpoint now returns no recent logs. You can add the recentLogs=X querystring parameter if you want to still return some. This significantly reduces server overhead since the majority of calls to this endpoint are from this component which doesn’t use that data anyway.
2. New Endpoint
The new endpoint is live. You can call /share/pool?userId=YOURID to get all pools returned, and you can find the "id" for the pool you want and make subsequent calls to /share/pool?userId=YOURID&poolId=YOURPOOLID which should be stable compared to the share code sometimes changing.
You still need to enable sharing via the share code or share with TFP in the app for your pools to be available in this api.
You can make those parameters as querystring or POST form data if you don’t want to expose them via the url.
This request is rate limited to 1 call per minute, and data is cached for up to 10 minutes, so please adjust the frequency of calls to take this into account. Reducing overhead is very helpful to running the server and app.
I’m not very familiar with python, but I may try and make a PR to the component to account for these changes, unless someone else is able to help out here?
Created a PR: Use newer PoolMath API by Redth · Pull Request #35 · rsnodgrass/hass-poolmath
If someone could test that would be great. I’m honestly not super familiar with HASS as I don’t run it myself, so hard for me to test this, but I think I got it mostly correct?
Hey @Redth. Thanks for following up on this and fixing it. I commented on your PR on Github. If I can figure out how to test it I will.
@Redth Should we be seeing anything in json output right now or are you working on the service?
Both my pool and hot tub are blank using new share links.
@Redth I’m trying to make the updates to PoolMath to be much easier for non-technical users to figure out what to configure. Is there a description somewhere that clearly shows how to go from “I have my Pool Math app on my phone” to getting the userId? All I can find in app is the share URL.
It seems like we have made the customer experience more complicated in this update by asking for pool_id and user_id, instead of just extracting this info from share URL that is readily accessible to users. Or am I missing something?