<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Shell Script To Control Belkin WeMo&#8217;s</title>
	<atom:link href="http://moderntoil.com/?feed=rss2&#038;p=839" rel="self" type="application/rss+xml" />
	<link>http://moderntoil.com/?p=839</link>
	<description>Technology, Life, &#38; Work</description>
	<lastBuildDate>Mon, 25 Nov 2019 19:44:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: dedelajoie</title>
		<link>http://moderntoil.com/?p=839#comment-169498</link>
		<dc:creator>dedelajoie</dc:creator>
		<pubDate>Sun, 16 Dec 2018 20:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://moderntoil.com/?p=839#comment-169498</guid>
		<description>I found a simple -though ugly- way to get power consumption over a wemo insight switch

this is a simple modification of rich&#039;s script 

just add before the &quot;else&quot; something like : 
elif [ &quot;$2&quot; = &quot;GETPOWER&quot; ]

				then

			res=`curl -0 -A &#039;&#039; -X POST -H &#039;Accept: &#039; -H &#039;Content-type: text/xml; charset=&quot;utf-8&quot;&#039; -H &quot;SOAPACTION: \&quot;urn:Belkin:service:insight:1#GetInsightParams\&quot;&quot; --data &#039; &#039;	-s http://$IP:$PORT/upnp/control/insight1  &#124;  grep &quot;&quot;  &#124; cut -d&quot;&gt;&quot; -f2&#124;cut -d&quot;&#124;&quot; -f9`
			Power=$(($res/60000))
			echo $Power
 
I wanted to get the GetPower Property which is mentionned here and there but  I never managed to get it working.

I found an alternate solution which is to get the InsightParams from the wemo insight API. the result is a string which looks like that : 1&#124;1544988731&#124;3&#124;38049&#124;456580&#124;1209600&#124;361&#124;1430400&#124;657939175&#124;7107245804.000000&#124;8000

I was able to identify the meaning of some -not all- fields

field 1 : 1 is the position of the switch (1-ON &#124;0-OFF)

field 2 : 1544988731 is the date in secondes since 1970/01/01

field 3 : unknown

field 4 : 38049 Today&#039;s activity in sec

field 5 : 456580 Total activity in sec

field 6 : 1209600 unknown

field 7 : 361 unknown

field 8 : unknown

field 9 : 657939175 Energy Today that&#039;s our consumption ! (on mwh -&gt; to be divided by 60000 to get the Energy Today

field 10 : 7107245804 Total Engery (since when? )

field 11 : unknown

then the only thing to do is to get the InsightParam, get the field n# 9 and divide it by 60000

I&#039;d like to say thank you to rich for his brillant inspiration.</description>
		<content:encoded><![CDATA[<p>I found a simple -though ugly- way to get power consumption over a wemo insight switch</p>
<p>this is a simple modification of rich&#8217;s script </p>
<p>just add before the &#8220;else&#8221; something like :<br />
elif [ "$2" = "GETPOWER" ]</p>
<p>				then</p>
<p>			res=`curl -0 -A &#8221; -X POST -H &#8216;Accept: &#8216; -H &#8216;Content-type: text/xml; charset=&#8221;utf-8&#8243;&#8216; -H &#8220;SOAPACTION: \&#8221;urn:Belkin:service:insight:1#GetInsightParams\&#8221;" &#8211;data &#8216; &#8216;	-s <a href="http://$IP:$PORT/upnp/control/insight1" rel="nofollow">http://$IP:$PORT/upnp/control/insight1</a>  |  grep &#8220;&#8221;  | cut -d&#8221;&gt;&#8221; -f2|cut -d&#8221;|&#8221; -f9`<br />
			Power=$(($res/60000))<br />
			echo $Power</p>
<p>I wanted to get the GetPower Property which is mentionned here and there but  I never managed to get it working.</p>
<p>I found an alternate solution which is to get the InsightParams from the wemo insight API. the result is a string which looks like that : 1|1544988731|3|38049|456580|1209600|361|1430400|657939175|7107245804.000000|8000</p>
<p>I was able to identify the meaning of some -not all- fields</p>
<p>field 1 : 1 is the position of the switch (1-ON |0-OFF)</p>
<p>field 2 : 1544988731 is the date in secondes since 1970/01/01</p>
<p>field 3 : unknown</p>
<p>field 4 : 38049 Today&#8217;s activity in sec</p>
<p>field 5 : 456580 Total activity in sec</p>
<p>field 6 : 1209600 unknown</p>
<p>field 7 : 361 unknown</p>
<p>field 8 : unknown</p>
<p>field 9 : 657939175 Energy Today that&#8217;s our consumption ! (on mwh -&gt; to be divided by 60000 to get the Energy Today</p>
<p>field 10 : 7107245804 Total Engery (since when? )</p>
<p>field 11 : unknown</p>
<p>then the only thing to do is to get the InsightParam, get the field n# 9 and divide it by 60000</p>
<p>I&#8217;d like to say thank you to rich for his brillant inspiration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soynerdito</title>
		<link>http://moderntoil.com/?p=839#comment-165463</link>
		<dc:creator>Soynerdito</dc:creator>
		<pubDate>Mon, 26 Nov 2018 00:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://moderntoil.com/?p=839#comment-165463</guid>
		<description>This script worked very well on my esp8266 emulating a wemo device. Had to change the port to the actual port I am using. Apart of that, well done my friend. Great post and thread comments.
And the c# implementation, have to look into it. need a few mods for my liking, but thanks also it is a great start.</description>
		<content:encoded><![CDATA[<p>This script worked very well on my esp8266 emulating a wemo device. Had to change the port to the actual port I am using. Apart of that, well done my friend. Great post and thread comments.<br />
And the c# implementation, have to look into it. need a few mods for my liking, but thanks also it is a great start.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lehi</title>
		<link>http://moderntoil.com/?p=839#comment-164688</link>
		<dc:creator>Lehi</dc:creator>
		<pubDate>Wed, 21 Nov 2018 18:46:34 +0000</pubDate>
		<guid isPermaLink="false">http://moderntoil.com/?p=839#comment-164688</guid>
		<description>It is 11/21/2018 and this script is working great for me, thank you for it!</description>
		<content:encoded><![CDATA[<p>It is 11/21/2018 and this script is working great for me, thank you for it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shed Denizen</title>
		<link>http://moderntoil.com/?p=839#comment-163198</link>
		<dc:creator>Shed Denizen</dc:creator>
		<pubDate>Fri, 16 Nov 2018 08:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://moderntoil.com/?p=839#comment-163198</guid>
		<description>Ancient tech now, but FWIW, here&#039;s yet more bash to make a WeMo to MQTT bridge: https://shedlabsblog.wordpress.com/2018/11/14/wemo-smart-plug-to-mqtt/</description>
		<content:encoded><![CDATA[<p>Ancient tech now, but FWIW, here&#8217;s yet more bash to make a WeMo to MQTT bridge: <a href="https://shedlabsblog.wordpress.com/2018/11/14/wemo-smart-plug-to-mqtt/" rel="nofollow">https://shedlabsblog.wordpress.com/2018/11/14/wemo-smart-plug-to-mqtt/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://moderntoil.com/?p=839#comment-128972</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Thu, 17 Aug 2017 20:09:50 +0000</pubDate>
		<guid isPermaLink="false">http://moderntoil.com/?p=839#comment-128972</guid>
		<description>Does anyone knows what is the request to get the power consumption of a wimo insight ?
thanks</description>
		<content:encoded><![CDATA[<p>Does anyone knows what is the request to get the power consumption of a wimo insight ?<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Larry</title>
		<link>http://moderntoil.com/?p=839#comment-128033</link>
		<dc:creator>Larry</dc:creator>
		<pubDate>Thu, 15 Jun 2017 15:44:28 +0000</pubDate>
		<guid isPermaLink="false">http://moderntoil.com/?p=839#comment-128033</guid>
		<description>I am able to connect to the Wemo and get the state, signal strength, and name. Does anyone know how I would go about getting the Power usage in watts? I would love to be able to request from the Wemo how much energy is currently being used at this moment.

Thank you.</description>
		<content:encoded><![CDATA[<p>I am able to connect to the Wemo and get the state, signal strength, and name. Does anyone know how I would go about getting the Power usage in watts? I would love to be able to request from the Wemo how much energy is currently being used at this moment.</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Song</title>
		<link>http://moderntoil.com/?p=839#comment-126395</link>
		<dc:creator>Song</dc:creator>
		<pubDate>Thu, 23 Feb 2017 08:53:52 +0000</pubDate>
		<guid isPermaLink="false">http://moderntoil.com/?p=839#comment-126395</guid>
		<description>I haven&#039;t yet bought a WEMO insight.

I was planning on buying one and using &quot;wemo_control.sh&quot; to control it and measure power consumption watt-hour through it. If it works, I would like to try designing a smartphone app for it. 

So my question is... Would a standard WEMO insight off the shelf work fine with this shell? If not, Is there a particular model number that this shell works on?

Thanks.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t yet bought a WEMO insight.</p>
<p>I was planning on buying one and using &#8220;wemo_control.sh&#8221; to control it and measure power consumption watt-hour through it. If it works, I would like to try designing a smartphone app for it. </p>
<p>So my question is&#8230; Would a standard WEMO insight off the shelf work fine with this shell? If not, Is there a particular model number that this shell works on?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://moderntoil.com/?p=839#comment-125983</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sat, 21 Jan 2017 20:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://moderntoil.com/?p=839#comment-125983</guid>
		<description>Thanks for this! I&#039;m using it with ha-bridge, now I can control my mix of hue, wemo, and x10 lights with Hue apps.</description>
		<content:encoded><![CDATA[<p>Thanks for this! I&#8217;m using it with ha-bridge, now I can control my mix of hue, wemo, and x10 lights with Hue apps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wayne Manion</title>
		<link>http://moderntoil.com/?p=839#comment-118752</link>
		<dc:creator>Wayne Manion</dc:creator>
		<pubDate>Wed, 14 Sep 2016 11:15:22 +0000</pubDate>
		<guid isPermaLink="false">http://moderntoil.com/?p=839#comment-118752</guid>
		<description>This works perfectly with my WeMo Insight.</description>
		<content:encoded><![CDATA[<p>This works perfectly with my WeMo Insight.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ex</title>
		<link>http://moderntoil.com/?p=839#comment-111795</link>
		<dc:creator>ex</dc:creator>
		<pubDate>Mon, 23 May 2016 22:14:02 +0000</pubDate>
		<guid isPermaLink="false">http://moderntoil.com/?p=839#comment-111795</guid>
		<description>Just got a WeMo Switch Insight today, this still seem to work for that model. (Assume it&#039;s a newer version/hav had some firmware updates.)

Using mine as a bandaid solution for a host that randomly dies and need hard reboots now and then.</description>
		<content:encoded><![CDATA[<p>Just got a WeMo Switch Insight today, this still seem to work for that model. (Assume it&#8217;s a newer version/hav had some firmware updates.)</p>
<p>Using mine as a bandaid solution for a host that randomly dies and need hard reboots now and then.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
