rstrouse / nodejs-poolController-dashPanel

A dashboard panel for tagyoureit/nodejs-poolController
35 stars 20 forks source link

Home Page: The schedule “names” (except for the last one as indicated in the screen capture) is not loading or visible. #4

Closed cmc0619 closed 3 years ago

cmc0619 commented 4 years ago

Home Page: The schedule “names” (except for the last one as indicated in the screen capture) is not loading or visible. 2020-06-21_10-06-41 replay (2).zip

cmc0619 commented 4 years ago

Also, let me know if you'd prefer I leave these on the main nodejs-poolcontroller page instead!

rstrouse commented 4 years ago

Are all these actual schedules? I found a bug that can mistake partially added schedules as actual schedules. I noticed that several of these are schedules without assigned schedule days and then realized that you have two features that do not have a name. If you added these through dashPanel then I needed to make sure you supplied a name. I'll have a deeper look into your config as IntelliCenter is clearly telling the us that there is a schedule that should run from 2am to 3am but no indication which days it should run.

Also, if you have features that you don't typically control via the control panel but have them assigned to pumps you can uncheck the Show as Feature checkbox on the feature definition and these will only appear under the pump circuit display. Click the pump and you can turn on/off that feature. I would definitely do that to your pool and spa circuit since you can simply click on pool or spa to turn that on and off. If you do that same treatment to your lights it will move it to the lights section as well.

gw8674 commented 4 years ago

rstrouse... Hi... And thank you very much for all of the hard work that you have been putting in to this project. I for one are very appreciative of all of your efforts. cmc0619 has been acting as a go-between for me because he was so much more technically proficient with the RP, the code etc. and assisted me in getting the poolController dashboard up and running on the RP that is connected to the RS485 bus of my IntelliCenter. But now, since poolController is up and operating for me, I think at this point, it would be unfair to him to ask him to continue to pass messages back and forth and especially when it comes to answering specific questions regarding my setup etc. I may still ask him for assistance if it involves coding, the RP etc since I'm just a fledgling at this, but for now, and given the subject matter, I think I can answer your questions much easier then he can regarding the configuration of my IntelliCenter i10PS...

  1. Most all of those are actual schedules (a couple are just test schedules currently). You're right, some do not have any days assigned to them because I don't use the same schedules throughout the year. They are activated or deactivated depending on the time of year. Most (but not all), of the schedules, call for various CIRCUIT GROUPS (macros) The Pool Light T, Accent Lights and Robot make a call for AUX circuits. Here is a screen print of the schedules from the Pentair web client. 2020-06-27_9-53-48 That is how I go about activating or deactivating schedules throughout the seasons. I just click "NO DAYS" and then that schedule sits in reserve until the particular season rolls around again. This is the method that I use in order to not have to continue to re-create schedules during the course of each year. Hope that makes sense lol...

Please notice on the FLUSH SPA macro, that I actually had to make a typo correction to the Pentair web client schedule screen print, because it goofs it up (one of many reasons that I have opted to transition to the poolController Dash Panel versus that clunky and buggy Pentair web client). That macro does appear correctly at the panel however.

  1. Regarding the features without names. Yea, the Dash Panel did not initially pick up the names of those two Feature Circuits (both valve actuators) for some reason (Filter By and PS Return), but once I manually inputted them in, they took and they now appear correctly.

  2. Yep, I'm aware of the "show as feature" option, I just have elected to not use that feature at this time. Thanks..

I hope this additional information is helpful.

There are some other issues that I am experiencing with the dash panel that I would be very appreciative if you could take a look at them for me please. Going back to cmc0619's question. Would you prefer to have them posted here or would it be better to post them on the main nodejs-poolcontroller page instead? I'm still kind of learning and getting comfortable with the thread structure here on GitHub lol. Thanks again very much for your outstanding help with all of this!!!

rstrouse commented 4 years ago

Here is fine. I have found a few places in both dashPanel and poolController that could cause the circuit names to not appear. In the case of schedules they inherit the name of the circuit or feature that they are tied to. I will be posting some updates this weekend that will fix the issue.

I mistakenly assumed that any schedule reported from the OCP with a 255 byte in the circuit id was an inactive schedule. And any schedule without any selected days was either a run-once or inactive so it cleared the circuit reference. In your case it ended up being an incorrect assumption. It appears a schedule is not a schedule only when it doesn't have a start time. Funny I never tried to create a schedule with 0 days.

There's a firmware bug in IntelliCenter right now that doesn't handle the setpoints correctly so I have a home automation schedule that sets it back every night. dashPanel is an attempt to improve on the functionality and work around some of the issues. It's not perfect but it is making faster forward progress. I almost never use the web client anymore.

When you do update you dashPanel and poolController you will need to find the Reload Config button under the menu to have it request all the info from your OCP again. I'll post back here when the code is ready. image

gw8674 commented 4 years ago

Sounds great!! Understand all and thank you! Yes, I definitely find the Dash Panel much more user friendly and the aesthetics of the Dash Panel, just seem to be a lot more fun to work with.

I am so thrilled at finally getting the Dash Panel up and operating on my rp. The design is so much better than the Pentair alternative.

Given that I am excited to have the dash panel be my "go to" UI from now on, I spent some time, running functionality checks on just about everything in the Dash Panel that I could find. My goal is to finally be able to put that Pentair web client in the "dust bin of history" for obvious reasons. lol...

Here is what I have discovered to date. These are not necessarily noted in order of importance. I've attempted to provide as much detailed information as I could, to facilitate finding and correcting the issue easier.

  1. Background: The dash panel backgrounds/images will not load (darkwater, water or waterdrop). This is a very minor issue but I think those backgrounds just look cool as all get out!

  2. Home Page: The schedule “names” (except for the last one as indicated in the screen capture) is not loading or visible. NOTE: THIS IS THE SAME ISSUE AS MENTIONED ABOVE. I THOUGHT MAYBE I SHOULD TRY TO KEEP THE LIST INTACT.

  3. Home Page: When I turn on either the “Skim Winter”, or “Skim Summer” macros from the Dash Panel Home Page, the “Speed 2700” Feature Circuit indicates ON but it shouldn’t (that Feature Circuit is not in this macro). And in reality, it doesn’t turn it on, it just shows ON in the Home Page. But when I turn off those macros, then it DOES activate the Speed “2700” Feature Circuit in reality but indicates the “Pump 50” circuit ON in the Home Page. When I turn off the Pump 50 from the Home Page, in reality, it turns OFF the “Speed 2700” Feature Circuit. 1

  4. Home Page: When I turn on the “Skim Spri/Fall”, macro from the Dash Panel Home Page, it should activate the “Pump 25” Feature Circuit. And in reality, it actually does, it just doesn’t indicate it on the Home Page. When I turn off the macro, in reality it WILL turn off the “Pump 25” Feature Circuit as well. It just never indicated ON to begin with. Note: To help with troubleshooting, I have included a list of my current AUX, FEATURE circuits as well as my macros (CIRCUIT GROUPS) and what circuits are contained in each one of the macros, at the end of this list.

  5. Home Page: When I turn on the “Water Feature” macro from the Dash Panel Home Page, the “Pump 50” Feature Circuit indicates ON but it shouldn’t (that Feature Circuit is not in this macro). And in reality, it doesn’t turn it on, it just shows ON in the Home Page and the correct “Speed 2700” is actually ON, like it should be. But when I turn off that macro, then it DOES activate the “Pump 50” Feature Circuit in reality but indicates the “Pump 25” circuit ON in the Home Page. When I turn off the Pump 25 from the Home Page, in reality, it turns OFF the “Pump 50” Feature Circuit.

  6. Home Page: When I turn on the “Flush Heat/Feat” macro from the Dash Panel Home Page, the “Speed 2700” Feature Circuit indicates ON but it shouldn’t (the Feature Circuit is not in that macro). And in reality, it doesn’t turn it on, it just shows ON in the Home Page and the correct “Pump 30” circuit is actually ON, like it should be. But when I turn off that macro, then it DOES activate the “Speed 2700” Feature Circuit in reality but indicates the “Pump 50” circuit ON in the Home Page. When I turn off the Pump 50 from the Home Page, in reality, it turns OFF the “Speed 2700” Feature Circuit.

  7. Home Page: When I turn on the “Flush Fil Bypass” macro from the Dash Panel Home Page, the “Speed 2700” Feature Circuit indicates ON but it shouldn’t (that Feature Circuit is not in this macro). And in reality, it doesn’t turn it on, it just shows ON in the Home Page and the correct “Pump 30” circuit is actually ON, like it should be. But when I turn off that macro, then it DOES activate the “Speed 2700” Feature Circuit in reality but indicates the “Pump 50” circuit ON in the Home Page. When I turn off the Pump 30 from the Home Page, in reality, it turns OFF the “Speed 2700” Feature Circuit.

  8. Home Page: When I turn on the “Flush Spa” macro from the Dash Panel Home Page, the “Pump 25” Feature Circuit indicates ON but it shouldn’t (that Feature Circuit is not in this macro). And in reality, it doesn’t turn it on, it just shows ON in the Home Page and the correct “Pump 50” circuit is actually ON, like it should be. But when I turn off that macro, then it DOES activate the “Pump 25” Feature Circuit in reality but indicates that NO CIRCUIT is on in the Home Page and I have to find an alternative method of turning off the “Pump 25” Feature Circuit.

  9. Home Page: When activating the POOL circuit ONLY from the Home Page, the Home Page indicates that the IntelliChlor is operating. In reality it is not however and it shouldn’t be. I don’t have it configured that way at my panel. My IntelliChlor (and IntellipH) derives its power from the “Sanitation” Power Relay (AUX). The Line-Side of the Sanitation power relay is jumpered from the Load-Side of the Filter Pump power relay. So two conditions must be met in order for the IntelliChlor to energize. 1. The Filter Pump Power Relay must be energized AND the Sanitation Power Relay must also be activated. This should be the only time that the IntelliChlor should indicate ON, on the Home Page in my particular case. 2

  10. Settings > General Tab: Pool Controller did not pick up the fact that “Heater Cooldown Delay” should be “checked” (called “Pump On During Heater Cool-Down Delay" in the Pentair web client). When I checked it in the Dash Panel, it indicated “Saving Delays…” but just hung up there. The only way to get out of that freeze is to do a browser refresh it seems.

  11. Settings > General Tab: Pool Controller did not pick up the “Alerts” (Pentair calls them “Notifications” or “Security” options.

  12. Settings > Chemistry, Heaters, Remotes: Ability to add or edit information is missing. NOTE: I understand from cmc0619, that this is currently “work-in-progress”. I just added to this list in order to make the list comprehensive and complete.

  13. Settings > Schedules Tab: Inability to enter “+/- offset times” when using Sunset or Sunrise options when configuring schedules.

  14. Settings > Schedules Tab: I opened a schedule and attempted to edit a time and when I clicked the “Save Schedule” button, I received the following error. This error occurred on every schedule that I attempted to edit the time. 2020-06-21_13-19-19

Here is the complete narrative of the error: ApiError: Invalid heat source: null at IntelliCenterScheduleCommands.setScheduleAsync (/home/pi/nodejs-poolController-next/controller/boards/IntelliCenterBoard.ts:2347:95) at app.put (/home/pi/nodejs-poolController-next/web/services/config/Config.ts:274:55) at Layer.handle [as handle_request] (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/layer.js:95:5) at next (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/layer.js:95:5) at /home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:335:12) at next (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:275:10) at app.use (/home/pi/nodejs-poolController-next/web/Server.ts:262:21) at Layer.handle [as handle_request] (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:317:13) at /home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:335:12) at next (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:275:10) at /home/pi/nodejs-poolController-next/node_modules/body-parser/lib/read.js:130:5 Close

  1. iPhone: When opening the Dash Panel in Safari on an iPhone, the sides of the pages are cut off. I've been advised that this may be a CSS error. 2020-06-21_13-43-47

NOTE: However the Dash Panel looks outstanding on an iPad as evidenced by the following screen capture. Thanks!! 2020-06-21_13-47-05

The following images are representative of my AUX (power) and FEATURE circuits (pump speeds/flows and IntelliValves) and CIRCUIT GROUPS (macros) to help with understanding how my particular system is setup. 2020-06-27_14-26-15 2020-06-27_14-26-47 2020-06-27_14-31-26

COMMENTS: I think I went through and performed ops checks on just about everything that I possibly could. The 15 items noted above were the only discrepancies that I could find. Now there were a couple of items that the Pool Controller did not initially “pick up” from the panel. But they were minor (a couple of valve names on the Home Page etc.) and once I added them and made the corrections, they saved and everything was fine in that respect.

Considering the amount of work that it must have taken to put this Pool Controller Dash Panel together, in my opinion, only 15 discrepancies found is phenomenal.

I am already finding the Pool Controller Dash Panel, far more user friendly than that clunky Pentair web client and without many of the errors that Pentair has introduced into their current UIs.

Thank you again very much for your dedication to this project. This goes for any other contributors as well. For many of us IntelliCenter users, we do not have the skill sets necessary to develop something like this, so once again, Thank You. You have rescued us from Pentairs' evil (web client) clutches. lol...

rstrouse commented 4 years ago

I have gone through your list and have posted updates to address your issues. Thank you and update both poolController and dashPanel.

  1. Background images not working: Forgot the *nix case requirements for file names. Fixed the casing on the css. The water drop should now show. In the future you will be able to load up your own image but the background image should now load. Don't forget to hard refresh your browser.
  2. Fixed some internal sequencing for when the system is saving schedules. These should appear after you reload your config and hard refresh your browser. 3 - 8. This was all the same problem related to the circuit groups in no. 2. This should now be fixed. Verify your setup and make sure you reload the config.
  3. Not sure how to handle this as IntelliCenter behind the scenes is continually telling the IntelliChlor to change its settings. This message will continue while the pool is on. We can't really ignore them as we do need to respond to them. This will need some more thinking on our part. You don't typically see these wired up this way. Your description also tells me why IntelliChlor hasn't responded with its model name.
  4. Fixed the reference to the Heater Cooldown -- If you have a Pentair heater you should not be selecting this.
  5. Alerts have not been completed yet. We are looking at the possibility of sending these alerts through e-mail and text services so it's probably best not to create the interface for it yet. IntelliCenter uses this info for badges which is a completely different style of interface.
  6. These configuration items are still in the works.
  7. Pentair does not allow offset times for Sunrise/Sunset to be stored as of fw 1.04. There has been rumors that this is coming so we don't want to shim any functionality that is coming. (except for maybe that blasted IntelliValve).
  8. Fixed the error when saving a schedule that was not previously associated with a body.
  9. There is currently no responsive CSS for iPhone format. I'm not sure I want to create it either. The primary reason I developed the dashPanel was that the web interface isn't conducive to a wall mounted controller and my wall mounted controller isn't to my liking. You have to sacrifice so much to get the interface to fit where the rotary dial is supposed to be.
gw8674 commented 4 years ago

Good morning... Thanks for working on these... I think that I might have done something wrong. These are my steps in order. Please let me know if I goofed up somewhere along the way (which is very likely lol). cd nodejs-poolController-dashPanel git pull npm i

cd ~/nodejs-poolController-next git pull npm i

restarted the rp.

Then I opened the browser and opened the Pool Control Dashboard and then navigated to Settings > System >Reload Config and then closed the brower and reopened but I didn't see any change.

  1. Couldn't get the background to come up.
  2. Only one schedule (Pool Light T) is still showing up on the home page.

3-8 also appear to be the same.

Like I said, I must have goofed something or overlooked a step.. Thanks...

tagyoureit commented 4 years ago

@gw8674 Thanks for all the great comments. If you are looking for a mobile client give my webClient a shot. Granted, I have an EasyTouch and it is geared towards that (so possibly more bugs/inconsistencies with IntelliCenter) but both clients should ultimately work with any OCP. Cheers, Tag.

tagyoureit commented 4 years ago

BTW, by hard refresh, @rstrouse means Control-F5 (or maybe Shift-F5) to force the browser to refresh the cache. That may be one thing I didn't see in your last post.

gw8674 commented 4 years ago

Tag, Thanks... I gotcha on the "hard refresh". You're right. I didn't do that initially. I did it now though but it still didn't have an any effect. Thanks!! I will try the web client on the iPhone once I get straightened out on the Dashpanel. Thanks again!

gw8674 commented 4 years ago

Quick update... So cmc0619 remoted in for me and changed something and we did a git pull again. The background is working now so no problem there but all of the other issues are still present. Thanks!!

rstrouse commented 4 years ago

Hmmm. I'll go back through the list. I replicated some of it by tweaking my setup so there is something that I am missing regarding the schedule names. I definitely replicated 3-8 as this was because the light groups and circuit groups share positions on the RS485 bus. Mistakenly I assumed all the bytes lined up but that was just coincidental on my configuration. The Reload Config should have indexed all of these correctly. Can I get you to post another replay?

Also what did cmc0619 change so I can make sure it gets committed to the code?

cmc0619 commented 4 years ago

Nothing on this end. I deleted package-lock.json to clear the git pull conflict and did a git pull/npm I and wallah. Background!

rstrouse commented 4 years ago

Yeah there was a naming conflict in package-lock.json. I am a git/node novice. That means that the git pull probably didn't work the first time. Did you run the Reload Config after the successful pull?

cmc0619 commented 4 years ago

Me too. :) The 2nd run of git pull shows files with ++++'s and ----'s so I'd agree first one didn't work. Yes, @gw8674 reminded me and we did a reload config. Watched it count all the way up and then flipped through the screens a couple of times to see if we could get the schedules on the main page to show up.

rstrouse commented 4 years ago

Alright, the schedule problem was staring me right in the face. The schedules in question are circuit groups (macros) which is fine except that the references to these were only getting picked up when the circuit group happened to be a light group. There were issues with light group but those issues you weren't even getting to since the display would find the name in question then look for it again even though it didn't need to. Anyhow enough with how the sausage is made, if you get update nodejs-PoolController, I'm confident the schedule names should now show up.

Another note on the macros. I created similar circuit groups (macros) to yours and I found something very interesting which might be why the rumor is that Pentair is revisiting these in their next firmware release. Interestingly enough a circuit group (macro) appears to have a missing parameter on the circuit setup. I wondered what happened to it when I first started coding the interface. This is the on/off/ignore flag for the associated circuit. When you have more than one circuit group with the same circuits it falls apart if you will.

What happens is that when the macro is executed it assigns its on/off state to the associated circuits and features. If you turn on one group and it activates a circuit, then turn on another it may activate that same circuit but if one of them off it will turn off the circuit but still show the group as being on. Sadly This is something that we really cannot control short of making our own macro functions which I have talked to @tagyoureit about since EasyTouch omits the functionality.

Bear in the missing name on the schedules are absolutely related to how the state was showing in the dashPanel. This is because we weren't sending the changes in a timely manner. What this means is that the on/off state of the circuit groups should now reflect what IntelliCenter has declared as on or off. We'll have to see what Pentair does with this but if it is the same as the macros in IntelliTouch it will simply invert the on/off/ignore state when turning it off. It truly is a weird feature since the overall state of the macro is never adjusted when you turn off the circuits associated with it. Funny enough the flag exists on the mobile app but you can't actually get it to save it.

gw8674 commented 4 years ago

r Thank you for your assistance with this!!! So, with regards to the schedules, I did an update per your instructions. Here is exactly what I did and the responses received. pi@raspberrypi:~ $ cd nodejs-poolController-dashPanel

pi@raspberrypi:~/nodejs-poolController-dashPanel $ git pull Already up to date. pi@raspberrypi:~/nodejs-poolController-dashPanel $ cd ~/nodejs-poolController-next pi@raspberrypi:~/nodejs-poolController-next $ git pull remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (1/1), done. remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0 Unpacking objects: 100% (4/4), done. From https://github.com/tagyoureit/nodejs-poolController a617b81..4fbee8e next -> origin/next Updating a617b81..4fbee8e Fast-forward controller/State.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) pi@raspberrypi:~/nodejs-poolController-next $ npm i npm WARN @typescript-eslint/eslint-plugin@3.1.0 requires a peer of @typescript-eslint/parser@^3.0.0 but none is installed. You must install peer dependencies yourself. npm WARN @typescript-eslint/parser@2.34.0 requires a peer of eslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN eslint-plugin-import@2.20.2 requires a peer of eslint@2.x - 6.x but none is installed. You must install peer dependencies yourself. npm WARN mobx-react@6.1.5 requires a peer of mobx@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN mobx-react@6.1.5 requires a peer of react@^16.8.0 || 16.9.0-alpha.0 but none is installed. You must install peer dependencies yourself. npm WARN mobx-react-lite@1.5.2 requires a peer of mobx@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN mobx-react-lite@1.5.2 requires a peer of react@^16.8.0 but none is installed. You must install peer dependencies yourself. npm WARN react-dropdown@1.7.0 requires a peer of react@^0.14.7 || ^15.0.0-0 || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-dropdown@1.7.0 requires a peer of react-dom@^0.14.7 || ^15.0.0-0 || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-tabs@3.1.0 requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN redoc@2.0.0-rc.29 requires a peer of mobx@^4.2.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN redoc@2.0.0-rc.29 requires a peer of react@^16.8.4 but none is installed. You must install peer dependencies yourself. npm WARN redoc@2.0.0-rc.29 requires a peer of react-dom@^16.8.4 but none is installed. You must install peer dependencies yourself. npm WARN redoc@2.0.0-rc.29 requires a peer of styled-components@^4.1.1 but none is installed. You must install peer dependencies yourself. npm WARN nodejs-poolController@6.0.0 No repository field. npm WARN nodejs-poolController@6.0.0 No license field. audited 580 packages in 9.589s 40 packages are looking for funding run npm fund for details found 1 low severity vulnerability run npm audit fix to fix them, or npm audit for details pi@raspberrypi:~/nodejs-poolController-next $

Then I did a restart of the rp. Then opened the browser/Dashpanel Did a "System > Reload Config" Then hard refresh of the browser (cntrl F5, shift F5)

It picked up all but the last two schedules. VERY NICE!!
2020-06-29_15-24-58

Checked issues #2 - #8 and same but that must be what you are referring to with regards to the whole "on/off/ignore flag for the associated circuit" issue. The only thing that puzzles me about that, is that those macro's work just fine when invoked from the Pentair web client, iOS/Android apps and at the touchscreen. Did Pentair just "Jury Rig" it to work although they knew the coding was all goofed?

Also, just for grins, I tried #14 regarding editing and saving schedules. Still the same error as before. I may have been premature on that one, as you may have not had a chance yet to get to it yet. Sorry, if I'm jumping ahead lol...

So some progress today. Thanks again for fixing most of the schedules. Wonder why the last two are still showing blank but all of the rest are good?

There is another advantage to working through some of these issues for me. I'm starting to get a bit more proficient at the whole "update" (git pull) procedures etc. lol... Thanks again!!!

rstrouse commented 4 years ago

Hmmm. For sure the error on #14 should not have occurred. Something isn't right. Can you generate a replay for me? Those last 2 schedules look like what you get when you create a feature, assign a schedule to it then delete the feature. IntelliCenter keeps these around for some reason. If they truly are schedules that don't have a feature then you can just delete them. I know they still appear in the mobile app when you do this but I am not sure about the web app. I suppose I will give it a try.

I forgot you are the one running the beta firmware 1.047. OMG maybe they remapped the location of the feature bits. It was wonky to start with in that the first 8 were in a byte out of order with the rest. Maybe I am not quite seeing what you are seeing with these. I definitely need a replay after the the fixes you have already installed. And if they fixed the heater problem on the schedules that is a good thing. Right now I have to edit my pool schedule every day or the solar setpoint drops to 78 degrees. No reason to even have solar when it resets itself every date to 78. This is a flat out firmware bug introduced in 1.040.

gw8674 commented 4 years ago

r. Okay, sounds good. I'm happy to get you that replay. I'll need to get with cmc0619 and see if he can mentor me on the procedures on generating and sending a replay because I am still fairly "raspberry pi" stupid at this point. lol.

Ah yes, so those last two schedules call for AUX circuits only (both are checked as "Show as Feature"). They are not calling for a feature circuit or a macro (Circuit Group).

Regarding 1,040. First I will be happy to send you the beta release notes if you can provide me a way that we can PM here on GitHub. You can then take a look at those because they may have fixed your issue in Beta 1.045 I believe (i'll have to double check that). LMK on PM (if that's possible here on this site. I'm just not sure because I'm pretty new here and still haven't quite learned yet, all of the ins and outs). If you want to consider that possibility, I can provide you more info.

Thanks very much and I'll work on getting that replay to you as soon as I figure it out. lol...

rstrouse commented 4 years ago

Yeah I am a novice at the github stuff as well. I'll figure out how to pm.

gw8674 commented 4 years ago

r, cmc0619 schooled me on capturing the zipped replay file, so here we go. Thanks very much!! replay.zip

rstrouse commented 4 years ago

Thank you I'll have a look at it this afternoon. Looks like the Git folks decided that they didn't want the platform to turn into social media so they removed the PM functions in 2012. I get it, but my disdain for Faceplace, Tweeter, and Instaspam on the interwebs probably clouds my judgement there.

gw8674 commented 4 years ago

r., Cool... Thanks!! Certainly agree regarding those social media snake pits. If you're a member over on TFP, we can do it there (PM) and then I can provide you with some more info that you may find useful.

Something else in the Dashpanel, that I found this morning which had me scratching my head. The names of my last two Feature Circuits were blank again this morning (see attachment). This happened to me the first time that I loaded the Dashpanel and it pulled the info from the panel (same ones). I had originally just filled in the names and saved in the Dashpanel and everything was fine. Not exactly sure when they reverted back to blank. Those two feature circuit names were never effected (changed) at the panel or in the Pentair web client

This also caused those particular entries in the macros (Circuit Groups), that call for those circuits to indicate "undefined" within those macros. But again, everything was correct at the panel and Pentair web client.

I filled the names back in and saved again just now. Everything (Circuits and Circuit Groups) appear to be correct for the moment. I'll keep an eye on them and report back if and/or when they revert back to blank names.

Thanks for all of the effort on this project!! 2020-06-30_8-26-54

rstrouse commented 4 years ago

I have looked at your replay logs and decided to give you an update on the progress. These were extremely helpful as simply replicating your setup was not enough. I am still doing some testing but will post an update later today.

On the new issue you reported, we weren't asking for enough feature names. poolController tries to reduce the amount of information it grabs from IntelliCenter when getting the config. In this case it needed to ask for 1 more message that contained the names. poolController cleared these values when it reloaded the config and never asked for them again. The reason I have never seen this issue is because I somehow I always ended up with an odd number of features and there are 2 names per message. When you do the math you come up one message shy. The good news is that I know exactly why these names disappeared. The even better news is that it won't happen again.

The 2 schedule that the names didn't show up is a similar issue to above but just a little more insidious. It appears that you originally had 2 schedules in the middle that you deleted but IntelliCenter didn't move these up in the list. It simply marked them as deleted. We were using the length as an indicator as to how many schedules we needed to request. This is not a correct assumption in that there can be blanks in the middle. I have modified the code so that it gets all of the schedule information up to the last identified one in the list.

The same issue rings true with the indexes for the circuit groups (macros). There appears to be a byte that I have been able to replicate which I didn't quite understand. Ultimately it tells me whether the circuit group is active. While my test case calls for removing a circuit group and feature it didn't call for expiring an existing id in the middle of the grouping. This won't be a problem going forward as the poolController will now jump over these when calculating its messages.

Once I saw my folly in the circuit groups I figured out that a similar condition can exist for the features. Again, you created a couple of features and I assume they were originally assigned to either a valve, macro, or schedule then deleted the features. Pentair does some weird things with this in that it simply keeps the reference around and even continues to update all the states. I have seen in the web app that it sets a bogus reference to deleted features. I deleted a feature that was attached a pump circuit and it still referenced it as 60008. I did the same with a schedule and got similar results.

I will post back here after I push the updates.

gw8674 commented 4 years ago

r, WOW!! First, thanks so much for the super quick response! You are all over this and I am very appreciative.

Given some of your explanations, it definitely sounds to me as if Pentair has not done a good job at all when it comes to their code development. Correct me if I'm wrong. But wouldn't it be more advantageous for them to just sit down and completely rewrite the code instead of just piling on one fix (band aid) after another.

This is coming from someone who knows virtually nothing about code/APIs etc, but it seems to me like the whole thing will come crashing down at some point. Like it's not built on a solid foundation. Would you agree that they just need to rewrite the whole firmware and clean-out all of these little ankle biters that they have introduced.

Is there any way for someone to take this code and just write new 3rd party firmware? Maybe I don't know enough about all of this to ask a question like that. lol..

Anyway. you're doing yeoman's work in my opinion. Thanks for all of the effort. Let me know if I can help in anyway or if you need those beta release notes or whatever.. Thanks again.. gw

rstrouse commented 4 years ago

After having written interfaces to Jandy and Hayward, I can say Pentair is doing just fine. The problem with these things really boils down to the limitations of the equipment in the wild. While there is some goofiness with things like dangling circuit references, the overall firmware is pretty good. And unlike the aforementioned systems, they have an opportunity to fix any shortcomings simply by pushing new firmware. The others (including the older Pentair gear) requires sending the board in to have it flashed or buying a new motherboard.

Where they are struggling a bit is in the user interface department. Some of that I suspect is outsourced and unfortunately that is the way in our current times. This creates teams with members that have very little subject matter understanding of the thing they are building. It takes a bit to get all the propellers on their hats to spin in unison.

As far as this project is concerned, bear in mind we are looking at the raw byte transfer from the OCP. From that we are building the functionality from the ground up by decoding each byte coming from RS485 bus. For instance here is what the names for two of your features look like. [255, 0, 255][165, 1, 15, 16, 30, 34][2, 8, 80, 117, 109, 112, 32, 51, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 117, 109, 112, 32, 52, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0][5, 90] Just to give you a full picture, the replay you sent me contained 1,944 such messages of varying length and purpose. We have decoded the lot of them.

rstrouse commented 4 years ago

Alright I posted up the changes. Let me know if there is anything I missed as there were are few byte changes between the firmware versions.

gw8674 commented 4 years ago

r. Great. Looks like I popped on at just the right time. I'll get the changes downloaded and take it for a test drive. Many thanks !!!!

gw8674 commented 4 years ago

r, I did a complete download in both directories, restart, config reload in the dashpanel and hard refresh on the browser.

Same issue with the last two schedule names not appearing but here is why possibly. So, I went to the settings > schedules page in the dashpanel. In each one of those "missing schedule names on the Home Page, the AUX circuit and the occurrence are missing in the schedule setup page. So I made the corrections on those. Then I put the correct start and stop times in (they were incorrect values appearing), and then clicked save. Received the following error: 2020-06-30_19-53-36

Here is the complete narrative of the error in the Stack Trace pulldown:

TypeError: Cannot read property 'isArray' of undefined at IntelliCenterScheduleCommands.transformDays (/home/pi/nodejs-poolController-next/controller/boards/SystemBoard.ts:1908:17) at IntelliCenterScheduleCommands.setScheduleAsync (/home/pi/nodejs-poolController-next/controller/boards/IntelliCenterBoard.ts:2481:49) at app.put (/home/pi/nodejs-poolController-next/web/services/config/Config.ts:297:55) at Layer.handle [as handle_request] (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/layer.js:95:5) at next (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/layer.js:95:5) at /home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:335:12) at next (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:275:10) at app.use (/home/pi/nodejs-poolController-next/web/Server.ts:262:21) at Layer.handle [as handle_request] (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:317:13) at /home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:335:12) at next (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:275:10)

Errors 3. through 9. remain the same as before. I tested all. Error 10. appears to be corrected. Error 14. is not occurring on all of the schedules now. Only the following schedules are still experiencing that error:

Skim Summer 1:05 - 5:00 Clean Summer 11:00 - 13:00 Clean Summer 20:00 - 23:30 Flush Spa 14:00 - 14:03

I'm hoping I did the download and all of the procedures correctly but pretty sure that I did. LMK if you need another replay.zip, any screen captures or anything else I can provide that will assist. I thank you for working on this!!!!!

rstrouse commented 4 years ago

Do me a favor and select at least one day. Then save. If that works then I’ll know what to do. I don’t have this issue.

gw8674 commented 4 years ago

I did that but then I got the same error when I click "Save Schedule", as I do when I attempt to click Save for the Skim Summer, the two Clean Summer's and Flush Spa. Here are the details: 2020-06-30_21-27-53

ApiError: Invalid heat source: undefined at IntelliCenterScheduleCommands.setScheduleAsync (/home/pi/nodejs-poolController-next/controller/boards/IntelliCenterBoard.ts:2494:95) at app.put (/home/pi/nodejs-poolController-next/web/services/config/Config.ts:297:55) at Layer.handle [as handle_request] (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/layer.js:95:5) at next (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/layer.js:95:5) at /home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:335:12) at next (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:275:10) at app.use (/home/pi/nodejs-poolController-next/web/Server.ts:262:21) at Layer.handle [as handle_request] (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:317:13) at /home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:335:12) at next (/home/pi/nodejs-poolController-next/node_modules/express/lib/router/index.js:275:10) at /home/pi/nodejs-poolController-next/node_modules/body-parser/lib/read.js:130:5

Thanks!!

rstrouse commented 4 years ago

This is really bizzare. The code referenced above is behind glass and only executes in an emergency. Not really an emergency but when it detects an incompatibility with one of the installed libraries. What web client are you running on? Is it by chance an iPad2? The other thing might be that the dashPanel may need to be re-installed due to the package-lock.json weirdness in npm.

gw8674 commented 4 years ago

r. Not quite sure of the question. As far as the browser, I'm running the dashpanel on chrome on a windows 10 machine. And running it also on Chomium on the RP. Both have same results. Or when you ask about the web client, are you referring to the Pentair web client? If that is what you are referring to, it's Web Client Version: 1.048 b7 Jun 4, 2020 Not quite sure how to re-install the dashpanel. Isn't that what I do when I do a download?

rstrouse commented 4 years ago

So it's not the ES5 fiasco that is iPad2 and this matches my test rig with Windows 10 and Chrome. The Pentair web client doesn't play a role here so that is out. Chromium on RP on my end works beautifully so something else is not sending the information to the server. There are checks to make sure the data is always sent with a heatSource.

This leaves some other thing that I haven't identified. The dashPanel and poolController code install that you do with git pull does update dashPanel and poolController but there are some other 3rd party libraries that are installed with npm. These are installed when you do the npm -i in the project directory. This is my next attack vector.

I don't suppose you know how to operate the console in Chrome to get me the text that is emitted there when you press the save button on the schedule do you? Specifically I am looking for this message. image

gw8674 commented 4 years ago

Okay. Got it. Lol... Just before you posted, cmc0619 contacted me and started to explain to me what you were asking for and while we were conferring, your message popped up. And thanks for the explanation. I'm in "learning mode" lol...

So, here is what you are asking for and as always, Thanks!! This is what I get when I try to save one of those schedules 2020-07-01_10-26-06

rstrouse commented 4 years ago

You almost supplied what I needed. There is a little triangle next to the message I need you to click it so that it expands the data. I want the one that starts with `{"method": "put". I already know that it is emitting an error 500. From what I am seeing there it looks like the schedule is defined as activating solar when you don't have a solar heater. That is if the attribute under that triangle says "heatSource": 5.

I'll double check your logs to see if IntelliCenter defaults this to solar or if you originally set the schedule with a solar heater installed but then removed it. This could simply be that IntelliCenter doesn't clear that byte or we are setting a default when nothing is supplied. If the latter is the case our code needs to check which heaters are available.

gw8674 commented 4 years ago

I found lots of triangles so I may be providing too much (unneeded info), if so, please disregard. Thanks!! 2020-07-01_11-14-39

rstrouse commented 4 years ago

Uggh I need the info that is cut off on the data line. That is in your first message. Google can be so stupid sometimes as the relevant information in the payload is the one that they cut off. Unfortunately, the only way I know to be able to see this is to click the 3 little vertical dots to dock the window at the bottom. I am looking for the string after data: on the first arrow you expanded. image

gw8674 commented 4 years ago

Better? 😃 2020-07-01_12-10-24

rstrouse commented 4 years ago

Almost I need the message right above where you cut it off. From your original screenshot I am looking for this line except not cut off. It contains all the schedule data that is being sent to the server. Let's try one more time. We'll go another method if that doesn't do it. image

gw8674 commented 4 years ago

Dang, I keep missing the target lol... Sorry... Okay, I think I got it now. LMK.. 2020-07-01_12-37-13

rstrouse commented 4 years ago

Holy buckets!!! That splains it all you can't hold water with that. I'll have a code update in ~ an hour after testing. This goes to prove that the source of all errors is code.

rstrouse commented 4 years ago

Make that 2 hours I have just been tasked with sticking food in my hole.

gw8674 commented 4 years ago

r, Cool... That's great that it jumped out at you. Thank you very much!!! 🙇‍♂️

rstrouse commented 4 years ago

Ok so I checked in the fixes. Here is what is going on with this and probably has something to do with the current fw bug in the released code. The following message if you are interested contains the data for the heat source. Valid values for fw prior to 1.047 include 0, 3, 5, or 32 for all the bytes after the 3, 28 sequence. The values for your panel are below. I assume 1 means that the heat source is OFF which is what I mapped it to. A good check is to look at your pool schedule and see what is selected there for the Heat Source. I do need you to check this in the IntelliCenter app as this is a previously unknown value and I do not have this firmware. [255, 0, 255][165, 1, 15, 16, 30, 42][3, 28, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1][1, 74]

Pull both poolController and dashPanel. After you have updated and restarted them Reload Config and check to see if the configuration is correct. All schedules, features, and circuit groups should be up to snuff. If we are ok there and you can save your schedule, then lets move on and I will have a different set of instructions for troubleshooting the feature indicators.

gw8674 commented 4 years ago

r. Sorry for the delay. Had to take care of a few things but back now. I sort of got what you are saying. I have checked all of my schedules for a "heat source" and nothing there. The only Circuit Group that calls for a heat source is the "Relax" macro because it calls for the "spa" circuit and "SPA" is the only body selected for the heater. Heat Mode for the pool circuit is OFF. I'll start working on the pull and reload now and will report back in a few. Thanks much!!

gw8674 commented 4 years ago

r., Item 2. Fixed! Those last two schedules are now showing up. Nice... Thank you! 2020-07-01_19-40-16

So, here is what I have discovered as far as editing existing Schedules.

I tested every Schedule and they all react the same. If I make a change to the time. It saves and I watch the actual save take effect on an open Pentair web client window. But then if I try to change that time back to its original time, then it errors with the Invalid heat source: null error.

I have even tried exiting that page and come back to it but that doesn't work. It's like its stuck after the first successful save.

rstrouse commented 4 years ago

For now let's move on to getting the circuit groups fixed. I now know that I will need to decode all the new settings for heat sources as they relate to the upcoming firmware. Based on what I am seeing it looks like they changed all the options.

Depending on how this step goes we can see about getting these extracted from your firmware version. What I would like to do is focus on one circuit group (macro) In this case I would like to focus on Skim Winter. I know that the new firmware is skipping bytes on the feature identifiers I just need to know how they are aligned.

PLEASE READ ALL INSTRUCTIONS CAREFULLY BEFORE BEGINNING

Step 1

Turn all equipment off. Nothing should be running on the pool.

Step 2

Go to the menu bars at the top and select the logging tab. From there I want you to click Capture Replay but this time I want you to uncheck the Capture Configuration Reload checkbox. After you have unchecked the option click on the Begin Capture button. image

Step 3

Click away from the settings window to allow it to close. After it has closed click on the Skim Winter circuit group button to activate it. Wait a couple of seconds to let it stabilize then click it again to turn it off.

Step 4

Click the menu bars on the upper left again to open the Settings dialog then select the Logging Tab. Click the Cancel Capture button and it will download a zip file to your browser. This will contain all I need to troubleshoot the macros. Whatever you do NEVER leave the capture on for an extended period of time. It will grow and grow until it won't anymore.

Thanks.

gw8674 commented 4 years ago

r, Thanks. Here is the file... replay (1).zip

rstrouse commented 4 years ago

Unfortunately, you didn't uncheck the Capture Configuration Reload. This file contains too many message to get to the ones I need. Please, go through the steps one by one and only activate/de-activate the Skim Winter macro.