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 »

Just pushed another release tonight. It uses the new icon to match the forum (yay! :) ). Also, for those users who are running Android 4.X and later (ICS and JellyBean), it makes use of the Holo Theme and has an action bar at the top. So the UI looks more like it belongs instead of with the older 2.X style theme.
Here's the rest of the updates:
  • updated the settings page to make it simpler and fewer screens
  • updated for ics and jellybean
  • updated to new logo
  • error retry count to retry connection before displaying error
    • disabled by default
    • default 5 second interval between retries
  • switched changelog to html view
The new settings page is MUCH nicer and a LOT simpler to navigate.
The error retry stuff is a new feature and will require some additional feedback from people on how it performs. Currently, if the error retry fails, each subsequent time it fails you will be notified UNLESS you are able to communicate with it (and reset the error counter). This should not happen if you are offline (ie, no internet available). It will not try to communicate if there is no internet address and it will just display a popup message saying you are offline.

Enjoy!
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Android Reef Angel Status

Post by 00Warpig00 »

Hmm it installed itself to my phone automagically :)
I am not lucky enough to enjoy the graphical changes other than the icon due to my droid version, but I like it so far.
Now lets see how that nifty retry gimmick works :D

Thanks Curt

Nick
180G FOWLR
20GH QT#1
29G QT#2

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

Re: Android Reef Angel Status

Post by binder »

I'm looking into putting the action bar in the app for the older droid versions but just haven't had a chance to work with it a lot. I am wanting to make some bigger ui changes but haven't found the time. There have been more important changes to make first.

Let me know how the retry thing works for you. :-)
Ademster
Posts: 144
Joined: Tue Aug 14, 2012 1:11 pm

Re: Android Reef Angel Status

Post by Ademster »

automatically uploaded.. I have droid x 2, i will see how it looks on my samsung tab note thats running newer os
Adam
58 Gal
Image
Ademster
Posts: 144
Joined: Tue Aug 14, 2012 1:11 pm

Re: Android Reef Angel Status

Post by Ademster »

Just check how it looks on the tablet and I love it!!! Wish it looked like this on my phone.

But I'll survive.

Posted by: Galaxy Note Tablet.
Adam
58 Gal
Image
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Android Reef Angel Status

Post by 00Warpig00 »

A great day with the Android App. Not a single peep out of it and updates all day long :)

Thanks Curt
180G FOWLR
20GH QT#1
29G QT#2

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

Re: Android Reef Angel Status

Post by binder »

Ademster wrote:Just check how it looks on the tablet and I love it!!! Wish it looked like this on my phone.

But I'll survive.

Posted by: Galaxy Note Tablet.
it may look close in the future with some more enhancements i have coming. :-)
00Warpig00 wrote:A great day with the Android App. Not a single peep out of it and updates all day long :)

Thanks Curt
awesome. Glad it is working good for you! 8-)
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Android Reef Angel Status

Post by 00Warpig00 »

Since we are on the topic of notifications lately, I just had another idea for the Android app.

Notifications. I realize the Portal has some basic functionality in this regard but it would be great to see it on the Android app too. Since the android app reads a bunch of the RA data why not have the ability to set phone notifications based off of the updated data at the read interval. I realize this wouldn't be realtime but for some things it doesn't need to be. It would be great to be able to notify if temp on a probe was outside of a range, or if an IO input was not as expected or a power outlet on/off when not expected to be, an ATO timeout etc. Right now you have to do custom variables on the RA coding and upload it to the RA and then tell the Portal to report on the variable if it falls outside of range. And the notification e-mails from the portal are very limited. The Android reads all the data anyhow why not report/notify based off of it.

Nick
180G FOWLR
20GH QT#1
29G QT#2

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

Re: Android Reef Angel Status

Post by binder »

00Warpig00 wrote:Since we are on the topic of notifications lately, I just had another idea for the Android app.

Notifications. I realize the Portal has some basic functionality in this regard but it would be great to see it on the Android app too. Since the android app reads a bunch of the RA data why not have the ability to set phone notifications based off of the updated data at the read interval. I realize this wouldn't be realtime but for some things it doesn't need to be. It would be great to be able to notify if temp on a probe was outside of a range, or if an IO input was not as expected or a power outlet on/off when not expected to be, an ATO timeout etc. Right now you have to do custom variables on the RA coding and upload it to the RA and then tell the Portal to report on the variable if it falls outside of range. And the notification e-mails from the portal are very limited. The Android reads all the data anyhow why not report/notify based off of it.

Nick
Already one step ahead of you. I've been thinking about this for a couple months now on what would be the best way to implement it. I've got ideas in my head and sketched out, but just haven't coded anything. What I plan on doing is having a separate section in the app to configure the notifications (we'll call them device or tank notifications instead of the error notifications). Then you can pick from all the available inputs/values and display notifications based on what occurs (>, >=, <, <=, ==, !=).

I'm thinking of having this tied into the error notifications. So if you disable notifications altogether, you won't have ANY notification (error or device/tank). Also wondering if I should allow you to disable the error notifications while keeping the device/tank notifications. I'm probably going to make it an "all or nothing". So you must have notifications turned on in order to create device/tank notifications and then that means that you will also receive error notifications as well.
I'm going to have to figure out the best way to handle the condition checking if you want to monitor the status of an outlet. Some of the checks are going to be limited because we can't count how long something has been on and so forth. The relay status could just be that the relay is ON or OFF. I might be able to add something in to check if a relay is the same as another relay or if it's opposite of another relay. We will just have to see.

Anyways, thanks for the feedback on this as well. It has given me some more things to think about.
modulok
Posts: 166
Joined: Wed Oct 24, 2012 8:37 am

Re: Android Reef Angel Status

Post by modulok »

How about a widget? It would be awesome to have a widget that shows a few chosen values that updates each time the app polls the data.
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

modulok wrote:How about a widget? It would be awesome to have a widget that shows a few chosen values that updates each time the app polls the data.
I've been working on this as well. A couple comments about it. 1. I can get the data no problem at all and display it on the screen. 2. I suck at graphics and have been having issues making things look right and have a nice layout.

I've had somebody suggest that I create a re-sizable widget that changes the contents based on its dimensions.

I just need to spend time and figure out how to do layouts better with graphics.
modulok
Posts: 166
Joined: Wed Oct 24, 2012 8:37 am

Re: Android Reef Angel Status

Post by modulok »

Not sure if you can reverse engineer, but the weather underground app has various sized widgets.

Sent from my mobile communication device
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

modulok wrote:Not sure if you can reverse engineer, but the weather underground app has various sized widgets.

Sent from my mobile communication device
I will look into that and also at others as well. Thanks for the tips....it is appreciated. :)
modulok
Posts: 166
Joined: Wed Oct 24, 2012 8:37 am

Re: Android Reef Angel Status

Post by modulok »

Yeah, give it a try. There are 3 different widgets, 1x1, 2x2, and a simple 2x2 that changes color based on the temperature compared to yesterday.
It might be kinda cool if the background color of the widget in regards to good or bad parameters.
Image
modulok
Posts: 166
Joined: Wed Oct 24, 2012 8:37 am

Re: Android Reef Angel Status

Post by modulok »

I just got my 2nd bad url this week with the new app.

It happened Thursday am, somewhere between 1:30am and 2am it stopped communicating with the wifi adapter. I fixed it quick with reconnecting the wifi unit. I did not check via the portal that morning. I just checked the portal and do not see an update between 1:54a & 7:14a. So maybe it was just the wifi unit.

It just happened now, ~2:20pm - 3:00pm. I manually did a refresh via the app and got an another bad url. While typing this and checking the portal, it's updating ok now. Not sure if going to the portal helped, or just time. The portal has been updating all day, so for some reason the app got a bad url and the portal was working.
Image
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Android Reef Angel Status

Post by 00Warpig00 »

Happy to report that so far the Android app has been much improved in regards to NOT chiming in on temporary network unavailability. I used to hear the Android app chime at least 4 or 5 times a day saying the controller was not available. I was away on business the whole week and I received two notices the ENTIRE WEEK! Every time I looked at the app I had current data. :D

Thanks again Curt!

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Android Reef Angel Status

Post by rimai »

Hey Curt, for next updates, can we have a method to change Vortech modes, speed and duration other than memory?? :)
Also, I don't know if you peeked at the dev branch, but I'm creating override variables for all dimming channels (actinic, daylight, expansion, AI and Radion).
It would be awesome to have a slider to adjust the override when you click the % on the app.
This is how the override is going to work:
Any value above 100, usually 255, indicates the override is disabled.
And consequently any value below and including 100 indicates the channel is overridden.
If someone clicked the AP% for example, a slider would popup that would let you adjust that % and place the new value on the override variable.
The controller would then adjust the channel to this new value.
This will allow for people to adjust their channels at any time :)
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:Hey Curt, for next updates, can we have a method to change Vortech modes, speed and duration other than memory?? :)
Also, I don't know if you peeked at the dev branch, but I'm creating override variables for all dimming channels (actinic, daylight, expansion, AI and Radion).
It would be awesome to have a slider to adjust the override when you click the % on the app.
This is how the override is going to work:
Any value above 100, usually 255, indicates the override is disabled.
And consequently any value below and including 100 indicates the channel is overridden.
If someone clicked the AP% for example, a slider would popup that would let you adjust that % and place the new value on the override variable.
The controller would then adjust the channel to this new value.
This will allow for people to adjust their channels at any time :)
No, I haven't looked at the dev branch lately.

Funny you should mention those changes/requests. I have been thinking about those types of changes as well. Mostly trying to figure out how to incorporate it actually. :)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Android Reef Angel Status

Post by rimai »

Well, it will be easy...
I'm going to create a new wifi command
/pox,y
where
x=channel to override
y=value to override
So, all you need to do is popup a slider and send the wifi command with the value :)
The libraries will take care of the rest.
XML data will also have new values like <PWMAO></PWMAO>, <PWMDO></PWMDO> etc
That should make it easy to implement in the app, right?
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:Well, it will be easy...
I'm going to create a new wifi command
/pox,y
where
x=channel to override
y=value to override
So, all you need to do is popup a slider and send the wifi command with the value :)
The libraries will take care of the rest.
XML data will also have new values like <PWMAO></PWMAO>, <PWMDO></PWMDO> etc
That should make it easy to implement in the app, right?
yeah, that will be easy to incorporate. will the xml values returned be if it is overridden or not? how will those need to be used or displayed? will that be replacing the pwma and pwmd values?
it sounds like they just tell if it's overridden.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Android Reef Angel Status

Post by rimai »

Not overridden with actinic channel outputting 60%:
<PWMA>60</PWMA>
<PWMAO>255</PWMAO>

Overridden with actinic channel outputting 45%:
<PWMA>60</PWMA>
<PWMAO>45</PWMAO>

To override the actinic channel to 45%, send command:
/po1,45
To remove override of actinic channel, send command:
/po1,255

I already have these on Globals.h:

Code: Select all

// PWM Override IDs
#define OVERRIDE_DAYLIGHT	0
#define OVERRIDE_ACTINIC	1
#define OVERRIDE_CHANNEL0	2
#define OVERRIDE_CHANNEL1	3
#define OVERRIDE_CHANNEL2	4
#define OVERRIDE_CHANNEL3	5
#define OVERRIDE_CHANNEL4	6
#define OVERRIDE_CHANNEL5	7
I need to append the list with AI and Radion channels.

Would that work?
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

ok cool. i see how it will work now. that should work fine. should be pretty simple to implement based on your example. guess i had better get busy working on this stuff.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Android Reef Angel Status

Post by lnevo »

Your not done yet?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

lnevo wrote:Your not done yet?
Haha. No. I'm slacking...sorry.
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: Android Reef Angel Status

Post by DrewPalmer04 »

EDIT:

removed post and PM'ed instead...to avoid thread jacking :)
Last edited by DrewPalmer04 on Thu Mar 21, 2013 11:41 am, edited 1 time in total.
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Android Reef Angel Status

Post by rimai »

Yes, the override will not interfere with the regular wave pattern and will go right back to it when the override is cancelled.
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:Hey Curt, for next updates, can we have a method to change Vortech modes, speed and duration other than memory?? :)
For the modes, when you long press on the mode, it will give a popup allowing you to change the mode. I was going to display the values 0 through 11, which would mean that the drop down menu would contain these items:
  • Constant
  • Lagoonal
  • Reef Crest
  • Short Wave
  • Long Wave
  • Nutrient
  • Tidal Swell
  • Feeding Start
  • Feeding Stop
  • Night
  • Storm
  • Custom
Would that work for the modes or do I need to include the ability to change to the other modes too??

Then, for the speed, I forget the range....I think it's 0-100, right? Can you confirm.
Also, the same for Duration...0-100 or larger? Confirmation needed.

Thanks!
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Android Reef Angel Status

Post by rimai »

Cool!!! :)
Yes, speed is 0-100, but duration is 0-255.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Android Reef Angel Status

Post by binder »

I've been working on the Vortech memory changing from Vortech page today. I've got it working. The way it works is this...
  • Swipe to the Vortech page
  • Long press on the VALUE being display. If you want to change the Mode, you long press on "Constant" (or whatever is displayed).
  • The long press displays a popup that displays the appropriate options. For Mode, it displays the list that I previously posted. For Speed, it displays 0-100% in a list. For Duration, it displays 0-255 in a list. The lists are not set based on the current value. If this functionality is desired, I'm sure I can figure out a way to handle it.
  • Press Update for the value to be updated. It does not care if you set it to the existing value, whatever value is selected is what will be set. You will see the "Last Update" status text change as it is sending the command. It "finishes" with "updating display" but I thought about changing it to something different. More about this later. And it also displays a Toast popup stating whether the command was successful or not (just like the current memory page does).
  • OR you can press Cancel to return to the page.
Before I get to the main question, I have a question about triggering the popup. Should the popup be triggered by long pressing on the LABEL (Mode, Speed, Duration) or the VALUE (Constant, Tidal, 100%, 0%, etc)? I originally coded it for the label but then changed it to the value. Doesn't matter to me, but I want the input from people who will use it.

Now, I have a question on how the app should behave after the update command is sent. Currently, the display text will read "Updating display" when the command is completed (like I stated). I have a couple options that I can do. I do not care which one is chosen. I just want it to behave like everybody thinks it should.
So, here's the options:
  • Last update status changed to "Command Response: STATUS" and display whatever the controller says back. The values are not updated on the page so the old values will still be shown until the controller is refreshed again.
  • The display is refreshed to display the LAST SUCCESSFUL UPDATE values and you get the Toast message that says "OK" or "ERR" from the controller. The old values still remain until you refresh again (like the previous option).
  • The app initiates an Update / Refresh from the controller after a successful response from the controller. You get a Toast message that says "OK" or "ERR" from the controller. The values are updated right after the command was sent out.
My comments are as follows:
Option 1: Good that it shows the status. No popups are displayed. Bad because the data is not refreshed so you have to manually refresh to see the new values. Good because the controller is not queried immediately especially if you are updating multiple options like Mode and Speed.
Option 2: Same response as Option 1 except the popup is nice to see and behaves how the current memory updating does for consistency. The updated text line is returned to the last updated time so you can easily see the time associated with the values.
Option 3: Great for immediately showing the values and displaying a popup message to keep consistency with the memory updating. Bad because the controller is queried immediately and sometimes querying too fast can cause problems. Bad because it will take longer to make more changes if you are changing both Mode and Speed.

I am initially inclined to code in Option 2. However, Option 3 does sound very logical to me as well. Like I said, I do not have a preference on this one. It can be coded either way. In fact, I could even put in a setting that you can control how you want the behavior to be: Option 2 or Option 3. (Yeah, I'm not a fan of Option 1 but I still wanted mention it).

With that being said, I'm ready for the feedback. Oh, and I almost forgot.....some screenshots for your viewing pleasure. :)
Here's 2 screenshots for changing the Mode:
Vortech Config Popup for Mode displaying list
Vortech Config Popup for Mode displaying list
VortechConfigPopupList.png (39.56 KiB) Viewed 6284 times
Vortech Config Popup for Mode
Vortech Config Popup for Mode
VortechConfigPopup.png (44.38 KiB) Viewed 6284 times
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Android Reef Angel Status

Post by rimai »

Awesome!!!
Can we have it update the display without querying the controller?
If OK is received, you change the display. If ERR is received, you leave it alone.
What do you think about this option?
Roberto.
Post Reply