Git Product home page Git Product logo

homeassistant-phyn's People

Contributors

hedda avatar jordanruthe avatar kasik96 avatar mizterb avatar rsocko avatar shawnheide avatar timbba80 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

homeassistant-phyn's Issues

[REQUEST] Support for water events connected to entities?

Copy from feature request submitted to upstream by @starsoccer -> MizterB#9

Curious if there are any plans to add support for water entities to this integration. For instance if phyn thinks a shower is on it would be nice if there was shower entity that would be represented showing its active and(assuming possible), how much water its using

Repository URL wrong

I have not installed yet, but I'm guessing the URL for the repository in the README is wrong, and it should be this repo?

Metric units or better yet, possibility to select wanted units.

HomeAssistant converts US customary units to Metric units automatically in many cases. Unfortunately not all, and with the new brilliant capabilities to see real time values such as real time flow, this becomes more visible. The flow is set to gpm - Gallons per minute. In a metric setup, this should be converted to "l/min" - Liters per minute - (or "lpm" depending on source).

Even better if it would be possible to set on your own to use "bar" instead of "kPa", if that feels like a more natural unit for pressure in water systems at least to me...

Of course both of these can be circumvented through helpers or templates, but if there is a way to make at least the first happen automatically to honor the system settings, then that would at least clearly be useful.

Flow Rate Sensor warning message in system logs

The following warning is appearing in system logs:

Entity sensor.phyn_pp1_current_water_flow_rate (<class 'custom_components.phyn.devices.pp.PhynCurrentFlowRateSensor'>) is using state class 'measurement' which is impossible considering device class ('water') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the author of the 'phyn' custom integration

The warning is resolved if class PhynCurrentFlowRateSensor (in pp.py) is updated from:
_attr_device_class = SensorDeviceClass.WATER to:
_attr_device_class = SensorDeviceClass.VOLUME_FLOW_RATE

[REQUEST] Real-time sensors for water flow, pressure, and temperature?

Can currently only see sensors for the average water flow-rate, water pressure, water temperature in this Phyn integration.

Is it possible to add real-time sensors as well for the water flow-rate, the water pressure, and the water temperature?

At least the water pressure and water temperature need to be real-time to be of any real use as those are key values to keep track of to prevent leaks or damage to appliances and frozen pipe bursts.

PS: The original Phyn app/software does show real-time data and for example warns of "High Base Pressure Alert" if the average water pressure is higher than 80 psi over the past 24-hour period or warns of "High-Pressure Warning" if the water pressure is much higher than normal for more than 1-minute and gives the recommendation to install a PRV (Pressure Reducing Valve), just as it gives a "Freeze Warning" or "Freeze Emergency" warnings depending if the temperature is too low or a combination of lower temperature and high pressure during a shorter period.

References:

https://phynsupport.my.salesforce-sites.com/FAQ/article_Datacategory1?id=3

https://helpcenter.phyn.com/help/i-got-a-high-base-pressure-alert-what-does-that-mean-and-what-should-i-do

https://helpcenter.phyn.com/help/what-are-the-normal-water-pressure-ranges-and-when-is-a-high-base-pressure-alert-sent

https://helpcenter.phyn.com/help/i-got-a-freeze-warning-alert-what-does-this-mean-and-what-should-i-do-c8c769b6

https://helpcenter.phyn.com/help/what-is-a-pressure-regulating-valve-prv

[REQUEST] Also support Phyn Smart Water Assistant (PC1), a.k.a. Classic Phyn Smart Water Assistant with Cold and Hot Water Lines

Please consider also supporting classic Phyn Smart Water Assistant with Cold and Hot Water Lines; Phyn Smart Water Assistant (PC1):

https://phyn.com/products/phyn

FYI, kasik96 has a pull request for it here which adds initial support for the original project -> MizterB#14

PS: Good idea is to combine Phyn Smart Water Assistant (PC1) with Phyn Plus (PP1/PP2) to get both hot and cold + shutoff valve.

[BUG] Phyn Smart Water Sensor expose incorrect home assistant sensors

Copy of bug report from @snairolf to upstream MizterB#7 in regards to the "Phyn Smart Water Sensor" leak sensor type product which also features air temperature and air humidity sensors in addition to the water leak detector sensor -> https://phyn.com/products/smart-water-sensor

The smart sensors seem to expose 'daily water usage', 'average water flow rate', 'average water pressuer', 'average water temperature', whereas in the app 'air temperature' and 'air humidity' and 'detected leak' are shown.

Here is the dump for a sensor:

{'auto_shutoff_eligible': 0,
  'auto_shutoff_enable': True,
  'battery_level': {'ts': 1693731332897, 'v': 75},
  'created_ts': 1654705582265,
  'device_id': 'REMOVED',
  'fw_version': '10803000',
  'humidity': {'ts': 1693731329, 'v': 61},
  'hw_version': '0',
  'name': 'Kitchen Sink',
  'network_name': 'REMOVED',
  'online_status': {'ts': 1684124769281, 'v': 'online'},
  'partner': 'phyn',
  'product_code': 'PW1',
  'sd_status': {'ts': 1693731332897, 'v': 'G'},
  'serial_number': 'REMOVED',
  'signal_strength': 73,
  'temperature': {'ts': 1693731329, 'v': 82},
  'timezone': 'REMOVED',
  'users': ['REMOVED']}

[aiophyn.mqtt] MQTT Connection Error

I keep getting connection errors and then the sensors don't update. Reloading the integration fixes it, but sometimes only for a few minutes. This is on v2024.1.3

Happy to help debug.

Setup fails when overwriting other fork. Any way to fix?

Hi. I tried to shift from the rsocko fork to this fork to get the latest features, but I get the following error after hot-replacing. Understandable in one way, but is there any way to fix this without starting from scratch. Tried starting from scratch as well, but that also did not work... My device is a Phyn.

Logger: homeassistant.config_entries
Source: config_entries.py:406
First occurred: 21:21:28 (2 occurrences)
Last logged: 21:22:35

Error setting up entry V10 for phyn
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/phyn/__init__.py", line 32, in async_setup_entry
    phyn_brand=entry.data["Brand"].lower(), session=session,
               ~~~~~~~~~~^^^^^^^^^
KeyError: 'Brand'

[REQUEST] Option to initiate “Plumbing Check” and get "Plumbing Check Leak" alert from Phyn’s Plumbing Check

Please implement the option to initiate a “Plumbing Check” and get a "Plumbing Check Leak" alert from Phyn’s Plumbing Check.

https://phynsupport.my.salesforce-sites.com/FAQ/article_detail1?id=ka01I000000S2rzQAC&Sid=1

https://phynsupport.my.salesforce-sites.com/FAQ/article_detail1?id=ka01I000000S2rfQAC&Sid=1

https://phynsupport.my.salesforce-sites.com/FAQ/article_detail1?id=ka01I000000S2raQAC&Sid=1

PS: If possible please also add an option to configure scheduling of automatic “Plumbing Check” as can do in the Phyn app.

Fetch Alert Notifications from Phyn API and make them available as binary sensors similar to the Flume integration?

Phyn username email address is case sensitive

Copy from issue posted to upstream by @pickett -> MizterB#3

I was getting an error when trying to first initialize saying User Not Found. I couldn't figure it out but then later realized that the Home Assistant UI on iPad defaults to first letter capitalized for email so if my email username with Phyn was "[email protected]" when I first typed it in, the iPad HA app made it "[email protected]".

Turns out, that was enough to cause an API error. So you might want to make everything lowercase on submit?

Integration stopped working

Suddenly started receiving "Failed to setup" with the following in the logs

2024-02-11 23:33:12.087 ERROR (MainThread) [custom_components.phyn] Unexpected error fetching phyn-coordinator data: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/phyn/update_coordinator.py", line 62, in _async_update_data
    await device.async_update_data()
  File "/config/custom_components/phyn/devices/pw.py", line 111, in async_update_data
    await self._update_device()
  File "/config/custom_components/phyn/devices/pw.py", line 136, in _update_device
    self._water_statistics.update(item)
TypeError: 'NoneType' object is not iterable
2024-02-11 23:33:12.101 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Linwood for phyn
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/phyn/__init__.py", line 75, in async_setup_entry
    await coordinator.async_setup()
  File "/config/custom_components/phyn/update_coordinator.py", line 68, in async_setup
    await device.async_setup()
  File "/config/custom_components/phyn/devices/pp.py", line 166, in async_setup
    return self._device_state["sov_status"]["v"]
           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'sov_status'

and this littered throughout the logs

2024-02-12 10:34:53.259 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/phyn/devices/pp.py", line 253, in on_device_update
    entity.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 966, in async_write_ha_state
    raise RuntimeError(f"Attribute hass is None for {self}")
RuntimeError: Attribute hass is None for <entity unknown.unknown=unknown>

Integration version: v2024.1.6
Home Assistant Core: 2024.2.1
Supervisor: 2024.01.1
OS: 11.5
Frontend: 20240207.1

[REQUEST] Make use of the new valve entity, device class, and valve control services?

Please consider implementing the use of the new valve entity to present shutoff valves as OPEN/CLOSE "valve" instead of as an ON/OFF "switch":

https://www.home-assistant.io/integrations/valve/

https://www.home-assistant.io/integrations/valve/#device-class

https://www.home-assistant.io/integrations/valve/#valve-control-services

https://www.home-assistant.io/integrations/valve/#service-valveset_position

This device type in Home Assistant is meant to provide a clearer defined interface to control valves such as water, gas, or air valves.

This might be a breaking change but not a huge change and it could be worth it to have a more properly suited device class.

If supported in then users can at least manually modify any switch device type that controls a valve device type and device class so it is presented as a valve by changing it to valve in the customize section of the UI or device config in configuration.yaml:

https://www.home-assistant.io/docs/configuration/customizing-devices/

Initially this new valve entity so far support the following device classes:

  • None: Generic valve. This is the default and doesn’t need to be set.
  • water: Valve that controls the flow of water through a system.
  • gas: Valve that controls the flow of gas through a system.

Anyway, this new valve entity, device class, and valve control services for use were added in Home Assistant 2024.1

https://www.home-assistant.io/blog/2024/01/03/release-20241/#new-entity-type-valve

Added by cibernox as entity type and device type for valves, which can be used by integrations to expose different type of valves.

New entity type: Valve

A brand new entity type has been added to Home Assistant: Valve!

Integrations can use this entity type to expose valves, such as a valve on a radiator, pool, sprinkler system, and main house gas or water line.

image

Currently, the Shelly integration supports it and now provides a valve entity for the Valve addon for Shelly Gas AddOn Manipulator. Additionally, support for it has been added to MQTT, and the valve entities also work with Amazon Alexa and Google Assistant.

Tip: Do you have a switch entity that controls a valve? You can now change the entity type to valve in the entity settings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.