Jump to content

johnstonf

Members
  • Posts

    369
  • Joined

  • Last visited

Everything posted by johnstonf

  1. After hours of wasted time on the 'other' program... threw it out, and started over... Now at least have a working program! totally agree!... NOT the nicest thing to look at (but works!) I'd like to look at yours, and make mine more readable. Thanks! Fred
  2. Belias Wet Sensor Program Flow v1.04/17jan17 This is simply to OVERVIEW the Belias program... to help understand what is going on. It's more of a "birds eye" view, to grasp the concepts before DIGGING IN. It can be a bit overwhelming when you first get into ISY programming, so I hope this helps a newbie (like i was), to get "over the hump"... it's not hard after you grasp it. HAVE FUN! TERMS: PGMx = Programs below HB = Heartbeat SV = State Variable ;ONE for EACH SENSOR (4 in my case) (EG "sLeak01BsmtEnt", "sLeak02Laundry", "sLeak03SumpRm", "sLeak04BsmtOffice") IV = Integer Variable ;ONE for WHOLE program (for STARTUP detection) (EG "iStartup") 1 = HB ok 2 = HB Missed 3 = HB Check Program NOT RUNNING 9 = LEAK DETECTED REMINDERS / NOTES: -Interrupt driven means ANY program can run ANYTIME it is evaluated TRUE! (So it hops out from its current "wait" state, and starts over, for example!) -When a SV value changes, it forces a re-evaluation of any programs using it (When an IV value changes, it does NOT cause any interrupts to occur anywhere!) -This is the MODIFIED version of Belias' for newer Leak Sensors (so all sensors work) -In PGM1, put lines to run PGM2a of each sensor (Not PGM2b) (Not mentioned in forum) ======= ======= LOGIC FLOW ======= ======= Note: PGMS1-3 below are ONE PER SENSOR (So 4 of each for 4 sensors)... ...(PGM0 is not duplicated, only ONE needed) PGM0: "LEAK STARTUP" ;Ran when ISY first boots, and IV = 0 (Tests IV 'iStartup', if 0 (JUST WAKING UP)... then...) (Runs THEN of every VariableControl2a program (one for each sensor)) (Otherwise IV=1 (ISY already awake), so this PGM1 doesn't even get ran at all)) PGM1: "VARIABLE CONTROL 1" IF this Leak Sensors "WET" node is set to ON (yuk! LEAK!)... Set SV to 9 (yuk! BAD!) Otherwise, chill for 10 seconds, and if all ok, set SV = 1 (10 seconds prevents "flapping") PGM2a: "VARIABLE CONTROL 2a" (Upon getting HB, AND if sensor WET is NOT 'ON' (Thus NO LEAK))... (Sets SV to 1(All ok), waits 25hrs for HB, if not received, then sets SV to 2 (HB Missed!) (So SV should always be at 1(ok), unless wet or HB missed) ...IF 25 Hours pass, it sets SV to 2 (HB MISSED) ...Which then gets noticed by PGM5 below PGM2b: "VARIABLE CONTROL 2b" (Upon getting HB, AND if sensor WET-STATUS=ON (yuk! LEAK!))... (LEAVES SV at CURRENT VALUE (NO CHANGE) (waits 25hrs for HB, then sets SV to 2 "HB MISSED") (note: the WET-STATUS=ON "COULD" still be from last wet sensed event... (...then reset button needs to be pushed to CLEAR the alarm) PGM3: "MODIFY VARIABLE CONTROL 3" ;Keeps an eye that above 2a/2b's are RUNNING! IF State Variable = 1 (all normal, or so it appears!) AND if last runtime of 2a/2b above is MORE that 26hours (should be 25 hours max!) THEN set StateVariable to 3 to indicate it has been too long! ---or--- IF State Variable = 9 (LEAK DETECTED!) AND if last runtime of 2a/2b above is MORE that 26hours (should be 25 hours max!) THEN set StateVariable to 3 to indicate it has been too long! ======= ======= COMMUNICATIONS ======= ======= Note: PGMS4-5 below are ONE only (not one per sensor)... PGM4: "LEAK SENSOR ACTIVATION" ;WET sensed!! IF StateVariable is set to "9"(yuk! LEAK!) then Send notification to LIST with content CONTENT PGM5: "LEAK SENSOR PROBLEM" ;Something OTHER than "WET sensed" IF TIME 9AM or 6PM (If problem, send out alerts at both 9am and 6pm)... And if ANY problems (StateVariable is NOT "1") Then send notification to LIST with content CONTENT"LeakSensorProblem"
  3. Gollllllleeeeeeeeyyyyy Jeeee... New and Improved!... ya! i wish i had seen that and not gone down this rabbit hole!... waste of time! oh well... time to re-do this top down... grrrrr!!!! Thanks!
  4. Thanks Larry... since I know you understand Interrupt Driven programming, that's increases my confidence that this code appears busted. If that is the case (we'll wait to see what rabbit1543 comes back with), it would be prudent to get this code fixed asap, and/or put a huge disclaimer pinned up top, so people relying on such an important thing (flood sensing) won't be shocked when their batteries quietly die, or devices go out of range for some reason. Fred
  5. Will be interested to hear... thanks
  6. I'm having trouble with my leak sensor program... My "Leak Startup Alert" seems to fire whenever my $sLeakXXXnHB STATE variable changes from 1 to 0 (which happens when my "WET#x-xxx-HeartbeatMissed" program runs for 25hours (temp 5 min to test) and falls down to where $sLeakXXXnHB=0 is set. This seems to then cause "Leak Startup Alert" to re-evaluate(ok), but runs the ELSE section (proven by putting a notification diagnostic in that section), thus re-running my "WET#x-xxx-HeartbeatMissed" in the "ELSE" section (why?) when $iStartup is still 1 (ISY is FULLY up...) so I don't understand), which then sets my $sLeakXXXnHB back to 1, thus waiting another 25 hours, and looping through this cycle, and never keeping $sLeakXXXnHB=0 when I have the battery pulled from one of the sensors (thus never announcing a problem). With the wait set to 5 minutes, instead of 25 hours, i watched the variable $sLeakXXXnHB and i saw it quickly flip to 0, then immediatly back to 1, and i received a diagnostic email, telling me that "Leak Startup Alert" had triggered in the ELSE section! My understanding was that the way this IF statement reads, that if a state variable 'changes' value, and that variable is referenced in the IF statement, it would re-evaluate... that's ok... but I'm puzzled why it triggers to ELSE section... I thought that if the AND were FALSE, that the WHOLE program would not run. I'm assuming this whole program works for other people, so I'm not sure how this works for anyone if this is true (or do I have something wrong in my program?) I'm to the point I'm just spinning this in circles. /fred Code sections follow: ===== ===== ===== ===== ===== Leak Startup Alert - [iD 000F][Parent 000E][Run At Startup] If $iStartup is 0 And ( $sLeakWET1 is 1 Or $sLeakWET2 is 1 Or $sLeakWET3 is 1 Or $sLeakWET4 is 1 Or $sLeakWET1HB is 0 Or $sLeakWET2HB is 0 Or $sLeakWET3HB is 0 Or $sLeakWET4HB is 0 ) Then Send Notification to 'FCJforwarderOnly' content 'Leak Sensor Startup Alert' Wait 10 seconds Run Program 'WET#1-BsmtEnt-HeartbeatMissed' (Then Path) Run Program 'WET#2-Laundry-HeartbeatMissed' (Then Path) Run Program 'WET#3-SumpRm-HeartbeatMissed' (Then Path) Run Program 'WET#4-BsmtOffice-HeartbeatMissed' (Then Path) Wait 30 seconds $iStartup = 1 Else Send Notification to 'DIAG01distList' content 'Leak Sensor Startup DIAG' Run Program 'WET#1-BsmtEnt-HeartbeatMissed' (Then Path) Run Program 'WET#2-Laundry-HeartbeatMissed' (Then Path) Run Program 'WET#3-SumpRm-HeartbeatMissed' (Then Path) Run Program 'WET#4-BsmtOffice-HeartbeatMissed' (Then Path) Wait 30 seconds $iStartup = 1 ===== ===== ===== ===== ===== WET#1-BsmtEnt-HeartbeatMissed - [iD 0010][Parent 000E] If Control 'ZZZ1-DO-NOT-USE / LEAK-SENSORS / HEARTBEAT / WET#1-BsmtEnt-Heartbeat' is switched On Or Control 'ZZZ1-DO-NOT-USE / LEAK-SENSORS / HEARTBEAT / WET#1-BsmtEnt-Heartbeat' is switched Off Then $iLeakTHISSensorNumber = 1 Run Program 'WET#ALL-NotifyOfHeartbeatChange' (Then Path) $sLeakWET1HB = 1 $sLeakWET1HB Init To $sLeakWET1HB Wait 25 hours (currently set to 5 minutes to test!) $sLeakWET1HB = 0 $sLeakWET1HB Init To $sLeakWET1HB Send Notification to 'FCJforwarderOnly' content 'Leak Sensor Heartbeat Alert - Level 1' Send Notification to 'ALL FREDS Email Addresses' content 'Leak Sensor Heartbeat Alert - Level 1' Wait 12 hours Repeat Every 12 hours Send Notification to 'FCJforwarderOnly' content 'Leak Sensor Heartbeat Alert - Level 2' Send Notification to 'ALL FREDS Email Addresses' content 'Leak Sensor Heartbeat Alert - Level 2' Else - No Actions - (To add one, press 'Action') ===== ===== ===== ===== =====
  7. Correct! And developers need to think like normal end-users too... (happy end-users = more sales = more success) (hard for them to do sometimes, being bitheads)
  8. ok, i guess that's why footnotes were invented, lol
  9. ok, but maybe an '(eg temp)' added to end to cover 90% usage maybe
  10. Funny, that's the screen i took the screenshot from. I looked 10 times at it, and skipped by it! What a HORRIBLE description! How about "formatted temperature value" Instead of "The formatted specified value" /Fred
  11. THANKS Larry! Works Great! Where in the world is this all documented? Fred
  12. RE: Substitution Variables Anybody know how to actually put CURRENT TEMPERATURE into an email? I see Heat and Cool SETPOINT, Humidity, ETC, but not the current TEMPERATURE... I don't want the agony of moving to v5 yet, i'll wait for more maturity on it... (looking to do it with v4.5.4) (SORRY For the reformatting of a NICE table below... lol... see attachment screenshot) Variable Example Description sys.node.<address>.name sys.node.11 22 AA 1.name Name of the device node sys.node.<address>.addr sys.node.#.addr Address of the device node sys.node.<address>.<valueName>.ST sys.node.11 22 AA 1.ST The formatted specified value sys.node.<address>.<valueName>.raw sys.node.11 22 AA 1.ST.raw The unformated specified value sys.node.<address>.<valueName>.OL sys.node.11 22 AA 1.OL On Level sys.node.<address>.<valueName>.RR sys.node.11 22 AA 1.RR Ramp Rate sys.node.<address>.<valueName>.ERR sys.node.11 22 AA 1.ERR Error sys.node.<address>.<valueName>.CLISPH sys.node.11 22 AA 1.CLISPH Heat Setpoint sys.node.<address>.<valueName>.CLISPC sys.node.11 22 AA 1.CLISPC Cool Setpoint sys.node.<address>.<valueName>.CLIFS sys.node.11 22 AA 1.CLIFS Fan State sys.node.<address>.<valueName>.CLIMD sys.node.11 22 AA 1.CLIMD Thermostat Mode sys.node.<address>.<valueName>.CLIHUM sys.node.11 22 AA 1.CLIHUM Humidity sys.node.<address>.<valueName>.CLIHCS sys.node.11 22 AA 1.CLIHCS Heat/Cool State sys.node.<address>.<valueName>.UOM sys.node.11 22 AA 1.UOM Unit sys.node.<address>.<valueName>.CV sys.node.11 22 AA 1.CV Current Voltage sys.node.<address>.<valueName>.CC sys.node.11 22 AA 1.CC Current Current sys.node.<address>.<valueName>.PPW sys.node.11 22 AA 1.PPW Polarized Power Used sys.node.<address>.<valueName>.TPW sys.node.11 22 AA 1.TPW Total Energy Used sys.node.<address>.<valueName>.PF sys.node.11 22 AA 1.PF Power Factor
  13. Was combination of bad battery in one unit, and i had to activate the other, and then the status came alive. Will monitor, to see if it keeps working ok. Still curious on the Q1 question: Q1>what does the "2" in 2.ST mean? If i change to 1, status changes to "off" instead (i couldn't see this looking at the link in above post...)
  14. Nope, my bad... i actually BROKE the lines reporting ok by removing 0's in my lines 2 & 4. So they are back to original, with 0's, and lines 1&3 still not reporting...
  15. I think i answered my own Q2 (Remove 0's in the addresses... will test!)
  16. Another big thanks from me... I have a couple of issues... Not understanding this in the customization email: Leak Status WET1:Basement Entrance: ${sys.node.25 AD EC 2.ST} WET2:Laundry: ${sys.node.25 B0 49 2.ST} WET3:Sump Room: ${sys.node.27 9F C7 2.ST} WET4:Basement Office: ${sys.node.2D D0 9B 2.ST} This is the lines in the code above: Leak Status Washing Machine: ${sys.node.2E F 25 2.ST} Hot Water Tank: ${sys.node.2E 11 9B 2.ST} Master Bath Sink: ${sys.node.2E 16 B 2.ST} Dishwasher: ${sys.node.2E 17 EB 2.ST} I'm only getting status for 2 of the 4 above (the 2nd and 4th report as "on") Q1>what does the "2" in 2.ST mean? If i change to 1, status changes to "off" instead (i couldn't see this looking at the link in above post...) Q2>why are only #2 & #4 reporting (other 2 are BLANK) (yes, i have confirmed correct addresses!) Thx
  17. Hi Paul, Thanks for sharing that!... I'm going with a version of this for now! Fred
  18. Yeah, I'm a bit anal on my sump pump too... I have a sump pump, with a battery backup 2nd on top. Then i have a float sensor to my monitored home alarm system. Then i have a camera on my sump pump. Then i have an INSTEON leak sensor close to the pump, on a block. Then i have a backup sump pump. Then i have a spare sump pump with no float on a quick hose fitting (Hose handy) (it is more for high water in driveway when the ice melts, but is great backup2backup) Then i have a small generator i can connect, if power out too long... Then i have NOW have some feedback from the EM system via DashBox feed. I too am VERY concerned about "another" sump pump failure (as you MIGHT be able to tell LOL) The DashBox to ISY was sort of an afterthought, but a nice "HEY!" bonus! I'm sure there'll be tons of these little lights going off in my head in the middle of the night!
  19. OK, so that makes sense... the change in value is an "interrupt" much like all the other interrupt driven conditions... So it would, in this case be more like: -GEM sends new watts value every 8 seconds -Sump runs maybe for 1 minute -8x7=56seconds, 8x8=64seconds (thus the reason i'd sometimes get 7, sometimes 8 emails in a group) I'll try that, thanks... /Fred
  20. This is very cool!... when my sump pump goes off, i get notified based on watts value being pushed to ISY from GEM! (Saves always sit wondering if my sump pump is active or not... quick and dirty cheap way of knowing!) What I want: When my sump pump turns on, send me ONE (max) email every hour, while it is active... What I currently get: When sump activates, i get a BURST of 8 emails, every time it runs Overview: I have my GEM dumping values into ISY variables, and it is set to do so every 8 seconds, from the GEM side, which PUSHES the values over to the ISY using REST calls. When my sump pump goes off (only a couple of weeks spring and fall normally), it is in short burst of anywhere from a few seconds to a minute, depending on water level around the house). So my program right now, sends me 8 emails in a burst, whenever the sump pump uses more than 100 watts. I'm assuming that the sump goes for a few seconds, then GEM sends its watts used and gets sent via REST to the ISY. The ISY then, every second, or so, triggers based on my program: If $s.Dash_Box_FrontOD_SUMP_03 > 100 Then Send Notification to 'ALL FREDS Email Addresses' content 'SumpPumpActivated" Wait 1 hour Questions: -Based on the above (8 seconds bursts give 8 or so emails), is it because ISY runs a program interrups every second? -How can i restructure/reprogram so i only get ONE email per HOUR while the sump pump is active? Thanks
  21. Doesn't get much better than that ; -) Sent from my GT-N7105 using Tapatalk
  22. Thanks AGAIN Larry... I did the factory reset and ISY restore on the IO-Linc and... as you suspected, the logic somehow reverted, and thus reversed (I THEN had to change the logic from IF OFF (DISABLED) turn fan switches OFF, to IF OFF (DISABLED) turn fan switches ON). (IO-Linc is "OFF" when Tstat is OPEN (Not calling for heat (thus window fans are ON (For "Cooling")... gets a bit complicated using the Tstat in reverse, but I still think it's better than using the Cooling mode of the Tstat... just need to think everything in REVERSE lol)) I forced the run of the QUERY, and it SURVIVED it... YAY! So I **think** I'm gold now... thanks AGAIN to Larry! Fred ===== ===== ===== ===== ===== ===== BRDR-FanOff - [iD 0059][Parent 0001] If Status 'ZZZ1-DO-NOT-USE / IO-LINCS / IO-LINC-BR-Sensor' is On Then Set 'DIMMERS+SWITCHES / SW-DR-WindowFan' Fast Off Set 'DIMMERS+SWITCHES / SW-BedRm-Fan+HTR' Fast Off Else - No Actions - (To add one, press 'Action') ===== ===== ===== ===== ===== ===== BRDR-FanOn - [iD 0058][Parent 0001] If Status 'ZZZ1-DO-NOT-USE / IO-LINCS / IO-LINC-BR-Sensor' is Off Then Set 'DIMMERS+SWITCHES / SW-DR-WindowFan' Fast On Set 'DIMMERS+SWITCHES / SW-BedRm-Fan+HTR' Fast On Else - No Actions - (To add one, press 'Action') ===== ===== ===== ===== ===== =====
  23. Thanks Larry for the suggestion... i'll try that at some point when i get a chance, and report back...
  24. That is correct stusviews... The batteries last for a few years (somehow), and only run the display, programming, AND the relay (which i imagine consumes MOST of the power). /f
  25. HUH? LOL... over my head, but with with the odds of us meeting here, and living so freakin (scary) close, i may stay awake thinking about the possibilities...
×
×
  • Create New...