Trying to set up the 300amp wired Shunt on the black relay board using V2.0.2 and having troubles.
When I try to calibrate and enter in the battery amp hours i get this message: “Your Capacity is RequestError: connect ECONNREFUSED 127.0.0.1:8080 : http://127.0.0.1:8080/setMaxWH/3840 wh”.
When I enter the settings into the calibration I get this message: “new calibrationfactor set to: NaN”
When I debug on Scan I2C, I get the following: 20 at 0,20: and 48 at 8,40:
I had previously fried the RJ11 cord that came with the Shunt. I accidently put it into the RJ45 port used for the display. I bought a new one off amazon - https://www.amazon.ca/dp/B078ZGL8MF?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1. It’s a 4 wire cord, I am wondering if this might not be the right cord for connecting with the Shunt?
Any other suggestions for getting the Shunt to work?
first in both the init and update scripts we’re missing to correctly download the pythonsqlite.db, which is needed for the wired shunt to work. I’ve already updated both scripts, but you can simply download that one file using
Second mistake is that we’re checking if the pekaway shunt is set to active in the frontend. Currently, that only happens if we turn on the switch for the wireless shunt:
I simply forgot to include that function for the wired shunt…
Once you have downloaded the original pythonsqlite.db, turn off the switch for the Relayboard in the main system config, wait a minute and turn it back on. This should restart the needed scripts for the wired shunt. After that, let it run for a few seconds and then try to calibrate the shunt again (it needs to be connected obviously, so that the script can receive the values from the shunt).
I followed your instructions and I still have the same result. I have the the Main Batt Data set to wireless shunt and the activate wireless shunt switch on. I still get the same errors when inputing the calibration data and when pressing the calibrate button. The Debug I2C still shows the same as before. Any other suggestions? I’ve tried rebooting a few times as well, without success.
I just rechecked on my test system and it worked. But since you’re getting the CONNREFUSED error, that means the script itself does not run properly.
Can you stop the script in Node-RED and then start it manually in a terminal? It should then return the errors it is facing. Let me know if you need a step-bystep guide.
@Vincent I ended up re-flashing bookworm and running the init script to start fresh. I then updated the system to V2.0.3. I went into node red and attempted to restart the script but i still got the ECONNREFUSED on the http requests. I noticed in the script for web2 that it references I2C port 0x4a, which is not detected when the shunt is plugged in. Is this an issue? I’ve added the return from the command line when opening Node Red - might help?
Summary
Start Node-RED
Once Node-RED has started, point a browser at http://100.83.0.90:1880
On Pi Node-RED works better with the Firefox or Chrome browser
Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
Starting as a systemd service.
17 Oct 22:04:33 - [error] [http request:c09495b052b2f61b] RequestError: connect ECONNREFUSED 127.0.0.1:8080
17 Oct 22:04:33 - [error] [http request:c93715849c999a24] RequestError: connect ECONNREFUSED 127.0.0.1:8080
17 Oct 22:04:33 - [error] [json:c158a2fdf8ebd56d] Unexpected token ‘R’, “RequestErr”… is not valid JSON
17 Oct 22:04:40 - [error] [http request:9f0c1f372d4e35c8] RequestError: connect ECONNREFUSED 127.0.0.1:8080
pi : PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/hciconfig hci0 down
pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
pam_unix(sudo:session): session closed for user root
pi : PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/systemctl restart bluetooth
pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
pam_unix(sudo:session): session closed for user root
17 Oct 22:04:43 - [error] [http request:c09495b052b2f61b] RequestError: connect ECONNREFUSED 127.0.0.1:8080
17 Oct 22:04:43 - [error] [http request:c93715849c999a24] RequestError: connect ECONNREFUSED 127.0.0.1:8080
17 Oct 22:04:43 - [error] [json:c158a2fdf8ebd56d] Unexpected token ‘R’, “RequestErr”… is not valid JSON
pi : PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/pkill -f bleJBD.py
pi : PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/pkill -f bleMppt.py
pi : PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/pkill -f bleShunt.py
pi : PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/pkill -f bleRuuvi.py
pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
pam_unix(sudo:session): session closed for user root
pam_unix(sudo:session): session closed for user root
pam_unix(sudo:session): session closed for user root
pam_unix(sudo:session): session closed for user root
17 Oct 22:04:50 - [error] [http request:9f0c1f372d4e35c8] RequestError: connect ECONNREFUSED 127.0.0.1:8080
17 Oct 22:04:53 - [error] [http request:c09495b052b2f61b] RequestError: connect ECONNREFUSED 127.0.0.1:8080
17 Oct 22:04:53 - [error] [http request:c93715849c999a24] RequestError: connect ECONNREFUSED 127.0.0.1:8080
17 Oct 22:04:53 - [error] [json:c158a2fdf8ebd56d] Unexpected token ‘R’, “RequestErr”… is not valid JSON
17 Oct 22:05:00 - [error] [http request:9f0c1f372d4e35c8] RequestError: connect ECONNREFUSED 127.0.0.1:8080
17 Oct 22:05:03 - [error] [http request:c09495b052b2f61b] RequestError: connect ECONNREFUSED 127.0.0.1:8080
17 Oct 22:05:03 - [error] [http request:c93715849c999a24] RequestError: connect ECONNREFUSED 127.0.0.1:8080
17 Oct 22:05:03 - [error] [json:c158a2fdf8ebd56d] Unexpected token ‘R’, “RequestErr”… is not valid JSON
Hello @aballingall
Can that be that you not only fried your cable when you put it in the wrong plug.
With the I2C scan you should find 3 participants 20, 48, 4a, and possibly 68.
I suspect that one ads is burned.
Sorry my Google translator English
@aballingall Well yes, that is an issue. On I2C adress 0x4a should be the wired shunt. Seems like the ADC on your board got fried.
That is also why the script fails and you therefore get the connection refused error.
Usually that happens when we have a connection with a battery, shunt, board and Raspberry. If you now remove the power source for the board, then the RPI will use GND from the shunt, which can/will fry the ADC…
Thank you Vincent and ahtdf. It must be fried then. What are some options to fix it? I could attempt to solder on a new port. Or do I need a new board?
Will the fried ADC affect any other devices besides the shunt connection?
Yes, we can replace the ADS1115 ADC for you. However, it may be easier to switch to our new Wireless Shunt, which is also more accurate and can operate when the main system is switched off.
Hi Vince, but must we the wireless shunt after installing the scripts again, to see something in the Info page?
If not, we have no shunt display,or not?