{"id":2934,"date":"2010-04-05T08:07:05","date_gmt":"2010-04-05T12:07:05","guid":{"rendered":"http:\/\/www.schollnick.net\/wordpress\/?p=2934"},"modified":"2010-04-05T08:23:01","modified_gmt":"2010-04-05T12:23:01","slug":"perceptive-automation-view-topic-control-all-lights-that-are-currently-on","status":"publish","type":"post","link":"http:\/\/www.schollnick.net\/wordpress\/2010\/04\/perceptive-automation-view-topic-control-all-lights-that-are-currently-on\/","title":{"rendered":"Control \/ Dim all lights&#8230;."},"content":{"rendered":"<blockquote><p>I&#8217;m trying to create a Trigger that will dim all the lights that are currently ON. Anyone have any ideas how I can implement this?<\/p><\/blockquote>\n<p>Home Automation is more than just wanting things to happen, sometimes it takes some work, to get it to work the way you expect. \u00c2\u00a0After all, computers are just really really fast idiots&#8230;. \u00c2\u00a0Take this case in point&#8230; \u00c2\u00a0We simply want to dim any light that is on, to 50%&#8230; \u00c2\u00a0Well, currently you would setup an Time\/Date Action in Indigo, that would run an Applescript when you want to dim the lights&#8230;<\/p>\n<pre>tell application \"IndigoServer\"\r\n  with timeout of 60 seconds\r\n    try\r\n      repeat with curDevice in devices\r\n        status request (curDevice)\r\n        set currentBright to brightness of curDevice\r\n        if currentBright &gt; 10 then brighten curDevice to 50\r\n        if currentBright &lt; 10 then brighten curDevice to 0\r\n        delay 0.25\r\n      end repeat\r\n    end try\r\n  end timeout\r\nend tell<\/pre>\n<p>This script was originally written for Indigo 3, I believe&#8230; \u00c2\u00a0And I ended up adding a small delay (which should be reduced if you are running an 2413 or 2412)&#8230; \u00c2\u00a0Along with that, I ended up adding the less then 10 conditional, simply because for some reason some lights were being seen at 1 or 2%, even though as far as we knew they were off&#8230; So it would appear that an off lamp would suddenly brighten to 50%&#8230; \u00c2\u00a0The conditional ensures that the light is off&#8230; \u00c2\u00a0And now that I think about it, I think this script was originally written for X10 devices&#8230; \u00c2\u00a0So I can&#8217;t recall if we ever saw the issue with Insteon units&#8230;?<\/p>\n<p>Either way, this solves the issue&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to create a Trigger that will dim all the lights that are currently ON. Anyone have any ideas how I can implement this? Home Automation is more than just wanting things to happen, sometimes it takes some work, to get it to work the way you expect. \u00c2\u00a0After all, computers are just really <a class=\"read-more\" href=\"http:\/\/www.schollnick.net\/wordpress\/2010\/04\/perceptive-automation-view-topic-control-all-lights-that-are-currently-on\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[166,12,68,4],"tags":[141,89,71,97,91],"_links":{"self":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts\/2934"}],"collection":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/comments?post=2934"}],"version-history":[{"count":0,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts\/2934\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/media?parent=2934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/categories?post=2934"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/tags?post=2934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->