Page 1 of 1

Re: Use PHControl on PH Expansion

Posted: Fri Nov 07, 2014 1:36 pm
by mng777777
lnevo wrote:I just created a patch to the dev library to add a flag to PHControl and CO2Control to use the expansion or not. The default without the argument is false.

You would need to use the command like this to use the ph Expansion

ReefAngel.PHControl(Port2, 800, 840, true);

Additionally, I added the following functions to set and read the memory locations.

int PHEControlOn_read();
void PHEControlOn_write(const int value);
int PHEControlOff_read();
void PHEControlOff_write(const int value);

You could also use the wifi to set the memory as well.

The branch is located here https://github.com/lnevo/Libraries/tree/phecontrol

If you could test it I will submit the patch to Roberto.
So the same would work for CO2Control, but the custom line added would read something like:

Code: Select all

ReefAngel.CO2Control(Port2, 800, 840, true); 
Right?

Re: Use PHControl on PH Expansion

Posted: Fri Nov 07, 2014 1:56 pm
by lnevo
Yep.

Re: Use PHControl on PH Expansion

Posted: Fri Nov 07, 2014 3:11 pm
by mng777777
Getting this error on RA Client when trying to read values:
*****11/7/2014 2:09:20 PM*****
Message:
This request operation sent to net.tcp://localhost:8733/ReefAngelListener/ did not receive a reply within the configured timeout (00:01:00). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.
StackTrace:

Server stack trace:
at System.ServiceModel.Dispatcher.DuplexChannelBinder.SyncDuplexRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at ReefAngelClient.Classes.MemoryController.GetMemoryValues(ReefAngelListenerClient raService)
at ReefAngelClient.Form1.RefreshMemoryValues()
Any ideas?

Re: Use PHControl on PH Expansion

Posted: Fri Nov 07, 2014 5:28 pm
by lnevo
Yes, there's an INI file that contains the memory locations for the RA. The dev libraries and my patch added a lot to the number of memory locations. You will need to update that file. I don't use the client so I'm not exactly familiar with it. Roberto may be able to give a better suggestion plus he's better at searching the forum than I.

I did give you the functions to read/write the variables in code so you don't have to change them through the client... but I dont' know if not having the client helps you much....

Re: Use PHControl on PH Expansion

Posted: Sat Nov 15, 2014 5:49 am
by mng777777
If not using the client, what other method would you use? They aren't loaded in the app either.

Justin (San Francisco),
sent from tapatalk

Re: Use PHControl on PH Expansion

Posted: Sat Nov 15, 2014 6:41 am
by lnevo
I'm not sure what you are asking. Can you clarify what you still need to do?

Re: Use PHControl on PH Expansion

Posted: Sat Nov 15, 2014 10:08 pm
by mng777777
How do you read/write the variables if you're not using the client? Are you doing it through the portal?

Justin (San Francisco),
sent from tapatalk

Re: Use PHControl on PH Expansion

Posted: Sun Nov 16, 2014 4:16 am
by rimai
The Client doesn't have those memory location options.
The Portal and iphone app can change the most used and the android app can change them all.
Do you have any memory location in particular you would like to change? Maybe it is already in the Portal already.

Re: Use PHControl on PH Expansion

Posted: Sun Nov 16, 2014 5:10 am
by lnevo
You can do it in the code also. The functions to do so are in post 7. You can also do it with straight http requests...

http://reefangelwifi/mi365

That will read PHEControlOn

http://reefangelwifi/mi367,800

That will set PHEControlOff to 8.00