Hi,
I'm trying to use the local app to have remote monitoring with a nexus 7. I have the latest firmware on the classics. I have the classics setup with static IPs and set to auto reset.
It seems the networking on the classics is unreliable. I get a usable interface on the local app by rebooting the classics, but then if I put down the nexus and come back say 4 hrs later, the local app is stuck in "connecting" and "retrying" . Any ideas?
Or better yet, do you have a spec I could use to write my own application? I'd like to ditch the Adobe Air requirement. I don't need fancy dials and interface, just reliable data.
thx
Please see the "MidNite Solar MODBUS Network Specifications" document available with the other manuals here:
http://www.midnitesolar.com/documents.php?productCat_ID=21&productCatName=Charge%20Controllers%20-%20Classics&model=CLASSIC%20150&product_ID=256&act=products
You can also poke around the forum here, there are a bunch of folks who have done their own monitoring solutions and have generously offered them to the community.
Thanks,
-Andrew
thx. Is there anybody with a solution that uses the ethernet interface?
The software isnt really the issue. What i have found by extensive trial and error, is, that the way to get a 100% reliable ethernet connection to the classic is to maintain a single open modbus connection. Open it and keep it open. After a about 1 or 2 weeks the controller will likely reboot in which case you will need to reestablish the link. Doing this i have had a stable connection between the blackbox prototype here for the last 5 months. In fact i have 1s data logged contniuously over that whole period.
However the local app works on the same always open basis, so you can just leave it running 2/7 on a netbook or tablet, should work with all power management disabled etc.
OTH if you want to open read and close, the best thing i found was to space the sample periods out to at least 5 minutes. Theres something in there that gets muddled on too close or frequent connect attempts.
The latest firmware reportedly contains some network fixes, but to verify those, id need to go back to using cronjob interval connects, which im kinda over now.
Anyone that knows some php and wants to help design a really cool UI for blackbox, let me know. When i get time ill update the svn, and make a zip download to make it a bit more accessible.
Yes what I find happens a lot is the OS on the device (Tablet, Laptop etc) puts the device into standby or whatnot and that is an Ungraceful disconnect. It is sort of like just cutting the cat 5 cable. The issue is the device (Laptop or tablet or whatever) really should let programs know it is going to shut down so they can make there disconnect but that would likely be way to complicated.
So try disabling all power save functions so the tablet stays awake 24/7 and see if that helps
thx.
hmmm, seems like the app could catch the state using onpause() or something similar and do a graceful exit.
What is the preferred mode: static or dhcp?
I'll try exiting the app after each use and see if that works.
Well I think, and please remember I know nothing about programming, that the issue is the OS kills the app by going into low power mode. I dont know that the App has a chance to do anything about it? This is more an Andrew question so I will ask him to chime in
Ryan
Static. On any network that will always yeild a "simpler" setup, however the classic has pretty small computer inside, and dhcp takes a fair bit of resources, hence its even better to use static. That way the local app can remember the IP addresses too.
Quote from: jtdiesel65 on May 23, 2014, 10:24:44 AM
thx.
hmmm, seems like the app could catch the state using onpause() or something similar and do a graceful exit.
What is the preferred mode: static or dhcp?
I'll try exiting the app after each use and see if that works.
Static for sure...
What I do to make for less entry on the MNGP keypad is set it for DHCP, save and reboot. Then go in and change it to static and the IP you want and save. That way it gets the gateway and DNS from the router and those values will be correct after you switch to static with no input from you.
Just a trick I use.
Tom
The way the App/Classic work together is:
1- App attaches to Classic
2- App polls Classic every 2 seconds (best case)
3- If there is 30-60 second dead-time on the line the Classic will close the connection on its end.
4- There is a 1-second grace timeout between Closing and re-opening the connection to the Classic.
5- If the App does not catch the closed connection from the Classic (i.e. if the PC goes into suspend mode) then there is no error case for the App and it continues to act as if it is monitoring the connection. If the OS throws the correct error state then the App will disconnect and attempt to reconnect if not then the app is sometimes stuck in a metastable state where it thinks it is connected but really isn't. The answer is usually to shutdown the app and start it up again.
I haven't investigated the power modes, but I'll have a look to see. I do have a "catch all" in the app which is supposed to close connections gracefully, but then it depends again on whether the OS throws the correct event or not.
I agree whole-heartedly with anyone who wants to ditch Adobe AIR. It promised way more than it delivered when we started development. However we now have something like 6-manpower-years worth of development time in it and it will unfortunately have to remain our solution for monitoring the Classic. Please rest assured that we won't use that crap ever again for future products if at all possible.