architecture icon indicating copy to clipboard operation
architecture copied to clipboard

New device type for showers

Open niemyjski opened this issue 6 years ago • 25 comments

I just renovated my place and went super smart.. I went with the Kohler DTV+ system as well as smart mirrors (yet to ship)... More Info..

The shower needs to be setup and can be configured / triggered via http (unsecured) json api. There are different modules that you can have (audio module, light module, massage mode). The basic setup allows you to dynamically configure each valve to be a shower head, jet, etc... and allows you to trigger each one on/off with an overall temperature.

  • I'd like to be able to show presence (it knows when you are there because it will auto dim the display based on setting (so it won't be too smart but at least gives you an idea if it's dim or not).
  • Temperature
  • Device Versioning and Status (you can check and apply updates remotely)
  • Motion (just via the screen is activated... and not dimmed)
  • On or off for each valve
  • Current users activated profile.

niemyjski avatar Sep 19 '18 21:09 niemyjski

Also please note there are other showers on the market that have app / api access like the Moen U

niemyjski avatar Sep 19 '18 21:09 niemyjski

Controlling the shower remotely doesn't make really to me because you are in the shower when you use it and the water temperature feels different for every user, depends on the temperature of the environment and your mood.

Anyway, this sounds a bit like an irrigation system (with some boiler features). Not so much time-driven as the irrigation system but with temperature as the important value. So, create a component for your shower and the needed platform:

I'd like to be able to show presence[...]

This would be a binary_sensor platform.

Temperature

sensor platforms.

Device Versioning and Status (you can check and apply updates remotely)

Status? Depends sensor or binary_sensor.

Motion (just via the screen is activated... and not dimmed)

Again, binary_sensor.

On or off for each valve

switch platform.

Current users activated profile.

'scene'

If there will pop up 50 other smart showers we can still create a shower component but I doubt that it would be necessary and those showers could be their own component.

fabaff avatar Sep 26 '18 07:09 fabaff

There are more than just one or two smart shower systems. There are at least 5 I know of, I just own the one. I'll try and experiment with this. It makes sense to me for the following scenario(s)

  • I have a daily routine and want to automate turning on fans, shower, in floor heat
  • I'm in the tub and I want to say take a relaxing shower, I could turn on the shower while I'm getting out of the tub, turn on the media player and it's all ready...
  • Automate exhaust fan controls based on usage.
  • Turn off any water leak sensors that may be in the tub (I'm not sure why it would be there) but you could turn it off while you know the water is on..
  • Also trigger in floor heat to turn on when shower command is given. You get out to warm floors.

Also, with it supporting different profiles and Alexa / google knowing whose talking I can pick the right profile for temperature and the like. They are also shipping an Alexa module for the shower by q1.

niemyjski avatar Oct 04 '18 12:10 niemyjski

Can I get some guidance on this. I'm new to both HA and python. I think I'm making good progress, the spot that I'm stuck is that I don't know the best way to flow through state through various devices. For example I was looking at wink and the others but those are all for different devices.

The Kohler shower has support for adding like: multiple lights, audio, up to 6 valves (with different modes), steam, rain shower addons, relays, extra touch panels, multiple users and a thing called water tile? All of these are controlled through their hub.

I just don't know how to represent these, I tried looking at binary sensors. They have one http end point which returns a massive flat json file over http. There are no device id anywhere and a few version numbers.

image

I guess I'm just really stuck on how do I create different devices and flow through updates from state when I'm keying off a suffix for the data model. Do I just inject my state and ignore updates as those come on a timer?

niemyjski avatar Nov 20 '18 17:11 niemyjski

I tried reaching out on discord but it's not very much help... If anyone would be willing to pair / give me some guidance, that would be amazing.

niemyjski avatar Nov 20 '18 17:11 niemyjski

Also please note there are other showers on the market that have app / api access like the Moen U

as you mentioned, does U by Moen provide api? And where can I find it?

aihometesting avatar Mar 06 '19 09:03 aihometesting

I'm not sure as I don't have a moen system, but Kohler does provide an api

niemyjski avatar Mar 06 '19 14:03 niemyjski

Anyone find anything on the Moen Api? I am debating buying this product now.

ZinkNotTheMetal avatar Mar 25 '19 03:03 ZinkNotTheMetal

I have not, but it would be great if you could reach out to them about it as well as get a list of all capabilities so we can solidify what an abstraction may look like.

niemyjski avatar Mar 25 '19 14:03 niemyjski

I just sent them an email. I don't expect anything back soon, but I'll update the thread when I do.

ZinkNotTheMetal avatar Mar 25 '19 16:03 ZinkNotTheMetal

I reached out to Moen a few days ago and they reached back out today.

Thank you for your interest in our U by Moen smart shower system. I was forwarded your email, and I want to make sure all of your questions are addressed.

We do not have a published API, so you will not be able to write automations or integrate third party software at this time While we cannot on specific upcoming features, we are always looking at the market to determine what features make sense for our customers.

I hope this answers your questions. If you have any further questions, we can be reached via email or you can call us direct at 1-800-321-8809 ext. 8987. We are available M-F between the hours of 9:00AM - 5:30PM EST.

Best Regards,
Colin

So it looks like published API is out the window... So maybe WireShark?

ZinkNotTheMetal avatar Mar 27 '19 18:03 ZinkNotTheMetal

That's what I did, and I looked at the javascript in the web portal they had :)

niemyjski avatar Mar 28 '19 12:03 niemyjski

Can someone share code or how they got the javascript to give me an idea on how the API for Moen works?

Thanks in advance

ZinkNotTheMetal avatar Sep 07 '19 23:09 ZinkNotTheMetal

I did create a MoenU API a few months ago. I can get all the shower data but I have one last call I need to make to get the actual water to start. Might be a socket based call. Not sure yet. Contributions there would be great...

https://github.com/madenwala/Moen.U.Api

madenwala avatar Oct 15 '19 18:10 madenwala

I have an initial working version here for the DTV+ system. Need to add the binary sensors for valves and users etc... https://github.com/niemyjski/homeassistant-kohler

niemyjski avatar Jan 21 '20 02:01 niemyjski

image

I got it working really good. However, I think some discussion needs to be had here on device types. Because you can have two valves with up to 6 outlets each and you might want to turn on each one individually and you can't really do that with a water_heater. Any ideas on the best way to accomplish this. Having an operation list with every combination is not a valid solution..

image

niemyjski avatar Jan 21 '20 15:01 niemyjski

I agree. A water_control device would be useful, as it isn't just showers but remote water shutoffs like Flo by Moen: https://github.com/rsnodgrass/hass-flo-water

rsnodgrass avatar Jan 21 '20 19:01 rsnodgrass

In my case I have multiple outlets which you can control over one valve, but the temp across all outlets remain the same. I think this needs to be considered. I would think this water device would work great for water monitoring devices like flow, showers but also sprinkler systems..

niemyjski avatar Jan 21 '20 22:01 niemyjski

Just realized we can’t sync water heaters to Alexa via nabu... might have to file a bug for this.

Sent from my iPhone

On Oct 15, 2019, at 1:04 PM, Mohammed Adenwala [email protected] wrote:

 I did create a MoenU API a few months ago. I can get all the shower data but I have one last call I need to make to get the actual water to start. Might be a socket based call. Not sure yet. Contributions there would be great...

https://github.com/madenwala/Moen.U.Api

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

niemyjski avatar Jan 22 '20 05:01 niemyjski

@niemyjski Regarding water heaters; It's an issue with the Alexa Smart Home API.

The Alexa.ThermostatController only supports specific thermostatModes that don't translate to the water_heater integration operation_mode.

I've considered trying to expose a Alexa.ThermostatController for the target_temperature, and a separate Alexa.ModeController for the operation_mode but haven't tested how it will affect the voice model for the user experience.

Branch: alexa-support-water-heater

ochlocracy avatar Jan 23 '20 14:01 ochlocracy

Mira Mode Showers have only a BLE interface for which I created a Python module: https://github.com/alexpilotti/python-miramode I currently handle the shower outlets via template switches and shellcommands, but it would be indeed great to have a better Home Assistant integration for water outlets

alexpilotti avatar Aug 19 '20 16:08 alexpilotti

It seems like a more general water (or liquid) valve makes sense. It isn't just showers that are the same, for instance water monitors/shutoff valves, mixing valves (though I don't know of any that are smart yet), etc.

water_valve:
  turn_on()   // optional
  turn_off()   // optional
  set_mode(operation_mode)  // optional
  set_temperature(temp)   // optional

Properties:

  is_on()
  temperature()  // optional
  pressure()  // optional
  flow_rate()  // optional

This would be great for things like the Flo Water Monitor, water monitors, smart shower heads, smart faucets, pool and hot tub valves, etc. Additional properties or sensors for daily consumption, etc. would be useful.

rsnodgrass avatar Aug 19 '20 18:08 rsnodgrass

I have a completed shower integration here: https://github.com/niemyjski/homeassistant-kohler/tree/master/custom_components/kohler There is a lot going on and it doesn't cover all of the functionality.

niemyjski avatar Nov 11 '20 20:11 niemyjski

@rsnodgrass I agree, what are the water irrigation (sprinkler) components using?

niemyjski avatar Nov 11 '20 20:11 niemyjski

@niemyjski Nothing that I can see...they create custom sensors/switches.

For example, the popular Rain Bird irrigation controllers: https://www.home-assistant.io/integrations/rainbird/

A base valve controller with a standard set of APIs/attributes/services would go a long way here towards standardizing this.

rsnodgrass avatar Nov 13 '20 05:11 rsnodgrass

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

I've been waiting years for a discussion or response... it's still valid... be good to link to where these would go...

niemyjski avatar May 11 '23 15:05 niemyjski

@niemyjski I'm happy to re-open and move it into a discussion. I've merely closed it, as it has been silent since 2020. (Which is considerably stale).

Let's me know if that is preferred.

frenck avatar May 11 '23 16:05 frenck

@frenck that would be preferred, we do have an integration that is current for kohler shower that uses a water heater (https://github.com/niemyjski/homeassistant-kohler)

niemyjski avatar May 11 '23 16:05 niemyjski