Next on my list is a virtual lightswitch driver for control4 that will allow you to instantiate lights in C4 that are actually controlled by Indigo. Getting C4 to know state when they are changed in indigo or locally is a little challenging, but I think it's possible.
<devicedata>
<copyright>Copyright 2008 CT. All rights reserved.</copyright>
<creator>CT</creator>
<manufacturer>Perceptive Automation</manufacturer>
<name>Set Indigo variables driver</name>
<model>Indigo IWS</model>
<created>01/04/2008 12:30 PM</created>
<modified>05/27/2013 11:31 AM</modified>
<version>1</version>
<top>
</top>
<bottom>
</bottom>
<front>
</front>
<back>
</back>
<left>
</left>
<right>
</right>
<control>lua_gen</control>
<controlmethod>other</controlmethod>
<driver>DriverWorks</driver>
<states />
<combo>True</combo>
<OnlineCategory>others</OnlineCategory>
<proxies qty="1">
<proxy>Indigo_IWS</proxy>
</proxies>
<config>
<power_management_method>AlwaysOn</power_management_method>
<power_command_delay>0</power_command_delay>
<power_delay>0</power_delay>
<power_command_needed>False</power_command_needed>
<documentation>
Driver to set variables on Indigo IWS from C4 events \n\n
1) Add driver to project \n
2) Enter the IP Address and port of your IWS server \n
3) Enter the Indigo variable name you want to change\n
4) In composer programming, execute Set Indigo Variable from any event\n
5) In Set Indigo Variable, set the variable as needed. (Note that you'll need to re-drag the command if you want to chagne the value).\n
6) When event fires, Indigo variable will be set from C4 director (via IWS)\n
/n
NOTES: \n
- You cannot have a password on your IWS server \n
- No invalid chars (spaces) in value \n
\n
Version 1 = Driver Release \n
TODO: \n
- User / pass \n
- don't send blank variables
</documentation>
<script><![CDATA[--------------- Driver Functions --------------
-------------- Called by Director -------------
function ExecuteCommand(strCommand, tParams)
if (strCommand == "Set Indigo Variables") then
for ParamName, ParamValue in pairs(tParams) do
GenerateURL ("Indigo Variable", ParamValue)
print("Sending URL: " .. URL)
C4:urlGet(URL)
end
end
if strCommand == "LUA_ACTION" then
if (tParams.ACTION == "GENERATE_URL") then
GenerateURL("Indigo Variable", "TestValue")
print("Sending URL: " .. URL)
C4:urlGet(URL)
end
end
end
---------------- Utility -----------------
function GenerateURL (IndigoVarName, IndigoVarValue )
URL = "http://" .. Properties["IWS IP Address"] .. ":" .. Properties["IWS Port"] .. "/variables/" ..Properties[IndigoVarName] .. "?_method=put&value=" .. IndigoVarValue
end
-------------- Init --------------
URL = ""
-------------- End Init ----------
-------------- Unused ------------
function ListParams()
if (tParams ~= nil) then
for ParamName, ParamValue in pairs(tParams) do
print("Variables:" .. ParamName, ParamValue)
end
end
end]]></script>
<actions>
<action>
<name>Generate Test URL</name>
<command>GENERATE_URL</command>
</action>
</actions>
<commands>
<command>
<name>Set Indigo Variables</name>
<description>Set variables in indigo</description>
<params>
<param>
<name>Variable 1</name>
<type>STRING</type>
<readonly>False</readonly>
<default>
</default>
</param>
</params>
</command>
</commands>
<properties>
<property>
<name>IWS IP Address</name>
<type>STRING</type>
<readonly>False</readonly>
<default>192.168.1.1</default>
</property>
<property>
<name>IWS Port</name>
<type>STRING</type>
<readonly>False</readonly>
<default>8176</default>
</property>
<property>
<name>Indigo Variable</name>
<type>STRING</type>
<readonly>False</readonly>
<default>C4RoomStatus</default>
</property>
</properties>
</config>
</devicedata>
if value of variable "voicecontrol" = "" then stop
johnprzy wrote:
The big hurdle to get across is how to eliminate the email bottle neck. Right now I'm thinking hitting a URL with specified parameters is the way to go.
What do people think?
berkinet wrote:
One, there needs to be the ability to define multiple "targets."
Two, the app needs to be always on, that is always looking to see if it is "near" a target.
Three, battery usage needs to be well controlled.
The last two points seem to be mutually exclusive. But, I was thinking the app could normally use Cell Tower location (if that is possible) and then only switch to GPS when within the same tower area as the target. This might requiring some learning on the part of the app. But, if it can be done, it would meet the criteria noted above.
***************************
John,
Hi, great app. Here's a couple of wishes:
1. Ability to edit the subject line of messages
2. Allow multiple repeats during the same day.
3. The ability to duplicate (copy) already-created messages so you don't have to completely recreate a message from the start if you have several similar to build. If that's too difficult how about the ability to send separate emails for arriving and leaving an area (both contained in one GeoMessage).
4. Option to include other phone info in the message (battery level, today's phone usage time, GPS coords., etc)
5. Save/restore messages to another phone.
**************************
Hi Terry,
Thanks for the email and I'm happy you like the app.
Re: #1 – A number of users have requested the ability to modify the email subject which is something I'm working on for the next release.
Re: #5 – Are you thinking this behavior would be similar to documents in iCloud?
As for suggestion numbers 2, 3, 4... can you explain more about how you're using GeoMessage? Are you using it to notify friends/family of your location or something else?
John P.
***********************
Hi John, thanks for the reply. Yes, perhaps an explanation of what I'm using the app for would be of benefit. I'm attempting to use the app for location tracking with my home automation system. So for example if I enter or leave the area defined around my house, I'd like to send a corresponding email to an inbox that the HA server watches. Similarly, I'd like to do the same for work and various other places in my normal travel. I'll then display that info on an iPad or similar device in my house using the HA server as the keeper of that info.
So, from my wish-list; #2 would allow my system to know that I've arrived/left the same more location more than once/day. A use-case would be leaving the house and going to work, then leaving work and returning home. Later that evening I leave the house a second time, and go to the store, of course I'll return from the store and arrive at home a second time that same day (hopefully) but the app in it's current state will only show the first arrival/departure and not the second (or subsequent).
#3 just makes it easy to duplicate the messages. So for example; I create a message for leaving the work 'circle' around 12:00 (for lunch) and send an email to somebody. If I wish to create a second 'leaving work' message, but this time for an end-of-work scenario (heading home) I have to completely recreate the message, choosing the 'circle', typing the message, selecting the email, etc. If I could simply copy the first message that I created - the 'lunch' message - and then change the time and/or email body, it would simplify the creation of multiple messages.
The sub-question to #3 involves the ability to send differing emails in one 'message' so, i would like to be notified when I enter a 'circle' AND when I leave (each with a different email and/or subject) the circle. As it stands now, that requires two separate 'messages'. It would be nice to give the option for "enter area", "exit area", and "both" in the 'set region' screen'. If 'both' is selected then that would probably modify the 'Edit Message" screen to have at a minimum two 'Label' and 'Message' entries - one for entering the area, and one for leaving.
#4 is just a "nice to have" - again sending that info to my Home automation system would be cool. I could then have the system to remind me to charge my phone if GeoMessage sends a battery-level warning of <xx% when I arrive home.
#5 Take all of the stuff I want to do above and then duplicate it for my wife's and daughter's phone - I have to do triple the 'standard' messages plus any custom per-phone messages. If there was a way iCloud, XML input via copy/paste from email, bluetooth send to phone, however... it would greatly simplify folks that want to purchase multiple copies and use them for their family/co-workers.
How about three more while I'm on a roll :) -
#6 In addition to sending an email, how about being able to call a URL on a webserver? Using my home automation system as an example - Currently I check for emails once/minute, which is fine for some things, but I can thank of sometimes when that one minute delay would not be advantageous (arriving home in the dark and wanting to turn on the outside lights for example). However, If I wrote a simple PHP web page that parsed the URL query string and then caused the system to react, I could have near instantaneous response. In this example I envision an "Add URL" button below the "Add Email Contact" button on the "Set Message" screen. Selecting the "Add URL" button would present a text box to enter a URL that would be called when the message was activated:
http://<server>/page.php?Message=arriving home
You could optionally include the message label, subject and body as parameters in the query string or make the info user-definable with some optional variables to include:
batt=battery level
label=message label
body=message body
gps=gps coordinates
mph = miles per hour
kph = kilometers per hour
so then if I wanted to send a custom set of info to my server-side php script I might have a URL that looks like this:
http://<server>/page.php?Message=On highway 17 passing Wall-Mart&Battery=<batt>&Location=<gps>&Speed=<mph>
So in that URL Geo Message would place the current values of the battery level and the gps lat,lon (maybe the precision too) in the string, replacing the "<batt>" and "<gps>" place holders. It would also send my custom message "Message" and anything else I placed in the query string. My server-side PHP script would read that as soon as GeoMessage sent it and then act on it as designed.
#7 how about a separate message 'trigger' that instead of sending a message on entering/leaving an area, one that triggers on an "over speed" alert - if my daughters phone (in her purse, in her car) is traveling at more than 70MPH, I get a message.
How about this one: #8 - This plays into #5 and allows coping to multiple devices and changing phone messages on-the-fly. How about the ability to remotely configure the phone by entering a custom web address? The phone could be set to periodically check the address for a new config file. All of the settings available to the user from the phone interface could be configurable from the web address and the file could be a plist, XML, json, whatever. Allow all changes from the config file, even the ability to 'lock' the UI on the phone so changes can't be overridden, and also allow the config file to adjust the time/interval that the app checks for new versions of the config file.
Use case: Let's say I have a small company and I make deliveries. I provide company phones to stay in touch with my drivers (or have iPads with 3G in the vehicles). I want to know when they get their deliveries out on time so I have an application (here's another business opportunity for you) that pulls the day's deliveries from my point-of-sale system, and converts them into a series of config files (one per phone/iPad/driver). The phones are set to pull the config info down once/minute initially so I can insure that they get the correct 'messages' that correspond to their deliveries. Also as the deliveries change throughout the day new remote config files are pulled down by the phones to changes the message as needed. At the end of the day I could send I config file out that clears the day's messages and resets the config check interval to not check until the next morning (either by a long interval of several hours, or a specific time entry)
I think that you could open your app up to a whole different market by doing the above, HA geeks like myself, but also small companies that wish to track their fleet drivers, parents worried about their kids safety etc. You could even have a separate subscription-based web application to configure the messages that get pushed to the phone (see #8). Keep the ability to specify the config server address and the config file simple to create for hackers/geeks like myself. But if somebody has several phones to configure and no technical ability then paying a little cash for a nice web interface to configure all of the instances of GeoMessage on his/her family's and/or business' phones should be a no-brainer.
Sorry to be so long winded, I hope some of the above helps you out.
Terry
tell application "IndigoServer"
set theText to value of variable "Weather_Condition"
if theText contains "Overcast" then
set the value of variable "Weather_Condition" to "Overcast"
else if theText contains "Rain" and theText contains "Light" then
set the value of variable "Weather_Condition" to "Rain_Light"
else if theText contains "Rain" and theText contains "Freezing" then
set the value of variable "Weather_Condition" to "Sleet"
else if theText contains "Rain" then
set the value of variable "Weather_Condition" to "Rain"
else if theText contains "Scattered" and theText contains "Showers" then
set the value of variable "Weather_Condition" to "Scattered_Showers"
else if theText contains "Sleet" then
set the value of variable "Weather_Condition" to "Sleet"
else if theText contains "Snow" and theText contains "Blowing" then
set the value of variable "Weather_Condition" to "Snow_Blowing"
else if theText contains "Snow" and theText contains "Fog" then
set the value of variable "Weather_Condition" to "Snow_Fog"
else if theText contains "Snow" then
set the value of variable "Weather_Condition" to "Snow"
else if theText contains "Stormy" then
set the value of variable "Weather_Condition" to "Stormy"
else if theText contains "Thunderstorms" then
set the value of variable "Weather_Condition" to "Stormy"
else if theText contains "Thunderstorm" then
set the value of variable "Weather_Condition" to "Stormy"
else if theText contains "Hail" then
set the value of variable "Weather_Condition" to "Hail"
else if theText contains "Unknown Precip" then
set the value of variable "Weather_Condition" to "Overcast"
else if theText contains "Squalls" then
set the value of variable "Weather_Condition" to "Rain"
end if
end tell
neilgreene wrote:jay (support) wrote:kennybroh wrote:And I assume as an interim measure I could simply set up a parallel z-wave network to control the locks and at some point integrate that into my Indigo system when that's possible. If I did that, what do you recommend as the easiest solution?
Sorry, realized I didn't really directly address this question.
The only way to support Z-Wave locks in Indigo at the moment is to get a MiCasaVerde Vera controller and configure the lock in their UI (it would indeed be a separate Z-Wave network from one you would create with the Z-Stick that Indigo could control directly). Then use the free Vera plugin to talk to it. Note that the plugin isn't supported by anyone at the moment (the original author, who was selling it originally, found that he didn't have time to support it and made it available for free in our File Library). However, I believe some users have had some success using it to control locks (as well as other Z-Wave devices).
I'm not recommending this approach mainly because it's pretty expensive - the Vera Lite is ~$180 (you might be able to find them cheaper) so added to the cost of the lock it's pretty pricey. And you have to use the Vera UI at the very least to add the lock to it (it's pretty awful IMO) so you can't do all of the management in Indigo (which we think is pretty important).
So you mean even with the plugin and with the MiCasaVerda (Z-wave controller) I still have to use the Vera UI, you mean the device does not show up in Indigo even in this configuration?? I don't mind if I can not manage it, I just need to be able to trigger it to lock and unlock from Indigo. That is possible right??
neilgreene wrote:jay (support) wrote:kennybroh wrote:And I assume as an interim measure I could simply set up a parallel z-wave network to control the locks and at some point integrate that into my Indigo system when that's possible. If I did that, what do you recommend as the easiest solution?
Sorry, realized I didn't really directly address this question.
The only way to support Z-Wave locks in Indigo at the moment is to get a MiCasaVerde Vera controller and configure the lock in their UI (it would indeed be a separate Z-Wave network from one you would create with the Z-Stick that Indigo could control directly). Then use the free Vera plugin to talk to it. Note that the plugin isn't supported by anyone at the moment (the original author, who was selling it originally, found that he didn't have time to support it and made it available for free in our File Library). However, I believe some users have had some success using it to control locks (as well as other Z-Wave devices).
I'm not recommending this approach mainly because it's pretty expensive - the Vera Lite is ~$180 (you might be able to find them cheaper) so added to the cost of the lock it's pretty pricey. And you have to use the Vera UI at the very least to add the lock to it (it's pretty awful IMO) so you can't do all of the management in Indigo (which we think is pretty important).
So you mean even with the plugin and with the MiCasaVerda (Z-wave controller) I still have to use the Vera UI, you mean the device does not show up in Indigo even in this configuration?? I don't mind if I can not manage it, I just need to be able to trigger it to lock and unlock from Indigo. That is possible right??
jay (support) wrote:kennybroh wrote:And I assume as an interim measure I could simply set up a parallel z-wave network to control the locks and at some point integrate that into my Indigo system when that's possible. If I did that, what do you recommend as the easiest solution?
Sorry, realized I didn't really directly address this question.
The only way to support Z-Wave locks in Indigo at the moment is to get a MiCasaVerde Vera controller and configure the lock in their UI (it would indeed be a separate Z-Wave network from one you would create with the Z-Stick that Indigo could control directly). Then use the free Vera plugin to talk to it. Note that the plugin isn't supported by anyone at the moment (the original author, who was selling it originally, found that he didn't have time to support it and made it available for free in our File Library). However, I believe some users have had some success using it to control locks (as well as other Z-Wave devices).
I'm not recommending this approach mainly because it's pretty expensive - the Vera Lite is ~$180 (you might be able to find them cheaper) so added to the cost of the lock it's pretty pricey. And you have to use the Vera UI at the very least to add the lock to it (it's pretty awful IMO) so you can't do all of the management in Indigo (which we think is pretty important).
kennybroh wrote:And I assume as an interim measure I could simply set up a parallel z-wave network to control the locks and at some point integrate that into my Indigo system when that's possible. If I did that, what do you recommend as the easiest solution?