rstrouse / nodejs-poolController-dashPanel

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

Message aborted after 6 attempts - Trying to actuate valve #85

Closed theRealMCQwerty closed 1 month ago

theRealMCQwerty commented 2 months ago

Hi, Intellicenter i8PS - firmware 1.064. njsPC: 8.0.1 dashPanel 8.0.0

I have a Valve Expansion card in my OCP which surfaces the additional valve relays in the 'Valves' section of 'Other Equipment' on the Intellicenter2.com config page. I have each of those valves mapped to a Feature Circuit, of which 'C BLK Wall Retu' is one. Each of these feature circuits shows up correctly in DashPanel. When I try to actuate any of the features mapped to valves controlled by the OCP, I get an error similar to the screenshot below (this one is for 'C BLK Wall Retu'): image

If I actuate the valve via the feature on the Intellicenter2.com website, then everything works correctly and the green light appears in DashPanel against that particular feature.

Attached are two packet captures:

'Replay DashPanel' is when attempting to actuate via DashPanel with the failure. replay DashPanel.zip

'Replay Intellicenter' is when actuating successfully via the Intellicenter2.com interface and then turning the valve 'off' again. replay Intellicenter.zip

These are all Intellivalves.

Any ideas?

Thanks!

rstrouse commented 2 months ago

Any ideas?

Yes the two NAN at the end of the frame are supposed to be the checksum for the message. You do not turn valves on or off in IntelliCenter, you actuate circuits that define how the valve should be positioned. Your valve setups are correct however you have additional Nixie circuits defined as circuits that will not show up in IntelliCenter. I suspect we probably are not ignoring the master setting (1) when sending the information to IntelliCenter and thus the message to turn on or off a circuit needs to be fixed.

I will fix this this weekend.

theRealMCQwerty commented 2 months ago

Great, thanks! So I think that also explains why adjusting lights via DashPanel is also not working? image

theRealMCQwerty commented 1 month ago

Hi @rstrouse, Sorry to bug you, just wondered if this was still on your radar or if it turned out to be more work than originally expected? Thanks!

rstrouse commented 1 month ago

It has not fallen off my radar and I think I have it sorted but I need to find some time to test it. Perhaps I will get some time to finish up the testing tonight on this and another issue.

rstrouse commented 1 month ago

Pull njsPC. The code was including Nixie circuits and features when it was communicating with IntelliCenter. IntelliCenter knows nothing of those so the message formatting would fail.

theRealMCQwerty commented 1 month ago

I pulled the latest but I am getting a lot of compile errors:

image

image

rstrouse commented 1 month ago

Hmmm. Something isn't right with your installation. Which version of nodejs do you have installed?

theRealMCQwerty commented 1 month ago

18.16.0

image

rstrouse commented 1 month ago

Are you starting from PM2 or from the command line. You may need to have it rebuild if it is using the cache the first time.

theRealMCQwerty commented 1 month ago

I do use pm2 but I tried building from the command line.

from njsPC dir:

git pull
npm i
npm run build

Then it fails to compile with the errors above.

Do I need to do a fresh install or something?

rstrouse commented 1 month ago
git pull
npm i
npm start

Do you see any errors or warnings on git pull or npm i?

theRealMCQwerty commented 1 month ago

Just tried again from the top. Looks like there were some more recent changes that pulled down with my latest pull. No errors in the pull. njspc 1

npm i looked like it worked but has vulnerabilities but I assumed last time I could ignore these. I did try an npm audit fix but that didn't seem to work image

then tried npm run build again and got the same compile errors

image

rstrouse commented 1 month ago

You should never run npm audit fix. Sadly this bs actually causes more issues than it fixes. Even with node core because it will fix things to unreleased software. Delete the entire node_modules directory and do npm i again.

theRealMCQwerty commented 1 month ago

Arg! Ok:

image

Then tried npm run build again:

image

rstrouse commented 1 month ago

Run the following command and post the results

npm ls typescript

theRealMCQwerty commented 1 month ago

image

rstrouse commented 1 month ago

Is there anything else that has changed? OS... etc.

theRealMCQwerty commented 1 month ago

I haven't updated anything on the pi for a long time. Ah, so I think this all started when the PM2 log ran my SD card out of space. I cleared off the space and it was about the time I was trying to get the pool open and working again. I had somehow lost my settings for REM so I had to reconfigure all of that. Then I tried to remember how to link it all back to njsPC. I think I figured that out again but then started having the issue with the NaN errors that I eventually got round to reporting. (Because I thought for a long time I had messed something up in linking it to REM).

I don't think any of that explains this though does it? Unless the lack-of-space crash corrupted something else. REM and DashPanel seem to be working fine though.

😕

rstrouse commented 1 month ago

Yeah I cannot understand why this is not working. I have tried several things and cannot get it to fail. You did delete the node_modules directory and try it... correct?

theRealMCQwerty commented 1 month ago

You did delete the node_modules directory and try it... correct?

Yes. (Photographic evidence: https://github.com/rstrouse/nodejs-poolController-dashPanel/issues/85#issuecomment-2159117694) :-)

Do I need to start a fresh? If so, how 'fresh' do you think?

rstrouse commented 1 month ago

Copy the data directory from njsPC and delete the existing directory. Then do a git clone on njsPC. It is so odd that the typescript compiler is failing on that module.

theRealMCQwerty commented 1 month ago

@rstrouse That got it to compile. I was able to copy the data folder back in and run successfully but... image

Back to the original problem. I checked the repo and looks like @tagyoureit reverted your changes with a more recent commit with comments "Revert "Fix intellicenter circuit message when nixie circuits are included."

tagyoureit commented 1 month ago

Ugh. I pushed a bad commit and tried to undo it but Git got me again. I likely reverted back one commit too far. :(

theRealMCQwerty commented 1 month ago

@tagyoureit are you able to un-undo or do we need @rstrouse to re-commit the previous changes?

tagyoureit commented 1 month ago

Pull it again. I re-did the changes from the prior commit.

theRealMCQwerty commented 1 month ago

Thanks @tagyoureit. Working now. Thank you @rstrouse - everything is working now. No idea what that compile issue was about but thanks for sticking with it. Closing issue. Thanks again!