Everything posted by johnstonf
-
MY project to make ISY push variables to Raspberry Pi Python
Here are the overall steps i used to get my ISY passing variables to my RaspberryPi RPi3... (Just thought I'd throw them up to help any NEWBIES like me... starting is the hardest) HUGE shoutout of thanks to my buddy LarryLIX who seems to always be there to help! (Even past midnight) -Notes: (where you see ip’s below, substitute yours)… -My SCREENSHOTS can be a bit confusing... so to clarify... -My ISY CONSOLE Is always ran on my MAC -All the Python code is done on the RPi3, via VNC remoted to the RPi3 (that's how i was able to screenshot BOTH at the same time) -My ISY is 192.168.77.147 -My Raspberry Pi3 is 192.168.77.209 -RPi3 is Raspberry Pi3 running Raspbian and Python3 -Note the attached SCREENSHOTS where noted below!!! (stick them in at those points) -Install ISY networking module if not installed -Console> Help> PurchaseModules -Reboot ISY: Console> Configuration(Tab)> Reboot(button) -Create 5 test variables (Test1,Test2...Test5) -Console> Programs> Variable> Integer(Tab) (Note their ID#'s in left column) -Create "Network Resource" -Console> Configuration> Networking(tab)> NetworkResources(tab) -Add> Name="RPi3", URL> -http: -GET -Host: 192.168.77.209 -Port: 8000 (This is port we set on the RPi3 later) -Path: /1/2/3/4/5 (This is TEST set of values to pass to RPi3) -Click UPDATE and make screen look like below… then SAVE button SEE SCREENSHOT 1 HERE... -Create a PROGRAM to run on ISY: -Console> Programs> Details(tab)> NewProgram(button) -Name it 000TEST (000 Keeps near top of list so handy) -In ‘Then’ section, want to see “Resource ‘RPi3” (what you named it above) (Click “Action”> Networking(dropdown)> Resource> RPi3(dropdown)) -Now ready to run it… LATER… -NOW ON RPi3… -Paste the code below into file, example /IsyToPython/TEST001.py (be careful that each new indent level is 2 spaces, hopefully copy/paste works ok) #!/usr/bin/python3.4 fjversion="v1.01b/18feb15/BuddyISY-SAMPLE-002.py" #Thanks for code from LarryLIX! #!/usr/bin/env python from http.server import BaseHTTPRequestHandler, HTTPServer ### # HTTPRequestHandler class class myHTTPServer_RequestHandler(BaseHTTPRequestHandler): # GET def do_GET(self): words = self.requestline.split() params = words[1].split("/",7) if len(params) > 5: # Send response status code self.send_response_only(200) self.send_header('Content-type','text/html') self.end_headers() self.wfile.write(bytes("GET OK", "utf8")) Test1 = params[1] Test2 = params[2] Test3 = params[3] Test4 = params[4] Test5 = params[5] print("Test1:",Test1, " Test2:",Test2, " Test3:",Test3, " Test4:",Test4, " Test5:",Test5) else: # Send response status code self.send_error(400) self.send_header('Content-type','text/html') self.end_headers() self.wfile.write(bytes("GET Bad", "utf8")) print("GET:format error!") return ### ### def run(): print('starting server...') ### # Server settings server_address = ('192.168.77.209', 8000) httpd = HTTPServer(server_address, myHTTPServer_RequestHandler) ### print('running server...') httpd.serve_forever() ### ### run() -Substitue YOUR RPi3 ipAddress above, and note port is 8000 -Run the above .py python file in Python3 (Run Python3-IDLE, then File> Open… then F5 to run -On the ISY console, run the THEN section of the 000TEST program by… -RightClick on 000TEST, then “Run Then” line… -Now on the RPi3 you should see Test1: 1 Test2:2 Test3:3 Test4:4 Test5:5 -The Python variables are Test1, Test2, etc SEE SCREENSHOT 2 HERE... -Now put ACTUAL variables into the Program Resource on the ISY… -Replace /1/2/3/4/5 in above path with, for example… …with /${var.1.20}/${var.1.21}/${var.1.22}/${var.1.23}/${var.1.24} …where 1=INTEGER, and 20,20,etc are the Variable# we recorded above when creating them …substitue your own, if you used STATE variables, they would be 2.20 and 2.21 etc -Run the program again, and now the values you give to Test1 to Test5 should appear in the ISY (I set values of Test1=11, Test2=12, etc…) Now see 11,12,13,14,15, so it is pushing VARIABLES over! SEE SCREENSHOT 3 HERE... ~end~
-
Capture up down 2441TH thermostat buttons for if condition?
I have a manual set to 16c at 5:55am. (should have been in the orig post) I normally don't use Mobilinc directly, but use its plug to Tasker, and runs program via icon for 23c and +1 and -1. The motion drive program; (complimentary separated right now for troubleshooting)... (If we head out for a few hours, it drops to 16c till we are back) We have ONE (of 3) motion sensor that covers a big area with frequent traffic. ===== ===== ===== ===== Motion3-A-If-OFF - [iD 00A4][Parent 0001] If Status 'ZZZ1-DO-NOT-USE / MOTION-SENSORS / Motion3-Sensor' is Off And $s.AwayFromHome is 0 And From 6:00:00AM To 9:00:00PM (same day) Then Stop program 'Motion3-A-If-ON' $s.Motion3CounterOFF += 1 Set 'Tstat-Main' 21° (Heat Setpoint) Wait 60 minutes Set 'Tstat-Main' 16° (Heat Setpoint) Else - No Actions - (To add one, press 'Action') Stop Program is to stop the OTHER 'Motion3-A-If" from running, so BOTH are not running at same time ===== ===== ===== ===== Motion3-A-If-ON - [iD 00A5][Parent 0001] If Status 'ZZZ1-DO-NOT-USE / MOTION-SENSORS / Motion3-Sensor' is On And $s.AwayFromHome is 0 And From 6:00:00AM To 9:00:00PM (same day) Then Stop program 'Motion3-A-If-OFF' $s.Motion3CounterON += 1 Set 'Tstat-Main' 21° (Heat Setpoint) Wait 60 minutes Set 'Tstat-Main' 16° (Heat Setpoint) Else - No Actions - (To add one, press 'Action') Stop Program is to stop the OTHER 'Motion3-A-If" from running, so BOTH are not running at same time ===== ===== ===== =====
-
Capture up down 2441TH thermostat buttons for if condition?
Basically: *=Currently working !!=Not working -*If away_from_home var set, tstat 16c -*Else, if home... -*Timed: sets temp to 16c at night, 20c at 5am -*Motion: sets temp to 21c between 6am and 9pm -*If no motion for 1 hour, set Tstat to 16c -If any of my mini remotes, Mobilinc/Tasker OR !!TstatUP/DOWN, manually modifies temp... (they have a 23c button, and a +1 and -1 button) ...then obey that override for 30 minutes, then fall back to Motion set (above is done by setting/resetting a variable) The only condition i need to fix is when the Tstat UP/DOWN is pressed (that is ALSO an override to obey for 30 minutes, in addition to above) This would be VERY EASY if the Tstat up/down were captured for conditions to use! /f
-
Capture up down 2441TH thermostat buttons for if condition?
just reporting back, this didn't work for me... As mentioned above, "ANY" change to the Tstat triggers the if condition... so it creates circular logic, because, say i have the Tstat change to 20c at 6am, that in turn unintentionally fires off the "if button pushed" logic i currently have, disables the motion, waits for x minutes, then enables, then when motion sensed, it triggers the Tstat to change, which then disables the motions for x time again, blah blah. So, is the problem that the Tstat up/down does not report that to the ISY, or is it that the ISY is currently not capturing that activity? It sure would be nice if that up/down could trigger a condition!! (could even do things like "if pressed up 3 times in 5 seconds" type logic, etc.) I guess for now, i'll have to put a couple of big wads of DUCT TAPE over the buttons on the Tstat, so nobody uses them. Won't my wife and friends be impressed! /f
-
Trace of programs ran in log?
Interesting! Do i need a network license for my ISY for that?
-
Trace of programs ran in log?
Yes, i do use summary, but some of the stuff is middle of the night weirdness, so i'd prefer to look at it next day. I don't see much in L3 events, REAMS AND REAMS of variables coming from my EM dashbox. How do you set the Error Logs to levels? I see how to set levels in the Event Viewer, but not error log level. I'm looking for a nice (wishful?) list of just program calls if possible. /Fred
-
Trace of programs ran in log?
In my log, I'm only seeing 'device' activity (on/off/humidity/etc). Is there another log, or way in the log, to see what programs are running and completing at what times? Thanks
-
Repair of 2413S PLM When the Power Supply Fails
Sounds like maybe a few of us are ready to buy a set, if anyone in the USA would be willing to do it. I'm in Canada, glad to pay postage. Fred
-
Capture up down 2441TH thermostat buttons for if condition?
-
Capture up down 2441TH thermostat buttons for if condition?
That will work! i'm good with a "Status Change"! Where do i find that? (I have my Tstat completely dumbed down so ISY does all setting) (Other that forcing up/down with the keys on it from current setpoint) I see a "then" where i can set up/down 1 degree. But i'm missing where to "if" a "Status Change" see attached...
-
Capture up down 2441TH thermostat buttons for if condition?
Hi MIchel, can you offer any advice here? Thanks
-
Capture up down 2441TH thermostat buttons for if condition?
I'm looking to add a condition when up or down is pressed on my Insteon 2441TH Thermostat so i can override control of my motion sensors when the temperature is manually overridden, for a period of 60minutes. I can't see a condition for it... am i missing it? See attached screenshot... (What is ON/OFF and how would that be used in a condition?)
-
If program disabled THEN DO SOMETHING
I just need to be darn sure that that siren comes back on, so for now I'm just going to turn it on twice a day, and I'll have to manually turn it off if it isn't ready to be turned on yet. I just don't trust the variable idea... I have tried it but I just don't like it. I just don't understand why there is no condition for a disabled program, seems like a no-brainer to me. Sent from my SM-N915W8 using Tapatalk
-
If program disabled THEN DO SOMETHING
I've searched, don't see... probably been asked 1000 times, but anyways... my search in the forums was... program true false disabled condition (all) I'm trying to say 'if my siren_blasts program is disabled" (not true or false) then at xx times each day, notify me by sending an email. reason: (in a panic i have a program that if we push our main dimmer 5x down (or more) then it disables it, and then it must be MANUALLY reset (i don't want it going off if i already have an emergency i know about... it just causes additional stress for no reason) I only see condition "if prog true/false", not "disabled"... where the heck is it? /fj
-
Search all programs for a variable
Thanks bud, i missed that in the dropdown!
-
Search all programs for a variable
Is there a way to search all programs to find a specific text or variable etc in any of the programs?
-
Repair of 2413S PLM When the Power Supply Fails
Thanks Teken... if anyone is willing to ship a kit to me in Canada, please let me know.
-
Repair of 2413S PLM When the Power Supply Fails
Hi Teken, Did you source a bunch of them as kits you can ship within Canada? I saw an earlier post where you were talking about doing it. if so, can i buy one from you? Just want to be ready, as I'm sure i'm nearing the death of mine, based on all the talk. Fred
-
Leak Sensors - Another (Suggested) Complete Program Package
This is response to question asked by dierwin johnstonf, deirwin has just posted a reply to a topic that you have subscribed to titled "Leak Sensors - Another (Suggested) Complete Program Package". Thank you for doing this! I am unable to find the "Add And (..)" button. I've googled and read and searched... Even Wiki, doesn't tell me how to access it, just how to use it. First add an AND statement, then you'll see the AND.. OR.. See attached screenshot...
-
Can't backup config JAVA READ ONLY
Me thinks there's more to it... it's not just the 1k nothing... First time it DOWNLOADS the application, and I can see traffic downloading via SNMP on my router. So I'd rather know I'm running and backing up the actual app... /f
-
Can't backup config JAVA READ ONLY
Thanks... i did find it (was just coming back to report)... that is so confusing... I don't know what that dashboard thing is, but it should NOT be listed on the first page of instructions for getting the ISY going! Horribly Confusing! I downloaded the .jnlp but when i run it it goes and appears to grab a file from externally and is only 1k in size. Can i find the actual application file, and save/keep it, and run it locally? /f
-
Can't backup config JAVA READ ONLY
OK, before i BLOW A COOKIE... wtf have i downloaded? I used the link at the page http://forum.univers...s-now-official/ to download a link http://isy.universal.../dashboard.jnlp and get a totally useless looking interface... what is this? (see attached screenshot)...
-
Can't backup config JAVA READ ONLY
Please rescue me from f&ching JAVA! I was able (MAC) to backup my config til recently. Now it won't ALLOW me to save it anywhere... WTF... JAVA drives me EVEN MORE nuts these days. I can run the admin console ok. What happened recently that i can no longer back up my configs? When i go to back up, i get no writeble locations! If i click the "New Folder" button, i get a popup saying "this location is read-only". Tried on BOTH of my macs, in all browsers. /f
-
Emergency Health Alert needed... Insteon?
Thanks for the insights and laughs guys... much appreciated...
-
Emergency Health Alert needed... Insteon?
My mom has had a stroke... She's recovering quickly, but I need an 'alert' solution, as she lives alone without computer or internet, and doesn't like technology. I'm looking for some sort of mini-switch on a bracelet that she can push if she runs into trouble. Then I can have the ISY (Will install it and Internet in her home) send out emails to us children, friends, etc if she has another fall/episode. I also found an app called ManDown that monitors movement on a smartphone, and resets whenever it senses movement (eg set to 1 hour, and if NO movement, it will start calling, emailing, texting). So just putting data on a smartphone would allow this app to work, BUT, she would need to carry and maintain a smartphone (charge nightly, etc). The app also has an SOS button to push to send immediate alert, but it can be a P.I.T.A. to get into the app, touch the screen in the right place, answer an "are you sure?" button, etc. She does drive, and go for long walks, so a 500 foot limited RF solution won't cover it all. Also, money / cost IS a consideration, for sure! Any thoughts? Anyone going through this and found good solution(s)?