Page 1 of 1

Controller security

Posted: Sun Jan 04, 2015 7:33 am
by Reefology
Was wondering if there is a way to set up a password to protect my controller settings in both the portal and iphone app?

I noticed in user control panel --> profile, the bottom 2 fields are controller authentication username and controller authentication password. Is this what I'm looking for? And if so, how do I apply these to my reef angel?

Thanks

Re: Controller security

Posted: Sun Jan 04, 2015 10:34 am
by rimai
Correct. This is a new feature that was added this past libraries update.
It will add basic authentication to your controller. The only apps that support this at them moment are the Portal and the Android app.
You need to add this to your code:

Code: Select all

ReefAngel.Network.WifiAuthentication("username:password");

Re: Controller security

Posted: Sun Jan 04, 2015 11:48 am
by Reefology
so if i understand this correctly the fields in my profile are simply for reference and adding the code is what actually accomplishes the desired outcome?

If this is correct, then adding
ReefAngel.Network.WifiAuthentication("anyusername:anypassword");
anywhere in the code would work? or does it have to go in a specific place?

BTW, though this has been somewhat overwhelming, I absolutely love what the Reef Angel can do, and am so glad i choose to purchase this as my controller...

Thanks Roberto

Re: Controller security

Posted: Sun Jan 04, 2015 1:22 pm
by lnevo
You need to use both. If you enable it in code you will have to put the parameters in any app/portal.

Re: Controller security

Posted: Sun Jan 04, 2015 1:33 pm
by Reefology
Great...so "how" and "where" do I do that?

1. There is no field in the iphone app and Roberto says it isnt supported yet?
2. Where in the portal?
3. ReefAngel.Network.WifiAuthentication("anyusername:anypassword") where in the code?

Thanks

Re: Controller security

Posted: Sun Jan 04, 2015 2:13 pm
by lnevo
You either wait till its supported or don't use the ios app. You can still use the portal from safari.

Re: Controller security

Posted: Sun Jan 04, 2015 2:22 pm
by Reefology
ok sorry, i get it now.

so let's assume i don't use the iphone app, i still don't know how to add it to the code??? where does ReefAngel.Network.WifiAuthentication("anyusername:anypassword") go? do i just copy and paste this at the top after the libraries in the code?

Re: Controller security

Posted: Sun Jan 04, 2015 2:40 pm
by rimai
You need to add that line in the custom section of your setup() function.

Re: Controller security

Posted: Mon Jan 05, 2015 5:52 pm
by Reefology
thank you Roberto. and i would imagine adding in my profile is for the portal to gain access?

Re: Controller security

Posted: Mon Jan 05, 2015 5:55 pm
by rimai
Exactly :)