Crewski / njsPC-HA

Home Assistant integration for nodejs-PoolController
28 stars 6 forks source link

v0.4.2 dropped sensors like pump rpm & salt level #19

Closed nicksardo closed 1 year ago

nicksardo commented 1 year ago

After upgrading to v0.4.2, many sensor entities went unavailable; most importantly, intelliflo RPM and intelliclor salt level. I tried deleting the integration and re-adding; they still haven't popped up.

Crewski commented 1 year ago

Well that's not ideal! There was some pretty decent changes in this version as @rstrouse helped rewrite/format a bunch of stuff. What version of Home Assistant are you running? Also, can you post the response you get by going to http://<your_njspc_ip>:4200/state/all. Thanks.

nicksardo commented 1 year ago

Running latest of HA, and njsPC. 2023.2.3

I see the relevant data in the JSON. response.txt

Crewski commented 1 year ago

Thanks. I'll look it over.

Did you see any errors in the Home Assistant logs when you boot up?

nicksardo commented 1 year ago

I don't see any errors. Thanks for looking.

rstrouse commented 1 year ago

@nicksardo go into your devices list for njsPC-HA on home assistant and click on the pump. It is possible that since we had some overlapping ids in HA that these are simply on a different id. If you go to your dashboard make sure they are assigned to the correct entity.

nicksardo commented 1 year ago

The only thing under the pump device is running state. I also tried going to Developer Tools and searching for entities containing 'salt' or 'rpm' - nothing.

rstrouse commented 1 year ago

Go into settings and on the integration click reload on the njsPC-HA integration.

nicksardo commented 1 year ago

Tried that a few times... Also tried deleting the integration and re-adding it.

rstrouse commented 1 year ago

If you upload your poolState.json and poolConfig.json I can mimic your install to see if there is anything in the output that does not show up. In your Home Assistant logs are you seeing any .... entity id duplicated messages. Home assistant will simply not create an entity if it already exists for the given unique id. Strangely, deleting the integration does not always clean these up. When you click on entities for the integration do you see any that are dead?

nicksardo commented 1 year ago

Ah, I didn't have my verbosity set right. There is something in the log.

@rstrouse State json is in my first reply. The config json is just boilerplate. Yes, there were many dead entities in the integration. However, they were removed when I deleted the integration.

2023-02-08 16:07:48.073 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up njspc_ha platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 293, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/njspc_ha/sensor.py", line 139, in async_setup_entry
    ChemistryDosingStatus(
  File "/config/custom_components/njspc_ha/chemistry.py", line 56, in __init__
    self.equipment_name = chem_controller["name"]
KeyError: 'name'

BTW

2023-02-08 16:07:48.047 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for njspc_ha using this method at custom_components/njspc_ha/__init__.py, line 63: hass.config_entries.async_setup_platforms(entry, PLATFORMS)
Crewski commented 1 year ago

@rstrouse I'll defer to you since I don't have chemical controllers, but seems like we just need to set the name to "unknown" then replace it if its available.

@nicksardo thanks for the heads up on that alert. Its a simple single line change so I'll include it in the next release.

rstrouse commented 1 year ago

@nicksardo do you have a chemistry controller? How did you get one added to njsPC without a name?

nicksardo commented 1 year ago

@rstrouse I don't. Maybe the pool had one in the past. 🤷 I can't figure out how to remove it from EasyTouch. Thinking about it now, Dashpanel throws an error when I try to visit the Chemistry tab in settings. Any idea on how I can erase the controller from the pool controller?

rstrouse commented 1 year ago

Stop njsPC and edit the poolConfig.json. Scroll down to the chem controllers section and delete the single entry that is in there. But if EasyTouch thinks its there but just cannot communicate with it, it will try to put it back.

Do you have IntelliChem enabled on your EasyTouch? Perhaps it is still trying to communicate with that and if it doesn't exist it will do all manner of crappy things in EasyTouch to try to resurrect it.

nicksardo commented 1 year ago

Yea, deleting the section is temporary. It comes back on restart. Was asking if you know how to remove it from EasyTouch. I've scanned both the Easytouch manual and Intellichem manual and didn't see anything.

When I set the Intellichem 'enabled' flag to false, it seems to persist this setting and the missing entities returned. Thanks for your help.