Feb 162014
 

PG&E Report

For the first full month of solar our PG&E graph goes a little wonky:

Technically speaking, Jan 15-Jan 20 was the first part of this last billing cycle, but despite that, our PG&E contract was still on the old pre-Net Energy Metering (NEM or Solar) program.  Which meant that PG&E was not tracking energy credits when I over produced.  I mentioned this in a previous article about how they had to download new software to our meter– Well, Jan 20th was the date they did that so Jan 21 was the fist date we were on the NEM program (and actually tracking credits.)

However, Jan 1-15 was part of the Dec 15-Jan 15 billing cycle and apparently PG&E decided to roll the charges from Jan 1-15 onto the December part of the graph.

It’s so weird how they handle the numbers.

Looking at the post-NEM period (Jan 21-Feb 12) we did pretty good on energy production vs consumption. We produced 291 kWh according to our monitoring service, we consumed 372 kWh beyond production (meaning that we consumed 661 kWh for this 23 day period. So, all in all I’d say our usage is also down from normal.  If we extend that consumption average out over a 31 day cycle we’d arrive at 890 kWh for 31 days (estimated).  The difference is likely my personal PC being in the shop between Jan 13 and Feb 5.)

PG&E Invoice, Plan Conversion, Total charges

Because our energy plan changed on Jan 20, we do pay for the electricity usage on the old plan between the 15th (when the paperwork for the plan conversion was filed by PG&E, not when we filed the paperwork with PG&E) and the 20th when the conversion was actually completed. But, between Jan 21 and Feb 12 (this first cycle) we only pay the “NEM minimum energy charges”, which for us is only $3.40 for Jan-Feb.

The balance of the charges for usage accrued is now “on account.” If we produce more energy than we consume during the coming summer months, then our credits will be deducted from the annual usage.

Once a year we’ll have a “true up” invoice which will be significantly larger than our monthly bill, but will be the total of all charges for the entire year.  This does require a little more planning and budget control, but our electricity being cut significantly means that our annual invoice will be significantly lower than our annual sum of monthly charges would be without the solar.  (e.g., Let’s say $300 per month in electricity over 12 months is $3600 annual electricity  charges.  If we say that the solar panels eliminate 80% of that bill, then the annual charge post-solar is $720.  ($3600 times 20% is $720.) This is a lot higher than a $300 monthly bill pre-solar, but when you compare $3600 to $720, it’s a lot less over the entire year.  These numbers are completely fictional to my scenario.  Until I have a full years worth of history it’s impossible to do anything other than forecast poorly.)

Our true up period for electricity seems to be Jan 15, 2015 (and annually thereafter). There is a detailed NEM energy charge summary for this billing period, which shows Tier 1-3 usage and taxes.

Some of the wording on the invoice is questionable and will require further investigation:

 If your total cumulative energy  charges are negative at the end of the true up period, the energy credit is zeroed out and not carried over to your next true up period. If your total net usage is negative at the end of your true up period, you may qualify for Net Surplus Compensation that will be reflected in your true up bill.

According to the video on the Net Surplus Compensation page, if you have a credit on your account it will be converted to a cash credit (at wholesale rates) which can be rolled over into the following true up period.

This seems to contradict what I was told when I was “sold” the system (that credits could be rolled over from one period to the next. This would be critical if your true up period began during the summer months when your energy production, and therefore credits, were at their peak. This is less critical to me as Jan is likely to be a month when we are consuming more power than we produce. Still, something that I need to look into and will follow up in a future article.)

Edit: Upon further reflection, after a full year of production and consumption peaks, this is not as big a deal as I thought it might be. Regardless of when during the year your period begins, you will have the same peak usage and peak energy generation. (e.g., winters being peak usage due to short days and less sun, summers being peak generation due to long days.)

Unsurprisingly, PG&E even tells you that there is no incentive to build a solar system large than you can use (after all, the problem isn’t transmission, but storage. Producing 5 MWh more power than we consume does nothing for anyone. The energy “goes nowhere.”– technically it goes somewhere, but I don’t know enough about the grid to speculate where surplus energy goes. However, it is safe to say that it goes nowhere useful.)

What if I install a larger generator than my home needs?

There is no incentive for installing a system larger than your business needs. Compensation for excess generation through Net Surplus Compensation is set by the California Public Utilities Commission at a wholesale rate that does not justify the cost of an oversized system.

Now, this is just the electricity portion of the bill. I also have gas, and the gas portion of the bill is invoiced monthly, just like normal.

TCO of my personal computer (a side note)

On a side note, I bought a Belkin Energy Use Monitor

and my 1500W personal rig seems to consume approximately 300 kWh per month (which is about right when you look at the reduced energy charges for this period.)  When you work this out as a monthly dollar amount it comes to about $25 bucks a month (but can double if I get myself into higher tier rates for electricity.)

Jan-Feb Solar Energy Production

Now, if I’d been thinking about how I wanted to write this post back in Jan/Feb, I’d have snagged some scrapes of  the forecast– but early February my area got hit with a nice deluge of cloud cover and rain. The Sonoma area (about 73 miles or 90 minutes North of me) actually posted flood alerts in the last 14 days, but we just got excessive cloud cover. What do this mean you ask? (Maybe you didn’t, but I’m monologueing here.)

During the height of the rain/cloud period energy production never exceeded 7.5 kWh for the entire day.  In early-mid January and clear skies, production reached nearly 17.5 kWh.  As we get closer to summer (better angle between the panels and the sun, more panels exposed, etc.) even with moderate cloud cover we managed to get up to 15 kWh for a day.

Today (so far) is looking to be clear and sunny all day (despite the forecast predicting clouds)

As of 9 AM this morning, energy production was already in excess of 1 kW/h (our “break even” is somewhere around 880 Wh or .88 kWh). By 10 AM energy production had exceeded 2 kW/h. Peak production has been around 12:30 PM.

Today (as of 3:20 PM)

18.8kWh
Peak Power: 3.36kW at  1:50 PM

I can’t express how exciting this is.

(Unfortunately, from time to time, the microinverters experience enough line noise that they stop reporting how much power they are generating– they’re still generating power– but due to the noise we lose the granular detail. Instead it tracks total reporting intervals missed, and total power produced, and then displays the average for the entire period of missed power. A straight line instead of a up/down slope. Line noise can be caused by anything, including stuff going on in other houses on the same grid. In our case, I cannot find anything inside the house that is causing the problem so I suspect the problem is in a nearby house on the local grid.)

Jan 262014
 

The initial investment in Solar was “sizable” for us but there are motivators to spending the money.

Financial installation incentives

For instance, in the US, there is a federal “RESIDENTIAL RENEWABLE ENERGY TAX CREDIT” and in some locals the state or public utility company may offer additional incentives. The US federal tax credit is 1/3rd of the total investment in solar, which includes all costs (e.g., the cost of the system, installation costs, and even repair costs incurred to make installation possible.) Since we began the installation in December, we get the credit when doing our 2013 taxes. Unfortunately in our local there are no state or public utility incentives (they’ve been exhausted). If you’re considering installation of solar panels you should certainly investigate with your state and local public utility what programs or incentives they may offer for home improvements. e.g., Pacific Gas & Electric offers home improvement incentives just for doing things like replacing your insulation, adding or replacing windows and doors to improve energy efficiency, etc. They do not offer any incentives for installation of solar panels anymore, but there are public utilities in California that still do.

Financing your installation

Additionally, the installer offered financing and financing incentives. We get 12 month, no interest, no payments financing. This gives us 12 months to pay payments to lower the principal without incurring interest. Payment can come from sources such as the tax refund resulting from the federal tax credits received for installation, as well as the savings we receive from the reduced electricity bill. Lastly, the financing has a one time adjustment to the monthly payment which occurs when the interest begins– so if our current payments are $100 and we pay 1/2 of it then our new payments would be $50. Even if your installer does not offer financing, you could consider various methods of controlling the costs:

  1. Home improvement loans against home equity, or other bank loan
  2. Credit card loans (buy, then roll over the purchase to another credit card on lower or zero percent financing for some term.)

Energy savings

Using some of the numbers I offered in my last post, if the cost of tier 4 power is $0.50 per kW (kilowatt) and our daily consumption is 40 kW and a billing cycle is 30 calendar days, you  can quickly arrive at $600 monthly electricity costs. (40 kW * 30 days * $0.50/kW) This is not an accurate number, because the energy pricing is actually on a sliding scale, so this is way more than our monthly bill (i.e., the first X kW are at tier 1 pricing, the next at tier 2, and so forth… with each tier increasing in cost. But let’s just use $600 as a budgetary number for this illustration.) If you decide to install a system that costs $40,000 (this is higher than what we paid) that is estimated to produce 1000 kW (this is more than our system produces) per billing cycle, then your balance is going to be 200 kW consumed (-1200 total usage, +1000 produced via solar, -200 consumed from the utility company). Assuming  flat pricing that’s only going to be $100 per month bill. Now, 30% of the $40,000 is given back to you through the federal tax credit so if you apply the full refund against you bill you’re only paying on $28,000 principal. If we assume a 10 year loan with 6% interest and a $28,000 principal, you’re only looking at about $310 as your monthly payments. If you were paying against the full $40,000 principal, you’d be paying about $444 per month. If you’re saving $500 on your electricity and putting $444 (or even $310), then you’re saving money by installing solar.

Home improvement value

According to an article in the 1999 edition of The Appraisal Journal [found via this article], for every $1 reduction in annual energy costs you increase the value of your home by $20. Based on the above estimate of reducing consumption by$500 per month (or $6,000 per year), the theoretical home receiving installation of $40,000 worth of solar panels would be increased in value by $120,000. In truth though, this value is highly subjective as “savings” is entirely dependent upon “usage” which is entirely dependent upon the consumer and their situation. A person who works from home and has higher energy consumption during “business hours” is going to have a much higher savings than someone who works remotely, and thus if the buyer works from home they’re going to see a lot greater value in the addition of solar panels than would someone who works out of the house. In my municipality the increase in value is not counted towards the house for the purposes of property tax, since it does not increase the “usable space” (like a pool, or a shed, or an addition to the home might.) So the only cost for us to install is the cost of the financing. When I was estimating the home improvement value on my house, I used a rough three times (3x) the cost of installation. Using that calculation, I still came in under the value proposed by the Appraisal Journal (my number was about 10% less than the estimated value from The Appraisal Journal.) In my illustration above, the numbers come out to be exactly the same regardless of which method you use. My reasons for using a 3x value was because the loan on the installation of solar was a 10 year loan, the typical home was a 30 year loan.

When it doesn’t make sense to install Solar

When your usage is in the tier 1 and sometimes tier 2, or when you want to install a solar system that can produce more energy than you will consume. If your usage is low, then the savings is minimal. Reducing tier 1 or tier 2 energy costs is not as substantial a savings as reducing tier 3 and 4 down to tier 1 or 2. Taking the above illustration, if we said you had an allotment of 300 kWh (kilowatt hour) in tier 1, 90 kWh in tier 2, 90 kWh in tier 3 and everything beyond tier 3 was at tier 4 pricing, then 1200 kWh usage per month would equate to 300 kWh in tier 1, 90 kWh in tier 2, 90 kWh in tier 3 and 720 in tier 4. If the prices are $0.16, $0.30, $0.40 and $0.50 for each tier, respectively, then your costs would be $48 for tier 1 usage, $27 for tier 2, $36 for tier 3 and $360 for tier 4 usage. This would equate to a $471 monthly bill. If we recalculate the above illustration, reducing consumption from 1200 down to 200… then our monthly usage is 200 kWh times $0.16 or a $32 monthly electricity bill.  Therefore our Solar installation needs to cost us less than $439 per month in order to make fiscal sense. While a straight $40,000 solar system installation would not make sense (because it would cost us $444 per month over 10 years with a 6% interest rate), once you deduct the tax rebate (assuming you put that money towards the principal on the solar installation), then our monthly finance payment drops to $310, which then makes solar a lot of sense. If you get the 1 year no interest, no payments financing… and you put the first years savings towards paying down the loan… then you adjust the monthly payments at the end of that first 12 months so that you’ll pay down the loan 10 years later… We apply the $439 monthly savings ($5268 annual savings) against the loan balance ($40,000 minus 30% for the federal credit is $28,000 minus $5268) which leaves $22,732 principal. At a 10 year term with 6% interest that results in a roughly $252 monthly finance payment. $252 finance payment plus + $32 electricity bill is $284 monthly combined expense, but is still far below the projected $439 monthly expense. But, if your usage was low to start with, it doesn’t make sense.   Along the same lines, it doesn’t make sense to over produce energy.  If your electricity bill is 800 kWh per month (roughly estimated at $271 per month) and you build a system that will produce 1000 kWh per month, then you have a surplus of 200 kWh per month. At the end of the year, if you consistently over produce, you’ll end up with 2400 kWh credits (and no reason to roll over those credits into next year). PG&E will only pay around $0.01-$0.02 cents. If we assume a high value ($0.02) that makes your 2400 kWh surplus worth only $48 per year ($4 per month). $252 finance payment minus $4 is a monthly expense of $248. However, if you got a smaller system, you could probably cut your month expenses even further. If your electricity bill is already less than $50 per month, you are unlikely to be able to find a system worth installing that will cost you less.   In short, it doesn’t make much sense to over produce because the return on investment for over production isn’t there.  Producing 80%-90% of your energy needs per annum is where you want to shoot for. And it’s only worth doing that if your usage is high enough (or is projected to go high enough) for the savings to exceed the cost.

Leasing vs Buying

I considered leasing, but decided against that. Firstly because photo voltaic (PV) cells degrade in efficiency over time. A system should experience a sharp reduction in efficiency (a few percentage points) the first year and then no more than 1-2% every year thereafter. The theoretical lifespan of the panels is 30 years (with current technology.) The only real attraction to the lease option over buy has been that the lease option usually includes some kind of maintenance plan (up to and including replacement of panels if they fail prematurely) as well as a monitoring plan to make sure that the leasing company is aware of failure. The downside of most buy options is that without some kind of warranty and a way to monitor the energy production of each panel individually, you have no way of knowing whether or not you bought a lemon. Most leases that I’ve seen are 25 year leases, where at the end of the lease terms they offer you the option of “buying” the solar panels “at fair market value.” The problem with “fair market value” is that after 25 years those panels are producing at about 75%-80% of their original production capability (and they will continue to degrade.)  After about 25 years, it might actually be cheaper to install a new system and take advantage of the technology advancements (from what I was told, in the last 10 years the micro-inverter advancements have been substantial, so anyone who bought panels 25 years ago would definitely want to take advantage of the increased efficiency from newer micro-inverters. In another 25 years, there is likely to be another advancement that would make it worth while to “upgrade” your installation.)

Final analysis

Our installer offered an attractive warranty on both installation and materials (the panels, micro-inverters, etc.) They also offered a monitoring package (not lifetime, but for the first X years it’s pre-paid) which let’s us monitor the efficiency of our solar panels as well as allowing us to be aware of equipment failure. Combine the home improvement value (no plans to sell the home, but it’s still nice to improve the home), the federal tax credit (which expires in 2016, unless it is extended), the reduction in our electricity bill, the attractive financing plan, and the ability to roll that financing over to another loan before the no interest, no payments feature expires (as I said above, rolling it over to a zero interest credit card offer, or maybe a home equity loan– thus extending how long we avoid interest.) There were so many reasons for us to go solar (although it is not the right decision for everyone). For us, as long as our final payments on the financing was less than the savings gained from having the panels, it made sense for us to take the plunge.

If anyone is interested in talking to my installer, I understand they offer referral incentives (both to the referrer and the referred). Let me know and I’d be happy to put you in touch.

Jan 212014
 

I recently installed Solar Panels on my house.


I had Future Energy Savers do the installation. During the installation they let me climb up on the roof with them and inspect their work. I know, like they’re going to stop me climbing on my own roof, but they were very welcoming and very helpful in explaining the installation process and why they made various decisions. I was very curious about the whole process.

They did a good job of applying electrical conduit, installing the new circuit breakers and emergency shut off switches. The whole job was very cleanly done. I felt pretty good about taking the photos. I still need to get a ladder and go back up and take final pictures showing the finished job. And while we installed in December/January (some of the shortest days of the year) and our overall energy production is significantly lower than it will be during the summer months, we’re already seeing a dramatic improvement in our “total electric consumption” numbers.

I can’t wait till the summer when energy production will be at it’s peak!

Day 1 (1/2 day) Production
(Noon-4 PM or so)

Between installation and this weekend the PG&E NetMeter wasn’t tracking credits. So all of the excess power produced was basically “free” for PG&E. We had to sign some documents and detail our NetMeter agreement terms. I’m not going to go into too much detail about this unless someone asks. But while we were waiting for them to execute on the NetMetering Agreement, we had “zero consumption” during peak solar hours (instead of energy credits) and regular usage in the evening. This produced a noticable but not dramatic reduction in electricity consumption. (It only applied for the last 9 days of the previous billing cycle. In a 32 day billing cycle we could see the impact but by then we were already in Tier 4 prices. Since installation we’ve been waiting for PG&E to determine if they needed to upgrade the NetMeter (they didn’t need to) and to push out a software update to allow them to track energy credits.

Recently, PG&E pushed the software out to my NetMeter. The billing cycle started January 15, the NetMeter was updated on January 18th. Now that we’re tracking credits our usage is down from 35-40ish kWh (pre solar panels) to 10-20 kWh. We might even remain entirely in Tier 1 rates for January. (0.13-0.16 cents currently per kWh.)

This should translate to a 90% reduction in our PG&E bill (for electricity only).

It’s very exciting.

Jan 182014
 

Use case

When work gets busy, resolved tickets sometimes are not closed promptly. For repair tickets, this artificially inflates the MTTR (mean time to resolution) and for billable/MAC (move add change) tickets, this delays invoicing the customer.

Requirements

Provide case status transition automation to control ticket closure.

Allow for a monitoring duration.

Give customers at least 8 work hours notice before transitioning tickets to “Request Closure” status.

Transition tickets back to “In Progress” if a customer response is received while in “Resolved – Closure Pending” status.

Implementation

NetSuite Script

messageAfterSubmit validates multiple criteria– if the criteria matches then the associated supportcase/ticket is updated to the iStatusUpdate value (2 = In Progress).

Required criteria:

  • Message.activity is non-null/blank.
  • Message.activity is a supportcase (ticket)
  • Message.author is not system (-4) nor null/blank
    NOTE: This if condition does mean that any external user who is CC’d on to case updates and who replies to a case update but is not a contact in NetSuite will fail to trigger transition behavior. If your environment requires non-NetSuite contacts to trigger transition behavior then you will have to remove the sAuthorID!=-4 (etc.) test. Although I have not tested this and am uncertain what behavior this might create. Alternately, you will need to add all replying parties to NetSuite contacts in order for them to trigger transition behavior.
  • Employee(Message.author) does not exist (not an internal employee) OR
    Message.author is an employee but is supportcase.contact OR
    Message.author is an employee but is the supportcase.companyID
  • supportcase(Message.activity).status is in the array iRequiredStatus
function inArray(e,t){var n=t.length;for(var r=0;r<n;r++){if(t[r]==e)return true}return false}

function messageAfterSubmit(typef)
{
 var iStatusUpdate = 2; // Set the desired status to transition to
 var iRequiredStatus = [ 22 ]; // Edit to be the status required for the status transition to be allowed, multiple values allowed
 var bUpdateCase = false;
 var oMsgRec = nlapiGetNewRecord();
 var iRecordID = oMsgRec.getFieldValue('activity');
 nlapiLogExecution('Debug','Record ID is',iRecordID);
 var bIsCase = false;
 if (iRecordID != null && iRecordID != '')
 {
  var aoFilters = new Array();
  aoFilters[0] = new nlobjSearchFilter('internalid',null,'anyof',iRecordID);
  var oSearchResults = nlapiSearchRecord('supportcase',null,aoFilters,null);
  if (oSearchResults != null && oSearchResults != '')
  {
   nlapiLogExecution('Debug','Search Result Length = ',oSearchResults.length);
   bIsCase = true;
  }
  if (bIsCase)
  {
   var sCurrentStatus = nlapiLookupField('supportcase',iRecordID,'status');
   nlapiLogExecution('Debug','sCurrentStatus/iStatusUpdate',sCurrentStatus+'/'+iStatusUpdate);
   var sAuthorID = nlapiGetFieldValue('author');
   var sAuthorEmail = nlapiLookupField('contact',sAuthorID,'email');
   var sCaseContactID = nlapiLookupField('supportcase',iRecordID,'contact');
   var sCompanyID = nlapiLookupField('supportcase',iRecordID,'company');
   var bIsInternal = nlapiLookupField('employee',sAuthorID,'entityid')? true: false;
   if( sAuthorID!=-4 && sAuthorEmail != null && sAuthorEmail != '' )
   {
    if((sAuthorID == sCaseContactID) || (sAuthorID == sCompanyID) || (bIsInternal === false) )
    {
     if( inArray(sCurrentStatus,iRequiredStatus) )
     {
      nlapiSubmitField('supportcase',iRecordID,'status',iStatusUpdate);
      nlapiLogExecution('Debug','Case Updated ',iRecordID);
     }
    }
   }
  }
 }
}

inArray has been minified using jscompress.com.

Deployment

  1. Create a new User Event script.
  2. Attach the script file to the Script record.
  3. Set the AfterSubmit function (new incoming email only trigger BeforeLoad and AfterSubmit, the Event Type is ‘create’).
  4. Save (obviously you have to fill out all required fields)
  5. Deploy script
  6. Applies to Message
  7. Audience All Roles (since we want it to apply against all incoming email)
  8. Execite as role Administrator
  9. Save

As long as the script is released/active and the deployment is released/active, your script should now fire each time an incoming email is received.

You can utilize nlapiLogExecution at various points to log execution data. Alternately, the example offered to me by Corey Hunt included the use of nlapiSendEmail which I used to help debug and understand the NetSuite message intake process. (e.g., that’s how I learned that if the Author of the incoming email is not a NetSuite contact, then the Author is -4 aka -System- with null email address. While the email address is stored on the message record (it has to be, since it appears on the message record for the Author when viewed in NetSuite), I have not yet dug into it enough to figure out where that information is stored in the message record.)

Dec 282013
 

I like building applications, and these days that means web applications. The challenge is enjoyable. During my vacation this year I decided to spend some time expanding some code that I’ve been working on over the years. In this case, a tool that runs on my PC that integrates with a database. Previously, I tended towards integrating with a local DB, be it via ODBC, a local text or Excel file, etc. This year I’m setting myself the challenge of integrating with a MySQL database over HTML.

The reason for this is because there is a substantial amount of information in my company’s online database (hosted by NetSuite), but getting access to it for any kind of automation can be tricky. However, it can be done if you’re willing to invest the development time to building an application (both sides of one). But, such a task is not something I’ve ever done before. So I’m combining a hobby and self improvement with the intention of building skills which may be useful at some point in the future at work.

As an example, an application which retrieves system information and helps organize and launch system connections (http, ssh, rdc) is a lot more portable if it retrieves the system information from a central database than something which requires all of the system information to be stored locally. If someone updates the system information and you don’t notice it, it means you could be attempting to connect to the wrong IP or server name. By automating the information retrieval you can save minutes (or over a calendar year, save hours or even days) worth of lookup time.

There are plenty of other uses, such as pulling information from a system, parsing it and then pushing it to a MySQL database directly, and then allowing that information to be displayed in an HTML format. Log parsing, etc., could be streamlined. Even, in one case, parsing the Microsoft hotfixes applied to servers and scrubbing it against a database for which hotfixes have been tested/approved by the manufacturer, would be a great application for my environment. Avaya already has something like that for the CS1000 that was created by the engineers back in the Nortel days. But they don’t have anything like that for the Avaya Aura Contact Center product line, even though they have the audit tool that would be necessary to implement the first half of that endeavor.

While tooling around with the XMLHTTP GET/POST integration for the client tool, I ran into an error on my website that was generated by Mod_Security. “An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.

Upon further investigation, I managed to capture an error log out of the shared error log on my web host “ModSecurity: Access denied with code 406 (phase 2). Match of “rx ^0$” against “REQUEST_HEADERS:Content-Length” required. [file “/etc/httpd/modsecurity.d/10_asl_rules.conf”] [line “101”] [id “392301”] [rev “5”] [msg “Request Containing Content, but Missing Content-Type header”] [severity “NOTICE”]

The rest of the error is largely environment specific, so I’m omitting that info, but if you’ve run into this error yourself, you know what it looks like.

Here’s what I learned in my search (I’m effectively building a custom browser using Microsoft XMLHTTP— the mechanism isn’t too important, be it Power Shell, vbscript or jscript)

  1. Must declare RequestHeader User-Agent
  2. Must declare RequestHeader Content-Type
  3. For POST, must declare RequestHeader Content-Length

These are not mandatory for all HTML interactions, but some security configurations may require certain headers in order to process an XMLHTTP request. In the case of my web server (shared webhosting) and my custom browser application, for a GET request only the User-Agent and Content-Type were required. However, Mod_Security was configured on the shared webhost to mandate Content-Length.

What triggered this research and error was a typo in my code.

The typo came down to a bad choice in variable declaration. In a foreach ( item in array ) statement, I poorly chose the variables to be foreach ( item in items ) and, I’m sure you can see the typo risk already, I accidentally typed foreach ( item in item ). As such, the foreach loop did not properly iterate over the array… and since the foreach loop set the RequestHeaders, the request headers were not being set. Thus, the mod_security error.

I didn’t catch the typo initially, as the first error message was mostly meaningless and I couldn’t immediately determine the cause. Still, I saw a number of articles (including some wordpress blog support requests for this error, with some fixes involving changing the behavior of Mod_Security). While the Mod_Security error isn’t very meaningful, if you dig into the error_logs deep enough, you’ll find the error message which will lead you to the root cause of the problem. In my case, an HTTP 406 indicating that “Rquest Containing Content, but Missing Content-Type header.”

Once I found the typo in the code and fixed it, the XMLHTTP request worked perfectly (except that mod_security was also configured to require a content-length request header on POST requests, but once I’d fixed the one problem the other was easily to identify and fix.)

Dec 102013
 

If you’ve ever searched for things like

  • Internet Explorer automatically opens and closes
  • How to repair or reinstall Internet Explorer
  • IE opens, flashes then closes immediately

then you know how frustrating it can be to have Windows automatic updates install the latest version of MSIE only to have it not work the next day;

I had this happen to me today and I spent nearly 90 minutes searching for solutions, trying various things solutions and repairing my Windows install.

I attempted:

The System File Checker (run within an Administrative CMD window) turned out to be my solution. A number of %windir%\system32 files were corrupted during the automatic upgrade of MSIE. SFC found and fixed all files (without the need to reboot into safe mode, etc.)

Unfortunately, if I’d been paying attention, I could have prevented this using MSIE >> About.

Nov 292013
 

Had a conversation with a friend recently about some of the things that I’ve been watching recently. He quoted/paraphrased me to his blog. So I decided provide a more detailed write up of my thoughts, and have cross posted them below:

1- Arrow does a better job with its series episodes that Marvel SHIELD. I happen to love Whedon, but SHIELD comes across as the step child of the Marvel universe, whereas Arrow (based on DC’s Green Arrow comic series) has reimagined the hero and yet paid homage to the rest of the DC universe. There series is chock full of references to things you would recognize from other DC movie franchises (Batman, Flash) as well as references to things that come only from the Comics. SHIELD has done the same, but lacks the same chemistry between its main characters (which is unfortunate, because Whedon is known for excellence in casting.)

2. Cloud Atlas (http://amzn.to/1j1BPus) was fantastic. Although the first 20 minutes is very confusing, and it takes great concentration to unravel the mystery of the series, by the conclusion you a pattern emerges and the final scenes are emotionally impactful. I was tenuously interested when it was in the theatre, but opted to skip. While it’s not the kind of movie that suffers greatly from that decision (and is still an excellent watch at home or via online streaming), I think it was worth the price of theatre admission.

3. Ender’s Game, on the other hand, greatly abbreviates the plot. While it is essentially true to the essence of the novel, the novel is quite literally too big a story for the big screen. They render the epic story down to a watery plot that omits much of the moral weight of the novel, as well as reducing the impact of Battle School on Ender (reducing his stay from years, in the novel, down to a mere 28 days in Battle School, in the movie…) Despite the loss of critical world building scenes, the movie still highlights the essential elements from the novel, remains true in spirit and provides a visual spectacle that one can appreciate.

Nov 122013
 

Issue:

  • Ports, Cards or entire Shelves disable during midnight routine.
  • NWS messages generate during midnight routine
% NWS301 8 0 : -1 -2 -3 -4 -5 -6
%
% NWS101 1 : 24
%
% NWS211 24 : 0 1

Environment:

  • Avaya CS1000, all releases
  • Nortel Meridian-1, all releases
  • Digital phones only

Cause:

  • Cabling issues and/or unplugged phones cause “continuity test” failures during midnight routines.
  • After sufficient number of port-based continuity tests fail a card reports a failure
  • After sufficient number of card-based continuity tests report failures the shelf reports a failure

Solution:

  • If a phone is removed from the jack, restore or de-program
  • If a phone cabling issue exists, fix

Comments:

  • I saw this for the first time when I was working for HellerEhrman. The site’s telecom tech would deploy phones where needed, moving phones from existing workspaces to new workspaces and document in a personal document all unused terminal numbers (TNs) for later re-use but did not de-program them. This was “speedier” for them than removing & reprogramming TNs. Doing this allowed them to save the time of programming the entire TN, they just plugged a new phone in, re-enabled the port, changed the DN and they were good.
  • However, users began reporting phones were disabling during midnight routine and had to be manually re-enabled next business morning.
  • Issue escalated to me (Firm-wide Telecom team).
  • I’d never seen this particular issue before and did not know root cause.
  • I performed routine troubleshooting and recommended several corrective actions, including routine maintenance (cleaning up TNs, etc.) but having no authority over the site tech (not being able to force them to do the recommended work and I did not know that the absence of routine maintenance was the proximate cause) I was told to escalate to Nortel (via our Service Provider).
  • Service provider had not seen it before and escalated to Nortel
  • Nortel indicated performance of routine maintenance. i.e., clean up all programmed TNs that were not going to be put back into service or reconnect a phone to any TN that needed to remain.
  • Issue resolved.

I’ve seen a couple of these tickets recently at my place of employment. So far each one appears to be the same cause/solution. I’ll post a comment later if I learn anything new.

Nov 072013
 

Issue

When IP Phones enter a reboot loop, attempt to “upgrade”, fail, then reboot again, or
When IP Phones enter a reboot loop, attempt to “upgrade”, fail with “FW authentication failure”, then reboot again

Environment

Avaya CS1000

UNIStim 5.0 or earlier

Avaya IP Phone 1100, Avaya IP Phone 1200

Cause

UNIStim firmware is digitally signed.

Signature has an expiration date.

UNIStim versions prior to 5.0 had shorter expiration dates.

New IP Phone hardware will not load firmware with expired signatures.

Source: http://downloads.avaya.com/css/P8/documents/100152833

Solution

Use UNIStim 5.1 or later firmware.

Avaya has applied a digital signature with a 10 year expiration date to UNIStim 5.1 and later.

UNIStim 5.5.1 (C8T) released in Aug 2013.

I updated my Google drive table of UNIStim firmware releases.