Page 1 of 2

Lee's Next Project

Posted: Fri Jul 21, 2017 5:38 pm
by lnevo
Hi all,

Sorry I haven't been around for a while. Hopefully this new project gives me an excuse to be around again. I'd like to thank Roberto for giving me the opportunity to play with the long awaited next generation of ReefAngel, the RA Star. You may have seen hints of this around in the libraries, but I don't believe much has been discussed about it.

As some of you know I was looking a while ago for a way to control my remote water station in conjunction with my RA+ (http://forum.reefangel.com/viewtopic.php?f=17&t=4287). I ended up building my station with a prototype of the Star that Roberto had me test (pic of my rebuilt mixing station attached.) In the end I had it just working as a standalone unit. I was able to control the RO/DI for my ATO with a solenoid on the RA+ and the RA Star just controlled my AWC pump, a solenoid for flushing the RO membrane and my mixing pump.

So now that I've rebuilt my mixing station, my next project is to re-wire my relay boxes on the tank upstairs and to swap out the controller with the hopefully production release of the RA Star. Some of the benefits of the Star are that it has ethernet built in, 4 PWM 5V or 10V, Analog or PWM ports. 3 IO ports, a built-in leak detector, 2 USB ports and a mini SD card slot. Oh, it also has a touch screen! (more pictures attached)

With the RA Star upstairs on my tank, you might be asking what this has to do with my mixing station. Well, to answer that is another new device that Roberto has me testing. It's called the Cloud WiFi Hub. This thing is pretty cool. I configured it a while ago (to some degree) but haven't gotten around to testing it yet. The Cloud WiFi Hub connects remotely to the Cloud server. It has 2 USB ports and 2 temp ports. I plan to have the relay box and the multi-Water Level expansion attached along with the temp probes for my two mixing bins. The RA Star will connect to it via the cloud and be able to control my station through one interface! This is going to be awesome, I can't wait!

But wait! There's one more awesome feature. Some of you may have seen it if you're playing with the Web Wizard, but maybe not as you might not have checked under the RA Star board, but there's a new option there. Instead of having to connect directly to your ReefAngel to upload new code, there is a Remote Upload feature! What this means, is that after you compile your code through the Web Wizard, it will upload your RA Star firmware to the portal. The RA Star connects to the portal every 5 minutes and checks for a new version and downloads and installs it automatically. No more cables! Also Roberto fixed a dependency last night so you don't even need the plugin. That means you can upload new code to your RA from anywhere in the world from just about any browser! Very very very sweet. Roberto and I tested this pretty extensively this week.

So, obviously I have a lot to do and won't be able to actually install it until I get some of the peg-board I ordered from Amazon that I wanted. This thread will be a build thread as I go. I should be able to work on a lot of the coding this weekend so that it'll be ready. The swap-out is going to be a major project though. Hopefully you guys will get excited, ask a lot of questions and learn about this new board. Welcome aboard.

Sorry if the pictures look like crap in the browser. Try in tapatalk or open them in a new window if you have issues.
image1.JPG
image1.JPG (1.34 MiB) Viewed 11072 times
IMG_1140.jpg
IMG_1140.jpg (1.75 MiB) Viewed 11072 times

Re: Lee's Next Project

Posted: Fri Jul 21, 2017 8:47 pm
by binder
very cool! I should be getting my RA Star sometime soon. Then I'll be able to swap out my setup and use it.


Sent from my iPad using Tapatalk

Re: Lee's Next Project

Posted: Sat Jul 22, 2017 6:14 pm
by lnevo
So, a long frustrating day of troubleshooting issues with the WebWizard plugin. Looks like at the end it was just a simple fix of having to kill the process and restart it from the GUI (on the Mac). Apparently there was a permission issue after it starts automatically with the installer.

So after Day 1, I have a working RA Star that I can now upload from the WebWizard through the cable, and use the Remote Upload feature. I'm currently waiting for it download my "Feature Complete" code which I modified to work on the Star. I had to remove all the custom screen writing stuff that I never use anyway and also had to change the relay boxes (there's no Main relay box)

Next work will be to get the Cloud hub configured and start testing that aspect.

One major blocking point that needs to be solved is the WiFiAlerts which I rely on heavily to keep me updated on some of the status that I can't use the Portal Alerts for etc. I also send my daily status updates, so this will have to be solved before I can cut over.

Anyway, Remote Upload worked once... will need to do some more work to see it be reliable :)

Re: Lee's Next Project

Posted: Sat Jul 22, 2017 8:04 pm
by binder
wifialerts... what's the blocking point for you?

Sent from my XT1585 using Tapatalk

Re: Lee's Next Project

Posted: Sat Jul 22, 2017 11:21 pm
by lnevo3
WiFiAlerts class sends a request to a webpage (GET /status/wifialert.asp) on the portal through the Serial out. The Star no longer uses the serial except for debug output and installing new firmware. So we need to modify it to use the PortalClient or another Ethernet class directly to make the call.

Re: Lee's Next Project

Posted: Sun Jul 23, 2017 7:32 am
by binder
lnevo3 wrote:WiFiAlerts class sends a request to a webpage (GET /status/wifialert.asp) on the portal through the Serial out. The Star no longer uses the serial except for debug output and installing new firmware. So we need to modify it to use the PortalClient or another Ethernet class directly to make the call.
gotcha. i haven't looked at the code at all. i don't use the portal, so i don't use that functionality.


Sent from my iPad using Tapatalk

Re: Lee's Next Project

Posted: Sun Jul 23, 2017 3:35 pm
by lnevo
I don't use the portal much either, but I do use the alerts :)

Anyway, so far today has been a good day. We debugged a few more things with Robert and got extra temp probes supported by the Star. I now have 1-3 on the head unit which will be for display, sump and stand and then we added 4 and 5 from the Cloud hub. So my Star is currently only showing me the 2 temp probes in the mixing station and I've configured the relay box there as Box 5 and it's now being controlled by the Star. Soo freakin cool. I'm also reading the multi-level expansion from there as well, but it needs to be calibrated. As soon as one of my tanks are 1/2 empty, I'll get to that :)

I now realize that I will need to use my extra expansion hub and get an IO module in order to read the flow switches on the mixing station, but I can live without those for now. So moving ahead now, the only thing stopping me is the alerts and some testing for reliability. I've moved all the code that I was running on the old star (albeit without a lot of customization - but with Remote Upload, I can live with that). It was so nice to finally be able to integrate the RO Flush solenoid with when I open the solenoid to fill my ATO reservoir. Having all the code on one controller really makes this a thing of beauty.

Re: Lee's Next Project

Posted: Sun Jul 23, 2017 4:54 pm
by lnevo
Image

Re: Lee's Next Project

Posted: Mon Jul 24, 2017 1:53 pm
by topjimmy
That star board is pretty sexy. I like it. Still prefer hard wire Ethernet to wireless though. I like the cloud server UI too.

Sent from my Lenovo TAB 2 A10-70F using Tapatalk

Re: Lee's Next Project

Posted: Tue Jul 25, 2017 9:08 pm
by lnevo
The Star itself is hard-wired. I'll more than likely be using a wifi access point though to give it connection. So it's not much of a trade-off. I've never really had a big issue.

Anyway, have a new blocking point that I'm working on with Roberto. The bins for my mixing station are tall and we had some customization to do so the sensitivity can be adjusted. Need to make this a feature in the code if using the web wizard, or I'll have to change it locally since the Cloud hub doesn't support Remote Upload anyway.

Let's see what Roberto comes back with. Still haven't had much chance to look at the Ethernet code yet to replace the WiFiAlert. I started too...

Anyway, I just got a new 29" Ultra Wide monitor so I'm having fun with that at the moment :)

Re: Lee's Next Project

Posted: Wed Jul 26, 2017 9:56 pm
by lnevo
Ok, so the solution for the WaterLevel was to adjust the gain. As the Cloud Hub does not use the libraries per se, the gain adjustment is right in the default code :) Made it very easy. Roberto also fixed an issue with the calibration. I haven't yet been able to try it, but I can see that it at least works again. Once I have room in my mixing bins, I'll have to empty one into the other and calibrate it by registering empty and then filling it back up. Literally rinse and repeat :)

So that's out of the way now and I have a somewhat measurement that changes for my waterlevels, we're definitely making progress. Trying to decipher some network code tonight to see what I can do for the alerts... very slow going.

Re: Lee's Next Project

Posted: Thu Jul 27, 2017 11:16 pm
by lnevo
So made some progress and some setbacks in getting the alerts to work. I have the alerts working, but it seems the PortalConnection is made in a non-blocking fashion and so if I just call it once, it happens while there is no active connection. So a connection is started and I've already sent the alert. Need to figure out how to properly add this to the queue or whatever so that it can stay non-blocking. In the meantime I'm trying to test it out with a blocking call to connect...

Re: Lee's Next Project

Posted: Thu Jul 27, 2017 11:46 pm
by lnevo
Ok test with connect versus noblockconnect is working... what are the cons? If it locks up the controller trying to connect I would imagine the watchdog would reset? Will the timeout (being called after the connect...) do anything, is there a default timeout, can I run the timeout function before the connect? At least I have alerts now :)

Re: Lee's Next Project

Posted: Fri Jul 28, 2017 6:52 am
by lnevo
My pegboard order was cancelled :( I re-ordered from another vendor on eBay this time and it should arrive sooner than the other one. I may need to wait for the end of the month before I swap out though. We'll see. I'm going on vacation and will be away from the tank for like 12 days. Don't need any surprises while I'm gone. This will be a major change. Decisions...

Re: Lee's Next Project

Posted: Sun Jul 30, 2017 1:39 am
by saf1
Are there any threads/links/pictures or anything else related to the product? I've been pretty happy with the Reef Angel has a whole but I dislike having to remove the wireless and plug in the cable to make changes. I know I can resolve that issue with another add on but I don't really want to have to do that either. I also prefer hardwire compared to WiFi. So these two things sort of got me looking at other products (sticker shock) that meet the traditional network jack requirement.

I was scanning the forums today just to see what is going on when I saw this. Peaked my interest.

Re: Lee's Next Project

Posted: Sun Jul 30, 2017 12:37 pm
by binder
saf1 wrote:Are there any threads/links/pictures or anything else related to the product? I've been pretty happy with the Reef Angel has a whole but I dislike having to remove the wireless and plug in the cable to make changes. I know I can resolve that issue with another add on but I don't really want to have to do that either. I also prefer hardwire compared to WiFi. So these two things sort of got me looking at other products (sticker shock) that meet the traditional network jack requirement.

I was scanning the forums today just to see what is going on when I saw this. Peaked my interest.
The RA Star has not officially been released yet. It is very close from what I understand. These are the first pictures and major discussions about it. I'm sure Roberto will have full details posted once it is officially released.


Sent from my iPad using Tapatalk

Re: Lee's Next Project

Posted: Sun Jul 30, 2017 4:28 pm
by Spotted
Any idea on pricing? I think I gotta start squirreling away some cash. Funds hidden from wifeing eyes. All in anticipation of RA Star's imminent release.

(Sorry, Wifey is listing to It on audio book.)

Re: Lee's Next Project

Posted: Sun Jul 30, 2017 7:39 pm
by lnevo
I'm sure we'll know when Roberto announces it. He said next week I believe. Anyway, let's get this thread back on track. So far alerts this weekend were working great. Everything upgraded today to point to the new cloud server. My peg board is on track and supposed to arrive early on Wednesday... should I upgrade before I leave or after? What would you do? :)

Re: Lee's Next Project

Posted: Sun Jul 30, 2017 9:13 pm
by binder
lnevo wrote:I'm sure we'll know when Roberto announces it. He said next week I believe. Anyway, let's get this thread back on track. So far alerts this weekend were working great. Everything upgraded today to point to the new cloud server. My peg board is on track and supposed to arrive early on Wednesday... should I upgrade before I leave or after? What would you do? :)
probably after.

never fails when i decide to do something or change something and it is supposed to be straightforward and simple, something goes wrong and it takes me a long time to figure it out. it could be because i overlooked or forgot something but regardless.
besides, doing after will give you a chance to rethink and double check all of your steps of the upgrade process.


Sent from my iPad using Tapatalk

Re: Lee's Next Project

Posted: Mon Jul 31, 2017 12:33 am
by lnevo
It's the same code as my current RA, nothing really changed, but it's a revamp of where my relay boxes and modules are. It will be tough to wait, but I need to put my patience hat on. It's kind of stopping me from doing a lot of things to the tank that I need to. Anyway, I think I'm going to use the Star right now to start debugging the WaterLevel ATO timeout issue. Currently since I don't have the WL module plugged in, it tries to kick in every time and since it's not attached I can play with it...

Re: Lee's Next Project

Posted: Mon Jul 31, 2017 12:44 am
by saf1
Sorry all. I did not mean to derail the thread.

Re: Lee's Next Project

Posted: Mon Jul 31, 2017 12:58 am
by lnevo
No worries. New gear is exciting :) I get it. I wish I had the answers to give you, you'll have to live vicariously through me for now :)

Re: Lee's Next Project

Posted: Mon Jul 31, 2017 1:14 am
by binder
lnevo wrote:No worries. New gear is exciting :) I get it. I wish I had the answers to give you, you'll have to live vicariously through me for now :)
I'll have my star sometime this week. I will post some pictures and feedback too. I'm also going to be getting it (cloud wifi) to work with my android app.

ok... resume normal thread. :lol:

Sent from my XT1585 using Tapatalk

Re: Lee's Next Project

Posted: Mon Jul 31, 2017 4:47 am
by rimai
Sneak Peak :)
I already have them, but the manual is not ready.

Re: Lee's Next Project

Posted: Mon Jul 31, 2017 5:35 pm
by GermanDude
That`s just wrong.
Love the looks of it.
Now I have to start saving money.

Re: Lee's Next Project

Posted: Tue Aug 01, 2017 11:59 am
by lnevo
So the wifi by my mixing station has always been a problem, even when I had the prototype Star connected to my little access point bridge. Now with the Cloud hub, it's become more annoying. At least with the standalone controller it would do its thing, with or without wifi. Anyway, I'm going to work on a script to reboot it with IFTT that I had working previously with the Dlink power plug I have attached to it. At the same time, I've ordered the Netgear Orbi AC5000. So hopefully some improved wifi signal will help.

Re: Lee's Next Project

Posted: Fri Aug 04, 2017 7:54 am
by lnevo
Pegboard is here and Roberto gave me some test code for non-blocking connection to the portal.

Now to integrate that into the WiFIAlert class...

Also, I've been playing with an OpenWRT access point. Before we had the remote upload feature in the Bootloader, the plan was to use one of these to download from the portal and burn the firmware. As I sometimes need to test library code, I think I'm going to hook this up permanently with the new controller so I have the ability to do that without ripping out the controller to hook up to my computer. I think I'm going to get another one for the cloud hub too.

Basically it just becomes a little Linux box in order to run avrdude or maybe I'll use it for a Serial Monitor if I need to debug things too :)

Re: Lee's Next Project

Posted: Fri Aug 04, 2017 8:07 am
by lnevo
Cool. Got minicom installed. It will be great to have a remote serial monitor as well now!
minicom.jpg
minicom.jpg (57.71 KiB) Viewed 9806 times

Re: Lee's Next Project

Posted: Fri Aug 04, 2017 8:57 pm
by lnevo
Well having a serial monitor and a way to test the libraries and being able to do it when this box is upstairs is great. The OpenWRT device is definitely nice addition. I ordered one for the cloud hub as well.

I integrated the code Roberto gave to me into the WiFiAlert class. It now can do both Serial or Ethernet. If you have an RA Start it should go to the Ethernet and if you have the RA+ the Serial.println is still active (and acts like a debug if you have the Star).

If you are using the WiFiAlerts (probably not too many of you..), it will behave the same as the Serial sends automatically whereas if you are using the Ethernet, you will need to add a alert.send(); call in persistence or at least for a little while after you call an alert.

So if an alert is stateless and for a one time event, you will have to continue calling Send while the alert object processes the message. If you have an alert for something with state then, you won't need to do that unless it's something that flaps a lot. Anyway, if you make sure Send(). It won't process anything once it's been sent until another Send call with a message (ie. alert.Send("Test"); If you want to send right away regardless of delay, pass true as the second argument).

So a push request is forthcoming after a bit of testing, but so far very good. I just have one issue with a sticky relay switch that I'm chasing. It's just the relay I'm using to trigger a test event. Overall good progress today :)

Re: Lee's Next Project

Posted: Sun Aug 13, 2017 8:19 pm
by lnevo
Alright, all the issues with the WiFiAlerts are now resolved. It's working great now and the star has been running very well running the same program I'm running on the RA+. I was very tempted to swap out last night. I feel like I'm missing a few more things before I can start the build. There will be pictures (I hope) :)

Waiting for a few power strips and some elastic cord. I guess I'm going to have to wait till I'm back. Still a few more days, so let's see. I happened across a nice shelf made for a locker that I think will work perfectly to hold up my ATO reservoir (after some reinforcement) and give me a ton of space underneath for storage.