Page 1 of 1

Turn outlets on/off from joystick?

Posted: Thu Sep 24, 2015 4:18 pm
by Kungpaoshizi
Perhaps I'm not accessing it correctly, is there no manual on/off menu for the relay box? (from the joystick)
Ty!

Re: Turn outlets on/off from joystick?

Posted: Fri Sep 25, 2015 10:44 am
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.

Re: Turn outlets on/off from joystick?

Posted: Wed Sep 30, 2015 8:34 am
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?

Re: Turn outlets on/off from joystick?

Posted: Thu Oct 01, 2015 7:20 pm
by palmer
I also interested in this turning off/on port from the joystick-
I wonder if you can do it through the APP-

Re: Turn outlets on/off from joystick?

Posted: Fri Oct 02, 2015 2:37 am
by Sacohen
Yes. The apps and the portal can do it, but not the joystick.

Sent from my SM-G928P using Tapatalk

Re: Turn outlets on/off from joystick?

Posted: Fri Oct 02, 2015 5:46 am
by palmer
to use the APP what attachment do I need?

Re: Turn outlets on/off from joystick?

Posted: Fri Oct 02, 2015 5:48 am
by Sacohen
WiFi module only.
Then you can use either app and the portal.

Sent from my SM-G928P using Tapatalk

Re: Turn outlets on/off from joystick?

Posted: Fri Oct 02, 2015 8:27 pm
by Kungpaoshizi
Is it not possible to add code for it?

Re: Turn outlets on/off from joystick?

Posted: Fri Oct 02, 2015 11:18 pm
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

Re: Turn outlets on/off from joystick?

Posted: Sat Oct 03, 2015 3:24 am
by cosmith71
I'm sure it could be added by a strong enough programmer. :D

--Colin

Re: Turn outlets on/off from joystick?

Posted: Sat Oct 03, 2015 7:46 am
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

Re: Turn outlets on/off from joystick?

Posted: Sat Oct 03, 2015 7:51 am
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

Re: Turn outlets on/off from joystick?

Posted: Sat Oct 03, 2015 5:10 pm
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

Re: Turn outlets on/off from joystick?

Posted: Mon Oct 05, 2015 5:06 am
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

Re: Turn outlets on/off from joystick?

Posted: Wed Oct 07, 2015 8:03 pm
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!

Re: Turn outlets on/off from joystick?

Posted: Wed Oct 07, 2015 8:20 pm
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;
}

Re: Turn outlets on/off from joystick?

Posted: Thu Oct 15, 2015 2:31 am
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.