Internet Explorer Support

I have a Surface 2 tablet that I still use sometimes. It is a nice size and generally works fine for viewing websites. I noticed that it did not work at all for IotaWatt. Figuring out the issue using the version of IE included with Windows 8.1 was not going to be easy, but I discovered that IE on Windows 10 had the same issue. So, I turned on the developer tools and now know why it is failing.

IE does not support the usage of default assignment in the function header, so this:

function validateInput(id, required=false, msg=undefined){

Needs to be something like this:

function validateInput(id, required, msg){
if (required === undefined) {
required = false;
}

That got me past not being able to click the buttons and have them do anything. But, even after changing this usage the page would display, but not update. Of course, it would update just fine when I had the debugger on. Searching the internet I saw many people suggested not using XMLHTTPRequest and instead using jQuery’s AJAX . I changed that, but it still didn’t work. It turns out the default on IE is to cache the results so it would not update. Luckily, there is a setting to turn that off.

Let me know if you are interested in getting a PR, but you should probably accept the one from the graphing, since this one is to a different file for a very different purpose. I am not sure exactly how you want to manage PRs. When it is only you developing something, it is not something you need to worry about. But, if you want people to contribute, having some process defined helps a lot.

Anyway, I can now see graphs and status on IE, so it is working fine for me. It still works on Edge and Chrome on Android, so it probably makes sense to use it for everyone.

HI Guys, I think we should help Bob define his PR process…

  1. Are you concerned with licencing, do you need CLAs, you could setup a bot to automate such as cla-bot
  2. Could you add github issues and label “feature requests” for all the improvements you want to do then your contributors could discuss then implement and raise a PR for group review and then final acceptance from Bob. There might be a github tool for voting or something to help determine order.

Some suggestions from githib here…

Any other questions/suggests to ask Bob to help firm up the process?

My skill set is around WebDev, but I am interested in the embedded side of things also.

Regards
Tim

Having a CLA is a good idea, though many smaller and even larger projects don’t have one. The CLA is really important for projects that have some commercial connection.

Ultimately someone needs to make the decision when something is good enough and desireable to add. I added things I wanted, but found the suggestions from both of you valuable in improving them. It was only a little bit extra effort to figure out how to make them work and I learned something in the process so we’ll worth it.

I have more ideas for improving things. Some of them might be things other people would find interesting too.

Having automation is great, but the changes I made probably require manual testing to verify and a good test plan. Since the code is borrowed, I would guess there is not a very detailed written test plan.

I am sure there are probably some instances where the time picker value will be incorrect. I made the decision to not invalidate it when panning though maybe it should.

There probably should also be a refresh the graph, but don’t make me select everything again button/choice. Issues/feature requests is a common way of doing this. There is also the community forum.

I do intend to integrate the PR for graphing changes. I’ve been consumed by the 50Hz phase correction project. I have been using your version locally and it works great, but experience cautions me to give it as much time as possible to see if any unintended consequences emerge. So far, so good. If that holds, I’ll merge it before cutting the next release, which is the only controlled way to put it out.

With regard to IE, I did try it on a windows 10 system and it doesn’t work as you have described. I have to marvel that this hasn’t been reported before. I’ve never been a fan of IE. It always seemed to have an agenda. I prefer Firefox or Chrome. That said, it does need to be fixed and you seem to have done the legwork. So a PR for the default function parameters would be fine. Can you advise if you’ve looked at all of the functions and fixed all incidence? Don’t know about the xmlHTTPrequest issue. I can look into that once the PR is available to get that far.

Looking forward at a PR policy, that’s probably not something I’m going to spend any time on. The project is open. As I write this there are no less than six repositories of IoTaWatt on Github. It seems to me that’s what Github is all about. PRs can fall into two categories:

Bug fixes - or things that don’t work as best they could. I’m open to reviewing any such input and will gladly work to integrate outside fixes. I probably should have a template for documenting those issues, but I won’t commit to getting around to that. This IE problem would definitely fall into this category.

New or Extended Features - These are suggestions for improving the product. With respect to the basic ESP8266 firmware, new functionality has to conform to what I selfishly consider to be the core mission, and the code, if extensive, would have to be in harmony with the grand scheme. That’s hard to do and in my experience, with my demeanor, can be very messy. We all have our faults. That said, the recent experience with @bcosta and PVoutput worked out well in the end. Understand that the way I code, a final component may be rewritten several times. That’s how I think through a problem and discover how to solve it. I took what was contributed and rewrote it using his basic approach and informed by some of the problems that he had dealt with. In the interim other parts of the firmware had to be changed to provide things like a native local time resource with DST rules.

With respect to add on tools like graph, I’m very open to new tools that might be added to the system like something to do data extraction or other visualizations like pie charts, dashboards, or mobile apps.

I’d rather work one-on-one with the so-far limited number of folks who are motivated to do these things than spend a lot of time on formal policies and procedures.

Thanks to all who take such an interest in the future of IoTaWatt to engage in this discussion.

1 Like