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 24v pack , Outback 3524 inverter
 5s 135w Kyocero , 3s3p 270w Kyocera   Classic 150 ,8s2p  Kyocera 225w to Hawkes Bay Jakiper 48v 20kwh  ,Gobel 16 kwh  lifepo4 Outback VFX 3648  8s2p 380w Rec pv EG4 6000XP

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).

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 24v pack , Outback 3524 inverter
 5s 135w Kyocero , 3s3p 270w Kyocera   Classic 150 ,8s2p  Kyocera 225w to Hawkes Bay Jakiper 48v 20kwh  ,Gobel 16 kwh  lifepo4 Outback VFX 3648  8s2p 380w Rec pv EG4 6000XP

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".

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 24v pack , Outback 3524 inverter
 5s 135w Kyocero , 3s3p 270w Kyocera   Classic 150 ,8s2p  Kyocera 225w to Hawkes Bay Jakiper 48v 20kwh  ,Gobel 16 kwh  lifepo4 Outback VFX 3648  8s2p 380w Rec pv EG4 6000XP

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.

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 24v pack , Outback 3524 inverter
 5s 135w Kyocero , 3s3p 270w Kyocera   Classic 150 ,8s2p  Kyocera 225w to Hawkes Bay Jakiper 48v 20kwh  ,Gobel 16 kwh  lifepo4 Outback VFX 3648  8s2p 380w Rec pv EG4 6000XP

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); 2s x Sharp 80watt + 2s x Solec 100W
Pack: 4s2p ROLLS S6-460AGM 6V for 24V pack
Inverter/Charger: Victron Quattro 5000 Watts, 24 Volts DC
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 24v pack , Outback 3524 inverter
 5s 135w Kyocero , 3s3p 270w Kyocera   Classic 150 ,8s2p  Kyocera 225w to Hawkes Bay Jakiper 48v 20kwh  ,Gobel 16 kwh  lifepo4 Outback VFX 3648  8s2p 380w Rec pv EG4 6000XP

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