Esperyd?s Raspberry PI project

Announcement - Help us fight the BOTS! Please report all spam including stuff in your inbox!

jbates58

New member
Joined
Mar 6, 2021
Messages
18
As i said many times now it will not start unless it can connect to Influxdb and your Mosquitto brooker. If it ant it will die directly. So please once again check the logs and see whats going on and why it cant connect.
Hey Daromer

Yes, this i understand. and it makes sense.

however, the issue i have is.

I cant start the container, to access the config ini file, to change the settings, so that it can connect to influx and mqtt.

looking at the portainer logs, it shows similar errors to above about not been able to parse auth credentials. it also mentions as the last entry that it cant connect to the mqtt server.

and this i understand, because the credentails havent been entered as its a fresh install (well, as far as i can tell it is. i have removed the container, the volume and the images, and started it from scratch several times) but as i said i cant keep it running to access the config file to set the credentails.

any suggestions?
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
Thats an issue but you should be able to see the logs and whats going wrong. If you run latest it should work.
Since you have a normal rpi perhaps try to run it there? You also states in the beginning that you were able to edit the config?

I cant replicate your issue so dont know what you have done with it nor the config. And yes you need to edit the config file to be able to start it up :)


Feel free to DM me and we take it from there.
 

grand

New member
Joined
Mar 22, 2021
Messages
4
Hi there,

Well done on this project you've done great work! I have followed the 'Raspberry PI solar system 2.0' guide and have the following questions if you can please assist:

Q1 - Will Solar-sis work with the USB port on inverter? Or is it Serial only?
Q2 - How do we find out which solar-sis example we need to install?
Q3 - How do we see if Solar-sis is successfully connecting to the inverter and getting data?
Q4 - I'm not interested in the BMS information as I have a large lead acid setup, do I still need WatchmonUDPListener?

I am happy to donate but want to check if this is going to work with my setup first, my inverter: 5KVA-48-PAR-B MPPT

Thank you
Paul
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
1. It will work with USB. I run USB to serial adaptors myself and the port on the inverter is basically that though it runs older hw that is pretty unstable.
2. Depends on your inverter or protocol of your inverter
3. Check the logs. you see answers on each call.
4. No you dont. You can even run the NodeMCU system i built instead and dont have to run a raspberry PI.

Above inverter is mot likely just an PIP clone so you should be able to use that part of the code.
 

grand

New member
Joined
Mar 22, 2021
Messages
4
- Can you please provide a recommendation of a solar-sis example to install? I'm really not sure where to begin to find which protocol my inverter uses, I know this inverter works with the 'Watchpower' software.
- Where do I find the logs for Solar-sis? Is that using Portainer > Containers > Solar-sis > Logs?
- What do you mean by "use that part of the code"? Are you referring to 'NodeMCU'? If yes can you provide a url for the software for it? I have already a Raspberry v4 so i'd like to use that if possible.

Thank you!

Paul
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
* As i said it looks like a PIP clone so you should use the PIP example
* Solar sis does not run as a container. Its a stand alone nodejs project. You find the logs directly in console or wherever you configure it
* If you have the R4 then go with it. You need to install the software either via NPM or from Github and then install the packages for it.
 

grand

New member
Joined
Mar 22, 2021
Messages
4
Thank you! I appreciate the assitance, so i've gone with the PIP4084, I find in console it dosen't like the Baud rate of 2400, do you know how I can find a Baud rate that will work?

pi@raspberrypi:~/solar-sis/example/PIP4084 $ sudo node project.js
[2021-03-23 08:27:17] http localhost Listening on port: 3001
[2021-03-23 08:27:17] ERR! serial:/dev/hidraw0 Error: Error: Invalid argument setting custom baud rate of 2400
[2021-03-23 08:27:17] ERR! serial:/dev/hidraw0 { [Error: Error: Invalid argument setting custom baud rate of 2400]
[2021-03-23 08:27:17] ERR! serial:/dev/hidraw0 stack:
[2021-03-23 08:27:17] ERR! serial:/dev/hidraw0 'Error: Error: Invalid argument setting custom baud rate of 2400' }

From Kern.log when I plug in the Inverter via USB:
Mar 23 08:13:57 raspberrypi kernel: [ 86.042142] usb 1-1.1: new low-speed USB device number 3 using xhci_hcd
Mar 23 08:13:57 raspberrypi kernel: [ 86.191934] usb 1-1.1: New USB device found, idVendor=0665, idProduct=5161, bcdDevice= 0.02
Mar 23 08:13:57 raspberrypi kernel: [ 86.191943] usb 1-1.1: New USB device strings: Mfr=3, Product=1, SerialNumber=0
Mar 23 08:13:57 raspberrypi kernel: [ 86.207204] hid-generic 0003:0665:5161.0001: hiddev96,hidraw0: USB HID v1.11 Device [HID 0665:5161] on usb-0000:01:00.0-1.1/input0
 

grand

New member
Joined
Mar 22, 2021
Messages
4
The Error "Error: Invalid argument setting custom baud rate of 2400" Is that actualy a scripting error or it dosen't like the rate of 2400?
Cheers
Paul
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
You have the answer here: https://github.com/opengd/solar-sis/issues/4
Unfortunately an issue using the newer serial driver. I have not looked into fixing it so depending on version you run this will happen. Look at the version
 

400bird

Member
Joined
Apr 27, 2020
Messages
97
Great project, thank you for taking the time to build and help us all troubleshoot the same problems over and over again.
I am working on installing the Batrium WatchMon UDP listener.

When I follow these steps on your website:

1618721840888.png


I get the following error:

1618721792014.png


I don't quite think that is the failure I should expect.
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
Thanks! Would love to spend more time on it but my time is limited as well for this type of projects :)

The failure is "fixed" :p I should update the manual

But not sure why it says above though Hmm...

What happens if you try to start it?
 

400bird

Member
Joined
Apr 27, 2020
Messages
97
Thank you for the input, that is helpful.

I have tried a few things and lots of google. What specific command should I use?

1618894547985.png

That didn't work, so a little google and some random attempts, and I made progress.

It is not what I expected.
I was able to use docker ps -a to find that when I tried to start "run.sh" it somehow opened even through it didn't seem like it. But, it appears that gave me image name?

Does this look right?
pi@raspberrypi:~/WatchMonUdpListener $ docker run daromer/watchmonudplistener
Influx host set to: localhost
Batrium logger started
Loaded file: Msg_3233_LiveDisplay.js
Loaded file: Msg_3e32_StatusRapid.js
Loaded file: Msg_3e33_StatusCellStats.js
Loaded file: Msg_3e5a_StatusRapid.js
Loaded file: Msg_3f33_StatusFast.js
Loaded file: Msg_3f34_StatusShunt.js
Loaded file: Msg_4032_StatusSlow.js
Loaded file: Msg_4033_StatusSlow.js
Loaded file: Msg_415a_CellNodeStatus.js
Loaded file: Msg_4232_CellNodeFull.js
Loaded file: Msg_4732_HwSystemSetup.js
Loaded file: Msg_4733_StatusControlLogic.js
Loaded file: Msg_475a_StatusControlLogic.js
Loaded file: Msg_4932_ControlRemoteStatus.js
Loaded file: Msg_4a34_HwSystemSetup.js
Loaded file: Msg_4a35_HwSystemSetup.js
Loaded file: Msg_4a36_HwSystemSetup.js
Loaded file: Msg_4b34_HwCellGroupSetup.js
Loaded file: Msg_4b35_HwCellGroupSetup.js
Loaded file: Msg_4b36_HwCellGroupSetup.js
Loaded file: Msg_4c33_HwShuntSetup.js
Loaded file: Msg_4c34_HwShuntSetup.js
Loaded file: Msg_4c58_HwShuntSetup.js
Loaded file: Msg_4d33_HwExpansionSetup.js
Loaded file: Msg_4d34_HwExpansionSetup.js
Loaded file: Msg_4e58_ControlRemoteSetup.js
Loaded file: Msg_4f33_ControlCriticalSetup.js
Loaded file: Msg_5033_ControlChargeSetup.js
Loaded file: Msg_5158_ControlDischargeSetup.js
Loaded file: Msg_5233_ControlThermalSetup.js
Loaded file: Msg_5258_ControlThermalSetup.js
Loaded file: Msg_5334_HwIntegrationSetup.js
Loaded file: Msg_5335_HwIntegrationSetup.js
Loaded file: Msg_5431_SessionMetrics.js
Loaded file: Msg_5432_DailySession.js
Loaded file: Msg_5457_DailySession.js
Loaded file: Msg_5632_LifetimeMetrics.js
Loaded file: Msg_5633_LifetimeMetrics.js
Loaded file: Msg_5634_LifetimeMetricsB.js
Loaded file: Msg_5635_LifetimeMetricsA.js
Loaded file: Msg_5732_SystemDiscovery.js
Loaded file: Msg_5831_DailySessionHist.js
Loaded file: Msg_6131_StatusComms.js
Loaded file: Msg_6132_StatusComms.js
Loaded file: Msg_6133_StatusComms.js
Loaded file: Msg_6831_QuickSessionHist.js
Loaded file: Msg_7832_HwShuntMetrics.js
Loaded file: Msg_7857_HwShuntMetrics.js
Batrium logger Server is listening at port18542
Can't connect to MQTT serverError: connect ECONNREFUSED 127.0.0.1:1883
true

I've just got the figure out the MQTT error.

And Influx...

1618895580736.png


You have mentioned before that many people forget to enable MQTT or influx. I think I did that, but maybe I got it wrong?
In /WatchMonUdpListener I copied the config and removed the _dist from the config (now named config.json)
Should I have moved this file to a new location?
In this config file I enabled both influx and mqtt.
1618901913401.png


I appreciate your time, any input would be great!

I may enable debug tomorrow and see if that gives up any information that is useful to me.
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
It may be that you somewhere along the way did something weird :D You get other results than i do but lets work from it :p

The config gets autopopulated into volumes/ folder. This is where you need to edit.

Note that the git repo contains both the docker-compose file but also the source so thats why it may be confusing :)
 

400bird

Member
Joined
Apr 27, 2020
Messages
97
It may be that you somewhere along the way did something weird
"Maybe" is not right, I definitely did something weird. I don't know what it was, but I'm sure I did something wrong.

I can't find a "volumes" folder. Can I get the full file path?

I may start fresh with a new install, I am not getting MQTT to work even with the test channel.
If I go into systemctl, I see "failed" for MQTT

1618961306511.png


I don't know why, when I open the log file in /var/log/mosquitto.
All seems fine, but why did it close?

1618961456515.png


If I start fresh again, I have a couple set up questions:

When using IOTstack, I get a warning that Portainer is at end of life and I should install Portainer CE. Which should I use?
Which node red components should be included?
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
So you have installed IOTstack with Mosquitto to or? You dont need to have it running on 2 places. Just run 1 of them and it shall work.

You should use portainer-ce
You dont need to install any extra components in node-red to get it working.

The volumes folder end up under the Watchmonudplistener folder that you have. You can find the path for the volumes in the docker-compose file.
 

400bird

Member
Joined
Apr 27, 2020
Messages
97
I believe I did install IOTstack this time? But, I've got two cards I have mixed up more than once, so I just labeled them...

I don't have a volumes folder in the WatchMonUdpListener folder.
1619065779266.png



I'm starting fresh with a fresh build, this seems like a mess.
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
The volumes folder is created when you set it up running inside docker.
1619068268813.png


If you run docker-compose up you should see the first part here where it starts and sits in the background
Then run it with -d for background. And with docker ps you can see it running
1619068471775.png
 

400bird

Member
Joined
Apr 27, 2020
Messages
97
Alright!
Great news, that worked. Thanks for the help!
I wish it had gone that well any of the previous 4 times I tried :rolleyes:


Now, it's set up time.
Specifically, I am looking for SOC and Ah capacity.
How do I get from the hex (0x3F33) in the protocol document to the 2 digit identifiers in config.json in volumes?
Is the translation just the last two digits?

I added "33" then " 3e"(copied the format and edited from 3e) and rebooted. No luck.

From this:
1619153595335.png


To these:
1619153640852.png
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
The first 2 are the message id and the last 2 are the version. So 3f33 is message 3f and the version is 33.
So depending on version you are running you can get different version of the messages. Look in the payload folder what messages exist and what versions they functioning in.
 

400bird

Member
Joined
Apr 27, 2020
Messages
97
Ok, I had checked the payload last night and just rechecked the payload files now.
If I open "Msg_3f33_StatusFast.js" I do not see anything to translate that to the 2 digits in volumes.
There are more than one messages that begin with 3e and more than one message that ends in 32.

I have tried a few things and am not seeing any difference in influx.
Do I need to do more than reboot the pi? Such as rebuild the docker? That is probably a very basic question.

Could you give me an example of how I would add the Fast Status to get SOC into influx?
 
Top