[Custom Component] Pool Math sensors for pool chemicals and operations

Hi all - since a few days, I get this error constantly:

PoolMath returned NO JSON data:

When I try the link in a browser, it’s a hit and miss as well…

I’ve switched off sharing & then back on - added the new link to my HA and will keep an eye on it…

Still the same - am over 1000 repeats of that message in my HA logs…

Try changing your update or scan interval to 8 minutes or longer. Pool Math service recently made a change to throttle requests from the same client and will return an empty JSON document (and 429 http status) instead of a cached result.

A pending version of the Pool Math integration (2.0) is pending additional testing and working out any bugs. The ETA for that is unknown…depends on how much time volunteer developers can test and fix anything before release. It could be a day or it could be months. Code changes with Pull Requests are always welcome to fix things.

Hi @ryans - as I use the poolmath results to calculate the setting for my SWG (see [Custom Component] Pool Math sensors for pool chemicals and operations - #17 by berniedp) a setting of 8 minutes could lead to a siginificant delay between entering my results and checking my SWG calculation in HA. With a 1 min setting, I enter my results in the app, clean up my test equipment and usually, by then, the results show in HA.

I’m not a developer, unfortunately, but if any testing is needed, please let me know I’m happy to help out where I can!

Thanks,
B.

Totally understand!

Please bring that use case up to the Pool Math developers (on Trouble Free Pool site). We don’t have any control over the 10 minute caching/8 minute interval that causes throttling on the Pool Math server side. Even if they remove the throttle, the 10 minute server side cache will cause data to not show up for some time after you enter data in Pool Math app.

It would be cool if Pool Math did some of those dynamic chlorine target calculations you linked to (plus the even simple Total Chlorine calc) and returned them automatically in the JSON data.

Done!

https://www.troublefreepool.com/threads/api-responses-home-assistant-integration.312454/

I have been unable to get this installed. I have no idea how to get around this same message you’re getting. Anyone know how to get it working on HA?

Version 2.0 has been released. Thanks to all the contributors making this release possible.

Major Release – Breaking Changes

This update introduces significant changes that require a full reconfiguration for existing users.

Changes

  • Simplified UI setup flow for easier onboarding (@aallen90)
  • Updated to support PoolMath API changes and request throttling (@aallen90)
  • Migrated to the new PoolMath API (@Redth)
  • Partial adoption of Home Assistant’s Coordinator pattern for improved architecture
  • Performance improvements: sensors now update via the coordinator instead of polling individually
  • Added Swedish translation (@misa1515)

Would love to challenge the community for someone to create a really cool custom card specific to displaying pool values and targets (the PoolMath integration returns targets for each sensor in attributes).

Either something horizontal or vertical, like these sample AI generated cards (which don’t completely make sense, but give ideas):


Or using exising tiles/cards and creating YAML example for people to use.

Try setting up with latest 2.0 release. There were changes to PoolMath services which were causing empty JSON to be returned, so older versions of the HA integration no longer worked consistently.

Well that timing is pretty crazy… When configuring the HA integration, do you need to use the “api.poolmathapp…” or the “troublefreepool.com/mypool” web address? I seem to be getting no readings for either

The URL is the share URL, something like:

https://troublefreepool.com/mypool/7XbH9vM

or

https://api.poolmathapp.com/share/7XbH9vM

To test the URL, you should be able to enter in your browser the https://api.poolmathapp.com/… and add “.json” on the end. It should return a JSON structure with all your data.

Though IF you do this, you might have to wait 10 minutes for the Pool Math service to not throttle the loading of that URL when you setup the actual integration. If anything fails, you have to wait 10 minutes between setups…this is a Pool Math service requirement currently.

1 Like

The 10 minute waitng did it for me. :+1:

Edit: All sensors is unknown, but the link with .json in the end shows all data:


I use this card: wilsto/pool-monitor-card: The “Pool Monitor Card” is a home assistant plugin that display information of 1 to 20 pre-defined sensors of your swimming pool : temperature, pH, ORP levels and TDS but also if you need them : salinity, CYA, calcium, phosphate, alkalinity, filter pressure , free chlorine, total chlorine

2 Likes

I have the same issue, all sensors “Unknown”.

2 Likes

I am having the same issue with ‘Unknown’ sensor(s).

When I plop in my URL (which works, I can confirm by going to the URL), it seems as if Poolmath is saving and using some other URL instead, as if it’s just ignoring the URL I put in when configuring.

Any one run into this in particular?

2 Likes

like this?

@ryans Release 2.0.0 · rsnodgrass/hass-poolmath
The Swedish translation is not Swedish.

I have the same result. Following the link shows me all of the data in a web browser, but nothing ever populates in HA.

I have the exact same problem after upgrading this morning. Works fine in a web browser, but the integration is not showing any data.