Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 15 18:37

    rstrouse on master

    Added processing for RTS signal… (compare)

  • May 15 15:46
    556duckvader commented #293
  • May 15 01:33
    acronce commented #294
  • May 14 20:18
    tagyoureit commented #294
  • May 14 17:30
    556duckvader commented #293
  • May 14 16:27
    rstrouse closed #292
  • May 14 16:27
    rstrouse commented #292
  • May 14 16:22
    rstrouse commented #290
  • May 14 16:17
    Telemachus1977 commented #292
  • May 14 15:37

    rstrouse on master

    Fix Issue #292 - Added signatur… (compare)

  • May 14 10:35
    Tegguy commented #290
  • May 14 00:39
    rstrouse commented #290
  • May 13 23:59
    acronce commented #294
  • May 13 23:53
    acronce commented #294
  • May 13 22:26
    omo22 commented #289
  • May 13 21:57
    acronce commented #294
  • May 13 20:48

    tagyoureit on 7.1.0

    (compare)

  • May 13 20:47

    tagyoureit on master

    7.1.0 changelog (compare)

  • May 13 20:42
    tagyoureit commented #289
  • May 13 20:42
    tagyoureit commented #294
ckurlinski
@ckurlinski
Use the external ip, if config
in the dashboard setup
I never used the loopback address
id-redacted
@id-redacted
Yes, I am using the direct ip(in this case 192.168.1.170)
ckurlinski
@ckurlinski
192.168.1.170:4200
id-redacted
@id-redacted
image.png
image.png
ckurlinski
@ckurlinski
restart the njpc
leaving dashboard running
id-redacted
@id-redacted
Ok. Nevermind. I have found the problem. Somehow my firewall rule to allow 4200 was lost.
I just re-added 4200 and its working fine.
Thanks
ckurlinski
@ckurlinski
ahhh, that will do it
No problem...
ufw
id-redacted
@id-redacted
So - now the question is: How do I get these to start on boot?
ckurlinski
@ckurlinski
from njpc wiki
systemd service would be the easiest
and do a similar service for dashboard
just verify your njpc and dashboard install folder
then verify node command - which node
ckurlinski
@ckurlinski
_service_dir=`find ~ -type d -name nodejs-poolController`
_node_cmd=`which node`
_node_user=`whoami`
_service_file="poolController.service"
_service_descr="NodeJS Pool Controller"
_service_doc="https://github.com/tagyoureit/nodejs-poolController/"
cat <<EOF > ${_service_file}
[Unit]
Description=${_service_descr}
Documentation=${_service_doc}
After=network.target

[Service]
Environment=NODE_ENV=production
Type=simple
User=${_node_user}
WorkingDirectory=${_service_dir}
ExecStart=${_node_cmd}
Restart=on-failure
RestartSec=15s

[Install]
WantedBy=multi-user.target
EOF

sudo cp ${_service_file} /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable `echo ${_service_file} | awk -F . '{print$1}'`
sudo systemctl start `echo ${_service_file} | awk -F . '{print$1}'`
sudo -n journalctl -o cat -n 2500 -f -u `echo ${_service_file} | awk -F . '{print$1}'`
adjust the vars for dashboard to create that one
tagyoureit
@tagyoureit

Hi all... PSA!
We pushed up 7.0.0 to the master branch. REM/dashPanel have also been updated to 7.0.0. Moving forward, we will be making all commits directly to the master branch and no longer doing development in the next branch. If you have been on the next branch now is the time to switch over to master.

You'll also notice that webClient is missing from that list. It hasn't gotten any love in the past ~7 months and I've previously hinted that it's going away. It's now officially deprecated so if you are still on webClient now is the time to move over to dashPanel.

Version 7 brings much improved connectivity between REM and njsPC. Setup has been streamlined between the two and there have been significant improvements in using njsPC + REM as a standalone controller/replacement for a commercial OCP (outdoor control panel).

20 replies
johnny2678
@johnny2678
image.png
Michael Smith
@emes
If anyone wants Docker images, these are built daily.
1 reply
DrJeff
@DrJeff

Version 7 brings much improved connectivity between REM and njsPC. Setup has been streamlined between the two and there have been significant improvements in using njsPC + REM as a standalone controller/replacement for a commercial OCP (outdoor control panel).

YES! Thanks

1 reply
2delarosa
@2delarosa

I'm looking to upgrade to version 7 so I checked out the master for nodejs-poolController but I get the following error when I try to check for a branch in nodejs-poolController-dashPanel

  • fatal: Failed to resolve HEAD as a valid ref.

Does it mean I need to clone the repository again, and if so, what files besides the config.json should I back up

84 replies
tagyoureit
@tagyoureit
Dang. I can’t fix anything. @rstrouse is too quick.
rstrouse
@rstrouse
Ive gotta please the wives
2delarosa
@2delarosa

LOL. I got sidetrack with Openhab issues so I'm finally got the pool controller back online but I noticed the following in the log when I started

[4/15/2021, 11:11:33 PM] info: Starting Virtual Pump Controller: Pump 1
[4/15/2021, 11:11:33 PM] verbose: sunriseLocal:13.256322102675853 sunsetLocal:2.2834816062756236 Calculating Heliotrope Valid
[4/15/2021, 11:11:34 PM] verbose: Wrote packet [255,0,255,165,0,96,33,4,1,0,1,43].  Retries remaining: 1
[4/15/2021, 11:11:34 PM] verbose: Wrote packet [255,0,255,165,0,96,33,6,1,4,1,49].  Retries remaining: 1
(node:2847) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'fn' of undefined
    at Outbound.onComplete (/home/openhabian/nodejs-poolController/controller/boards/SystemBoard.ts:1511:35)
    at /home/openhabian/nodejs-poolController/controller/comms/Comms.ts:386:71
    at afterWrite (_stream_writable.js:490:5)
    at onwrite (_stream_writable.js:470:7)
    at /home/openhabian/nodejs-poolController/node_modules/@serialport/stream/lib/index.js:320:7
(node:2847) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2847) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[4/15/2021, 11:11:43 PM] info: New socket client connected KtNjDbcq4RtGT0DmAAAB -- 192.168.99.2
[4/15/2021, 11:11:53 PM] info: [11:11:53 PM] 192.168.100.39 GET /state/features {}
info: Server is now listening on 0.0.0.0:5150

Should I be concern?

2delarosa
@2delarosa
For some reason, I can no longer get the dashPanel back up. I'm turning. Will investigate tomorrow morning
105 replies
Allen Cronce
@AllenCronce_twitter

Noobie here, trying to replace an old Autelis (which started hanging daily when I tried to integrate it with Home Assistant). Running the latest nodejs-poolController & nodejs-poolController-dashPanel on an RPi 4. The pool controller is a Pentair Easytouch (circa 2016).

When first starting up nodejs-poolController, I see a whole slew of log messages (about 50) like this:

Message aborted after 4 attempt(s): 165,1,16,33,197,1,0,1,157

Also initially there were no visible circuits, schedules, pumps, etc. But after physically going to the pool controller and visting the various settings, the nodejs-poolController now seems to "see" most items.

Now I'm trying to integrate with Home Assistant. Adding sensors and binary_sensors is working fine. But I keep getting errors with HA RESTFul switches.

I've reproduced an issue by trying to turn on the spa light manually. Here's the command line I'm using:

time curl -X PUT "http://192.168.1.1:4200/state/circuit/setState/" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{\"id\":4,\"isOn\":1}"

It takes about 4 seconds, then I get this error:

{"stack":"ApiError: Message aborted after 4 attempt(s): 165,1,16,33,134,2,4,1,1,100\n    at SendRecieveBuffer.writeMessage (/home/pi/sources/nodejs-poolController/controller/comms/Comms.ts:341:27)\n    at SendRecieveBuffer.processWaitPacket (/home/pi/sources/nodejs-poolController/controller/comms/Comms.ts:291:29)\n    at SendRecieveBuffer.processOutbound (/home/pi/sources/nodejs-poolController/controller/comms/Comms.ts:299:30)\n    at SendRecieveBuffer.processPackets (/home/pi/sources/nodejs-poolController/controller/comms/Comms.ts:282:21)\n    at Timeout.<anonymous> (/home/pi/sources/nodejs-poolController/controller/comms/Comms.ts:313:59)\n    at listOnTimeout (internal/timers.js:554:17)\n    at processTimers (internal/timers.js:497:7)","message":"Message aborted after 4 attempt(s): 165,1,16,33,134,2,4,1,1,100","code":501,"httpCode":400,"position":{"column":27,"line":341,"dir":"/home/pi/sources/nodejs-poolController/controller/comms","file":"Comms.ts"},"name":"OutboundMessageError","msg":{"_complete":false,"_id":22767,"timestamp":"2021-04-18T00:26:32.370Z","direction":"out","protocol":"broadcast","padding":[],"preamble":[255,0,255],"header":[165,1,16,33,134,2],"payload":[4,1],"term":[1,100],"packetCount":0,"isValid":true,"retries":3,"tries":4,"failed":true},"level":"error","timestamp":"April 17 2021"}curl -X PUT "http://192.168.111.18:4200/state/circuit/setState/" -H  -H  -d   0.00s user 0.00s system 0% cpu 4.064 total

Note that the command actually succeeds. The light does come on. But it's very sluggish due to the error.

I'd like to get to the bottom of this error, and possibly the others.

Any suggestions?

rstrouse
@rstrouse
@AllenCronce_twitter you are having comms issues. Make sure you have an rs485 adapter and not a tty adapter. This will allow njspc to receive messages but not send them.
Allen Cronce
@AllenCronce_twitter
Thanks for getting back to me so quickly. I'm using a JBtek USB to RS485 converter, so I think it's correct. Is it possible that the RPi OS would somehow misclassify the interface as a tty adaptor? Anything that I should check on the RPi side to verify it's correct?
rstrouse
@rstrouse
Nope the next thing to check is your wiring. Btw I have one of those PC100 thingys. Anyhow there is an issue in that EasyTouch isn’t responding to all requests. This could be a bad adapter. Given your symptoms it is pretty clear that njspc is asking for the data and either not getting a response or it just getting a corrupted one. Typically this is wiring or adapter but it could be a bad actor on the RS485 bus. Maybe disconnect the PC100.
Allen Cronce
@AllenCronce_twitter
But the PC100 seems to be providing good information. I'd post a screenshot from nodejs-poolController-dashPanel, but I'm not sure how to do that here. Anyway, it never give the Autelis indigestion. Note that I also have a QuickTouch II on the serial bus. Again, it's been problem free in the past.
DrJeff
@DrJeff
@AllenCronce_twitter drag screen capture to the box you type in
Allen Cronce
@AllenCronce_twitter
Screen Shot 2021-04-17 at 8.15.30 PM.png
Thanks!
Screen Shot 2021-04-17 at 8.24.28 PM.png

Perhaps the conversation has moved on, but lsusb shows the device here:

Bus 001 Device 003: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

And that maps to this dmsg outout:

[    2.429955] usb 1-1.4: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
FYI, if it makes sense to disconnect the PC100, I'll have to try that tomorrow. It's dark here and I'll need to open the Pentair panel to do this.
Allen Cronce
@AllenCronce_twitter
As another data point the QuickTouch II (which is directly connected to the same serial bus as the RPi) can send commands 100% reliably. The same spa light that's nodejs-poolController cannot reliably control works great from the remote. It turns on and off all day, like a crazy monkey ;-)
So both the QuickTouch II and the Autelis could both work reliably on the same wires. Maybe I need to look into replacing the JBtek (which is brand new BTW).
To be clear, when I disconnected the Autelis, I took its yellow and green data wires and connected them to the + and - connections of the JBtek (respectively).
Allen Cronce
@AllenCronce_twitter

I'm starting to suspect the cheap JBtek USB RS-485 adapter. According to this Amazon review, apparently there's a design flaw:

This part does not properly drive a RS-485 bus. It doesn't even work in my setup in a point-to-point connection but it might for some folks, depending on the cable length and type of receiver. The problem, as illustrated in the schematic, is that the transmit drive enable (DE, Pin 3 on the MAX485) is driven by the transmit data signal. This means that when the adapter is transmitting a 1, there is no drive current and the MAX485 goes into receive mode. If you need RS-485 compliance, choose a different part.

In my case, the RPi is connected to about 60' of cable to the EasyTouch. If the USB adapter can't handle that length and falls into receive mode, it would explain this problem.

I'll try a different adapter and report back.

8 replies