Android app for the Classic

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

Previous topic - Next topic

ClassicCrazy

Quote from: Halfcrazy on January 08, 2014, 06:04:04 AM
So I was playing with it here and it keeps disconnecting and reconnecting like every 2 seconds. I am running a Galaxy S3 with Android 4.3.0010

Yes - my Samsung Galaxy Captivate is doing the same thing - when I put in the address it found and filled in the data for just a second, then everything went to zero again and just keeps saying connected then scanning . Also the main app window will close but the Bar showing Scanning local network or Connnected wouldn''t  close and stays on top of everything else
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

I've posted an update to https://sourceforge.net/projects/classicmonitor/, still a work in progress but hopefully the TCP connection is a bit more stable. I've also added a scan range and gauge scale to the settings.

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: Graham on January 13, 2014, 09:18:34 PM
I've posted an update to https://sourceforge.net/projects/classicmonitor/, still a work in progress but hopefully the TCP connection is a bit more stable. I've also added a scan range and gauge scale to the settings.

Graham.
I just loaded up the Classic app on Samsung Galaxy S and it connects , stays on for about 20 seconds , then disconnects and starts the connection process over and will again connect - repeating. I just set up a new router but don't think it is from that causing the disconnects.

It is night so not much action on the gauges but will take a look tomorrow.

As is the rule - I had to shut off the Local Status App in order for this to connect.
Looks nice so thanks for developing this Android App.
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: ClassicCrazy on February 09, 2014, 01:41:15 AM
Quote from: Graham on January 13, 2014, 09:18:34 PM
I've posted an update to https://sourceforge.net/projects/classicmonitor/, still a work in progress but hopefully the TCP connection is a bit more stable. I've also added a scan range and gauge scale to the settings.

Graham.
I just loaded up the Classic app on Samsung Galaxy S and it connects , stays on for about 20 seconds , then disconnects and starts the connection process over and will again connect - repeating. I just set up a new router but don't think it is from that causing the disconnects.


There is a problem with the TCP connection on some devices, the classic stops responding to a modbus request, the code times out and re-connects. Works ok on the phone emulator running on a pc and on my nexus 10, fails on an old htc 2.1 phone. Still working on this issue...
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

mofawayesu

Fwiw, timeouts also happen on my 1st gen nexus 7. Thanks for your work on this!

Graham

I posted an update on https://sourceforge.net/projects/classicmonitor, I won't be back up to my cabin to test this latest version against a real classic until next week, If someone could try it and let me know if the app remains connected to the classic, I would appreciate it.
Thanks
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

dapdan

Graham,

First of all great app. I manage to get it load onto my nexus 7 2013. I like the clean simple interface. These are my observations:

1. If you have power dash on it will not be able to connect to your classic if power dash is active on any computer.

2. If you have an access point it will not connect through the access point and only through the main router.

3. It connects for about 2 seconds and and disconnects and reconnects...etc.

4. It will not be able to automatically scan for classic and to connect to any of my classics I have to disable automatic scan and input the IP address of each classic to view them.

Even though I am only able to see the details for one or two seconds at a time it is a real sweet development. I can now lay in bed and see what is going on instead of getting up and going to the notebook.

Keep up the good work.

Cheers...
Damani

dapdan

Graham,

Allow one modification of item 4. I re checked automatic scan and it was able to scan my network and pick up only one of my three classic. It connects for about a second and disconnects. It registers only one of the IP addresses and keeps going at the address with out jumping to another address. Say I have 3 classic addresses ending with 15, 16 & 17 it is stuck at 17 and keeps disconnecting and reconnecting to it and does not scan the othe addresses.

Cheers...
Damani

Graham

#23

Quote from: dapdan on February 10, 2014, 12:13:27 AM
Graham,

First of all great app. I manage to get it load onto my nexus 7 2013. I like the clean simple interface. These are my observations:

1. If you have power dash on it will not be able to connect to your classic if power dash is active on any computer.

2. If you have an access point it will not connect through the access point and only through the main router.

3. It connects for about 2 seconds and and disconnects and reconnects...etc.

4. It will not be able to automatically scan for classic and to connect to any of my classics I have to disable automatic scan and input the IP address of each classic to view them.

Even though I am only able to see the details for one or two seconds at a time it is a real sweet development. I can now lay in bed and see what is going on instead of getting up and going to the notebook.

Keep up the good work.

Cheers...
Damani

Damani,
thanks for testing this,

The current implementation of this android app only supports a connection to a single classic, also I believe the classic classic can only accept one TCP connection at a time so this app will not be able to connect to the classic if the Midnite Solar PC app is running.
I've been trying to identify the connect/reconnect issue, I'm using the J2Mod modbus open source library, I noticed that it was sending an extra null byte every time it tries to verify the connection state of the TCP socket, I was hoping that was the cause of the reconnect.
I'll have to continue debugging this issue the next time I'm up at my off-grid cabin in a week or so...


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

dapdan

G,

Cool. I was able to stay somewhat connected to one of my classics through the night. It was connected more than it was disconnected by about a factor of 3:1 (30 sec connect:10 sec disconnect). I was still very happy with it and went to bed with my nexus. I found it was most stable when set to autoscan as opposed to the exact IP add of a particular classic. When it was set to autoscan it keep going back to the same classic as opposed to rolling through the three that I have. My challenge was to get it on the classic that I wanted. Again not withstanding the bugs it is a wonderful app. I can't take my notebook to bed but my N7 will fit that bill easily.



Cheers...
Damani

dapdan

Graham,

I am not sure what i did but I got the app to run stable. First I uninstalled the entire app and made sure I installed your latest. It did have a diff UI with a calender and chart dummy tabs. When it first boot up in autoscan it found one of my classic and did not disconnect from it. It even stop throwing the grey bar indicating that it was scaning. When the N7 screen timed out it recommenced reporting on the classic without doing a scan. I then tried to force it to pick another classic by going in to settings and selecting apply and it did jump onto another classic(it would be nice to be able to control which classic it jump to since autoscan seems to be the more stable than selecting an exact address). Then I lost it. It then took some doing to get it back there, uninstall, re-install, autoscan, manual scan (can't explain the exact scenario) but I am here again and it has been running 
stable now for the past 15mins. I am happy not to disturb it and leave it be. Hope some of my discourse helps.

Cheers...
Damani

Graham

Quote from: dapdan on February 10, 2014, 01:40:38 PM
Graham,

I am not sure what i did but I got the app to run stable. First I uninstalled the entire app and made sure I installed your latest. It did have a diff UI with a calender and chart dummy tabs. When it first boot up in autoscan it found one of my classic and did not disconnect from it. It even stop throwing the grey bar indicating that it was scaning. When the N7 screen timed out it recommenced reporting on the classic without doing a scan. I then tried to force it to pick another classic by going in to settings and selecting apply and it did jump onto another classic(it would be nice to be able to control which classic it jump to since autoscan seems to be the more stable than selecting an exact address). Then I lost it. It then took some doing to get it back there, uninstall, re-install, autoscan, manual scan (can't explain the exact scenario) but I am here again and it has been running 
stable now for the past 15mins. I am happy not to disturb it and leave it be. Hope some of my discourse helps.

Cheers...
Damani

That's good news, I was ready to give up on J2MOD...
The latest build on sourceforge has placeholder tabs for swipe to Calendar/Charts, this is the version with the J2Mod fix for that extra null byte being sent when it check for a valid connection.
If it looses connection it might take up to 60 seconds to reconnect, I'll have to figure out why it lost the connection in the first place.
I'll have to come up with a way to support multiple classics, maybe swipe vertical to move between classic, swipe horizontal to move between tabs.
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

dapdan

Dude don't give up, you're doing great work. I am loving this mobility on my N7.

Cheers...
Damani

Cniemand

I have been running the new version for a few minutes now. Appears to work much better than the previous version (downloaded yesterday afternoon). Works nicely on my inexpensive smart phone. LG motion.

Stays connected.

Thanks for the work!

- 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

dapdan

Graham,

It's been 12hr+ and it is still connected. All seems well.  I dear not try to call up my other classics.

Cheers...
Damani