tagyoureit / nodejs-poolController

An application to control pool equipment from various manufacturers.
GNU Affero General Public License v3.0
323 stars 94 forks source link

Intellicenter Messages #116

Closed rstrouse closed 4 years ago

rstrouse commented 5 years ago

Tag,

Here are the files from the capture. replay.zip

rstrouse commented 4 years ago

Well I think I can get it recognize it but the manual says that there is only one valve expansion per load center. Page 65 https://www.pentair.com/content/dam/extranet/product-related/product-manuals/pool-and-spa-equipment/intellicenter/IntelliCenter_Install_Guide.pdf

I can say that I have seen conflicting info here. Not sure how one would get to 26 valves on a single load center. But then again you have only 11 supported circuits per load center. Are you sure you want that many valves? Typically, the plumbing is set up as to make sure you don't dead head a pump so 1 valve in a 3 way position often covers places where you may be thinking 2 valves. From a guy who has had a 100% failure rate on CV24s that would be catastrophic. And dangerous, at least to your wallet. Good news is that I have yet to have an Intellivalve failure. Btw my pool has 8 Intellivalves.

theRealMCQwerty commented 4 years ago

I think I can get it recognize it If you could would that make the additional valves available to assign to feature circuits? Regarding the 11 circuits per load center, I am seeing 32 available feature circuits and it is feature circuits I have been assigning valves too. Since I have an i8PS I do have 9 (8+1) aux circuits available but as far as I can see these are just for controlling relays. 😕

manual says that there is only one valve expansion per load center. Page 65

This is very confusing, from the manual:

The Expansion enclosure can be expanded to include up to five actuators (with valve module P/N
520285). Refer to the IntelliCenter Control System Expansion Kit Installation Guide (P/N 520471) for
more information. 

Part 520285 is an expansion module that adds 3 actuator ports but it looks like it is for the IntelliTouch not IntelliCenter https://www.amazon.com/Pentair-520285-Replacement-IntelliTouch-Automatic/dp/B008GTWG9A Also that whole paragraph is lifted directly from page 36 of the IntelliTouch manual: https://www.pentair.com/content/dam/extranet/product-related/product-manuals/pool-and-spa-equipment/easytouch/EasyTouch_and_IntelliTouch_Pool_and_Spa_Control_System_Load_Center_Installation_Guide_English.pdf I wonder if they just forgot to update that part for the IntelliCenter or do you think that when using an i5x or an i10x then that module is what should be used rather than the 6 port valve expansion module?

With 3 expansion boards each with the 3-port module and a main board with a personality board and a 6-port valve module that would equal a total of (4+6+2+3+2+3+2+3) 25 valves (almost but not quite 26 😄)

Are you sure you want that many valves?

...Yes 😀 - the pump dead-head issue is a concern but I already have my pad fully plumbed. I have a lot of features and two pumps, I made the whole thing very complicated but it gives me ultimate control! My hope is that if Pentair ever release the mythical firmware update to allow RS485 control of the valves then they will provide feedback as to their current position so I could avoid issues by processing the positions outside of the IntelliCenter before issuing commands to close other valves.

Worst case I will rig up an arduino and a bank of relays to control the valves, best case we can find a way to make the IntelliCenter recognize more than 10 (without shelling out $$$ on expansion load centers etc.). Middle case, if we get the firmware update and can figure out the RS485 calls then I could control the intellivalves and know their position just without connecting them to the IntelliCenter.

Thanks for all your help so far!

rstrouse commented 4 years ago

Russ and I spent a couple of hours collaborating last night and he is building configuration screens. I hope to steal his config code for the dashpanel. The system will pull all 26 from the configuration and the code for assigning circuits to valves does already exist in the poolController. If IntelliCenter doesn't reject the setting then we are probably golden. What it needs is a service layer and UX.

I will be checking in some code over the next couple of days that pulls the OCP modules in. They strangely removed the data from the panel dump but the secondary location (which we ignored) contains what looks like the correct location to be pulling from. This will register 16 valves with your two P/N 522440 cards installed. I don't quite know how they are addressed as they seem to hard-code these on the board as C-H. Internally we slap an ordinal on them as the position within the configuration so the poolController will deal with that like butter. We will know the addressing from your poolconfig.json when you run it with the new code and the two modules installed.

It also looks like they shifted one other location but you are too early in the process to notice it. It relates to lighting groups (which they called out in the release notes). This looks like we can actually remove some code that we put in to get over an issue they had with synchronizing the lights. Just need to figure out their transition bytes.

Theoretically, if I knew the protocol I could talk to the valves today but I don't have time to decode a protocol right now. In the end, these valves will exist on the comm bus and I assume that they will be sending a status periodically. Hopefully, not too often because we really don't need more chatter on the bus. Especially, if they follow the chlorinator model. That thing is an interrupting cow. In the end it will follow the OCP protocol or the Header/Terminator protocol found with the chlorinator.

Anyhoo, I'll post back here when it is ready.

rstrouse commented 4 years ago

@theRealMCQwerty,

Alright I made some changes that should recognize the installed cards and their appropriate expansion attributes. Pull down a new poolController and give it a try. It should now address all installed personality cards and expansions. The dashPanel has also been updated to include a yet to be completed configuration section. Click the gear icon on the upper right corner to see the valves that have been listed from the panel. It doesn't save anything yet but if the OCP recognizes the two valve expansions on the master panel then these should show in the list.

theRealMCQwerty commented 4 years ago

thanks @rstrouse !!

poolConfig.json:

"equipment": {
    "maxBodies": 2,
    "maxCircuits": 9,
    "maxSchedules": 100,
    "maxPumps": 16,
    "maxValves": 16,
    "maxCircuitGroups": 16,
    "maxLightGroups": 40,
    "maxChlorinators": 1,
    "maxFeatures": 32,
    "modules": [
      {
        "id": 0,
        "name": "i8PS",
        "desc": "i8PS Personality Card",
        "type": 3,
        "part": "521968Z",
        "bodies": 2,
        "circuits": 9,
        "valves": 4
      },
      {
        "id": 1,
        "name": "Valve Exp",
        "desc": "Valve Expansion Module",
        "type": 8,
        "part": "522440",
        "valves": 6
      },
      {
        "id": 3,
        "name": "Valve Exp",
        "desc": "Valve Expansion Module",
        "type": 8,
        "part": "522440",
        "valves": 6
      }
    ],
    "expansions": [
      {
        "id": 1,
        "modules": [],
        "type": 0,
        "name": "Expansion 1",
        "isActive": false
      },
      {
        "id": 2,
        "modules": [],
        "type": 0,
        "isActive": false,
        "name": "Expansion 2"
      },
      {
        "id": 3,
        "modules": [],
        "type": 0,
        "isActive": false,
        "name": "Expansion 3"
      }
    ],
    "shared": true,
    "model": "IntelliCenter i8PS",
    "softwareVersion": "1.04",
    "name": "Master Panel",
    "type": 15
  },
...
"valves": [
    {
      "id": 1,
      "circuit": 129,
      "type": 0,
      "isActive": true,
      "name": "Valve A"
    },
    {
      "id": 2,
      "circuit": 130,
      "type": 0,
      "isActive": true,
      "name": "VALVEB"
    },
    {
      "id": 3,
      "circuit": 247,
      "type": 0,
      "isActive": true,
      "name": "Intake"
    },
    {
      "id": 4,
      "circuit": 247,
      "type": 0,
      "isActive": true,
      "name": "Return"
    },
    {
      "id": 5,
      "circuit": 131,
      "type": 0,
      "isActive": true,
      "name": "VALVEC"
    },
    {
      "id": 6,
      "circuit": 132,
      "type": 0,
      "isActive": true,
      "name": "VALVED"
    },
    {
      "id": 7,
      "circuit": 133,
      "type": 0,
      "isActive": true,
      "name": "VALVEE"
    },
    {
      "id": 8,
      "circuit": 256,
      "type": 0,
      "isActive": true,
      "name": "Valve F"
    },
    {
      "id": 9,
      "circuit": 256,
      "type": 0,
      "isActive": true,
      "name": "Valve G"
    },
    {
      "id": 10,
      "circuit": 256,
      "type": 0,
      "isActive": true,
      "name": "Valve H"
    },
    {
      "id": 11,
      "circuit": 256,
      "type": 0,
      "isActive": true,
      "name": "Valve A (XP 1)"
    },
    {
      "id": 12,
      "circuit": 256,
      "type": 0,
      "isActive": true,
      "name": "Valve B (XP 1)"
    },
    {
      "id": 13,
      "circuit": 256,
      "type": 0,
      "isActive": true,
      "name": "Intake (XP 1)"
    },
    {
      "id": 14,
      "circuit": 256,
      "type": 0,
      "isActive": true,
      "name": "Return (XP 1)"
    },
    {
      "id": 15,
      "circuit": 256,
      "type": 0,
      "isActive": true,
      "name": "Intake Pool 2 ("
    },
    {
      "id": 16,
      "circuit": 256,
      "type": 0,
      "isActive": true,
      "name": "Return Pool 2 ("
    }
  ],

Logs: packetLog(2020-04-07_17-30-25).log

2020-04-07_17-30-25-20200408T012928Z-001.zip

Looks like its working!! 😁 I wasn't able to test dashpanel with it all connected as my IntelliCenter is now out on the equipment pad and it started to rain just as I got everything hooked up. Grabbed the logs and ran inside.

I did check the IntelliCenter screen and it was still only shoing 10 valves (Intake, Return, A, B, C, D, E, F, G and H) but I think that is as expected? Is the idea that I would be able to control these additional 6 actuators from dashpanel and also via the pool-controller API?

This is very exciting, I actually have yet another 6-port valve expansion module (yes I know I'm crazy), do you think that would work also?

Another bonkers question, I know there are only 4 expansion bays (3 when the personality card is installed) but since the cards connect with edge connectors do you think I could connect more than 4 cards? I currently have in my possession, the i8PS personality card 3x valve expansion cards and a pool cover card. I think I could make them fit and I can certainly test with the panel open but do you think it would work?

Thanks again!!!

rstrouse commented 4 years ago

We aren't out of the woods yet. While I am pretty confident that I can send the configuration to the OCP, I am not sure I can get it to activate the valve when the circuit turns on. I am hoping that they didn't hardcode anything after Valve H to XP1.

In short, I can set them and return them but let's see if I can get the circuit to rotate a valve. This will have to wait a bit as I have work and life in the way of my fun.

As for chaining that many cards together, I wouldn't know. One issue might be power limitations the other potential issue is how it communicates on the bus. I assume at least one of those lanes on the connector are interrupt for each connected card. Who knows maybe it is more sophisticated than that.

theRealMCQwerty commented 4 years ago

This will have to wait a bit as I have work and life in the way of my fun.

Thank you very much for all of your help so far!! My pad is currently being wired so I will run all the actuators back to the IC and sit tight until I hear back from you.

Thanks again and please let me know if there is anything I can test or info I can provide to help in the mean time.

kkzonie commented 4 years ago

Hi,

I'm very interested in the addition of IntelliCenter into this project as I want to integrate control of my pool locally into Home Assistant. Let me know how I can assist and here is my pool setup.

IntelliCenter Load Center w/SWG support IntelliCenter I10ps Pool/Spa Personality Kit IntelliChlor IC60 Cell 4x IntelliValve Actuators Pentair Mastertemp Gas Heater

Do you have an update of what is working and not working?

Thanks for all your efforts on this to date!

tagyoureit commented 4 years ago

Those should all be working in the next branch. The notables are that IntelliValve is actively being worked on and if the MasterTemp talks over RS485 then that would need to be decoded. Everything else should just work. Please do give it a try.

theRealMCQwerty commented 4 years ago

Hi @tagyoureit - your response is very interesting, a couple of follow up questions:

IntelliValve is actively being worked on

Could you provide some more detail on this? I know that @rstrouse mentioned that it appeared to be possible to control the intellivalves via rs485 but I think he said he did not have the time to reverse engineer the protocol. I have had one hooked up to my bus but of course I cant do anythign with it. Direct control of intellivalves is of very high interest to me since I have 24 of them!

if the MasterTemp talks over RS485

I am 99% sure that the Mastertemp does not have the ability to talk over RS485. I have one of these heaters and I have scoured the install manual to see if there is any mention of it. The only 'automation' is via the two wire fireman's switch, which I believe to be a dry contact. Is there something that I'm missing that you have seen regarding RS485 capabilities?

rstrouse commented 4 years ago

Hi,

I'm very interested in the addition of IntelliCenter into this project as I want to integrate control of my pool locally into Home Assistant. Let me know how I can assist and here is my pool setup.

IntelliCenter Load Center w/SWG support IntelliCenter I10ps Pool/Spa Personality Kit IntelliChlor IC60 Cell 4x IntelliValve Actuators Pentair Mastertemp Gas Heater

Do you have an update of what is working and not working?

Thanks for all your efforts on this to date!

Actually all of those items are supported in the next branch for IntelliCenter. @theRealMCQwerty is correct in that the MasterTemp is controlled by a fireman's switch. The poolController will recognize your setup with the configuration and the heat source/destination settings that have been set up on the Outdoor Control Panel.

Hybrid heat pumps do have the ability to communicate via RS485 but there really isn't much to control there.

rstrouse commented 4 years ago

Hi @tagyoureit - your response is very interesting, a couple of follow up questions:

IntelliValve is actively being worked on

Could you provide some more detail on this? I know that @rstrouse mentioned that it appeared to be possible to control the intellivalves via rs485 but I think he said he did not have the time to reverse engineer the protocol. I have had one hooked up to my bus but of course I cant do anythign with it. Direct control of intellivalves is of very high interest to me since I have 24 of them!

Yeah I don't have time to mess with the protocol but if someone else is looking at it, that would be great. I have 7 of them but no time to put together connectors and decode the comms. From what I understand it should report its current settings and provide 5 position setpoints. I know, Pentair has delayed on this as it was rumored to be released mid last year.

theRealMCQwerty commented 4 years ago

if someone else is looking at it, that would be great.

I have one lying around on my bench. Happy to power it up and connect to my RS485 interface. As for what to do after that, I would need a lot of guidance so I would probably end up consuming more time...

rstrouse commented 4 years ago

Yeah poolController will probably log the messages. The thing to do is to open dashPanel and select the logging as you see it in the screenshot. Perhaps it will yield some messages. image

theRealMCQwerty commented 4 years ago

Thanks @rstrouse. I have everything wired up and connected. I pulled down the latest 'next' branch of pool controller and the latest code for your dashPanel. I have pool controller running but I can't get dashPanel to run.

I am running windows 10 with node installed. When in the dashPanel directory from the cmd prompt I type tsc the command window pauses for a few seconds then I am given a new prompt next i type node app.js then I get an error. 😕

image

I am following tagyoureit's instructions from https://github.com/tagyoureit/nodejs-poolController/issues/116#issuecomment-597281933

Exploring the directory shows that there is no app.js file just the original app.ts from the repo. I'm assuming this means the compile failed but there is no error message in the console and node is not my language so I'm stuck....

rstrouse commented 4 years ago

Do you have a dist directory?

Try node dist/app.js

theRealMCQwerty commented 4 years ago

Try node dist/app.js

That did the trick - thanks.

Logs and replay packet capture attached:

packetLog(2020-04-21_20-30-14).log

packetCapture.zip

I am not seeing anything promising in either of those, just a lot of the exact same message.

I have my intellivalve cammed to position 1 for off and position 3 for on. With the app running, I switched between off and on multiple times. Each time waiting for the actuator to complete its movement before switching back.

rstrouse commented 4 years ago

I assume you have the RS485 bus hooked up with the green and yellow wires on the valve. Any idea what those action 82 messages relate to?

What other equipment is installed on your RS485 bus? Do you by chance have a heat pump?

theRealMCQwerty commented 4 years ago

@rstrouse IntelliValve yellow and green directly to RS485 USB adapter. Power from 24vac transformer through relay directly to white/red/black of IntelliValve. Nothing else on bus at all, just the single IntelliValve direct wider as above.

No idea what those messages are but I assumed they must be coming from the IntelliValve since it is the only thing connect. I was surprised to see no change in the messages after flipping the relay and the actuator moving positions though.

rstrouse commented 4 years ago

Well I presume these 82 messages to be our settings on the valve. There may be some sort of sequence that tells the valve that we are in control. When you say position 1 and 3 what are you referring to? The lights on the valve. Do this again and change the endpoint settings. Lets see if any of these action 82 messages change.

It is interesting that the source is 12 but how would the valve know which one it is. Perhaps this broadcast somehow contains the address. You should try to hook up 2 and see if we get two distinct sets of addresses.

theRealMCQwerty commented 4 years ago

what are you referring to? The lights on the valve.

Yes.

Do this again and change the endpoint settings.

First set point now set to 4 second set point now set to 8. Logs attached but I can't see any difference. packetLog(2020-04-22_20-29-18).log

packetCapture.zip


You should try to hook up 2

Will do but I only have one IntelliValve on my bench all the others are installed at the pad and wired in. I will need to go and rig up some cabling to get two talking on the bus and it is raining... again...

theRealMCQwerty commented 4 years ago

packetLog(2020-04-24_16-44-46).log

First I connected the USB adapter to two IntelliValves. The only things connected to the adapter were the yellow and green wires from the two valves. Neither of these valves are the one that I was using in my previous experiment on my bench. It is interesting that each appears to have a unique 'signature' in the heartbeat signal. It is also interesting that these signatures are both different from that of the previous valve on my desk. Is it possible that this is factory set and globally unique? Seems like a dangerous strategy given the finite number of unique combinations. Flipping the position of either valves had no effect on the content of the messages but it seems that a valve suspends transmission of any messages for the duration of the turning action. (You can see this first at 2020-04-24T16:46:08.146-0500 where ...76,39,119][3,235] stops transmitting as that is the valve that was moving whereas the other valve continues to transmit the heartbeat signal. Once the movement was complete the the valve began transmitting again, albeit the exact same message as before unfortunately.

packetLog(2020-04-24_17-04-58).log

Then I wondered what would happen if I added my original test valve to the mix, would it 'negotiate' a new signature. Would there be any chat on the bus other than the heartbeats.... So I wired the test valve into the bus along with the other two. (Still with just the valves connected, no IntelliCenter involved). I left the 3rd valve disconnected from the power. I also ran the monitor app before I powered on the valves. I'm not sure what the second message means, I'm assuming that is something to do with the second valve powering on. You can see the familiar heartbeat messages of the two valves after that (I tried rotating one also which is why there is a heartbeat gap).

Then I powered on the 3rd valve and..... well. I have no idea what all of that means but there is certainly some chat on the bus. @rstrouse I'm hoping you can make sense of it. 😄

Then there are some invalid messages, I think this could have been due to me moving the cables as I only had them temporarily set up and I could have been causing them to come loose. But after that, things seemed to settle down and now we have three valves sending out heartbeats. And look at that [0,128,216,128,57,159,209,162][5,63]] message, the exact same as when only that same valve was connected on my bench. What is also interesting is that the test vale is much older than the others. The other two were bought at the same time so if the signature is being set in the factory sequentially then it makes sense that the two bought together have IDs that are close together.

Anyway, this is certainly interesting but I don't really know what it all means, and I'm starting to think that these messages may hove nothing to do with the physical position of the valve. I wonder if they just broadcast their IDs until a master controller 'replies' and then they go into a different 'reporting' mode or something....

Any ideas? Happy to do more experimenting as I would LOVE to be able to control these things via RS485!!

Thanks

rstrouse commented 4 years ago

Actually addressing the valves at the factory makes a ton of sense. This done every day with anything that connects with Ethernet. Every device on every network has unique MAC address. This isn't too hard for Pentair and its manufacturers to do. The question is how many bytes did they use. Theoretically they could have a full mac address in this message. It takes 6 bytes to accomplish that for a full 48 bits.

My first reaction is that this is not the case but in 3 bytes I could get a pretty good set of unique addresses. As for the other information I would need the information if packed tightly would only need 2 bytes. Two bits (not bytes) for the status (auto/set/service) or maybe a third bit somewhere indicating transition.

I'm guessing that all 3 valves were in auto mode during the sequence and two of them didn't have their settings changed from the default. Would that that be a correct assessment?

So here is my initial guess. This message is reporting the current status of the valve. image

BELOW IS SOME WILD SPECULATION

All this being said I am fairly certain that all 5 projected setpoints are not stored on the valve. The guess is that IntelliCenter will make a determination as to which setpoint is to be active and ship it off to the valve based upon the currently running circuits from the action(2) message and the action(168) - payload(15) combination that tells every state on the controller.

rstrouse commented 4 years ago

Also by chance does one of the valves have any of the following number sequences on the serial number sticker? 10103 10060 19474 30503 4684 4369

It would be great if you included the serial numbers both above and below the barcode for each valve you had connected. I'll bet that number is how they match these up with the controller.

theRealMCQwerty commented 4 years ago

I'm guessing that all 3 valves were in auto mode during the sequence and two of them didn't have their settings changed from the default. Would that that be a correct assessment?

Correct.

  • byte(1) smells a lot like the mode (at least the upper 2 bits). All 3 valves were in the same mode I wonder if this byte changes when you switch it to service, set, or off.

packetLog(2020-04-25_20-38-33).log

Cycled through Off -> Set -> Service and made sure to wait for at least two heartbeats on each. Then changed position while in service mode. byte(1) stayed at 128 throughout.

  • byte(2-3) are perhaps the position setpoints. The high order bit may indicate which position is currently active. For instance 128 in byte(2) indicates that the valve is currently at position 0. If byte 3 was 159 then the valve is currently at position 31 (again this is wild speculation). Then again the low nibble on byte(1) would suffice nicely for this.

My test valve is cammed to position 4 and 8. Toggling the relay had no effect on bytes 2 and 3. With both remaining at 216 and 128 respectively. (As did all the other bytes in the heartbeat messages).

It would be great if you included the serial numbers both above and below the barcode for each valve you had connected.

I am not seeing those combinations in any of the serial numbers. My test valve is pretty old and beaten up so the sticker is not fully legible but I included photos for all 3.

IMG_20200425_182858 - Copy IMG_20200425_182933 - Copy IMG_20200425_203224 - Copy

Sorry this turned out to be a negative reply - I am liking your theories especially the idea that we could just flip a single bit to 'know' the format of the messages to send as commands.

Is it possible for me to try issuing a few test commands to my IntelliValve? The packetlog I included above is for the test valve I have on my bench. I know the chances of damaging it are slim to none but in any case I am willing to try issuing commands to it as a test. Even if we brick it it's worth it to me to move this forward.

As always @rstrouse, thank you for your help!

rstrouse commented 4 years ago

They couldn't make this easy. I am pretty sure that we are seeing the id for the valve. It is saying that it is there but may be just like an RS485 pump in that you don't get a response unless you ask for it.

Let me think about this a bit.

cmc0619 commented 4 years ago

Just another datapoint: 255 000 255 165 001 016 012 082 008 000 128 128 031 018 079 209 034 003 143 every 6 seconds. S/N: 1245225190054F Manufactured: 8/19/2019 Below the barcode: 16213213

theRealMCQwerty commented 4 years ago

I can set them and return them but let's see if I can get the circuit to rotate a valve. This will have to wait a bit as I have work and life in the way of my fun.

@rstrouse sorry to bug you on this but wondered if you had any more thoughts on enabling control of more than one 6-port valve expansion module on my IntelliCenter? I am completing my pad install and am wondering if I keep the current wiring with all of the actuators back to the IC in hopes that I could use all three of my valve expansion modules, or just cut the cables ☚ī¸ and re-route everything to an Arduino-controlled set of relays.

Thanks!

rstrouse commented 4 years ago

The only thing I can suggest is to try it. I have made the configuration on the -dashPanel try to send the config but we will see if IC rejects it and does not allow a circuit on OCP1 to attach to a valve EXP2. The system will send the commands we just need to see if it will actually cycle the valve.

The IC interfaces will not allow you to configure those circuits but -dashPanel will. I have found that there are some things in IC that it happily likes but doesn't seem to allow you to configure. For instance, putting a light into a circuit group on the web cannot be done but it can be done on the mobile app and -dashPanel as well.

I still have not had time to go out to the pad and wire up a few IntelliValves to the bus but when I do I will try to send some data to it to see if it responds. I've got 7 of them hooked up and 5 in a closet that I am doing nothing with. I bought extras because of all the CV24 failures I have had over the years.

theRealMCQwerty commented 4 years ago

@rstrouse I hooked everything up with the latest poolcontroller and dashPanel code. However, I don't know what I should be seeing in dashPanel to control the valves. Below are screenshots of the main dashboard and the settings.

dashpanel1

dashpanel2

I can see that it is correctly detecting the two valve expansions I currently have installed but I can't see where on the dashboard to actuate any valves, even the ones connected to the main board that are visible in the IC UI.

The FC_VALVEA and FC_VALVEB are circuits that I created for valves A and B the I set to 'show as features' so these are not what I'm looking for.

What am I missing?

rstrouse commented 4 years ago

First, what browser are you using? There should be a gears icon in the upper right that takes you to a configuration page. There you can assign valves to circuits. image Make sure you update both nodejs-PoolController and dashPanel. It's very odd that I am not seeing the gear icon, the connection status or the personality board name. image

theRealMCQwerty commented 4 years ago

Using Chrome on win 10. Latest version of Chrome. I updated both dashPanel and poolController to the latest before testing.

Will try again tomorrow but not sure why I would get a different result.

tagyoureit commented 4 years ago

One thing to try is delete your poolConfig.json and poolState.json (or make a backup of them and let the app create a new one). If anything got corrupted in all of the testing across different versions this will let you start anew.

theRealMCQwerty commented 4 years ago

One thing to try is delete your poolConfig.json and poolState.json

I had started a fresh so there were no config files.

@rstrouse I tried again (sorry it took me so long), and made sure to delete the config files from last time as @tagyoureit suggested. I still can't see the gears icon :-(

I verified that I was able to switch one of the relays from dashPanel just to see if it was communicating and it worked. Also switching the relay on the IC the state updated in dashPanel after a refresh so it does seem to be connected. Also the time was correctly reported this time in dashPanel matching the IC.

What is it that controls the visibility of the gear icon? Is there a file or some message dashPanel is looking for in order to display it?

rstrouse commented 4 years ago

The gears icon should always show unless there is an error in the browser console. Let's do a process of elimination.

First, make sure the the RS485 is connected to the IntelliCenter before starting the poolController. If it is not then it will try to start as a virtual controller without an OCP. Next load up dashPanel and press crtl-F5. It should say IntelliCenter i8PS on the left of the header, have the correct date/time from the OCP in the middle and after poolController settles down it should show a Ready icon with a gear icon next to it.

If it does not then right click on browser window and select inspect (unless you are running on an Apple product which makes chrome use their webkit). With the inspect window open hit ctrl+F5 and look for any errors in the console window. If there are any report them back. There will be one 404 where favicon.ico doesn't exist. This is chrome asking for a special icon but we don't supply it. It is inconsequential.

On another note I went out and hooked up a valve last weekend to start trying out various messages to see if I can get it to talk back. While I have managed to get the valve to echo, I can't seem to assign an id to it yet.

theRealMCQwerty commented 4 years ago

@rstrouse Quick reply from out at my panel:

Uncaught TypeError: Cannot read property 'val' of undefined
    at t.<computed>.<computed>.setEquipmentData (chemistry.js:54)
    at t.<computed>.<computed>.setEquipmentData (jquery-ui.min.js:6)
    at t.<computed>.<computed>._buildControls (chemistry.js:163)
    at t.<computed>.<computed>._buildControls (jquery-ui.min.js:6)
    at t.<computed>.<computed>._create (chemistry.js:28)
    at t.<computed>.<computed>._create (jquery-ui.min.js:6)
    at t.<computed>.<computed>._createWidget (jquery-ui.min.js:6)
    at new t.<computed>.<computed> (jquery-ui.min.js:6)
    at HTMLDivElement.<anonymous> (jquery-ui.min.js:6)
    at Function.each (jquery.min.js:2)
setEquipmentData @ chemistry.js:54
(anonymous) @ jquery-ui.min.js:6
_buildControls @ chemistry.js:163
(anonymous) @ jquery-ui.min.js:6
_create @ chemistry.js:28
(anonymous) @ jquery-ui.min.js:6
_createWidget @ jquery-ui.min.js:6
t.<computed>.<computed> @ jquery-ui.min.js:6
(anonymous) @ jquery-ui.min.js:6
each @ jquery.min.js:2
each @ jquery.min.js:2
t.fn.<computed> @ jquery-ui.min.js:6
_initChemistry @ chemistry.js:20
(anonymous) @ jquery-ui.min.js:6
el.<computed>.initChemistry @ chemistry.js:6
(anonymous) @ dashboard.js:31
each @ jquery.min.js:2
each @ jquery.min.js:2
_createChemistryPanel @ dashboard.js:31
(anonymous) @ jquery-ui.min.js:6
(anonymous) @ dashboard.js:96
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
l @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
load (async)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
jQuery.<computed> @ widgets.js:384
(anonymous) @ dashboard.js:76
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
l @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
load (async)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
S.<computed> @ jquery.min.js:2
getJSON @ jquery.min.js:2
_initState @ dashboard.js:72
(anonymous) @ jquery-ui.min.js:6
_create @ dashboard.js:6
(anonymous) @ jquery-ui.min.js:6
_createWidget @ jquery-ui.min.js:6
t.<computed>.<computed> @ jquery-ui.min.js:6
(anonymous) @ jquery-ui.min.js:6
each @ jquery.min.js:2
each @ jquery.min.js:2
t.fn.<computed> @ jquery-ui.min.js:6
(anonymous) @ (index):58
e @ jquery.min.js:2
t @ jquery.min.js:2
setTimeout (async)
(anonymous) @ jquery.min.js:2
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
fire @ jquery.min.js:2
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
ready @ jquery.min.js:2
B @ jquery.min.js:2

I see this error in the chrome console window.

Running latest code of controller and dashPanel downloaded 20 mins ago

rstrouse commented 4 years ago

Do you have an intellichlor hooked up? For some reason it doesn't have a status.

theRealMCQwerty commented 4 years ago

No intellichlor. I have an intellichem but it' is powered off at the moment

On Wed, May 27, 2020, 18:32 rstrouse notifications@github.com wrote:

Do you have an intellichlor hooked up? For some reason it doesn't have a status.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tagyoureit/nodejs-poolController/issues/116#issuecomment-634998312, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGNEWTD6QN3Y2QLGHC6MT7DRTWPKFANCNFSM4GZB2U2Q .

rstrouse commented 4 years ago

I'll have an update in a few minutes. The output should be skipping over the chemistry section and it is not. It just isn't completing the screen load as a result.

rstrouse commented 4 years ago

Can you upload your poolState.json file from the data directory? It's weird that there is a chlorinator reference yet no status on it.

theRealMCQwerty commented 4 years ago

Can you upload your poolState.json file from the data directory?

poolState.zip

rstrouse commented 4 years ago

Wow there are 4 chlorinators in there all of them with an unknown make and manufacturer. Can you upload your poolConfig.json. You can remove the personal info out of the pool section (owner and location) if you have it set.

theRealMCQwerty commented 4 years ago

poolConfig.zip

My setup may be a bit messed up as I have been messing with various things. I also previously activated the additional panels even though I don't have any (just to see what would happen).

rstrouse commented 4 years ago

That's funny originally had 4 bodies and was waiting to detect the chlorinators on each of the bodies. The configuration doesn't include them so the state is undefined. I will have an update that blows these off for now in a few minutes but you can shut down poolController and delete the poolState.json and poolConfig.json files from the data directory then restart it. It will interrogate your panel to come up with the correct config. Or you can shut down poolController then go into poolState.json and set the chlorinators to [] "chlorinators": [],. Don't forget the comma after the [].

rstrouse commented 4 years ago

I added a bunch of catch functions for when there is bogus data in the state. If you get an update of dashPanel it will blow off these crazy chlorinators. After you install it though you will need to do a hard refresh as I need to add some code to expire the cache.

theRealMCQwerty commented 4 years ago

@rstrouse image

poolConfig.zip poolState.zip

Using your latest dashPanel code.

Manually edited the poolstate and poolconfig json files.

Did hard reload each time.

😕

rstrouse commented 4 years ago

I think I know where this strange chlorinator stuff is coming from. IC is probably trying to get the salt levels from the IntelliChlor by polling it. I have added code to ignore the saltLevel check requests from IC wrt IntelliChem.

However, it is very odd that the controller name isn't being set and there are no errors in the console. I assume that the extension error is from LastPass or logmein. Are there possibly other extensions that are running? Can I get you to try another browser? Perhaps Edge or Firefox? I know IE has issues because of the lack of ES5 support.

theRealMCQwerty commented 4 years ago

Downloaded the latest dashpanel code but the repo said the last update was 2 hours ago so not sure if I should have some later code?

Tried in Edge but still the same issue. Sorry didn't screenshot that. Shut down poolcontroller went to IC and deleted the IntelliChem, deleted poolConfig and poolState then restarted.

Retried in Edge, screenshot below:

image

Then had to come in because my laptop does not like being out in the pouring rain...

Oh and:

I assume that the extension error is from LastPass or logmein.

Yes, I have LastPass on there so that was probably the source of that in Chrome

rstrouse commented 4 years ago

OMG! I think I figured this out. The css stylesheets don't get updated on the server when they are recompiled on my local repo. I need to figure this out. Not an expert at git so if I can't figure this out directly I will package them up and post them. How stupid is that. I suppose they think everyone pulling a distro would have an scss compiler. Just dumb.

rstrouse commented 4 years ago

Ok so now that I am able to duplicate your issue, I have updated the repo. You should be able to pull a new dashPanel and all of your problems (including the unrelated ones) should go away. It turns out that while the css was an issue the bigger issue were breaking changes in jquery 3.5.1.