architecture icon indicating copy to clipboard operation
architecture copied to clipboard

Create Pump Entity

Open djtimca opened this issue 4 years ago • 23 comments

While fixed speed pumps can easily be integrated using switches, with more pool integrations being added to HA it would be nice to have a standard entity for a pump which could be either fixed speed (on/off) or variable speed (0-100%), probably also a low/medium/high state as well for those that have fixed speed settings. Seems a combination of light dimmer, fan speed would work.

djtimca avatar Aug 16 '20 17:08 djtimca

Please use the issue template when submitting an issue. Are you going to create an integration with this new entity type?

MartinHjelmare avatar Aug 16 '20 17:08 MartinHjelmare

Sorry the template didn't come up in the mobile Github app. We have already built an integration for the Omnilogic system which this would be very helpful for - is currently in PR for dev.

djtimca avatar Aug 16 '20 17:08 djtimca

Please provide a market analysis for different brands and what actuator controls would be needed. See eg this architecture issue: https://github.com/home-assistant/architecture/issues/375

MartinHjelmare avatar Aug 16 '20 17:08 MartinHjelmare

Ok will do thanks

djtimca avatar Aug 16 '20 18:08 djtimca

Dytimca,

Do you mind if I help on the research?

I can't help on the development, but happy to put together a Google docs sheet to look at all the different vendors and the options available.

I did something similar for the humidifier research.

On Sun, Aug 16, 2020, 9:22 PM djtimca [email protected] wrote:

Ok will do thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/home-assistant/architecture/issues/424#issuecomment-674559927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOZ7Z4SSO6RQS3ZN2JIV3SBAPVRANCNFSM4QA5XVHA .

BradleyFord avatar Aug 16 '20 18:08 BradleyFord

That would be awesome Brad! For sure I know there are pool applications and integrations already built (Jandy, Hayward OmniLogic and Prologic, iAquaLink etc). May also be useful for sump pumps, well water pumps etc.

Tim Empringham Cell: 289-690-1569 Email: [email protected]


From: Brad [email protected] Sent: Sunday, August 16, 2020 2:29:34 PM To: home-assistant/architecture [email protected] Cc: djtimca [email protected]; Author [email protected] Subject: Re: [home-assistant/architecture] Create Pump Entity (#424)

Dytimca,

Do you mind if I help on the research?

I can't help on the development, but happy to put together a Google docs sheet to look at all the different vendors and the options available.

I did something similar for the humidifier research.

On Sun, Aug 16, 2020, 9:22 PM djtimca [email protected] wrote:

Ok will do thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/home-assistant/architecture/issues/424#issuecomment-674559927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOZ7Z4SSO6RQS3ZN2JIV3SBAPVRANCNFSM4QA5XVHA .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Farchitecture%2Fissues%2F424%23issuecomment-674560711&data=02%7C01%7C%7C5fcf620608d64f4c7ede08d842125417%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637331993764951897&sdata=pw1l3GdJJUDh0%2F1embG46vxQ5TwaMWK0lF%2BFPG4d2ZE%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPE2DJNXYASCEM6HA6HK2DSBAQQ5ANCNFSM4QA5XVHA&data=02%7C01%7C%7C5fcf620608d64f4c7ede08d842125417%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637331993764951897&sdata=cAKU8RykyERNnLzpx1S0FzOEYA1tBynJ5wME%2Fy4cUJg%3D&reserved=0.

djtimca avatar Aug 16 '20 18:08 djtimca

Ok, great!

This is what we did with Shulyaka for humidifiers/dehumidifiers https://docs.google.com/spreadsheets/d/1ZaxdGzzqXkK-bB2n9w1KzpJ_ogRVFGY6g2LcHKCOv8Q/edit?usp=sharing

I just created this for us to use by directly copying the humidifier structure; now just need to modify the columns to fit this purpose. Its fully open so just in!!! https://docs.google.com/spreadsheets/d/1D4xVZ7P759_xYpww0j3l-tQFMKDPsRDdKmlq2YLEXyk/edit?usp=sharing

Actually I dont have any pumps, but this is something I can do it help out, although a sump pump could be good for when i move to my new house.

On Sun, 16 Aug 2020 at 21:38, djtimca [email protected] wrote:

That would be awesome Brad! For sure I know there are pool applications and integrations already built (Jandy, Hayward OmniLogic and Prologic, iAquaLink etc). May also be useful for sump pumps, well water pumps etc.

Tim Empringham Cell: 289-690-1569 Email: [email protected]


From: Brad [email protected] Sent: Sunday, August 16, 2020 2:29:34 PM To: home-assistant/architecture [email protected] Cc: djtimca [email protected]; Author [email protected] Subject: Re: [home-assistant/architecture] Create Pump Entity (#424)

Dytimca,

Do you mind if I help on the research?

I can't help on the development, but happy to put together a Google docs sheet to look at all the different vendors and the options available.

I did something similar for the humidifier research.

On Sun, Aug 16, 2020, 9:22 PM djtimca [email protected] wrote:

Ok will do thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/home-assistant/architecture/issues/424#issuecomment-674559927 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AACOZ7Z4SSO6RQS3ZN2JIV3SBAPVRANCNFSM4QA5XVHA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Farchitecture%2Fissues%2F424%23issuecomment-674560711&data=02%7C01%7C%7C5fcf620608d64f4c7ede08d842125417%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637331993764951897&sdata=pw1l3GdJJUDh0%2F1embG46vxQ5TwaMWK0lF%2BFPG4d2ZE%3D&reserved=0>, or unsubscribe< https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPE2DJNXYASCEM6HA6HK2DSBAQQ5ANCNFSM4QA5XVHA&data=02%7C01%7C%7C5fcf620608d64f4c7ede08d842125417%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637331993764951897&sdata=cAKU8RykyERNnLzpx1S0FzOEYA1tBynJ5wME%2Fy4cUJg%3D&reserved=0

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/architecture/issues/424#issuecomment-674561711, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOZ75OU2DGE7ZGPYRHEB3SBARQZANCNFSM4QA5XVHA .

BradleyFord avatar Aug 16 '20 18:08 BradleyFord

Thanks - will get a look at this in the next couple days.

Tim Empringham Cell: 289-690-1569 Email: [email protected]


From: Brad [email protected] Sent: Sunday, August 16, 2020 2:43:22 PM To: home-assistant/architecture [email protected] Cc: djtimca [email protected]; Author [email protected] Subject: Re: [home-assistant/architecture] Create Pump Entity (#424)

Ok, great!

This is what we did with Shulyaka for humidifiers/dehumidifiers https://docs.google.com/spreadsheets/d/1ZaxdGzzqXkK-bB2n9w1KzpJ_ogRVFGY6g2LcHKCOv8Q/edit?usp=sharing

I just created this for us to use by directly copying the humidifier structure; now just need to modify the columns to fit this purpose. Its fully open so just in!!! https://docs.google.com/spreadsheets/d/1D4xVZ7P759_xYpww0j3l-tQFMKDPsRDdKmlq2YLEXyk/edit?usp=sharing

Actually I dont have any pumps, but this is something I can do it help out, although a sump pump could be good for when i move to my new house.

On Sun, 16 Aug 2020 at 21:38, djtimca [email protected] wrote:

That would be awesome Brad! For sure I know there are pool applications and integrations already built (Jandy, Hayward OmniLogic and Prologic, iAquaLink etc). May also be useful for sump pumps, well water pumps etc.

Tim Empringham Cell: 289-690-1569 Email: [email protected]


From: Brad [email protected] Sent: Sunday, August 16, 2020 2:29:34 PM To: home-assistant/architecture [email protected] Cc: djtimca [email protected]; Author [email protected] Subject: Re: [home-assistant/architecture] Create Pump Entity (#424)

Dytimca,

Do you mind if I help on the research?

I can't help on the development, but happy to put together a Google docs sheet to look at all the different vendors and the options available.

I did something similar for the humidifier research.

On Sun, Aug 16, 2020, 9:22 PM djtimca [email protected] wrote:

Ok will do thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/home-assistant/architecture/issues/424#issuecomment-674559927 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AACOZ7Z4SSO6RQS3ZN2JIV3SBAPVRANCNFSM4QA5XVHA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Farchitecture%2Fissues%2F424%23issuecomment-674560711&data=02%7C01%7C%7C5fcf620608d64f4c7ede08d842125417%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637331993764951897&sdata=pw1l3GdJJUDh0%2F1embG46vxQ5TwaMWK0lF%2BFPG4d2ZE%3D&reserved=0>, or unsubscribe< https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPE2DJNXYASCEM6HA6HK2DSBAQQ5ANCNFSM4QA5XVHA&data=02%7C01%7C%7C5fcf620608d64f4c7ede08d842125417%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637331993764951897&sdata=cAKU8RykyERNnLzpx1S0FzOEYA1tBynJ5wME%2Fy4cUJg%3D&reserved=0

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/architecture/issues/424#issuecomment-674561711, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOZ75OU2DGE7ZGPYRHEB3SBARQZANCNFSM4QA5XVHA .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Farchitecture%2Fissues%2F424%23issuecomment-674562247&data=02%7C01%7C%7C8344340114f9431e5c1408d842144174%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637332002041456839&sdata=CSFLYtoQ3icd%2BKaXpp4UxvWSy4N04L2L5EPAs0UylDA%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPE2DLMO2U4CEYKBIRLXMLSBASEVANCNFSM4QA5XVHA&data=02%7C01%7C%7C8344340114f9431e5c1408d842144174%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637332002041466834&sdata=G9uVoLwLlGXDiQ2Z33N2zskytAvO15eA4JTpwjPLYPU%3D&reserved=0.

djtimca avatar Aug 16 '20 18:08 djtimca

Ok, ive done some research and it was vastly easier than for Humidifiers... https://docs.google.com/spreadsheets/d/1D4xVZ7P759_xYpww0j3l-tQFMKDPsRDdKmlq2YLEXyk/edit?usp=sharing

Basically it looks like there are 4 options on the market; listing by commonality:

  1. On/Off Quite simple as it runs at a fixed speed and you can only turn it on or off

  2. Two Speed Very similar to On/Off except in this case it has 3 states that are effectively Off/Low/High/

  3. Multi-Speed These are variable speed drives/pumps; except they can only operate at specific speeds. (So actually quite similar to "Two Speed" except there are multiple speeds). But as you can see the number of options are totally varied depending on the vendor; often the actual speed is configured by the user, but they can only have a limited number of settings that can be set.

  4. Fully Variable In this case you can select the full 0 to 100% range of the setpoint But it should be noted that the setpoint is not always speed; it could be pressure or flow.

Hopefully that helps :)

Brad

On Sun, 16 Aug 2020 at 21:45, djtimca [email protected] wrote:

Thanks - will get a look at this in the next couple days.

Tim Empringham Cell: 289-690-1569 Email: [email protected]


From: Brad [email protected] Sent: Sunday, August 16, 2020 2:43:22 PM To: home-assistant/architecture [email protected] Cc: djtimca [email protected]; Author [email protected] Subject: Re: [home-assistant/architecture] Create Pump Entity (#424)

Ok, great!

This is what we did with Shulyaka for humidifiers/dehumidifiers

https://docs.google.com/spreadsheets/d/1ZaxdGzzqXkK-bB2n9w1KzpJ_ogRVFGY6g2LcHKCOv8Q/edit?usp=sharing

I just created this for us to use by directly copying the humidifier structure; now just need to modify the columns to fit this purpose. Its fully open so just in!!!

https://docs.google.com/spreadsheets/d/1D4xVZ7P759_xYpww0j3l-tQFMKDPsRDdKmlq2YLEXyk/edit?usp=sharing

Actually I dont have any pumps, but this is something I can do it help out, although a sump pump could be good for when i move to my new house.

On Sun, 16 Aug 2020 at 21:38, djtimca [email protected] wrote:

That would be awesome Brad! For sure I know there are pool applications and integrations already built (Jandy, Hayward OmniLogic and Prologic, iAquaLink etc). May also be useful for sump pumps, well water pumps etc.

Tim Empringham Cell: 289-690-1569 Email: [email protected]


From: Brad [email protected] Sent: Sunday, August 16, 2020 2:29:34 PM To: home-assistant/architecture [email protected] Cc: djtimca [email protected]; Author [email protected] Subject: Re: [home-assistant/architecture] Create Pump Entity (#424)

Dytimca,

Do you mind if I help on the research?

I can't help on the development, but happy to put together a Google docs sheet to look at all the different vendors and the options available.

I did something similar for the humidifier research.

On Sun, Aug 16, 2020, 9:22 PM djtimca [email protected] wrote:

Ok will do thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <

https://github.com/home-assistant/architecture/issues/424#issuecomment-674559927

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AACOZ7Z4SSO6RQS3ZN2JIV3SBAPVRANCNFSM4QA5XVHA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<

https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Farchitecture%2Fissues%2F424%23issuecomment-674560711&data=02%7C01%7C%7C5fcf620608d64f4c7ede08d842125417%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637331993764951897&sdata=pw1l3GdJJUDh0%2F1embG46vxQ5TwaMWK0lF%2BFPG4d2ZE%3D&reserved=0

, or unsubscribe<

https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPE2DJNXYASCEM6HA6HK2DSBAQQ5ANCNFSM4QA5XVHA&data=02%7C01%7C%7C5fcf620608d64f4c7ede08d842125417%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637331993764951897&sdata=cAKU8RykyERNnLzpx1S0FzOEYA1tBynJ5wME%2Fy4cUJg%3D&reserved=0

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/home-assistant/architecture/issues/424#issuecomment-674561711 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AACOZ75OU2DGE7ZGPYRHEB3SBARQZANCNFSM4QA5XVHA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Farchitecture%2Fissues%2F424%23issuecomment-674562247&data=02%7C01%7C%7C8344340114f9431e5c1408d842144174%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637332002041456839&sdata=CSFLYtoQ3icd%2BKaXpp4UxvWSy4N04L2L5EPAs0UylDA%3D&reserved=0>, or unsubscribe< https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPE2DLMO2U4CEYKBIRLXMLSBASEVANCNFSM4QA5XVHA&data=02%7C01%7C%7C8344340114f9431e5c1408d842144174%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637332002041466834&sdata=G9uVoLwLlGXDiQ2Z33N2zskytAvO15eA4JTpwjPLYPU%3D&reserved=0

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/architecture/issues/424#issuecomment-674562446, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOZ7YD4GS4YI765YN26K3SBASLTANCNFSM4QA5XVHA .

BradleyFord avatar Aug 16 '20 19:08 BradleyFord

Context

Currently there is no native support for "water pump devices". Typically a water pump would be used for pools, sump pumps, well water, or lake water but they may also be used in temporary situations to pump water out of flooded areas or ponds. A typical example of a common pool pump would be the Hayward VS Omni Variable Speed pump which, when paired with the Hayward OmniLogic control system is used to circulate water in a pool with speeds that can be programmed and configured on a schedule or called through their app or an API integration.

These pumps are commonly integrated either via a cloud connection like the Hayward Omnilogic system or the Jandy iAquaLink system but can also be controlled locally as in the Hayward Prologic system. Other types of smart pumps include smart dump pumps from Zoeller and Liberty Pumps, or fish tank return pumps such as the Syncra SDC 7.0.

I own the Hayward VS Omni pump and OmniLogic controller and we have recently submitted an integration for the OmniLogic control system for inclusion into Home Assistant. There are already integrations for other pool systems such as the Jandy iAquaLink system.

While we could use something like the fan entity or a light entity to accomplish the on/off and variable speed nature of these pumps, it would not be a good representation of the device in the Home Assistant architecture.

Proposal

With a new pump entity we would not need to abuse other types of platforms which would not be an accurate representation of the device, and which would need to be assigned differently depending on the capabilities of the pump.

Based on a market analysis by @BradleyFord, there are some typical configurations for these pumps which could be represented by:

Type (single speed, two speed, multi-speed, variable speed):

  • Single speed (on/off)
  • Two speed (off/low/high)
  • Multi-speed (off, speed1, speed2, ...)
  • Variable speed (0-100%)

Functions could be simple to extend the existing turn_on service to include a speed setting which would be defined in the integration based on the type of pump.

pump:state: on/off pump:speed: based on grid above

In addition some pumps may return values for power consumption etc.

I see this as an extension to the switch entity which would allow for defined speed attributes and the addition of speed: value to the turn_on service call.

Consequences

While it would be possible to leverage existing entities in Home Assistant to offer variable/multi speed controls on a pump, with more home smart pump applications being added to Home Assistant (pools, aquariums, sumo pumps) it creates a negative user experience (ie knowing to find your variable pool pump by searching for a light entity).

@MartinHjelmare Please let me know if you would like additional details or have additional questions.

djtimca avatar Aug 19 '20 17:08 djtimca

It looks like this is going towards this issue: https://github.com/home-assistant/architecture/issues/74

michaelarnauts avatar Aug 19 '20 20:08 michaelarnauts

I can contribute some context here! I live on a rural property and all water is supplied by fixed-speed variable-flow pressure pumps (6 individual pumps for supply and transfer of bore and rainwater across 2 houses...) They have no IoT capability - just plug in power and they'll keep the output side pressurized.

Example pump: https://www.ongapumpsales.com.au/product/jsp120-pressure-pump/

For each pump, I've attached them to a WiFi power meter and switch to provide external monitoring and control. The power is updated every 10s into HA via MQTT and the states I model are:

  1. Idle (<10W draw)
  2. Running (+/- 10% of nominal power draw (eg 1000W pump runs 900-1100W when active)
  3. Stall (+10% of nominal power).
  4. Dry (surging or constant power below -10% of nominal)

Example WiFi power meter: https://templates.blakadder.com/kogan-KASPEMHA.html

A Stall can happen on older pumps as the brushes wear out. On startup it fails to turn and the motor draws a high current for a few seconds until the controller goes into fault mode. This can generally be cleared by cycling the power supply, but if it repeats then you want to throw an alarm.

Dry occurs when the tank runs empty and you get a period of water surging/dribbling into the pump. The power meter fluctuates below the nominal wattage as it has no load then surging up to nominal load. The pump controller itself will protect against run-dry - it monitors low-power and will go into fault mode too after a period of time, however to the external power meter that's indistinguishable from Idle.

I count running cycles and total run time each day. I alarm for extended single runtime (could indicate a pipe blow-out or someone left a tap running). I alarm for extended runtime past sunset (someone left a sprinkler running). I alarm for short & regular running intervals (leaky tap). I alarm for extended periods of no cycles on some pumps (has it gone into fault mode?).

I'm still learning HA and the best way to build this setup into a platform/integration. Each pump is configured as a package in my config at the moment with a lot of duplicated logic - between the MQTT templates, inputs to define nominal/alarm power thresholds, and automations to detect and alarm on states.

kevstark avatar Aug 19 '20 23:08 kevstark

I have a pool-pump also but under a similar-but-different state model:

  1. Idle/Off (<5W)
  2. Priming (< -10% of nominal power)
  3. Running (+/-10% of nominal power)

The Priming state occurs at startup and when it sucks air through the line. If it spends too much time in this state then I alarm and turn-off the pump to avoid burnout.

The pool pump and water pump are very similar, just with different alarms/monitoring (in my environment). I don't have any variable-speed pumps but this could be modeled as a nominal power set-point and all high/low thresholds relative to that.

kevstark avatar Aug 19 '20 23:08 kevstark

There are two sides to the pump or any actuator abstraction:

  1. The controls: on/off, speed
  2. The current state measurement: running, idle, stall

For 1. We need to decide a control interface that will fit all pumps but still be simple to be able to interface with the frontend, voice assistants etc.

The control interfaces seem to be:

a. on/off b. speed

a. is not a problem. b. has varying kinds of settings so will need a solution that abstracts that variation. Could we use 0-100 % for all of the variations? Each integration would be responsible for translating to 0-100 %.

For 2. we don't have to include this in the pump entity but can also use separate sensor entities. If we find a common ground that fits the majority of pumps we could include it, but it might be safer to use separate sensors. Please continue recording different states here in this issue, and we'll see. We don't have to decide this before we implement the first version as we can start with separate sensors for the current state.

MartinHjelmare avatar Aug 20 '20 08:08 MartinHjelmare

Martin,

Your assessment is quite sound.

With regards to point 2; when I was doing the analysis there was a huge variety of different sensors that were included or excluded. This primarily stems from pumps not being as integrated and standardised as other equipment such as humidifiers or lights. For example some are fully integrated devices, others only do 1 function and expect an external controller to do the rest.

My feeling would be to start with just the on/off and speed; then use the device structures to flexibly add the sensors as optional elements as part of a phase 2.

You would love the pumps at my work that we do the automation for...:

  • 3 axis vibration sensors
  • multiple temperature sensors
  • Speed
  • Flow rate
  • Pressure
  • Leakage

Fun stuff

On Thu, 20 Aug 2020 at 11:02, Martin Hjelmare [email protected] wrote:

There are two sides to the pump or any actuator abstraction:

  1. The controls: on/off, speed
  2. The current state measurement: running, idle, stall

For 1. We need to decide a control interface that will fit all pumps but still be simple to be able to interface with the frontend, voice assistants etc.

The control interfaces seem to be:

a. on/off b. speed

a. is not a problem. b. has varying kinds of settings so will need a solution that abstracts that variation. Could we use 0-100 % for all of the variations? Each integration would be responsible for translating to 0-100 %.

For 2. we don't have to include this in the pump entity but can also use separate sensor entities. If we find a common ground that fits the majority of pumps we could include it, but it might be safer to use separate sensors. Please continue recording different states here in this issue, and we'll see. We don't have to decide this before we implement the first version as we can start with separate sensors for the current state.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/architecture/issues/424#issuecomment-677442178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOZ73PHDXRXA4IDRSDD6DSBTKADANCNFSM4QA5XVHA .

BradleyFord avatar Aug 20 '20 09:08 BradleyFord

The control of speed is really the value to a separate entity. For on/off we are currently using the switch entity which works fine for this purpose. We also have implemented a sensor for the current speed which will handle reporting on the speeds. This setup works fine for fixed speed (on/off) pumps.

Is there a way to simply extend the switch entity to add a set_speed service within the existing entity structure? In that case the integration itself could extend the entity for any variations that are supported:

set_speed_pct: 0-100 (within supported range) set_speed_level: low/med/high (like a fan) set_speed_preset: within supported list (like a light effect list)

This would be similar to how the light entity handles dimming (two methods). I could also see the above three methods which each integration would have to handle and apply to the pumps they support which would cover the vast majority of pumps.

The supported range of a pump (many variable speed pumps have a minimum speed) with a min_speed_pct attribute, however that could also be easily handled for variation within each integration.

djtimca avatar Aug 20 '20 10:08 djtimca

By the way the Hayward OmniLogic integration that is currently in development/review is at https://github.com/home-assistant/core/pull/38911

djtimca avatar Aug 20 '20 10:08 djtimca

Custom entity services can be added by each integration.

The point with a new entity type is to unify the interface and remove the variation between different devices. We should decide on a single speed interface for the new entity.

MartinHjelmare avatar Aug 20 '20 10:08 MartinHjelmare

Is there documentation on that type of service extension or entity extension, or an example integration that you can refer me to?

djtimca avatar Aug 20 '20 10:08 djtimca

https://developers.home-assistant.io/docs/dev_101_services#entity-services

MartinHjelmare avatar Aug 20 '20 10:08 MartinHjelmare

In my CV system I also have some water pumps. They have PWM input to set speed. What I do to control them is to use an analog_output platform (see https://github.com/home-assistant/architecture/issues/347, code is already there in https://github.com/home-assistant/core/pull/33427 but architectural discussion is still pending). If you use an analog_output and add an event to switch power of the pump on if the analog output is switched on you're there.

antonverburg avatar Oct 15 '20 09:10 antonverburg

Thanks @antonverburg will have a look and do some thinking. We are considering three pump types to cover the pump use cases: -single speed (can be handled by switch) -dual / fixed speed settings (low/med/high) - no current entity I can find is a fit for this -variable speed (this analog_output) would work here

It may actually be a case where we just handle the fixed speed pumps as a custom service or extension of one of switch or analog_output.

djtimca avatar Oct 15 '20 13:10 djtimca

Hello,

I'm interested in having a pump entity for variable speed motors. For the record, in my case the device will be linked via modbus.

Is there any repository available with the temptative code?

Cheers!

Mandrake-Lee avatar Apr 27 '21 09:04 Mandrake-Lee

This architecture issue is old, stale, and possibly obsolete. Things changed a lot over the years. Additionally, we have been moving to discussions for these architectural discussions.

For that reason, I'm going to close this issue.

../Frenck

frenck avatar May 11 '23 13:05 frenck