Android app for the Classic

Started by Graham, January 06, 2014, 07:54:42 PM

Previous topic - Next topic

Cniemand

Graham, latest version fixed the Dial readout issue I had. Thanks!

Also, very neat being able to see the calendar. Is it being parsed from the website or the internal memory in the Classic?

- Cloud
OFF-GRID @ 8500FT : 2000w Array : 8 - CS6P-250P ; VFX 3648 ; WBjr ; MN CL200 #6738 ; FW #2079  
48v LiFePo4 : 16 - CALB CA 100 aH in Series - 5 kWh ; No Active BMS - Bottom Balanced
Charging Parameters : Bulk - 55v, Absorb - 5 EndAmps @ 55v, Float - 54v or 3.375v per Cell : ZERO EQUALIZE

Graham

Quote from: Cniemand on April 01, 2014, 10:56:50 PM
Graham, latest version fixed the Dial readout issue I had. Thanks!

Also, very neat being able to see the calendar. Is it being parsed from the website or the internal memory in the Classic?

- Cloud

It uses the modbus FileTransfer commands to read the data directly from the classic the same way the offline data works in the PC app. , so the calendar tab does not require an internet connection.
My system at my cabin doesn't have internet service and I can't use the MyMidnite service so I was planning on having the android app save the calendar data and forward it up to the PVOutput.org site when the phone gets within range of a cell tower or wifi service, this would allow me to record historical energy data similar to MyMidnite. The third tab 'charts' is an online embedded web page of the PVOutput.org page that will display this data as charts.

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

Graham - I finally had a chance to try out the latest version of the Classic Android App that  you made. It is working fine for me  - really like the large screen showing system watts dial along with SOC .

And the calendar is a great feature too.

Do you think it would be possible  to have selectable fields for the calendar ? Like being able to show float status or  current peaks or  any other data that could be grabbed out of the Classic and displayed in calendar ? 

Keep up the great work you have done !

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

anvil

Howdy,  i have a new classic 200 and no pc at the moment. i discovered your android app.

i have a galaxy S4. i cannot connect. i'm not familiar with network setup. i followed the DHCP instructions in the manual with no luck.

can i seek help here, or is there a better place for this basic help/

thanks in advance

Graham

Quote from: ClassicCrazy on April 18, 2014, 06:25:18 PM
Graham - I finally had a chance to try out the latest version of the Classic Android App that  you made. It is working fine for me  - really like the large screen showing system watts dial along with SOC .

And the calendar is a great feature too.

Do you think it would be possible  to have selectable fields for the calendar ? Like being able to show float status or  current peaks or  any other data that could be grabbed out of the Classic and displayed in calendar ? 

Keep up the great work you have done !



I was thinking of doing that with the calendar but I haven't had much time to work on this lately.
I ported the calendar code from my first classic monitor project http://netduinosolar.codeplex.com/, it is an embedded html/javascript control, so it should be pretty easy to figure out which day is selected, then I would just have to come up with a way to display the detail data so that it's readable on a small screen, maybe a tooltip bubble or popup?
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: anvil on April 19, 2014, 12:47:54 PM
Howdy,  i have a new classic 200 and no pc at the moment. i discovered your android app.

i have a galaxy S4. i cannot connect. i'm not familiar with network setup. i followed the DHCP instructions in the manual with no luck.

can i seek help here, or is there a better place for this basic help/

thanks in advance

I assume you have connected your classic to your wireless router, if not, midnite solar has a youtube video https://www.youtube.com/watch?v=rJSMO2pnaY0 that shows you how to do this.
Next, your phone must have a wireless connection to your wireless network, you should be able to use the browser on your phone to view your routers setup page to verify this. I simply have to enter 'http://192.168.0.1/status.htm'; as the address for my router, yours might be different depending on the make of your router.

If you have setup your classic to use DHCP, then your router will assign the classic an IP address within it's subnet range. Typically a router will have a subnet mask of 255.255.255.0 and a gateway address of 192.168.0.1, this means it will assign addresses within the range of 192.168.0.2 through 192.168.0.255 to devices within its subnet.

My android app will get the subnet mask and the gateway address from the router, it will scan the subnet for a device with an open port (usually 502) for the given range (255).
Assuming your router is setup with a subnet of 255.255.255.0 and a gateway address of 192.168.0.1, the app will try each address from 192.168.0.2 to 192.168.0.255 for a response from port 502.

You can also setup your classic to use a static IP address, you can then uncheck the 'Scan the local subnet for the Classic' and enter the static IP address in the into the android app setting page under ''Classic IP Address", the android app will then attempt to connect to that address only without scanning the subnet. The static IP address you configure in the classic must be within the range as defined by your router subnet mask and gateway address (192.168.0.x in our example) typically 192.168.0.223.

You could also download a ping utility onto your S4 to make sure your phone can send a ping request to the classic and get a reply from it.

hope this helps.
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

anvil

 thanks much. that should help

anvil

#97
howdy. I got her up and running.  all it took was a router and and an hour or two figuring out where the "on" button was.

here's what I found.

phone:

galaxy S4. GT I9505G. KitKat. VirginROM  v 3.1.2

the Google app connected with no problem.  I was not able to get the source forge download to connect.

when I click on the desktop icon I get a grey screen with a box in the center. the box and text are too small. text is unreadable.  I click on this with my hardware mouse and go to a deep purple screen. 

this connects and the data at the top is a good readable size.  click on view

and the gages come up. they are nice, but the middle boxes and numbers are too small and not readable.

under the gages are 3 buttons.  button text is unreadable/too small

left button brings up another screen.  the size is good and easily read!

middle button brings up another screen.  text is unreadably small.

3rd button (rt) . takes a while for screen to go from opaque to clear.  "check for updates, unlock code", readable. check box is small. h/w mouse works fine. not sure about touchscreen. may be a problem due to small size.  there is a too small box next to " unlock code". too small. cannot tell what symbol in box is.

what is "unlock code"?

3of 4 boxes at the bottom

button text is too small and unreadable.

1st (left) " overview"?

screen text is good and easy to read

2od button

cannot read text in screen "none"?

3rd(rt) " info"?

screen text is good and readable.

more or less, all the readable text is the same size.  the unreadable is about the same size. 

all in all,,, great job!

I cannot connect to the internet.  this is because, I'm sure, I need to connect the router to a modem.

would it be possible to use the phone's WiFi hotspot function and find/connect the classic thru the router to the internet?

or is there a way to connect the router/classic to the internet thru my phone?

will it be possible to upgrade the classic w/o a computer and just use the phone to do this?

thanks for all you are doing, its great. looking forward to what comes next. charts?



Graham

Quote from: anvil on April 20, 2014, 09:37:47 PM
howdy. I got her up and running.  all it took was a router and and an hour or two figuring out where the "on" button was.

here's what I found.

phone:

galaxy S4. GT I9505G. KitKat. VirginROM  v 3.1.2

the Google app connected with no problem.  I was not able to get the source forge download to connect.

....

It sounds like your are using the android app provided by Midnite Solar which is a port of the Adobe Air desktop application to Android, they have a child board under 'local app software' for this.

I've been developing another open source Android app (the one on sourceforge) on my spare time primarily as an exercise to learn how to develop mobile apps for android. I work developing software for Microsoft/C# at my day job and I wanted to learn about the new Android Studio development environment from Google, I started developing this app in February before I realized that Midnite Solar had plans to port their app. 

One of the differences in my app compared to the Midnite Solar app is what it doesn't have, which is the ability to write to the Classic, I wanted a read-only display of the state of my CC so I don't have to worry about someone playing with the tablet and accidentally changing some setting on the CC.
I recently added a WihizBangJr to my system and I've been adding new features to my app like the Bi-Directional power gauge, the large SOC% display...

I'm still tinkering with the app and will continue to post updates on sourceforge.

The Classic will only accept one connection at a time from either the local app or Android apps, the MidniteSolar Android app will hold on to the connection even if it's minimized. Make sure the MS app is not running in the background if you want to try and connect with my app, you might have to go into the settings and verify the start scan address and range or enter the static IP address of the Classic.
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

Yes you were out in front of the Midnite android apps Graham . And as far as graphics I like the looks and some of the features of yours more ! 
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

anvil

now I understand. i havehave been following this thread and thought they were the same.

I will try what you suggested, and have 2 toys to play with

Graham

Quote from: ClassicCrazy on April 21, 2014, 08:45:22 AM
Yes you were out in front of the Midnite android apps Graham . And as far as graphics I like the looks and some of the features of yours more ! 

Thanks, you have a lot more control when developing a native app but you can't reuse the code on other devices like Ipad etc
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

offgridQLD

#102
The apps been performing great though I have noticed one issue. It's not a big deal but its strange.

If I go to the Calendar screen I am showing 0.0 kWh every day this week. Going back over the months there is a lot of 0.0kWh days. If I log onto my midnite Its been recording the KWH totals for each day and there has been no resets. It all looks fine.

In the gauge view its showing the energy total for the day just calender view there are a lot of 0.0kWh days. The last time I had a day in calendar view that recorded a kwh number and float status was Sat 26 April. Though every day I reach float and obviously a + kwh number.

Ideas ?

edit: perhaps I need to update my classic firmware. I am running 1735 , just noticed its a little old now.

Kurt

Off grid system: 48v 16x400ah Calb lithium, Pv array one  NE facing  24 x 165w 3960w, Array two NW facing 21 x 200w 4200w total PV 8200w. Two x Classic 150,  Selectronic PS1 6000w inverter charger, Kubota J108 8kw diesel generator.

Graham

Quote from: offgridQLD on May 01, 2014, 11:44:51 PM
The apps been performing great though I have noticed one issue. It's not a big deal but its strange.

If I go to the Calendar screen I am showing 0.0 kWh every day this week. Going back over the months there is a lot of 0.0kWh days. If I log onto my midnite Its been recording the KWH totals for each day and there has been no resets. It all looks fine.

In the gauge view its showing the energy total for the day just calender view there are a lot of 0.0kWh days. The last time I had a day in calendar view that recorded a kwh number and float status was Sat 26 April. Though every day I reach float and obviously a + kwh number.

Ideas ?

edit: perhaps I need to update my classic firmware. I am running 1735 , just noticed its a little old now.

Kurt

It might have something to do with the Date/Time of the classic versus your device. Maybe you could try to reset the classic and set the time.

I'll try setting a wrong date at my system the next time I get to my cabin, see if it has an affect on the calendar


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

Not sure if this is related but the Local Status app offline data was showing me a lot of weird dates after one of the last firmware updates. It seemed like the clock was set okay in the Classic but there was a new feature to sync the clock with the Local Status app and some setting in a menu that allowed you to do that. I had changed something along the way and had to go back and reset that so the the Classic reported date correctly .

I didn't look recently to see if the same date problem was messing up Grahams android app reporting or not but can check this weekend.


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