Android Reef Angel Status

Community contributed apps
Post Reply
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

alexwbush wrote:nice update. I haven't switched to wifi yet, so I am using the reefangel.com values. I guess it can't pull DP and AP percents from the website.

I might play with putting wifi back in if you're going to work it such that we can modify from our phones. I've got it plugged in via USB to a stand alone computer running the client right now.

Is a widget coming?
the ap and dp values are set to be added to the reefangel.com website values soon... i just have to add the sending of them to the web banner string.

you will be able to modify memory values and trigger modes and toggle relays from the app eventually. i'm actually going to start working on that stuff next. i don't think you will be able to do that if you use the website values though... have to test that one.

as for a widget, i have thought about it and how that would work. it would be nice to have a widget with a value or two on it that would load the app up if you clicked on it. i just don't have all the specifics worked out with it yet. so we will have to see.

curt
StuGotz
Posts: 95
Joined: Sat Oct 15, 2011 9:17 am

Re: Android Reef Angel Status

Post by StuGotz »

binder wrote:Just pushed another release, so be on the lookout for it. Here's the new changes:
  • Improved XML parsing
  • Added more status text updates
  • Switched to use HttpURLConnection, allows for read and connect timeouts
  • Moved status strings to strings.xml
  • Added connect & read timeouts to host class
  • Added ability to enter in userid for web banner on reefangel.com
  • Added ability to choose to query controller directly or reefangel.com for values
curt
Great Update! Thanks for adding the ability to use our userid for web banner!
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: Android Reef Angel Status

Post by alexwbush »

binder wrote: the ap and dp values are set to be added to the reefangel.com website values soon... i just have to add the sending of them to the web banner string.

you will be able to modify memory values and trigger modes and toggle relays from the app eventually. i'm actually going to start working on that stuff next. i don't think you will be able to do that if you use the website values though... have to test that one.

as for a widget, i have thought about it and how that would work. it would be nice to have a widget with a value or two on it that would load the app up if you clicked on it. i just don't have all the specifics worked out with it yet. so we will have to see.

curt
Curt,
Excellent news on the ap/dp. I was not aware that those were coming to the website.

I doubt values could be modified via the website... but you guys keep developing stuff, so who knows.

I was thinking like a 2-3 space widget that would show the same info as the banner. Also if the app could trigger water change or feed mode... that'd be impressive. I'm working on building the automated water change again now that I have room on the new board.

I will have to look hard again at wifi. I think the main problem I might have is that my internet connection comes in through the router and goes through 3 personal routers before going to my computers. I had one setup as a webserver for a little while going through two routers, so I know it's possible. But I also have an IP camera I am trying to get to work. I'll have to play around with settings and see if I can get them both to work.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

alexwbush wrote: I was thinking like a 2-3 space widget that would show the same info as the banner. Also if the app could trigger water change or feed mode... that'd be impressive. I'm working on building the automated water change again now that I have room on the new board.
The triggering of water change and feed mode will be coming. The code already exists on the controller's end. The iPhone app handles it already (they had a head start on development over me).

I'm going to be researching the widget more. It would require some modification of the current code and improvements that I've already planned to do (but haven't yet). This would be so the phone is only doing one request on the controller instead of multiple ones (from different apps and such). Plus I will have to add in an "update interval" to specify how often to update the values from the device (controller or web banner).

Yes, I have ideas....lots of them. I just have to implement them and continue to work on other things. Maybe I should clone myself. :ugeek:

curt
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

For those of you in foreign countries (aka, non-English speaking locations), I'm curious to know how the app works for you with displaying other languages and if you've encountered any problems.

Also, if you would be interested in doing some string translations for the app, please let me know. You're name will be added to the list of contributors as well.

curt
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

Ok. I've got a French translation that will be in the next update.

curt
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

Next update is pushed. Be on the lookout for it.

Here's the highlights for version 0.3
  • store controller values inside a database
  • added history menu that displays previous 30 status updates
  • database is limited to only keeping 30 status updates
  • BufferedReader has 8K initialization
  • Switched connection reader to use StringBuilder instead of just appending to a single String
  • added error status summary to update line on error
  • improved error handling
  • update the screen after changing preferences
  • use styles with the layout for consistent look and easier to update values
  • add in ability to label relay ports
  • moved labels to own preference screen: controller & relay labels
  • moved visibility to own preferences screen
  • display relay status information
  • allow for toggling relay port status
  • option to query all labels from ra.com using web banner id entered (does not download values yet)
  • added French translation
  • added better layout/style for tablets (extra large screens)
This should be a good update for everybody. More additions, more updates. The big update with this one is the ability to toggle the ports on & off.

curt
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

Just pushed a minor update. Fixed a bug with parsing the salinity.

curt
tkeracer619
Posts: 160
Joined: Thu Nov 24, 2011 9:50 pm
Location: Golden, CO

Re: Android Reef Angel Status

Post by tkeracer619 »

Keep up the good work! Program works good on my HTC Sensation.

Get home this weekend and will hopefully get everything setup.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Android Reef Angel Status

Post by rimai »

It's been working beutiful now with last patch :)
I've been using it everyday. It's awesome.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

rimai wrote:It's been working beutiful now with last patch :)
I've been using it everyday. It's awesome.
that's great. i'm glad it's working properly now. i just need to start adding in more features to make it more complete. 8-)

curt
tkeracer619
Posts: 160
Joined: Thu Nov 24, 2011 9:50 pm
Location: Golden, CO

Re: Android Reef Angel Status

Post by tkeracer619 »

Quick question...

What is the purpose of the green dot that shows up when you manually turn on one of the relays?

Once it has been turned on and back off why does the green dot stay on when turning off the relay via the button and then only goes off when touching the green dot?

When you turn off a relay that is already on via the programming and then turn it back on using the android app does the relay go back to its programmed state? If I want to turn on a relay for say a few days (my ro) and have it ignore the programmed state how is this done without first turning the relay off and then back on? or can you even do this?

Thanks,
Mark
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

tkeracer619 wrote:Quick question...

What is the purpose of the green dot that shows up when you manually turn on one of the relays?

Once it has been turned on and back off why does the green dot stay on when turning off the relay via the button and then only goes off when touching the green dot?
The green dot that shows up indicates that the relay has been overridden from its default state. Normally, the relays are in "auto" mode meaning they are controlled by the logic in the code (ie, your loop() ). When you use the app to force a port ON or OFF, you are overriding their default logic/mode. Thus you are turning the port ON and it will stay ON until you return it back to the AUTO mode (or if you turn it OFF for good). So the green dot is a way to clear out the override mask and return the port to it's automatic mode that is controlled by the logic.

The iPhone app has a blue dot. (I made it green to match the green android logo. :) )
When you turn off a relay that is already on via the programming and then turn it back on using the android app does the relay go back to its programmed state? If I want to turn on a relay for say a few days (my ro) and have it ignore the programmed state how is this done without first turning the relay off and then back on? or can you even do this?
To do this, you would manually turn it on by choosing ON from the app (to force it ON). Then when you are ready to return it back to it's normal state you would click on the green dot to return to normal. Otherwise it would stay in the overridden state forever (or until you restart the controller).

The idea behind the override is that you are specifically wanting a port turned ON or OFF and you know what you are doing. This came from the lights ON and OFF modes in the menu and also with the feeding and water change modes. The modes had to have a way to override the logic to force a port off (or on) and keep it that way while running so as to prevent unwanted events from happening during the different modes. (You wouldn't want your powerheads to cycle ON while you were in the middle of feeding OR you wouldn't want your return pump to turn back ON when you had 25% of your water out of the tank for a water change.)

Hopefully that clarifies things for you.

curt
tkeracer619
Posts: 160
Joined: Thu Nov 24, 2011 9:50 pm
Location: Golden, CO

Re: Android Reef Angel Status

Post by tkeracer619 »

Yup clears it up.

Thanks for the quick response :)
Image
Nikkwins
Posts: 20
Joined: Fri Nov 18, 2011 10:30 pm

Re: Android Reef Angel Status

Post by Nikkwins »

Curt, thank you for providing this app! I have two questions:

1) I checked the box to display salinity, and it shows up on my screen but the value is 0.0

2) I tried to control the relays but the relay buttons dont do anything when i tap them.

Any ideas?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

Nikkwins wrote:Curt, thank you for providing this app! I have two questions:

1) I checked the box to display salinity, and it shows up on my screen but the value is 0.0

2) I tried to control the relays but the relay buttons dont do anything when i tap them.

Any ideas?
yes. what are you communicating with? the website or your controller?

when you choose the website, the relay toggling is disabled. also the website does not handle salinity, so i think that is your problem.
Nikkwins
Posts: 20
Joined: Fri Nov 18, 2011 10:30 pm

Re: Android Reef Angel Status

Post by Nikkwins »

binder wrote:
Nikkwins wrote:Curt, thank you for providing this app! I have two questions:

1) I checked the box to display salinity, and it shows up on my screen but the value is 0.0

2) I tried to control the relays but the relay buttons dont do anything when i tap them.

Any ideas?
yes. what are you communicating with? the website or your contr

when you choose the website, the relay toggling is disabled. also the website does not handle salinity, so i think that is your problem.
Curt, thats right, I have it configured to use the website. I found the instructions in the iphone thread to set up dynamic DNS so ill mess with that toniht. thanks for your help!
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Android Reef Angel Status

Post by rimai »

You could always use the internal ip address too.
It would work inside your house, but not outside.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

For those of you that are following this app, I just pushed another update. The highlights are as follows:
  • * added icons to the menus
    * added ability to change PH & Salinity labels
    * added Memory reading / writing
    * added controller command sending
    * ability to download labels from reefangel.com
    * full history viewing instead of just temperatures
    * improved communication framework
Just thought I'd share this with everybody. So for those of you who are using the app, look for the update.
projectx
Posts: 120
Joined: Sat Apr 23, 2011 6:53 pm

Re: Android Reef Angel Status

Post by projectx »

That is great thanks for doing this.

there a way to change what is set to on and off during feeding mode or water change mode?

I am glad that this was the controller I decided to go with, you guys are on top of this
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

projectx wrote:there a way to change what is set to on and off during feeding mode or water change mode?
Yes. You do this inside your PDE file. If you used RAGen to generate your PDE file, on the PDE tab at the bottom of the screen you will be able to "check" what ports get turned off in the different modes.

If you did not use RAGen, you can manually add that functionality to your PDE file in the setup(). The code you will want is as follows:

Code: Select all

void setup()
{
    ReefAngel.Init();  //Initialize controller

    // Set the ports that get toggled on & off during the following modes
    // To enable a port to be toggled, place a 1 in the appropriate position
    // Uncomment and update as needed
    //                     Port   87654321
    //ReefAngel.FeedingModePorts = B10011100;
    //ReefAngel.WaterChangePorts = B10011100;
    //ReefAngel.OverheatShutoffPorts = B00001100;
    //ReefAngel.LightsOnPorts = B00000110;

    // Other initialization code goes here...
}
From the example above, you just need to place a 1 in the correct spot of the port you want turned on/off in the respective mode. If you look at the Feeding and water change modes above, ports 8, 5, 4 & 3 will be turned OFF when those modes are entered and turned ON when those modes are exited.
projectx
Posts: 120
Joined: Sat Apr 23, 2011 6:53 pm

Re: Android Reef Angel Status

Post by projectx »

Ok, sorry I ment inside the android app, i did do it inside the ragen app.
Image
serhiyi
Posts: 50
Joined: Thu Jul 21, 2011 8:59 pm

Re: Android Reef Angel Status

Post by serhiyi »

Does this work with WiFi Authentication?

I was testing app inside the house with local IP and it works. But I want to be able to access controller from anywhere using phone. Before setting up router to handle redirect I added security to controler

I'm able to use access by 192.168.1.100:2000/wifi and it asks for user and password. Works great.
But now app is not working.

My code:

Code: Select all

void setup()
{
    ReefAngel.Init(); //Initialize controller
    WifiAuthentication("ra:test");
    ReefAngel.SetTemperatureUnit(0);
    ReefAngel.PWM.SetActinic(0);
    ReefAngel.PWM.SetDaylight(0);
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

No, authentication currently is not implemented. It is added to the todo list and will be worked on. If I recall correctly, some people were having issues with authentication in general but I do not know what the status of that is as it has been a little while since it was discussed on the forums.
agentgreen
Posts: 97
Joined: Wed Jul 06, 2011 6:45 am

Re: Android Reef Angel Status

Post by agentgreen »

Great work on this app! Quick question.

I have port forwarding setup and I can use the app to read memory settings, so I know the connection is working. However, when I hit Refresh, the 'Last Updated" field runs through, Connecting -> Reading (can't really tell its too fast) -> Parsing and stays at parsing, but doesn't seem to update any of the items below.

Once I switch back to the web banner everything updates. Am I missing something?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Android Reef Angel Status

Post by rimai »

Bug :(
You are in the same boat that I am.
Curt is working on it though.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

Roberto is right. He found a bug with the app. I had partially implemented relay boxes and doing so triggered the bug. I've got it fixed and should be releasing an update soon.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

Just released the fix for it. Be on the lookout for the update to come through the market.
agentgreen
Posts: 97
Joined: Wed Jul 06, 2011 6:45 am

Re: Android Reef Angel Status

Post by agentgreen »

binder wrote:Just released the fix for it. Be on the lookout for the update to come through the market.
Love it! Thanks!
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

Let me know if you have any other problems or questions about it. Also, feedback (both positive and negative) is always welcomed.
Post Reply