Turn outlets on/off from joystick?

Basic / Standard Reef Angel hardware
Post Reply
Kungpaoshizi
Posts: 52
Joined: Wed Sep 16, 2015 8:12 am

Turn outlets on/off from joystick?

Post by Kungpaoshizi »

Perhaps I'm not accessing it correctly, is there no manual on/off menu for the relay box? (from the joystick)
Ty!
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Turn outlets on/off from joystick?

Post by Sacohen »

As far as I know you can't turn ports on/off from the head unit.
Really make any changes except calibrate salinity, pH and other items.
Kungpaoshizi
Posts: 52
Joined: Wed Sep 16, 2015 8:12 am

Re: Turn outlets on/off from joystick?

Post by Kungpaoshizi »

Apologies as I'm still learning the setup, which header or section of source code is the GUI portion on the joystick/head unit?
palmer
Posts: 24
Joined: Thu Mar 29, 2012 7:57 pm

Re: Turn outlets on/off from joystick?

Post by palmer »

I also interested in this turning off/on port from the joystick-
I wonder if you can do it through the APP-
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Turn outlets on/off from joystick?

Post by Sacohen »

Yes. The apps and the portal can do it, but not the joystick.

Sent from my SM-G928P using Tapatalk
palmer
Posts: 24
Joined: Thu Mar 29, 2012 7:57 pm

Re: Turn outlets on/off from joystick?

Post by palmer »

to use the APP what attachment do I need?
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Turn outlets on/off from joystick?

Post by Sacohen »

WiFi module only.
Then you can use either app and the portal.

Sent from my SM-G928P using Tapatalk
Kungpaoshizi
Posts: 52
Joined: Wed Sep 16, 2015 8:12 am

Re: Turn outlets on/off from joystick?

Post by Kungpaoshizi »

Is it not possible to add code for it?
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Turn outlets on/off from joystick?

Post by Sacohen »

That's a question for Roberto.
I don't believe so, but maybe I'm wrong.

Sent from my SM-G928P using Tapatalk
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Turn outlets on/off from joystick?

Post by cosmith71 »

I'm sure it could be added by a strong enough programmer. :D

--Colin
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Turn outlets on/off from joystick?

Post by lnevo »

Most people dont use the screen joystick enough to warrant it in my opinion. You have access to water change mode and feeding modes from the menu. If theres another common device you want to toggle i have code for that in my ino. I do that for my refugium light.

If you dont have the wifi but have a laptop you could use the windows client.

It certainly could be done but its quite a bit of code especially when you could have up to 72 relays each with explicit on/off/auto
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Turn outlets on/off from joystick?

Post by lnevo »

Maybe a two line screen where you can left/right to run through all the ports and then you press down to the next line and pick the operation then down to OK/Cancel buttons
Kungpaoshizi
Posts: 52
Joined: Wed Sep 16, 2015 8:12 am

Re: Turn outlets on/off from joystick?

Post by Kungpaoshizi »

cosmith71 wrote:I'm sure it could be added by a strong enough programmer. :D

--Colin
I'm tryin to.. heh
If it weren't for my c# goggles this would be going much faster... :D
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Turn outlets on/off from joystick?

Post by binder »

everyone is correct about it being a bit tricky to do this. it's not a highly suggested thing either. it can be done though. one thing you have to keep in mind is the code size increases when doing this. it may not be a problem now with the Plus but it certainly was with the standard ra when it was originally being coded.
if you are doing this, when you get the screen created to toggle the ports, while you are waiting for the input you will need to make sure you are letting the ra check its status and handle all its events. the current code does this, so try to mimic that. im just saying don't go creating one function that listens for a response before it returns or proceeds, otherwise your tank won't function properly.
with that being said, have fun coding it! customize it to your hearts content.

Sent from my Moto X
Kungpaoshizi
Posts: 52
Joined: Wed Sep 16, 2015 8:12 am

Re: Turn outlets on/off from joystick?

Post by Kungpaoshizi »

Been so busy I haven't made any progress.

Lnevo could I get that code you have, might be able to adapt some of it.

I see if I press the joystick left, 3 times, I get a screen, the list of relays, labeled with their status, a color and then Port #.
That screen would be perfect to be able to arrow down through, click/scroll to select the state.

Anyone know which source file contains that? I've looked through a lot of code but am still fumbling a bit :)

Tyvm though, any other thoughts are quite welcome!
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Turn outlets on/off from joystick?

Post by lnevo »

This is what I use in my menu. You have to follow the thread that explains how to customize the menu to add this. This function toggles the port on / off depending on it's state

Code: Select all

void MenuEntry1() {
  // Toggle refugium light between on/auto.
  ReefAngel.Relay.Override(Refugium, ReefAngel.Relay.Status(Refugium)+1);
  ReefAngel.DisplayedMenu = RETURN_MAIN_MODE;
}
Mirror176
Posts: 6
Joined: Tue Aug 04, 2015 12:02 am
Location: Phoenix, AZ
Contact:

Re: Turn outlets on/off from joystick?

Post by Mirror176 »

Definitely able to be coded. Code allowed feeding/water change/lighting modes out of the box which controls outlets as groups. I seem to have lost lighting control through menu since starting to reprogram it from what the wizard generated for me and haven't looked into it but feeding and water change modes still work.
Post Reply