cmccartney Posted September 21, 2014 Posted September 21, 2014 I have been using this new URL provided by OhmConnect and some simple programs to respond to Flex Alerts for a few weeks. Since the programs seem to be working, I thought I would post them as examples. The first step, before writing any programs, is to put this URL: https://login.ohmconnect.com/xml_persistant_energy_alert/SLAP_PGEB-APND in the ISY Configuration/Electricity/Modules tab and click the Enabled check box. I have my polling interval set to 59 seconds, but the default will work too. I first set up a static variable called s.Flex.Alert. The first program, Flex.Alert.Flag.Set : If Module 'Flex Alert' Status is Active And Module 'Flex Alert' Status is not Not Active Then $s.Flex.Alert = 9 $s.Flex.Alert Init To $s.Flex.Alert Send Notification to 'Craig' content 'Flex Alert' Else $s.Flex.Alert = 0 $s.Flex.Alert Init To $s.Flex.Alert Send Notification to 'Craig' content 'Flex Alert' Sets a state variable to = 9 when a Flex Alert begins and resets it to = 0 when the Flex Alert has concluded. The 'Init' functions maintain the variable's state over ISY restarts. does just what it name implies - keeps the static variable updated with the current Flex alert status. I then wrote two more programs to actually do something at the beginning and end of a Flex Alert. The Flex.Alert.Begin program: If $s.Flex.Alert is 9 Then Set Scene 'Ham Shack / Multi: HS Radio Lights' Off Set Scene 'Ham Shack / Multi: HS Workbench Lights' Off Set Scene 'Ham Shack / Multi: HS Rack Work Lights' Off Set Scene 'Garage / Garage Bathroom / Multi: Garage Bathroom' Off Set 'Ham Shack / GPS Receiver Rack' Off Run Program 'Ham Shack Window Fan' (Else Path) Run Program 'Kitchen Ceiling Fan' (Else Path) Run Program 'Dawn End' (If) Run Program 'Dusk End' (If) Else - No Actions - (To add one, press 'Action') Turns off some non-critical loads at beginning of a Flex Alert. does just what he comment says. Here is where, if you have a controllable thermostat, you would increase the setpoint for air conditioning, for instance. Also turn off other non-essential loads as in my example. The third program, Flex.Alert.End: If $s.Flex.Alert is 0 Then Set 'Ham Shack / GPS Receiver Rack' On Run Program 'Kitchen Ceiling Fan' (If) Run Program 'Ham Shack Window Fan' (If) Run Program 'Dawn Begin' (If) Run Program 'Dusk Begin' (If) Run Program 'Dusk Begin, Peak' (If) Run Program 'Dusk Begin, Peak Holiday' (If) Else - No Actions - (To add one, press 'Action') Turns some non-critical loads back on at end of a Flex Alert. simply restores things the way they were before the Flex Alert. Resetting your air conditioning setpoint to normal would go here. The reason that I call other programs in some cases, instead of triggering the loads directly, is that I have other conditions that also will affect whether certain loads should be on or off at certain times of day. Currently these conditions include PG&E time-of-use-service and lights that I want on during in the dawn and dusk hours. Craig
Michel Kohanim Posted September 21, 2014 Posted September 21, 2014 Hi Craig, Thanks so very much for taking the time to post the details of what you are doing. Hopefully more of our CA based community will be able to use FlexAlert to help with the load on the grid and black/brownouts. Thanks again and with kind regards, Michel
Jimbo.Automates Posted September 22, 2014 Posted September 22, 2014 Hi Craig, I just added the Set program to my isy yesterday for testing, and a few minutes ago I started getting notifications that it was enabled a few times in a row, then disabled a few times, and back and forth. Have you ever had that happen? I guess the program should check the current status before changing it? I had to get logged into my isy from work and disable the program to stop it. Thanks, Jim
cmccartney Posted September 22, 2014 Author Posted September 22, 2014 Jim, No, I have never seen multiple notifications. I often get an Active notification followed 5 minutes later by a No Active notification, but this is normal from what I understand about Flex Alerts. Craig
jtara92101 Posted April 27, 2015 Posted April 27, 2015 Can you clarify if these are Flex-Alerts, OhmHours, or both? If they are flex-alerts, is there a different URL for OhmHours? (I was curious, and went to see what the site was all about...)
jtara92101 Posted April 27, 2015 Posted April 27, 2015 I'm guessing these are really OhmHours, given the frequency of alerts you say you have been getting. Flex Alerts are very infrequent - I think the last one was February 6. Am I guessing correctly that the amazonAWS server URL no longer works? I see mine was stuck at a status of "1". Then I tried the UR in my browser, and it didn't work. (The OhmConnect URL does give me an XML response.)
jtara92101 Posted April 27, 2015 Posted April 27, 2015 Ah, found it. For others: http://forum.universal-devices.com/topic/13820-ohmconnect-alerts/?hl=ohmconnect As well, https://www.ohmconnect.com/blog.html (scroll WAY down, or search for "Automation with Universal Devices") So, these are not FlexAlerts, but, in a way better - they are more often, and you can actually get a rebate of sorts for using them. Maybe some adjustments to documentation and on-screen labeling are in order? Really, the "flex alert" capability can be used with any website that provides the requisite XML. It would be trivial to set-up a server as an "adapter" to follow the real FlexAlerts, or most likely any other similar scheme. What other localities have a similar service?
jtara92101 Posted April 27, 2015 Posted April 27, 2015 FYI, got an OhmHour even this morning. My ISY sent out start/end alerts at 9:04 and 9:24. I still had the polling interval set to 10 minutes, (which is more appropriate for Flex alerts, which I think are 24-hour events). I've updated it now to poll every 5 minutes. I don't do anything with them yet (except send an alert). I did delay running the dryer.
jtara92101 Posted April 28, 2015 Posted April 28, 2015 Because of polling, it is possible to miss an alert if the status flips within the polling period. As well, I've seen other inconsistencies. Whatever programming you do around this, you can really only rely on the last status you got. And you should probably set your own timeout to terminate any OhmHour (at, say, 1 hour ) even if the "0" status is never seen. Certainly if you interrupted something interruptible, but ultimately critical or inconvenient you should use a timer to limit it. (e.g. shutting off a refrigerator or a dryer - you don't want your food to spoil, or your clothes come out musty or stiff as a board, but you could interrupt either for up to an hour...) Here's what I got yesterday and so far today. My polling period was set to 5 minutes, so on average I will trim 2 1/2 minutes off of each end: 4/27 ----- 09:04AM 1 09:24AM 0 02:36PM 0 04:51PM 1 05:31PM 1 4/28 06:31AM 1 06:46AM 0 Guessing: - sometimes there will be very short events, 5 minutes or less. That is the only thing that can explain 2:36PM. - sometimes an "Ohm Hour" will be more than an hour. It's unclear if there are hourly "reminder" messages. That seems the case above, but then unclear if the "0" message was not sent, or if the event actually extended all night. That doesn't seem likely. Overnight demand like that for whatever reason would be in the news... - Or not. Maybe there was a short "0" period a bit before 5:31PM. IMO the jury is out. This can't be relied-upon. Certainly if you are doing some programming around this, limit your cutback periods in case of message/polling failure. I'll sign up for the service, and see if the real alerts are more reliable and make more sense.
stevesreed Posted February 6, 2016 Posted February 6, 2016 I'm trying to get this set up using the custom xml link provided by ohm connect (in the account setting page)Unfortunately, the format of that link's XML slightly different than the old FlexAlert xml data: <ohmhour> <address>123 Main Sreet, San Diego, CA 92021</address> <active>False</active> </ohmhour> Does anyone know if the iSY994 actually parses the xml data, or does it just look for <active>true</Active> or <active>false</active>?If it fully parses the file, Ohmconenct could add more data at the end of their XML file that uses the flexalert format. something like: <ohmhour> <address>123 Main Sreet, San Diego, CA 92021</address> <active>False</active> </ohmhour> <flexalert> <active>false</active> </flexalert>
Michel Kohanim Posted February 7, 2016 Posted February 7, 2016 Hi stevesreed, ISY will only look for false Is it not working? Did you setup the URL properly? With kind regards, Michel
stevesreed Posted February 9, 2016 Posted February 9, 2016 ISY will only look for <flexalert> <active>false</active> </flexalert> Is it not working? Did you setup the URL properly? currently the personalized url only returns the format: <ohmhour> <address>123 Main Sreet, San Diego, CA 92021</address> <active>False</active> </ohmhour> I'm talking to ohmconnect to see if we can get the <flexalert> lines added as well, so it will work with devices looking for the <ohmhour> data and devices looking for the <flexalert> fields. As soon as we get that working, I'll post the info here.
cmccartney Posted February 9, 2016 Author Posted February 9, 2016 I rewrote my programs using the personalized URL and yesterday, at 1 pm Pacific, am OhmHour was successfully detected. I received two email notifications, one from ohmconnect and one directly from my ISY program. Also, several loads were dropped during the hour. Thanks for the effort, the changes and the information. Craig
stevesreed Posted February 9, 2016 Posted February 9, 2016 I rewrote my programs using the personalized URL and yesterday, at 1 pm Pacific, am OhmHour was successfully detected. I received two email notifications, one from ohmconnect and one directly from my ISY program. Also, several loads were dropped during the hour. Thanks for the effort, the changes and the information. Craig Hmm. I did not get the IPY to trigger based on the personalize URL. I'll check over everything again and see if I have a typo or something. Thanks for posting that it worked for your link, it help to know it should work.
stevesreed Posted February 9, 2016 Posted February 9, 2016 I rewrote my programs using the personalized URL and yesterday, at 1 pm Pacific, am OhmHour was successfully detected. I received two email notifications, one from ohmconnect and one directly from my ISY program. Also, several loads were dropped during the hour. Thanks for the effort, the changes and the information. Craig I used an integer variable instead of a state variable. So that's why it did not trigger for me. I only got my ISY last Friday, so I'm still getting the hang of it. I should probably read the manual, but where's the fun in that. Now I just have to wait for the next ohmhour. There is not usually more than 1 day or 2 between them lately.
stevesreed Posted February 9, 2016 Posted February 9, 2016 Now I just have to wait for the next ohmhour. There is not usually more than 1 day or 2 between them lately. Well that did not work. I just got an ohmhour alert, and I checked the URL manually and it was set to True, but the Flexalert status did not trigger the program to run. What version of the firmware are you using? I have the 4.3.3 RC1 (needed to use the networking module with the IPYPortal), so maybe that is an issue.
stevesreed Posted February 9, 2016 Posted February 9, 2016 I found the problem. the link on the Ohmconnect setting page an "http:" link that redirects to an "https:" location. The ISY does not seem to like the redirect. Putting the https version in works.Nice. Now, I can add more devices to automatically shut down during ohmhours.
stevesreed Posted April 17, 2016 Posted April 17, 2016 Here is a quick samples program that "chirps" my Aeon Labs ZW080-A17 siren when an OhmHour begins during "reasonable" hours. The state variable s.Flex.Alert is set as in Craig's examples. The siren is set up with the lowest volume (still quite loud) and the lease "alarming" sound. This is helpful to let everyone in the house know an OhmHour started, since not everyone gets a SMS alert, or has their phone with them all the time. If ( On Mon, Tue, Wed, Thu, Fri From 6:30:00AM To 10:00:00PM (same day) Or On Sat, Sun From 7:30:00AM To 10:00:00PM (same day) ) And $s.Flex.Alert is 9 Then Set 'ZW 002 Siren' On Wait 2 seconds Set 'ZW 002 Siren' Off Else - No Actions - (To add one, press 'Action')
cmccartney Posted April 18, 2016 Author Posted April 18, 2016 Steve, Adding the alarm is a good idea; I like it! Now I have to decide if it will pass the 'wife approval test' in my situation. Craig
Scottmichaelj Posted April 18, 2016 Posted April 18, 2016 Steve, Adding the alarm is a good idea; I like it! Now I have to decide if it will pass the 'wife approval test' in my situation. Craig Yeah sounds a bit unlikely the wife signs off on that. Moreover surprised his wife didnt shoot him. Cant image having dinner with family/friends then the buzzer goes off. Oh brb gotta do a load of towels. How hard is it to look at the time and say oh its after "X" so its Flex time? I am being a bit facetious and joking a bit here but that wouldnt work in most of our homes. To each their own what works for some families doesnt work for all, I get that. Some wives might say back "sure put in an alarm to remind YOU to do the laundry!" OOPS! Backfired
stevesreed Posted April 19, 2016 Posted April 19, 2016 Yeah sounds a bit unlikely the wife signs off on that. Moreover surprised his wife didnt shoot him. Cant image having dinner with family/friends then the buzzer goes off. Oh brb gotta do a load of towels. How hard is it to look at the time and say oh its after "X" so its Flex time? I am being a bit facetious and joking a bit here but that wouldnt work in most of our homes. To each their own what works for some families doesnt work for all, I get that. Some wives might say back "sure put in an alarm to remind YOU to do the laundry!" OOPS! Backfired Sorry for any confusion, but "OhmHours" are not flextime or off-peak rates. We already plan large usage during off-peak or super-off-peak times. OhmHours are times when the grid demand is unexpectedly higher and the large efficient power plants can't supply enough electricity, so "Peaker" plants are needed to make up the difference. Peaker plants are smaller, generall less efficient plants, and tend to produce significantly more (sometimes more than 5x) CO2 and other pollutants. They are not same time during the day, or even everyday, but reducing during them can have a significant impact, which is what OhmConnect is all about. (http://www.wired.com/2015/02/ohmconnect/) We don't "go crazy" during OhmHours. We don't stop the laundry machine, pull the dinner out of the oven, or anything like that. But it's easy to have the kids take a break from video games, postpone starting a load of laundry, or tell the dishwasher to start in a hour instead of right now. All my program does is make a 2 second alert sound when an OhmHour starts. And, yes, I definitely checked with my wife before enabling it (I'm not crazy ). She actually likes the reminder, since otherwise she missed some alerts when not near her phone.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.