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!