Classic Monitoring with a raspberry pi

Started by welmore, October 26, 2017, 12:44:45 AM

Previous topic - Next topic

ClassicCrazy

yes I think you need to build container for both of the classics  so run this twice using the two different classics info

docker run classic_mqtt --classic <ClassicHost> --classic_port <502> --classic_name MyClassic --mqtt <127.0.0.1> --mqtt_port <1883> --mqtt_root <ClassicMQTT> --mqtt_user <username> --mqtt_pass <password>

After you modify that .env file you will have to run the

3.  and 4 directions again .

Tell docker-compose to download, build and start up the both mosquitto and the script with the following command.

docker-compose -f classic_mqtt_compose.yml up

Only use this if you change the .env file or anything classic_mqtt_compose.yml or Dockerfile once you have already run the command in step 3 above. This tells docker-compose to rebuild and save the images use the command in step 3 to run it:

docker-compose -f classic_mqtt_compose.yml build

system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

malkierian

How do I use the app on a local network? I don't even know what the password is supposed to be, it looks like the thing stored in mosquitto.pass is already hashed. I did try using option 1 with dioty.co, and it's publishing, but the app isn't picking up on anything (yes, I made sure the roots are the same).
1st System: 12.5kw on 5 Classics (3 150s, 2 250s), 1 classic 250 with wind turbine, 2 stacked Magnum 4024PAE inverters.

2nd System: 1250W solar on 1 Classic 150, two DIY3024 running separate breaker boxes, one hooked up to Magnum output for AC charging.

ClassicCrazy

I never got that dioty site to work for me.
But if you have that part working you need to put that info in the MQTT setup of Grahams Android Classic Monitoring app .
https://github.com/ClassicDIY/ClassicMQTT/wiki/4.-Classic-Monitor-MQTT-Subscriber-app-for-Android
Then you go to the right on Android app and hit the + sign top right corner and add your Classic names
It shows in that wiki link above .
I use it with mosquitto on my local network so don't go out to another server.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

malkierian

Yes, yes, I've already done all that, but what username and password do I use to connect to the local server? Just using garbage login credentials still doesn't show anything on the app. I've put in the IP address of the Pi that it's running on, the port is 1883, but the Classic app just immediately tells me "Failed to connect to MQTT broker".
1st System: 12.5kw on 5 Classics (3 150s, 2 250s), 1 classic 250 with wind turbine, 2 stacked Magnum 4024PAE inverters.

2nd System: 1250W solar on 1 Classic 150, two DIY3024 running separate breaker boxes, one hooked up to Magnum output for AC charging.

ClassicCrazy

You are telling me two different thngs - that you are using dioty but now you want to connect to the local server ?
Which did you set up the initial container for .
What did you put in this ?
docker run classic_mqtt --classic <ClassicHost> --classic_port <502> --classic_name MyClassic --mqtt <127.0.0.1> --mqtt_port <1883> --mqtt_root <ClassicMQTT> --mqtt_user <username> --mqtt_pass <password>

You use those same credentials in the MQTT setup on the Android app.
Keep in mind that only one IP connection at a time can connect to Classic so you can't have the Midnite Local Status app and the others connected at the same time.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

malkierian

Well, you told me you were never able to get DIoTY working, so I tried switching back over, but I've tried both of them over and over with no success either way. And I STILL don't know how to test connection to this thing on the same machine to see if it's actually broadcasting, and perhaps it's not allowing connections from outside the machine.

And that "docker run" command doesn't do me any good, I was running docker-compose ever since you told me following step 3 would make it all work automatically. So I don't know what username and password to use, because that's all set up in the script, and the password is already encrypted. And no, using the ClassicPublisher username with ClassicPub123 as the password (the default .env values) didn't work.
1st System: 12.5kw on 5 Classics (3 150s, 2 250s), 1 classic 250 with wind turbine, 2 stacked Magnum 4024PAE inverters.

2nd System: 1250W solar on 1 Classic 150, two DIY3024 running separate breaker boxes, one hooked up to Magnum output for AC charging.

ClassicCrazy

I am starting to think maybe I should make a Raspberry Pi card image that is all set up .
But just to be sure .
Did you do these steps first
https://dev.to/rohansawant/installing-docker-and-docker-compose-on-the-raspberry-pi-in-5-simple-steps-3mgl

There is a small program called MQTT Explorer that you can use to see if you pi is publishing
screen shot below
Also I found it really helpful to install Portainer because you can see if the proper containers are installed and up and running.
(install portainer )
docker pull portainer/portainer:linux-arm
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer:linux-arm
info on these commands at link below
https://www.osarea.com/docker-environment-with-raspbian-buster-with-rasbian-pi-4-portainer

With portainer it makes it easy to remove old containers and start over too .

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

mcsarge

#67
Hi if you look in the classic_mqtt_compose.yml file, it tells you the usernames and password that are used in the Mosquitto broker that the compose sets up.

Matt


Quote from: ClassicCrazy on April 18, 2020, 10:31:23 PM
I am starting to think maybe I should make a Raspberry Pi card image that is all set up .
But just to be sure .
Did you do these steps first
https://dev.to/rohansawant/installing-docker-and-docker-compose-on-the-raspberry-pi-in-5-simple-steps-3mgl

There is a small program called MQTT Explorer that you can use to see if you pi is publishing
screen shot below
Also I found it really helpful to install Portainer because you can see if the proper containers are installed and up and running.
(install portainer )
docker pull portainer/portainer:linux-arm
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer:linux-arm
info on these commands at link below
https://www.osarea.com/docker-environment-with-raspbian-buster-with-rasbian-pi-4-portainer

With portainer it makes it easy to remove old containers and start over too .

Larry
Off Grid Island in Ontario Canada (Beaverstone Bay)
Primary: Classic 150 + wbjr; 3s2p HES 270watt
Winter: SolarBoost 50 MPPT (into wbjr); 2 x Sharp NE-80EJEA 80watt
Pack: 4s2p ROLLS S6-460AGM 6V for 24V pack
Inverter/Charger: Trace DR2424
Call Sign: KG4EUF

Trapp

No Response
From this forum and Midnite Solar support
WHY ?

ClassicCrazy

Quote from: Trapp on May 18, 2020, 07:52:36 PM
No Response
From this forum and Midnite Solar support
WHY ?

What exactly is your question ?

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Trapp

Quote from: ClassicCrazy on May 18, 2020, 10:18:15 PM
Quote from: Trapp on May 18, 2020, 07:52:36 PM
No Response
From this forum and Midnite Solar support
WHY ?

What exactly is your question ?

Larry
Do you read Larry I only have 2 posts here

boB

Quote from: Trapp on May 31, 2020, 11:06:11 PM
Quote from: ClassicCrazy on May 18, 2020, 10:18:15 PM
Quote from: Trapp on May 18, 2020, 07:52:36 PM
No Response
From this forum and Midnite Solar support
WHY ?

What exactly is your question ?

Larry
Do you read Larry I only have 2 posts here


He posted....

Quote from: Trapp on May 31, 2020, 11:06:11 PM

Thanks welmore your code “Logging.php” works right out of the box I’ve been using it for over a year now

Clasic 200
SN # CL 12345

I want to turn on/off the relay on aux1 with $modbus->writeSingleRegister(0, 4129, $relayon, $dataTypes);

And keep the Ethernet lock on
Please help me

Nothing ????????????


I can't remember the exact addresses to use but you have to write the Classic's serial number to unlock the Classic for writing first.

Some of these guys here may know this but I can take a look and/or ask around.  That info "should" be in the latest document but I wonder ?






K7IQ 🌛  He/She/Me