RA WebApp

Related to the Portal
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RA WebApp

Post by lnevo »

Looks like the demo is currently controlling my tank... thought the json was on the client end... gotta figure this one out real quick.. :(

It's either have a broken demo or be exposed... :(
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RA WebApp

Post by lnevo »

Ok. It had nothing to do with json, but the ajax call queries a php script on the server. Meaning that the actual communication with the controller happens between the webserver and the controller and then it returns the json object to the client which then does the javascript to parse it.

I've now cleaned up the data-cmd values so that all the calls just run r99 so it looks like everything from a r/w perspective now is assured. Unfortunately not as good a demo, but at least you see a live tank and can interact with the front end. Just pretend it's doing stuff. You should see the webcam update when you click stuff at least.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA WebApp

Post by rimai »

Is the live demo link the same as your screenshots?
I get different stuff :(
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RA WebApp

Post by lnevo »

It should be somewhat close.. It's different on the phone, the desktop/tablet version has gauges and LEDs for the relays. The phone version has progress bars and buttons for the relays...also there is a charts tab on the desktop/tablet version. I can post some pics as well of that version.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RA WebApp

Post by lnevo »

ImageUploadedByTapatalk1374979980.797125.jpg
ImageUploadedByTapatalk1374979980.797125.jpg (37.17 KiB) Viewed 6418 times
ImageUploadedByTapatalk1374980024.157144.jpg
ImageUploadedByTapatalk1374980024.157144.jpg (35.3 KiB) Viewed 6418 times
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA WebApp

Post by rimai »

Yeah, that's what I see on my desktop.
How does handle the override on the LED buttons?
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RA WebApp

Post by lnevo »

So there are 4 led colors. green-on, green-off, red-on, red-off.

The color represents the auto / programmed status. If you click the led it will force the override to the opposite of the current, when it's in that state another click clears the override.

It works very well in practice. The only negatives are that you can't override it to the state that it's in, and you also cannot tell if the relay is overridden and in it's auto state (I.e. programmed to on and overriden on both look the same)

It can be changed, but I was trying to do it all in one button when I did it. On the iPhone, you get discreet on/off/auto.

Here's a screen shot with one relay (extension) overridden on and my refugium light overridden off.
ImageUploadedByTapatalk1374981376.871629.jpg
ImageUploadedByTapatalk1374981376.871629.jpg (39.45 KiB) Viewed 6414 times
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RA WebApp

Post by lnevo »

Sacohen wrote:It looks great.
I may try hosting it on my MAC, but I don't usually keep that on all the time.
I only use it when I have some freelance video editing work to do.
Just an FYI.

The cache may not work properly...I'm a version behind on OSX so i dont know about the latest...but the extension for the cache manifest changed from .manifest to .appcache. So you can either rename the manifest file and update the <HTML> tag to match the new name or update the mime types for apache.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RA WebApp

Post by lnevo »

This has been my primary method for controlling my RA for a while now. I've made a number of improvements so that everything is refreshed from ajax and also used html5 local storage to remember what tab you are on. It's made the webapp seem very seamless and simulates multitasking very nicely. I added that this past weekend and it's made checking on my tank sooo nice.

I'll be posting the updated code in next week or two. The one issue is that i do a lot of caching by preloading the pages with a shell script running on my mac. It speeds up page load a lot.

Other than that I'm very happy with this. If anyone is using this or would like more info please lmk.

Thanks
Lee
ReEfnWrX
Posts: 234
Joined: Tue Nov 05, 2013 8:40 am
Location: Houston TX

Re: RA WebApp

Post by ReEfnWrX »

This looks really cool, does it update more frequently than the portal?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RA WebApp

Post by lnevo »

I run my script every minute through cron.
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: RA WebApp

Post by Appleseed »

Hi,

Once again this is awesome..!

I forgot about this and am trying it again.

I extracted the tar.gz file to a linux box and can get to the page but seem to be seeing your reef even though i changed the variables in the config.php file...

any ideas are appreciated.

Andy
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RA WebApp

Post by lnevo »

I'll have to look at the php again to see what else may need to be changed. You may be seeing the webcam image defautl file...? Is the RA data the same as mine too?
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: RA WebApp

Post by Appleseed »

Hi
it seems to be showing yours :/
Attachments
ra_image.JPG
ra_image.JPG (157.5 KiB) Viewed 6431 times
Image
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: RA WebApp

Post by Appleseed »

there where also a whole lot of references to your username in the index.php under the Charts tab which i changed but it seems that the index.php file is still generated/referencing your setup :/

I know nothing about php etc so dont even know where to start.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RA WebApp

Post by lnevo »

Well the good news is that its not showing *my* relay data :)

A lot of the code is going to be hard coded to my INO and specific configs. Like the relay bars...i think the labels come from the portal but its in the cache files in the data directory. You need to update the cron job shell script that dumps that out, or have it get the labels live from the portal (but that slows everything down...)

The fact that you have it up and running is great!!

I would start with the shell script that gets the cache files created. A bit in there will need to be modified.

I will definitely help you get this going, it will help converting this to a more generic form and a good learning experience for others who follow.
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: RA WebApp

Post by Appleseed »

I didn't realise that there is a shell script. I am out and about the next few days but will look at it again later in the week.
Image
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: RA WebApp

Post by Appleseed »

hi

can you share your shell script as the tar.gz doesnt seem to contain one?
Image
Post Reply