Holmes WeMo Humidifier

I have Holmes WeMo humidifier that I would like to be able to control with ST. I am not a programmer and would appreciate it if anyone can help me! Thanks!

I took a crack at it a while ago and it looks like their UPnP implementation just plain doesn’t work. The only way to control it is via the WeMo app.

Thank you for the response!

I can’t even find references to an api for the humidifier. What did you turn up?

It looked like the exact same implementation as on the Crock Pot, only it didn’t work. It even had methods with ā€œcrockpotā€ in their names.

I think I figured this out… I used a packet sniffer and got the following when setting fan to ā€œMINā€ value…

POST /upnp/control/deviceevent1 HTTP/1.0
Content-Type: text/xml; charset="utf-8"
HOST: 192.168.1.74
Content-Length: 1052
SOAPACTION: "urn:Belkin:service:deviceevent:1#SetAttributes"
Connection: close

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <s:Body>
  <u:SetAttributes xmlns:u="urn:Belkin:service:deviceevent:1">
     <attributeList>&lt;attribute&gt;&lt;name&gt;FanMode&lt;/name&gt;&lt;value&gt;1&lt;/value&gt;&lt;/attribute&gt;&lt;attribute&gt;&lt;name&gt;DesiredHumidity&lt;/name&gt;&lt;value&gt;NULL&lt;/value&gt;&lt;/attribute&gt;&lt;attribute&gt;&lt;name&gt;CurrentHumidity&lt;/name&gt;&lt;value&gt;NULL&lt;/value&gt;&lt;/attribute&gt;&lt;attribute&gt;&lt;name&gt;WaterAdvise&lt;/name&gt;&lt;value&gt;NULL&lt;/value&gt;&lt;/attribute&gt;&lt;attribute&gt;&lt;name&gt;NoWater&lt;/name&gt;&lt;value&gt;NULL&lt;/value&gt;&lt;/attribute&gt;&lt;attribute&gt;&lt;name&gt;FilterLife&lt;/name&gt;&lt;value&gt;NULL&lt;/value&gt;&lt;/attribute&gt;&lt;attribute&gt;&lt;name&gt;ExpiredFilterTime&lt;/name&gt;&lt;value&gt;NULL&lt;/value&gt;&lt;/attribute&gt;</attributeList>
  </u:SetAttributes>
</s:Body>
</s:Envelope>

And the following response:

HTTP/1.0 200 OK
CONTENT-LENGTH: 288
CONTENT-TYPE: text/xml; charset="utf-8"
DATE: Tue, 08 Dec 2015 04:14:21 GMT
EXT:
SERVER: Unspecified, UPnP/1.0, Unspecified
X-User-Agent: redsonic

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body>
<u:SetAttributesResponse xmlns:u="urn:Belkin:service:deviceevent:1">
<attributeList>0</attributeList>
</u:SetAttributesResponse>
</s:Body> </s:Envelope>

interestingly enough, if I paste the text inside the ā€œattributeListā€ tag here and don’t make it ā€œpreformatted textā€ I get something more readable since the above code has XML entity references.

<attribute><name>FanMode</name><value>1</value></attribute>
<attribute><name>DesiredHumidity</name><value>NULL</value></attribute>
<attribute><name>CurrentHumidity</name><value>NULL</value></attribute>
<attribute><name>WaterAdvise</name><value>NULL</value></attribute>
<attribute><name>NoWater</name><value>NULL</value></attribute>
<attribute><name>FilterLife</name><value>NULL</value></attribute>
<attribute><name>ExpiredFilterTime</name><value>NULL</value></attribute>

So I guess to extrapolate… to set Fan mode, you pick a value 1-5 (MIN-MAX), and all other values to NULL.
to set humidity… desired humidity is 0-5 (45%,50%,55%,60%,Max%)

Also… to turn the unit ā€œOFFā€ you set the FanMode to 0 (which would make sense) and this shows as power off on the WeMo app.

1 Like

Interesting. I’m pretty sure this stuff wasn’t there when I looked at it way back when. I guess one of the firmware updates over the last year came with some updates for this as well.

Alright guys, the OP was looking for a guide on how to implement this for a non-technical type. Is there a link that could be used to get started based on the above?

Well this explains why I couldn’t take my code for the WeMo crockpot and modify it to work with the humidifier

I had tried to help @btk get his to work like 6 months back.

here’s what my crockpot command looks like when sent via curl

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
	<s:Body>
		<u:SetCrockpotState xmlns:u="urn:Belkin:service:basicevent:1">
			<mode>50</mode>
			<time>0</time>
		</u:SetCrockpotState>
	</s:Body>
</s:Envelope> 

Here’s how I send the command
def bodyMap = [mode:ā€˜50’,time:ā€˜0’]
sendCommand(’/upnp/control/basicevent1’,ā€˜urn:Belkin:service:basicevent:1’,ā€˜SetCrockpotState’,bodyMap)

def sendCommand(path,urn,action,body){
	log.debug "Send command called with path: ${path} , urn: ${urn}, action: ${action} , body: ${body}"
	def result = new physicalgraph.device.HubSoapAction(
		path:    path,
		urn:     urn,
		action:  action,
		body:    body,
		headers: [Host:getHostAddress(), CONNEC`TION: "close"]
)
	return result
}

looks like you could use my function and call it like this
def bodyMap = [attributelist:ā€˜FULL_ATTRIBUTE_LIST_STRING’]
sendCommand(’/upnp/control/deviceevent1’,ā€˜urn:Belkin:service:deviceevent:1’,ā€˜SetAttributes’,bodyMap)

Oh and if you haven’t seen it, IFTTT has added support for a bunch of new WeMo devices

Just got the wemo humidifier today. Any thoughts on if it has to be added as a custom hardware device, then an app written for it? I’m comfortable with the St ide and can help out if anyone had some starter coffee to test out. Thanks!

It’ll require a custom SmartApp which will discover and then install a custom device type. Now that we have a better understanding of how the command is formatted, we should be able to get it working.

While other devices have used
<attributeName>AttributeValue</attributeName>

The Humidifier uses
<attribute><name>attributeName</name><value>attributeValue</value></attribute>

My WeMo Crockpot code should give someone a good starting point. I know @btk tried to get his connected before, but the issue we now know is that the command is structured a little differently then other devices

Here is the Smart App

Here is the device handler

I’ve recently cleaned up my device handler and it should be easier to understand how it’s working and modify compared to my earlier version that I tried to help @btk use.

Also as a reference, here’s the docs on LAN connected devices that may help

thanks for the detail! I’ll take a stab at it and see if I can figure it out using your crockpot code as the base. Thank you!

1 Like

Would you be willing to share your code? I can test it out on mine and see what errrors, port changes I get. Thx!

It’s alive!

I’ve confirmed @btk code works as expted with some UI hiccups out of our control. Good work to everyone here!