tagyoureit / nodejs-poolController

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

[BUG] restoring backup appears to not complete #752

Closed samsiam closed 1 year ago

samsiam commented 1 year ago

nodejs-poolController Version/commit

8.0.1

nodejs-poolController-dashPanel Version/commit

8.0.0

relayEquipmentManager Version/commit

No response

Node Version

No response

Platform

No response

RS485 Adapter

Industrial

Are you using Docker?

OCP

Easytouch 2p

Pump(s)

Intelliflow VS, ExtremePowerUS

Chlorinator(s)

No response

What steps will reproduce the bug?

Doing some troubleshooting on my Easytouch. Backed my board up with poolcontroller and tried to restore to a different one. Restore took a long time and the restoring box never went away. I did see date up top incrementing like it was bytes loaded. That eventually stopped (restore window never went away). After about 20 minutes, I closed the browser and opened it back up. got a broken screen and now restarting NPM it errors out.

What happens?

image

image

What should have happened?

hoped to get a restore to confirm if my board has an issue

Additional information

Also trying to see if I can get any info from VSP - lightening in the area took out comms chip on Easytouch and Screenlogic. Fixed board (we think), replaced Screenlogic, and even keypad of Intelliflo. Intelliflo still not communicating. used different cable as well. rstrouse said he can help me here with Message Manager (i think).

samsiam commented 1 year ago

meant to include this - after that, restarting controller fails

image

rstrouse commented 1 year ago

Ok right off the bat I see an issue with the date/time off the panel. Please zip up your data directory or supply the original backup file you used to restore with. The date appears to be the year -271801. Not to mention Saturday Dec, 27.

samsiam commented 1 year ago

will do. it was correct on old board.

samsiam commented 1 year ago

2023-05-02_15-34-34.zip

rstrouse commented 1 year ago

What is the date/time set for the computer that is running the njsPC server?

samsiam commented 1 year ago

It is current.
image

rstrouse commented 1 year ago

That is so bizzare. I just restored that backup to a blank mock panel and it restored fine. Is the RS485 working for the target panel? Did it load on its own as soon as it started?

image

samsiam commented 1 year ago

hey, that is odd. i installed the new board and it showed up blank. then tried the restore as noted. after that it all went south. not sure what you mean by "load on its own" i dont have a startup script set yet. i did try a host reboot as well. should I try killing the config files and starting over? - renamed configs and it came back up. i will try restore again

rstrouse commented 1 year ago

If the RS485 port is connected and communicating it should read the current configuration from the panel. If communication is not working then that would explain why the restore failed.

First hook up the panel and let the initialization finish. It should detect and EasyTouch2 8 and begin interrogating any information that is currently on the panel. If you are not getting any broadcast messages from the panel then double check the RS485 connection.

This software will give you all current communication messages from the panel and if you have dashPanel connected and installed it is already on your system.

https://github.com/rstrouse/nodejs-poolController-dashPanel/wiki/Message-Manager

rstrouse commented 1 year ago

Oh and kill the files in the data directory to see what is currently configured on the panel.

samsiam commented 1 year ago

I renamed the files and it found the board. It is showing as it was when I got it from Tom. It read it in. Restoring mine seems to be an issue. I picked an earlier backup than the last one to see if it had an issue but same thing - it is loading now (date at top is incrementing). Loading Message Manager in different window shows nothing in messages as restore is going

samsiam commented 1 year ago

I may have missed this the first time. I just noticed it gives an error finally. and checking console, same crash. Going to remove my suspect VSP from the bus and start over image

samsiam commented 1 year ago

well this is new. almost as soon as i clicked restore this popped up. time still shows incrementing thought image

samsiam commented 1 year ago

also, is this OK? i have been getting this from day 1

image

rstrouse commented 1 year ago

Go into the general configuration and set your latitude and longitude. This will allow you to run schedules based upon sunrise and sunset.

samsiam commented 1 year ago

just realized message manager has a start/stop. started it and i am seeing info now. restore still going

rstrouse commented 1 year ago

You will see constant traffic on the bus. This is normal as EasyTouch will send action 2 status messages and communicate with your pump constantly.

samsiam commented 1 year ago

thanks, yea i figured that would be the case. just got lucky - the icon was not obvious

rstrouse commented 1 year ago

MessageManager in many cases is the only way we can troubleshoot equipment we do not have. When users give us a replay we can play that back to a mock install of the panel to watch what is going on with it. Without it decoding of the protocol would be near impossible.

So now that you have the system running I would like you to click on the hamburger menu in dashPanel, then navigate to the logging tab and press Capture Replay. Do not check the Reload Configuration checkbox at this point I want to see what EasyTouch is sending us on the action 5 messages. Let it run for about a minute then press the End Capture button. This should download a zip file to your browser. Upload that file here.

samsiam commented 1 year ago

replay.zip

samsiam commented 1 year ago

is that what you are looking for?

rstrouse commented 1 year ago

Yes and I am not seeing anything that reflects the strange date being set from your panel. In every instance I am seeing May the fourth be with you. The capture data looks good and the results look good in the configuration.

samsiam commented 1 year ago

this capture is before i did a restore so it has whatever configuration on it that was sent with the board. do you want me to do the capture at a different point?

rstrouse commented 1 year ago

Yes I would like to see it when it has the strange 2733 date.

samsiam commented 1 year ago

ok let me try that. start capture then do restore.

samsiam commented 1 year ago

replay (1).zip so not sure if this gets what you are looking for. i started capture, started restore. took forever and never completed - got the connection error on web interface. had to hit ctrl-c on console. once i did this the panel came back on web interface. ended capture and here it is. very strange. restore did not happen. back to what i started with but at least its not the broken interface i showed before.

rstrouse commented 1 year ago

I see the error message that we are not capturing. I'll have a look.

[5/4/2023, 3:43:34 PM] info: [3:43:34 PM] 192.168.86.25 PUT /app/restore/validate {"filename":"2023-05-01_15-34-59.zip","options":{"version":"1.1","name":"pool-backup","backupDate":"05/01/2023 03:34:59pm","njsPC":true},"filePath":"C:\\Users\\sjs\\Documents\\GitHub\\nodejs-poolController\\backups\\2023-05-01_15-34-59.zip"}
[5/4/2023, 3:43:34 PM] error: Error extracting restore options from C:\Users\sjs\Documents\GitHub\nodejs-poolController\backups\2023-05-01_15-34-59.zip: Cannot read properties of undefined (reading 'length')
rstrouse commented 1 year ago

Can I get a copy of the 2023-05-01_15-32-59.zip. The one you posted earlier is different.

samsiam commented 1 year ago

2023-05-01_15-34-59.zip 2023-05-01_15-34-34.zip

possible the -32 is something else? i only have 2 from that day. 34? image i did try a different one just to be sure it was not the file

rstrouse commented 1 year ago

I meant to type -34 so I got the file I needed. Pull njsPC and dashPanel. There was an error thrown early on that did not allow it to complete.

samsiam commented 1 year ago

still get this error. looking at the backup file it is set to 10.

image

{ "id": 10, "type": 65, "name": "Two Speed", "portId": 0, "circuits": [ { "id": 1, "master": 0, "circuit": 3 }, { "id": 2, "master": 0, "circuit": 12 }, { "id": 3, "master": 0, "circuit": 6 }, { "id": 4, "master": 0, "circuit": 11 } ], "isActive": true

rstrouse commented 1 year ago

Yes that is because of the way EasyTouch handles two speed pumps. It was shoehorned into the ET firmware at some point and requires a two step process where it is first disabled then re-enabled. We probably should not display the message as an error when it is doing this though.

rstrouse commented 1 year ago

Actually, I misspoke. An id of 10 is actually supposed to be a single speed pump. Dual speed pumps (for which you can only have one in EasyTouch) should be assigned an id of 9. The error message should have read The id for a Single-Speed pump must be 10. The backup file believes it has a dual speed pump on id 10.

samsiam commented 1 year ago

should i edit the backup file? it won't restore - just stops immediately now after that error. i believe i was messing around when i added that - not sure.

rstrouse commented 1 year ago

Yes change it to id 9 in poolState.json and poolConfig.json and it will restore properly.

samsiam commented 1 year ago

well it acted like it was uploading. stopped here. restarted panel and it is a mix of mine and what was there. not complete though image

samsiam commented 1 year ago

finally got the right part for my pump so it is back online. pulled Tom's board to retest mine and aux6/7 are bad. i will put his back in and try the restore again. i pulled the fixes - thanks

samsiam commented 1 year ago

ok, swapped board and restore worked. thanks for the help!