Any success with HASS integration?
@markmghali @alexbeatle
I’ve finished integration for iQua supported water softeners. It fetches data from Ecowater company server.
Thanks for doing this! Does their api allow for turning on and off the valve?
@jmacul2 shut off valve? If the application has this function, 99% API have this function too. But I can’t check because my softener doesn’t have shut off valve.
Thank you!
Is it possible to add a sensor for when cleaning is needed?
Is data available offline (local network)?
Created a card inspired by this…
https://community.home-assistant.io/t/new-integration-grunbeck-softliq/157478/44
type: picture-elements
image: /local/water_soft.jpg
elements:
- type: state-label
entity: sensor.water_softener_water_current_flow
style:
top: 10%
left: 70%
color: white
- type: conditional
conditions:
- entity: sensor.water_softener_state
state: Online
elements:
- type: state-label
entity: sensor.water_softener_state
style:
top: 25%
left: 38%
color: green
font-weight: bold
font-size: 150%
- type: conditional
conditions:
- entity: sensor.water_softener_state
state: Offline
elements:
- type: state-label
entity: sensor.water_softener_state
style:
top: 25%
left: 38%
color: red
font-weight: bold
font-size: 150%
- type: state-label
entity: sensor.water_softener_today_water_usage
style:
top: 28%
left: 77%
text-align: left
color: rgb(0,0,0)
font-size: 100%
font-weight: normal
prefix: 'Used today: '
- type: state-label
entity: sensor.water_softener_water_usage_daily_average
style:
top: 34%
left: 77%
text-align: left
color: rgb(0,0,0)
font-size: 100%
font-weight: normal
prefix: 'Daily average: '
- type: state-label
entity: sensor.water_softener_available_water
style:
top: 48.3%
left: 77%
color: rgb(0,0,0)
font-size: 100%
font-weight: normal
prefix: 'Water level: '
- type: state-label
entity: sensor.water_softener_salt_level
style:
top: 63.5%
left: 77%
color: rgb(0,0,0)
font-size: 100%
font-weight: normal
prefix: 'Salt level: '
- type: state-label
entity: sensor.water_softener_out_of_salt_date
style:
top: 67.5%
left: 77%
color: rgb(0,0,0)
font-size: 100%
font-weight: normal
prefix: 'Empty: '
- type: image
style:
top: 48.4%
left: 50%
width: 19%
aspect_ratio: 50%
entity: sensor.water_softener_water_level_image
state_image:
image_0: /local/circ_blue_0.png
image_25: /local/circ_blue_25.png
image_50: /local/circ_blue_50.png
image_75: /local/circ_blue_75.png
image_100: /local/circ_blue_100.png
- type: image
style:
top: 65.8%
left: 50%
width: 19%
aspect_ratio: 50%
entity: sensor.water_softener_salt_level_image
state_image:
image_0: /local/circ_grey_0.png
image_25: /local/circ_grey_25.png
image_50: /local/circ_grey_50.png
image_75: /local/circ_grey_75.png
image_100: /local/circ_grey_100.png
Nice work. Thank you!
Any chance we have answers for these?
I am really excited about this! Thank you arturzk! I’m having some trouble though, and am hoping someone can help out. I followed the instructions on github — copied just custom_components/iqua_softener folder into the config folder (didn’t touch other files at root like hacs.json). I added the iqua integration, and plugged in my user, pass and serial. But the sensors never seem to get created. Checking the logs, I see this entry below. Any ideas?
Error setting up entry iQua RHW4221-xxxxx-xxxx for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 204, in async_setup_entry
return await component.async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 147, in async_setup_entry
platform = await async_prepare_setup_platform(
File "/usr/src/homeassistant/homeassistant/setup.py", line 309, in async_prepare_setup_platform
platform = integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 530, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 535, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/iqua_softener/sensor.py", line 208, in <module>
class IquaSoftenerSaltLevelSensor(IquaSoftenerSensor):
File "/config/custom_components/iqua_softener/sensor.py", line 213, in IquaSoftenerSaltLevelSensor
def icon(self) -> str | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
Worked without issues for me.
Are you sure the username, password and the serial number are correct (inc. correct case)? I couldn’t recall my iQua login info, so had to change password.
Your error says…
Blockquote
Error setting up entry iQua RHW4221-xxxxx-xxxx for sensor…
Blockquote
Maybe you used System Serial, when need to use DSN#?
Great idea. I had actually been using system serial. But I just tried with DSN#, and it still didn’t work. I doublechecked to make sure I had the user and password right as well. Still getting the same kind of log errors.
Tried…
- remove integration and delete the iqua_softener folder
- restart HASS
- create the iqua_softener folder with all files again
- restart HASS
- config the integration with the user info and the dsn#
- restart HASS
- check the entities…
?
I sometimes find that HASS doesn’t like just be given new login info when everything is already integrated. As if you give the component new info, but it retains the old in the background. So usually the above works.
Also, I’m assuming your HASS is up to date.
Post the new logs after this, please.
@timonium this errors comes from using Python 3.10 syntax on older version, you are probably using Python < 3.10? I made a commit with old syntax. Try pull updated version from git.
Fabulous!! That seems to have done it. I deleted the old custom folder, restarted HASS, pulled from git again, restarted, plugged in credentials, and I’m seeing the sensors now. I don’t have much time to poke around right now, but this looks great. Thank you @arturzx !!
For what it’s worth, I’m running Home Assistant v 2021.12.10. Python version 3.9.7.
I look forward to trying out the card.
I want to thank you for developing this. I just bought and installed this water softener. I can see the entities show up in HomeAssistant but there are no devices associated with them and when i try expose them to Homekit nothing shows up.
I too only see entities., but it’s no problem.
Please post your Homekit setup
How/ what should I post as HomeKit setup?
I’m sorry but I don’t understand.
I have home assistant installed in docker on a pi4.
Edit:
I have Iaqualink installed for the pool equipment and I can see all the sensors it has.
Also, I have the Rheem heat pump/hybrid water heater and I can also see all the sensors
@abarna21 sorry but I’m not familiar with HomeKit. I don’t know how exactly HomeAssistant entities/devices work, I wrote this integration after looking some builtin sensors and other projects.
You did a far better job than I ever could. I’ll keep playing with them when I have time to see if I can get them to show in HomeKit.
These kind of sensors are not defined in HomeKit, so even you add them, they will not be visible in the Home App.