architecture
architecture copied to clipboard
New device type for showers
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.
Also please note there are other showers on the market that have app / api access like the Moen U
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.
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.
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.
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.
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?
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.
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?
I'm not sure as I don't have a moen system, but Kohler does provide an api
Anyone find anything on the Moen Api? I am debating buying this product now.
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.
I just sent them an email. I don't expect anything back soon, but I'll update the thread when I do.
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?
That's what I did, and I looked at the javascript in the web portal they had :)
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
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
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
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..
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
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..
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 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.
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
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.
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.
@rsnodgrass I agree, what are the water irrigation (sprinkler) components using?
@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.
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
I've been waiting years for a discussion or response... it's still valid... be good to link to where these would go...
@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 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)