Author Topic: Classic Monitoring with a raspberry pi  (Read 13437 times)

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 2670
Re: Classic Monitoring with a raspberry pi
« Reply #60 on: April 17, 2020, 10:00:58 PM »
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 one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

malkierian

  • Newby
  • *
  • Posts: 12
Re: Classic Monitoring with a raspberry pi
« Reply #61 on: April 17, 2020, 10:25:04 PM »
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

  • Hero Member
  • *****
  • Posts: 2670
Re: Classic Monitoring with a raspberry pi
« Reply #62 on: April 17, 2020, 10:54:00 PM »
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 one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

malkierian

  • Newby
  • *
  • Posts: 12
Re: Classic Monitoring with a raspberry pi
« Reply #63 on: April 17, 2020, 11:23:55 PM »
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

  • Hero Member
  • *****
  • Posts: 2670
Re: Classic Monitoring with a raspberry pi
« Reply #64 on: April 18, 2020, 11:23:18 AM »
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 one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

malkierian

  • Newby
  • *
  • Posts: 12
Re: Classic Monitoring with a raspberry pi
« Reply #65 on: April 18, 2020, 07:38:18 PM »
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

  • Hero Member
  • *****
  • Posts: 2670
Re: Classic Monitoring with a raspberry pi
« Reply #66 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
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

mcsarge

  • Full Member
  • ***
  • Posts: 106
Re: Classic Monitoring with a raspberry pi
« Reply #67 on: April 30, 2020, 05:25:15 PM »
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


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
« Last Edit: April 30, 2020, 05:31:51 PM by mcsarge »
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: 4s4p US2200 FLA 6V for 24V pack
Inverter/Charger: Trace DR2424
Call Sign: KG4EUF

Trapp

  • Newby
  • *
  • Posts: 3
Re: Classic Monitoring with a raspberry pi
« Reply #68 on: May 18, 2020, 07:52:36 PM »
No Response
From this forum and Midnite Solar support
WHY ?

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 2670
Re: Classic Monitoring with a raspberry pi
« Reply #69 on: May 18, 2020, 10:18:15 PM »
No Response
From this forum and Midnite Solar support
WHY ?

What exactly is your question ?

Larry
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

Trapp

  • Newby
  • *
  • Posts: 3
Re: Classic Monitoring with a raspberry pi
« Reply #70 on: May 31, 2020, 11:06:11 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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3354
Re: Classic Monitoring with a raspberry pi
« Reply #71 on: June 01, 2020, 02:05:27 AM »
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....


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