for the Classic: Webview and server for the datas?

Started by binkino, September 15, 2017, 09:28:40 AM

Previous topic - Next topic

ClassicCrazy

Quote from: binkino on September 27, 2017, 08:13:24 PM
Quote from: ClassicCrazy on September 27, 2017, 11:23:31 AM
Bikino - does this program just gather the data via IP modbus ?  No physical connection to the Classic ? I am guessing that is how it works. 
Larry


Yes, over IP modbus - via the home network.
The php software / webpage, polls every x seconds the datas from the Classic and stores them in a text file.
The further handling happens on the server (reading, logging, displaying)
So it is also possible to connect to the Classic with the Android App, just between the connects of the php

Will look forward to seeing this when you guys get all the bugs worked out - ha ha .
That is interesting if you can get the data and also connect up Android app ? Wouldn't they collide and one or both of them get kicked off ?

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

binkino

Quote from: ClassicCrazy on September 28, 2017, 08:23:21 PM
Will look forward to seeing this when you guys get all the bugs worked out - ha ha .
That is interesting if you can get the data and also connect up Android app ? Wouldn't they collide and one or both of them get kicked off ?

Larry

You can not run them the same time and display on both updated datas
you can log with the PI and between the data polls from the PI you can connect the Classic with an App, without causing problems. The PI will try, but get nothing and try again.
Just will not update the datas in the browser. But will get the datas again and complete them, when you close the App again and the PI gets datas again.
PI only connects a short time to get datas and between these polls you can connect with the App and keep the connection.
Once a connection is established, no other connection can
PV-OUTPUT: http://pvoutput.org/list.jsp?id=38617
Classic Lite 200 + Classic 200 + Easun ISolar-SMX-II-5.6KW + 12x240Wp + 12x255Wp + 2x10kWh LFP
http://a68k.de/Solar/Monitor_LC2.php

RossW

I wrote my "newmodbus" code back in early 2013. The source was (and I presume still is) available in various places, or from me. It included all the modbus communications directly over IP, without requiring a direct connection to the Classic.

It would be trivial to have it read the entire data table and write to disk, and allow other applications to access that data, or only slightly more time-consuming to make it act as a "relay", permitting simultaneous access from other devices and serving data from its own internal cache/buffer that is updated periodically from the classic.

Was written in standard C, should compile and run on just about anything.

RossW
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine

binkino

Hi RossW,
have seen the newmodbus and played with it, but I couldn't go further then writing to a log file.
Didn't know how to work with the log file to display the datas
also on the website there was no contact, so I couldn't ask
The solution from welmore is like this, but has a webpage with it :)
Possible we can combine it, also expanding your newmodbus for a "relay"
PV-OUTPUT: http://pvoutput.org/list.jsp?id=38617
Classic Lite 200 + Classic 200 + Easun ISolar-SMX-II-5.6KW + 12x240Wp + 12x255Wp + 2x10kWh LFP
http://a68k.de/Solar/Monitor_LC2.php

binkino

http://a68k.de:81/Solar/Solar_Monitoring_2b.php
Gauges. More gauges. To many :D

Thanks to Wade, I have now a working code for continuing with gauges.
The other "graphic" page, http://a68k.de:81/Solar/Solar_Monitor_LC_de.php is also in work.


Now after the Banana OS made me crazy (hangs a lot and had to reboot it all night) I installed now  LEMAKER's Raspian and that runs much better. Stable and no problems.

Meanwhile another PI arrived to me, an "ORANGE PI PC" ... don't buy it!
It is a nightmare. There is only one OS it boots with, all the others, also from Roange, son't even switch it on. Spend hours and hours with it ... put it back in the box and if I don't forget its existence, someday I will hold out for newer OS images.

PV-OUTPUT: http://pvoutput.org/list.jsp?id=38617
Classic Lite 200 + Classic 200 + Easun ISolar-SMX-II-5.6KW + 12x240Wp + 12x255Wp + 2x10kWh LFP
http://a68k.de/Solar/Monitor_LC2.php

ClassicCrazy

Looking good Bikino - nice to see the progress and every thing working .

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

binkino

Thank you ;)

I am currently aiming the optimization for a resolution of 1024x768, then I can comfortably hook up a PI to an old 15 "monitor and display this all time
And this dimension is also good for a view from the internet in my opinion.
But - any tips, recommendations and suggestions are allways welcome :)

In the "gauge page" I was now playing with the colors. Give them a matching theme for their function.
Yellow/Orange für the incoming energy, like the sun. But I am still not 100% happy, satisfied with it.

First, I tried to design it like Graham's app gui, but it is hard readable then - the numbers are not outside of the gauge lines, and the color flow from a light blue and a darker didn't look so good here.
So first will finish that version, then new ideas will come and possible I can do a design matching version.
I like the blue theme of Graham ;)


For mobile device i have Graham's app, so no need for a mobile version - or do we?
It would make it more complicated.
The App has direct connection and shows changes just in time, no wait for reload of the page :)

May be, show both versions and do a "night version" with the blue theme hehehe

Too many ideas are spooking in my head (as always...)

PV-OUTPUT: http://pvoutput.org/list.jsp?id=38617
Classic Lite 200 + Classic 200 + Easun ISolar-SMX-II-5.6KW + 12x240Wp + 12x255Wp + 2x10kWh LFP
http://a68k.de/Solar/Monitor_LC2.php

grgdgreek

Home:6*135w mitsu.10*175w shuko. 2* cl150.3*D400 turbines.
Rolls18*4v series 5000 545ah*3 .2*Victron 3000 multiplus inv/chg. 24v. Shop:28*185w shuko. Sunny island. Sunnyboy.Rolls 40*s530.48volt.Sunny web box.

binkino

haha that is so amazing great ...
Now with AUX states.
see: http://a68k.de:81/Solar/gauges.php

I let it interpret the AUX state from clear text ("on"..."Off" and so on) to the function.

Energie:   PV/Batterie = it uses energy from battery and font color is green.
If the AUX powers the big relay between the grid and the inverter, it is red and says like "on grid" (in german..)

Energie:   PV/Batterie = tells, if the AUX powers another relay, that powers the fan for exhausting the gases from the batteries while charging.
if OFF = light blue font color
if ON it has green color.

I also have to modify my inverter, to get a signal, if it is "on grid" or "on battery"
it has LEDs in the front, possible use the led power for a small circuit to a relay contact,
or if I can get some contact to the big relay inside ... will see.

The Westech has contacts for generator, but they didn't work for me like expected.
Didn't find infos in the web, in wich condition, they change state ... will use these connection for the signal, i need.
PV-OUTPUT: http://pvoutput.org/list.jsp?id=38617
Classic Lite 200 + Classic 200 + Easun ISolar-SMX-II-5.6KW + 12x240Wp + 12x255Wp + 2x10kWh LFP
http://a68k.de/Solar/Monitor_LC2.php

binkino

#39
So ... now back on the "Lcars" (Star Trek) style version ....

Thanks to Wade I was able to complete my "gauge page" (that is not 100% finish, but close to be) with his AUX code
and now I returned back to my "Lcars" version and added the AUX states to it.
Also we changed from pure php code to easy to create and modify html code with php codes/command.
For a 1024x768 display: http://a68k.de:81/Solar/Monitor_LC.php
(old version: http://a68k.de:81/Solar/Monitor_LC_old.php )
The old Lcars version is still in the old code, not sure I will use it longer. But keep the file for me it as reference.
and as the browser all do not display all the same***, I made a "Mobile" version, in portrait scale
http://a68k.de:81/Solar/Monitor_LCm.php
that fits my 7" ASUS Android tablet and is just okay for my Android phones.

!!! I just cleaned up and have renamed the files! (if you have an old link)

It is for sure the biggest shame, that after 20 years (official) internet, we have to fight with the incompetence of the web browser programmers.
It was not enough, that in the early years we uses to write the same damn web page for each browser (IE and Netscape, then Mozille/Firefox) --- no not enough.
I have 6 different browsers on my tablet, to check styles and other purposes. In every browser it looks different.
They invent new technics, new functions, new ... senseless crap. What ever. But are not able to let the browser match the displayed output.
All these endless programming languages, do not solve it. And this nightmare continues.

how every. I had to yell that out ;-)



If someone has good ideas, suggestions, ... let me know.
PV-OUTPUT: http://pvoutput.org/list.jsp?id=38617
Classic Lite 200 + Classic 200 + Easun ISolar-SMX-II-5.6KW + 12x240Wp + 12x255Wp + 2x10kWh LFP
http://a68k.de/Solar/Monitor_LC2.php

ClassicCrazy

Do you have this running on your new Raspberry Pi now ?
Are you going to share this code ?

You have sure come a long way since you first asked about this not too long ago !

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

binkino

Quote from: ClassicCrazy on October 19, 2017, 11:14:29 AM
Do you have this running on your new Raspberry Pi now ?
Are you going to share this code ?

You have sure come a long way since you first asked about this not too long ago !

Larry

Hi Larry

I have my BananaPI M1 running with the service.
Some weeks ago I bought a "OrangePi PC" but that thing sucks. I can only recommend the BananaPI as cheaper alternative for a PI.
(better price, faster, has Sata)


Yes we will share the code, but I first have to wait until Wade gives his 'ok' because the base code is from him.
I will also write some notes to my pages. Also about the used OS, hardware, links to the sources, examples, and my files.
We can keep this topic alive, for further questions and so on ;)

That's right :)
I had some very useful lessons and refresh of many things in writing web code by hand :D




btw what is the difference between a Linux as web server and a windos based?
I also tried to run it on ma Lattepanda (that nice piece of hardware, that was castrated with win10) but didn't run on it.

PV-OUTPUT: http://pvoutput.org/list.jsp?id=38617
Classic Lite 200 + Classic 200 + Easun ISolar-SMX-II-5.6KW + 12x240Wp + 12x255Wp + 2x10kWh LFP
http://a68k.de/Solar/Monitor_LC2.php

Graham

Quote from: binkino on October 19, 2017, 09:39:52 AM
So ... now back on the "Lcars" (Star Trek) style version ....

Thanks to Wade I was able to complete my "gauge page" (that is not 100% finish, but close to be) with his AUX code
and now I returned back to my "Lcars" version and added the AUX states to it.
Also we changed from pure php code to easy to create and modify html code with php codes/command.
For a 1024x768 display: http://a68k.de:81/Solar/Monitor_LC.php
(old version: http://a68k.de:81/Solar/Monitor_LC_old.php )
The old Lcars version is still in the old code, not sure I will use it longer. But keep the file for me it as reference.
and as the browser all do not display all the same***, I made a "Mobile" version, in portrait scale
http://a68k.de:81/Solar/Monitor_LCm.php
that fits my 7" ASUS Android tablet and is just okay for my Android phones.

!!! I just cleaned up and have renamed the files! (if you have an old link)

It is for sure the biggest shame, that after 20 years (official) internet, we have to fight with the incompetence of the web browser programmers.
It was not enough, that in the early years we uses to write the same damn web page for each browser (IE and Netscape, then Mozille/Firefox) --- no not enough.
I have 6 different browsers on my tablet, to check styles and other purposes. In every browser it looks different.
They invent new technics, new functions, new ... senseless crap. What ever. But are not able to let the browser match the displayed output.
All these endless programming languages, do not solve it. And this nightmare continues.

how every. I had to yell that out ;-)



If someone has good ideas, suggestions, ... let me know.


looks great Andy, nice job.
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