VoxCommando
General Discussion => General Discussion => Topic started by: Dominique on July 08, 2014, 11:39:49 AM
-
Kalle,
Here is what I want to do, I want to use Denise as a talking head like you did. However I also want to control my home automation setup without using eventghost if possible. One way I can control my devices is with IFTTT by sending email triggers.
http://youtu.be/HJuZXMzqiWQ
The problem I have faced with V.C. is that I do not know if it is possible to compose or even send email. I see that you can call or get email but did not see anything about sending one. In the video above, I show Denise toggling my devices by sending email triggers.
-
You can control your Belkin Wemo directly from VC. http://voxcommando.com/forum/index.php?topic=1261.msg12793#msg12793
Yes, you can send emails. You need to set up your SMTP server in VC options. http://voxcommando.com/mediawiki/index.php?title=Options
There are then SMTP actions within your commands.
There is a ton of documentation on the wiki etc. It does take time to digest. VC is a very versatile program; there's a learning curve and a lot of details that take some time to explore.
-
You can control your Belkin Wemo directly from VC. http://voxcommando.com/forum/index.php?topic=1261.msg12793#msg12793
Yes, you can send emails. You need to set up your SMTP server in VC options. http://voxcommando.com/mediawiki/index.php?title=Options
There are then SMTP actions within your commands.
There is a ton of documentation on the wiki etc. It does take time to digest. VC is a very versatile program; there's a learning curve and a lot of details that take some time to explore.
Yes I saw that @Nime5ter however I have 4 different Wemo devices, how do I decipher which is turned on/off?
-
I don't have a Wemo and don't know much about it, but I assume each one has its own IP address? You will need to know which device has which IP address.
You could then create a payload xml file in which each Wemo's IP address is associated with a friendly name, like "corner light", "kitchen light" etc. (example file is attached)
Rather than just saying "Turn wemo on" or "off". You then specify which one when issuing your command. Within the command, VC will refer to your payload XML file to find the correct IP address for that friendly name.
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.0.0.0-->
<commandGroup open="True" name="wemo" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="758" name="Turn wemo on" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Scrape.Post</cmdType>
<params>
<param>http://{1}:49153/upnp/control/basicevent1</param>
<param><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:SetBinaryState></s:Body></s:Envelope></param>
<param />
<param />
<param>text/xml; charset="utf-8"</param>
<param>SOAPAction: "urn:Belkin:service:basicevent:1#SetBinaryState"</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>{LastResult}</param>
</params>
<cmdRepeat>0</cmdRepeat>
</action>
<phrase>Turn</phrase>
<payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">wemoDevices.xml</payloadFromXML>
<phrase>on</phrase>
</command>
<command id="766" name="Turn wemo off" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Scrape.Post</cmdType>
<params>
<param>http://{1}:49153/upnp/control/basicevent1</param>
<param><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>0</BinaryState></u:SetBinaryState></s:Body></s:Envelope></param>
<param />
<param />
<param>text/xml; charset="utf-8"</param>
<param>SOAPAction: "urn:Belkin:service:basicevent:1#SetBinaryState"</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>{LastResult}</param>
</params>
<cmdRepeat>0</cmdRepeat>
</action>
<phrase>Turn</phrase>
<payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">wemoDevices.xml</payloadFromXML>
<phrase>off</phrase>
</command>
</commandGroup>
If you're not yet familiar with payload xml and how that works, you might want to watch the Vera \Home Automation tutorial video. A lot of the explanations apply generally in VC, whether or not you're using the Vera plugin.
Here is a master list of available video tutorials: http://voxcommando.com/mediawiki/index.php?title=Video_Tutorials. You should also watch the Fundamentals videos on editing commands.
-
note: I just edited my post above to correct a mistake in my initial command xml, so make sure to grab the corrected version.
-
Yes I saw that @Nime5ter however I have 4 different Wemo devices, how do I decipher which is turned on/off?
Originally you said that you could control your Wemo lights by sending an email to IFTTT.
So now you know how to send an email from VC. But you can also control the lights directly (much faster) if you know the IP address of each light which should be pretty easy to figure out, assuming they are not changing all the time.
Now it sounds like you want to monitor the status of your lights, to know whether they are off, which is something else completely. Which is it? What are you trying to accomplish? How were you doing this before?
-
Originally you said that you could control your Wemo lights by sending an email to IFTTT.
So now you know how to send an email from VC. But you can also control the lights directly (much faster) if you know the IP address of each light which should be pretty easy to figure out, assuming they are not changing all the time.
Now it sounds like you want to monitor the status of your lights, to know whether they are off, which is something else completely. Which is it? What are you trying to accomplish? How were you doing this before?
No, I do not care to know the status. I had read that the ip address changes so that was why I used the IfTTT method. On my phone it is easy, I use Tasker. However toggling devices by voice from computer is also desired.
-
You should be able to set the IPs to remain constant in your router settings.
In case anyone wants to check the current status of a light here is a sample command. You should only need to adjust the IP address to make it work.
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.0.0.0-->
<command id="889" name="Check Wemo status" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Scrape.Post</cmdType>
<params>
<param>http://192.168.0.111:49153/upnp/control/basicevent1</param>
<param><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:GetBinaryState></s:Body></s:Envelope></param>
<param />
<param />
<param>text/xml; charset="utf-8"</param>
<param>SOAPAction: "urn:Belkin:service:basicevent:1#GetBinaryState"</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegEx</cmdType>
<params>
<param>BinaryState>(.)<</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>"{Match.1}"</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)==(B)</ifType>
<ifParams>{Match.1}&&1</ifParams>
<then>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>The wemo switch is ON</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>The Wemo switch is OFF</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<phrase>Check Wemo status</phrase>
</command>
-
For those who have multiple units, it may be worthwhile to create a map table as well as the payload xml file mentioned above, to make it easier to create commands that target specific Wemo devices.
http://voxcommando.com/mediawiki/index.php?title=Maps
For example, you might have a "good morning" scene that is triggered at the same time each morning. It wishes you good morning, switches on the Wemo light in the bedroom, and tunes in to your morning radio station.
In this case, you want to target one particular Wemo. Sure, you could enter the IP address manually, but it's probably easier if you're going to start creating different commands targeting different devices to be able to drag and drop the correct IP address from you Wemo map table.
-
@jitterjames
I have a question. How did you find the IP Address of your Wemo Device? I have several and I cannot seem to figure out how you did it. Once I have that, I would like to try out that code.
EDIT: I just saw the other thread that you made a plugin for it. Excited about that. However I am still curious on how you located the IP Addresses of the devices. Cant seem to find anything on it anywhere online.
-
My Wemo appears in "my network places" in Windows 7. There are also many others ways to find the IP addresses of devices on your network.