View unanswered posts | View active topics It is currently Mon Jun 17, 2013 10:40 pm



Reply to topic  [ 8 posts ] 
 Laundry Dryer 
Author Message
User avatar

Joined: Dec 24, 2008
Posts: 386
Location: Mission Viejo, CA
Post Laundry Dryer
I have found the SynchroLinc and Indigo to be the perfect Insteon device and Software combination to let me know when the dryer is done so that I can rotate the laundry loads.

One more feature that would be nice in Indigo would be to be able to program the SynchroLinc's sensitivity and delay since this can only be done in software. What happens is somebody pushes the button to start the dryer, but it does not make complete contact to start the cycle, it only rev's it up but when the person let's go it doesn't start because it wasn't pushed hard enough...unfortunately this is enough for the SynchroLinc to send an on/off


For now here is my trigger for when the dryer is done:

Trigger:
Type: Device State Changed
Device: Laundry Dryer
On/Off State
Becomes Off

Condition: Always

Actions:

1) Type: Execute Script Embedded AS:
Code: Select all
tell application "Airfoil"
    connect to every speaker
end tell


2) Type: Plugin
Plugin: iTunes Plugin
Action: Pause Playback and Speak Text
Device: iTunes Server
Action Setting: itunes: pause and say "excuse me, the dryer is done."

3) Type: Execute Script Embedded AS:

Code: Select all
property emailAddress : "1234567890@mms.att.net"

tell application "IndigoServer"
    set lastChanged to last changed of device "Laundry Dryer"
    set runTime to ((current date) - lastChanged) div minutes
    if runTime > 1 then
        set emailBody to "The dryer is done after drying since " & time string of lastChanged & " for " & runTime & " minutes!"
        send email to emailAddress with body emailBody
    end if
end tell


_________________
Indigo 6.x w/ Dual-Band PLM 2413U
Mac OS X 10.6.x Snow Leopard
2006 Mac Mini Core Solo


Last edited by Brandt on Sat Jul 16, 2011 11:47 am, edited 2 times in total.



Sun Jul 10, 2011 10:24 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6841
Location: Austin, Texas
Post Re: Laundry Dryer
Given that actions execute in parallel threads (except for embedded AppleScript actions), you may want to put a really small delay (like maybe .02) on the second action - that will help ensure that the script controlling Airfoil has a chance to finish executing before the itunes plugin pause and speak action executes. It may always work as you have it - but since AppleScripts must run on the main thread it's possible that another script could hold up the tell to Airfoil such that the iTunes plugin actually executes it's action before Airfoil sets the speakers.

Just a thought. We've got a task to look at all the existing INSTEON modules and see what (if any) extended command features we're going to add to them (extended INSTEON commands require one of the newer PowerLincs - specifically not the 2414) - adding those settings to the SynchroLinc falls into that category (I suspect).

_________________
Jay (Indigo Support)
Image


Sun Jul 10, 2011 10:55 pm
Profile WWW
User avatar

Joined: Dec 24, 2008
Posts: 386
Location: Mission Viejo, CA
Post Re: Laundry Dryer
Ah yes, I had seen somebody mention that 0.02 minute delay in another thread and I had already had that in place, just forgot to mention it. Will the upcoming Airfoil plugin be able to replace those two actions (Airfoil AS and iTunes Plugin)?

I would love to see full support for SynchroLincs, then I could monitor the Dryer, Clothes Washer, Dishwasher, and Refrigerator (maybe see how long it runs for). I don't really have much interest in the iMeter at this point (I was using a KillAWatt previously), but more for a whole house meter like the TED w/ Indigo Plugin.

_________________
Indigo 6.x w/ Dual-Band PLM 2413U
Mac OS X 10.6.x Snow Leopard
2006 Mac Mini Core Solo


Mon Jul 11, 2011 3:35 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6841
Location: Austin, Texas
Post Re: Laundry Dryer
pomprocker wrote:Will the upcoming Airfoil plugin be able to replace those two actions (Airfoil AS and iTunes Plugin)?


Well, not both of them - the Airfoil plugin will be able to replace the Airfoil script. Introducing a dependency between iTunes and Airfoil in either plugin isn't a good idea IMO and the Airfoil application itself doesn't know how to pause iTunes.

_________________
Jay (Indigo Support)
Image


Mon Jul 11, 2011 4:50 pm
Profile WWW

Joined: Nov 11, 2006
Posts: 120
Location: Reno, NV
Post Re: Laundry Dryer
jay wrote: the Airfoil application itself doesn't know how to pause iTunes.


I thought Airfoil v4 could control audio sources, or is it just that they haven't updated the Airfoil Applescript library to add that functionality? Still on Airfoil v3, so I'm not sure what the "new" version can do.


Mon Jul 11, 2011 7:05 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6841
Location: Austin, Texas
Post Re: Laundry Dryer
That's entirely possible - my server is PPC so I can't update to 4.0 either. I will be targeting 3.x, which I hope will continue to work in 4.0.

_________________
Jay (Indigo Support)
Image


Mon Jul 11, 2011 7:41 pm
Profile WWW
User avatar

Joined: Dec 24, 2008
Posts: 386
Location: Mission Viejo, CA
Post Re: Laundry Dryer
My laundry script has been acting up lately....the last changed it's picking up is that when it shut off, not when it turn on, so I am getting a run-time of 0 minutes:

Code: Select all
property emailAddress : "1234567890@mms.att.net"

tell application "IndigoServer"
   set lastChanged to last changed of device "Laundry Dryer"
   set runTime to ((current date) - lastChanged) div minutes
   -- if runTime > 1 then
   set emailBody to "The dryer is done after drying since " & time string of lastChanged & " for " & runTime & " minutes!"
   send email to emailAddress with body emailBody
   -- end if
end tell

_________________
Indigo 6.x w/ Dual-Band PLM 2413U
Mac OS X 10.6.x Snow Leopard
2006 Mac Mini Core Solo


Thu Jul 21, 2011 9:52 pm
Profile
User avatar

Joined: Dec 24, 2008
Posts: 386
Location: Mission Viejo, CA
Post Re: Laundry Dryer
I modified it....

When the dryer starts, it uses the actions collection plugin to insert and AS style date/timestamp into a variable, it then removed any delayed action of the dryer done trigger.

The dryer done action AS looks like this now:

Code: Select all
property emailAddress : "1234567890@mms.att.net"

tell application "IndigoServer"
   set dryerStartTime to value of variable "Dryer_Start_Time"
   set startTime to string dryerStartTime as date
   set runTime to ((current date) - startTime) div minutes
   if runTime > 1 then
      set emailBody to "The dryer is done after drying since " & time string of startTime & " for " & runTime & " minutes!"
      send email to emailAddress with body emailBody
   end if
end tell

_________________
Indigo 6.x w/ Dual-Band PLM 2413U
Mac OS X 10.6.x Snow Leopard
2006 Mac Mini Core Solo


Fri Jul 22, 2011 12:26 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.