How to Monitor Classic 200SL

Started by justinbowser, April 16, 2020, 12:32:42 PM

Previous topic - Next topic

justinbowser

I have installed Python, some kind of Microsoft crap, platformio, and a bunch of other stuff I've never heard of and all I get is errors, such and such module not found, blah, blah, blah...

Maybe someday if I get really bored I might look at it again but I think I'm done for now...

Larry - Thanks for your help but I guess I'm not "nerd" enough to figure out all this stuff. 
Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)

Graham

Quote from: justinbowser on May 23, 2020, 11:41:45 AM
...
Graham -  When I tried to execute "pip install pyqt5" at a DOS prompt I got an error:

'pip' is not recognized as an internal or external command,
operable program or batch file.

Looks like you might not have your python path set in windows

see step 1: https://datatofish.com/executable-pyinstaller/


Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

ClassicCrazy

Quote from: justinbowser on May 23, 2020, 11:33:45 PM
I have installed Python, some kind of Microsoft crap, platformio, and a bunch of other stuff I've never heard of and all I get is errors, such and such module not found, blah, blah, blah...

Maybe someday if I get really bored I might look at it again but I think I'm done for now...

Larry - Thanks for your help but I guess I'm not "nerd" enough to figure out all this stuff.

It takes some time and perseverance to get through all the small bugs that crop up with computers . Hang in there.

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

ClassicCrazy

Graham ,
I ruled out it being my cable because I plugged the MNGP into it  and it worked.
So I have to start debugging my RS232 to TTL converter or the ESP itself.
I have another converter around here somewhere I can try .

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

justinbowser

Graham - Thanks for the hint, I did not have it in the path.  I added it to the path and was able to install pyqt5 but flasher still won't run, still get error:

C:\Users\Barbi\Documents\ESP32\Firmware>flasher
Traceback (most recent call last):
  File "flasher.py", line 5, in <module>
  File "c:\users\me\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
  File "flasher_esptool.py", line 36, in <module>
ImportError: DLL load failed while importing QtCore: The specified module could not be found.
[21704] Failed to execute script flasher

I notice the path " File "c:\users\me\appdata..." in the error.  I have no c:\users\me\appdata... on the PC
Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)

justinbowser

Oh, I can now get the flasher.py script to run in Python but it just returns a prompt.  How do I tell it to load the firmware.bin file?
Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)

Graham

Quote from: justinbowser on May 24, 2020, 11:58:21 AM
Oh, I can now get the flasher.py script to run in Python but it just returns a prompt.  How do I tell it to load the firmware.bin file?


Let's try downloading the flasher from github and running the flasher.py in python

go to https://github.com/ClassicDIY/EspFlashTool
click "Clone or Download" then "download zip"
using windows explorer, go to your download folder, right click on the ESPFlashTool-master.zip and Extract All
Open a Command window, navigate to C:\Users\Barbi\Downloads\EspFlashTool-master\EspFlashTool-master

if you execute a "DIR", you should see flasher.py, flasher_esptool.py...

now execute
python flasher.py

let me know if you see the ESP32 Flasher 1.0 window as shown in the attachment

Graham
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

Graham

Quote from: ClassicCrazy on May 24, 2020, 10:44:05 AM
Graham ,
I ruled out it being my cable because I plugged the MNGP into it  and it worked.
So I have to start debugging my RS232 to TTL converter or the ESP itself.
I have another converter around here somewhere I can try .

Larry

I would first try using the ModbusMaster in RTU mode to communicate to the classic directly from a pc over serial without the ESP if you have one of these USB to Serial cables like this one:
https://www.newegg.ca/p/N82E16812203018?item=N82E16812203018&source=region&nm_mc=knc-googleadwordsca-pc&cm_mmc=knc-googleadwordsca-pc-_-pla-_-cables+-+serial+cables-_-N82E16812203018&gclid=CjwKCAjw2a32BRBXEiwAUcugiDWxp96-P1USSIGwdu0MIZ6_ZegeX9BekGn9EbuTEgVm2t-38irGzBoCV7AQAvD_BwE

Setup the Modbus Master as in the attachment, select the COM port of your USB to Serial adapter
once you connect, try "Read Holding Register" to see if you can read data from address 4100 of your classic

the next step would be connect the ESP/RS232 adapter to the classic, setup the Local App or Android app to the ESP's IP address so that it issues a modbus TCP read request to the ESP every 2 seconds, the ESP will convert that TCP request to a serial RTU request on the ESP's serial port 2 (pin 17).
Then, using a second RS232-TTL adapter connected to the USB to Serial adapter that is connected to your pc,
connect the RS232/TTL ground to the ESP gnd and the RS232/TTL RX to pin 17 (TX) of the ESP.
Launch "Coolterm' on your pc, connect to the USB/Serial com port under the 'Options' button, select "View Hex" then "Connect"
You should see the RTU request hex codes in Coolterm that are being transmitted by the ESP.
If you see this, then move the RS232/TTL RX over to pin 16 (RX) of the ESP to see if you're getting the RTU responses from the classic into the ESP.

let mo know how far you get...

Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

justinbowser

Graham - or should I call you Mr. Wizard? - that worked perfectly!  I have the ESP32 flashed and configured and now just need to make the cable.  I can't thank you enough and I will update as soon as I make the cable and get attached to the classic!
Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)

justinbowser

I have attached this "pile-o-stuff" up to the classic and the Classic Local App does not connect, indicates 'Device not Available"  Is there something in the Classic setup I need to change?  I can ping the ESP32 and get into the configuration screen via the device IP address so I'm pretty sure the network portion is working ok.

I am talking to the ESP32 by using my cell phone as a hot-spot/router.  Would this make a difference?  Do I need to get a cheapo WIFI router to connect to this thing?
Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)

ClassicCrazy

Quote from: Graham on May 25, 2020, 08:01:24 AM
Quote from: ClassicCrazy on May 24, 2020, 10:44:05 AM
Graham ,
I ruled out it being my cable because I plugged the MNGP into it  and it worked.
So I have to start debugging my RS232 to TTL converter or the ESP itself.
I have another converter around here somewhere I can try .

Larry

I would first try using the ModbusMaster in RTU mode to communicate to the classic directly from a pc over serial without the ESP if you have one of these USB to Serial cables like this one:
https://www.newegg.ca/p/N82E16812203018?item=N82E16812203018&source=region&nm_mc=knc-googleadwordsca-pc&cm_mmc=knc-googleadwordsca-pc-_-pla-_-cables+-+serial+cables-_-N82E16812203018&gclid=CjwKCAjw2a32BRBXEiwAUcugiDWxp96-P1USSIGwdu0MIZ6_ZegeX9BekGn9EbuTEgVm2t-38irGzBoCV7AQAvD_BwE

Setup the Modbus Master as in the attachment, select the COM port of your USB to Serial adapter
once you connect, try "Read Holding Register" to see if you can read data from address 4100 of your classic
QuoteYes USB to RS232 adapter connected to my cable to Classic using Modbus Master shows some data .

the next step would be connect the ESP/RS232 adapter to the classic, setup the Local App or Android app to the ESP's IP address so that it issues a modbus TCP read request to the ESP every 2 seconds, the ESP will convert that TCP request to a serial RTU request on the ESP's serial port 2 (pin 17).
QuoteOkay
Then, using a second RS232-TTL adapter connected to the USB to Serial adapter that is connected to your pc,
connect the RS232/TTL ground to the ESP gnd and the RS232/TTL RX to pin 17 (TX) of the ESP.
Quotehooked up as  explained above
Launch "Coolterm' on your pc, connect to the USB/Serial com port under the 'Options' button, select "View Hex" then "Connect"
You should see the RTU request hex codes in Coolterm that are being transmitted by the ESP.
QuoteNot sure which baud rate Coolterm should be but tried three different ones 9600, 19200, 115200- Coolterm does not register anything .See the screenshot . 
I think maybe my RS232 adapters might be bad ?
If you see this, then move the RS232/TTL RX over to pin 16 (RX) of the ESP to see if you're getting the RTU responses from the classic into the ESP.

let mo know how far you get...
That is how far I got !

Graham.

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

ClassicCrazy

#71
Quote from: justinbowser on May 25, 2020, 02:27:22 PM
I have attached this "pile-o-stuff" up to the classic and the Classic Local App does not connect, indicates 'Device not Available"  Is there something in the Classic setup I need to change?  I can ping the ESP32 and get into the configuration screen via the device IP address so I'm pretty sure the network portion is working ok.

I am talking to the ESP32 by using my cell phone as a hot-spot/router.  Would this make a difference?  Do I need to get a cheapo WIFI router to connect to this thing?

Did you set the Local Status app to connect to the same IP address ?
The way I see it using a wifi router would be easier than using a phone set up as a hotspot - mainly because I know how routers work and don't have a clue about what the hotspot is doing. Seems like if you can get into it for config screen then it should connect to Local Status app using the same IP address if you enter that into the Local Status app configeration setup.

Even if your cable to the Classic is not working you should still be able to connect to the Esp32 with Local Status app and just see a blank screen .
The 3.28 ip is my Esp32

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

Graham

Quote from: justinbowser on May 25, 2020, 02:27:22 PM
I have attached this "pile-o-stuff" up to the classic and the Classic Local App does not connect, indicates 'Device not Available"  Is there something in the Classic setup I need to change?  I can ping the ESP32 and get into the configuration screen via the device IP address so I'm pretty sure the network portion is working ok.

I am talking to the ESP32 by using my cell phone as a hot-spot/router.  Would this make a difference?  Do I need to get a cheapo WIFI router to connect to this thing?

If you can browse to the ESP's home page from the pc that's running the local app you should be ok.
just enter the IP of the esp in the browser's address bar

Graham
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

Graham

Quote from: ClassicCrazy on May 26, 2020, 01:13:35 AM
Quote from: Graham on May 25, 2020, 08:01:24 AM
Quote from: ClassicCrazy on May 24, 2020, 10:44:05 AM
Graham ,
I ruled out it being my cable because I plugged the MNGP into it  and it worked.
So I have to start debugging my RS232 to TTL converter or the ESP itself.
I have another converter around here somewhere I can try .

Larry

...

let mo know how far you get...
That is how far I got !


Larry


Try using a ftdi adapter directly instead of rs232ttl to rs232 to usb

select the com port of your ftdi in coolterm at 19200 8,1,none with 'View Hex'
connect gnd of the ftdi to gnd of the esp
connect the rx of the ftdi to pin 17 (TX) of the esp
have the local app connected to the esp's ip

I'm suspecting it's an issue with the RS232 voltage levels,
RS232 levels are +12/-12Volts, the RS232 adapter converts RS232TTL (+3.2v, 0V) to standard RS232 (+/- 12v) using a voltage pump to boost the voltage from 3.2V to +/- 12v.
I had problems when I used my cheap rs232 adapter from China, it only worked when I used the adapter from Canakits...

The MNGP is supplied with +9 volts so it doesn't have to boost the voltage as much.

let me know if you see any data being transmitted from the esp

Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

justinbowser

Strange.  I can connect to the esp "Home Page" and get into the configuration screen fine.  On my laptop the "modbus adapter" appears in the list of wireless networks but when adding the IP to the Local App it reports "Device not available" after attempting to connect for several seconds.
Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)