Reefbot Help (Re-coding to cut the cloud)

  • Thread starter Thread starter Inamo
  • Start date Start date
  • Tagged users Tagged users None

Inamo

Active Member
View Badges
Joined
Jul 4, 2023
Messages
158
Reaction score
77
Location
Crestview
Rating - 100%
1   0   0
I see Reef Kinetics is no longer on the forum, so I have no issues with making this public now.

Can skip down to the TLDR if you don't care about the backstory.

I tried for a long time to work with RK to help address concerns that quite a few of us had as well as give ideas on how to make their product even better. I truly wanted to see it succeed as really nothing is proprietary or dependent on RK other than the cloud and it uses a large list of off the shelf reagents.

I have also heard from a friend who was associated with them a long time ago, that they might be getting bought out. Which is even more concerning as support for the bot could be ultimately killed off.

I "hacked" into my bot quite a few years ago...by that meaning I pulled out the SD card, deleted the passwd file to clear out the RK password. Then I connected a monitor and keyboard into the PI and enabled SSH. I am by no means a coder. I can read and mostly understand what it is doing, but I can't write anything. So I could see what was going on and how it was talking to the AWS servers, in fact I discovered a security issue with their MQTT setup. You could connect (simultaneously) to the MQTT server with an explorer using your bots credentials. You could also see ever other bot that was online. You would also be able to send commands to any of them. So I let them know so they could fix it, which they did. Hindsight is 20/20, as if that was still available it would make my current endeavors so much easier.

TLDR (Sorry, still long)
I created a copy of the SD card and have been using Claude AI to help go through the code and make changes as needed. I have successfully got my Offline SD card to work, but it still needs a lot more work. I have captured a lot of the complete test sequences already. I have a basic Web UI to start tests and debug the tests as I work through them. The biggest task I still need to do is to get the color interpretation that RK programed for all the tests, but it is all in the AWS Cloud. So, in order to do this, I need completed test logs that shows the RGB colors reported to the cloud and the PPM/dKH/etc. that is given to the test. From that I can determine which "drop" was used and the RGB value from it. Then from there I should have a test that should work but might need some tweaking for accuracy.

Bottom line, this will be impossible to complete unless I buy every test kit already available to use on the bot. So, if there is anyone who uses the Bot and would like to collaborate and/or provide snippets from their logs it would be greatly appreciated.

Once I can get as many tests working as I can then I will work on the UI and features. Finally, when I can get it to a working state that I am comfortable with I will release it for all to use, tweak, build on, or whatever. Some of the planned features I will add:

- Ability to "calibrate" test results. Be able to adjust/set the reading higher or lower
- APIs to export data and to receive commands to run tests (I.E. Home Assistant Integration)
- User designed themes
- Graph will be editable
- Schedule stir frequency and duration as desired for any reagent
- Ability to receive/import UI and test updates.

Some things already implemented

- Test Cards can already be dragged and reordered, number of columns can be adjusted.
- The bottles on the test cards will show and estimated level.
- Test estimated run times are based off of previous runs.
- Bot (cloud) says some test will take 3 hours, when in reality it is 45 minutes)
- Adjust thresholds (user defined high/low range) for graph plotting (notifications in the future)
- Calibrations for the RO and Tank water chambers now have the option for the default fill/empty (5x) or just 1x for lines already primed.

Long term plans that I don't think I can do with the bot in the current state because of the Arduino code/sequences which I cannot see nor edit.

- Re-code the Arduino so test sequences can be adjusted and tweaked
- Once a titration test reaches its endpoint, it will stop and return any unused reagent instead of wasting.
- Adjust stepper motor speeds (to see if faster movements are feasible)
- Add new or fix tests (i.e. ABC reagents)
- Doser integration with safeguards (verify results before adjusting dosage, user acknowledgement, etc.)


So if anyone can help in anyway, please let me know. Thank you!



Bot6.png

Bot5.png

Bot4.png

Bot3.png

Bot2.png

Bot1.png
 
I'm here for this. What do you need me to do to help out. I just took mine apart, cleaned it, changed out some tubing and pump heads the other day. It was not working, but it is now. Lovely new issue though. The new filter is leaking from the top and bottom of the tubing. Need to figure that out because it continuously siphons from the tank and just drips.
 
Are you familiar with Linux and command line useage? If not it is ok, it should be fairly simple to walk you through it. I say should because it was over 3 years ago when I unlocked the ability to remote(withon my network) login to my Bot.

When I get home, I'll find software that will read the sd card on a PC. That will make it easier to clear out the rk account hashed password from the passwd file. If memory serves, ssh was already enabled so just need to clear the password, new one can be created, and then it is as simple as copy and pasting from the logs. I need to double check, as I don't believe any Bot, IP or other sensitive info is captured in the logs, just errors, messages from the test sequences.
 
Does anyone of you have the SD card image. Are you willing to share this?
 
Does anyone of you have the SD card image. Are you willing to share this?
I do. Are you just needing to reflash yours or are you looking to RE it? Asking because I can provide the zip if you need to reflash, if you are looking to 'hack' it for offline useage I can add you to my repo.
 
Here is the untouched (except /certs/configs.json, cleared out my bots info). Can't remember if bot will auto fix this when it tries to connect, if not change the XXXX to the last 4 numbers from your bots serial #. Leave the eu-west-1 as it is

{"clientId":"DeviceXXXX","SerialNumber":"RKLXXXX","AWSRegion":"eu-west-1"}
 

Attachments

I need to get back to work on this, have been side tracked with other things. I have streamlined the test capture process so I can capture the full sequence in <1 minute now, but still requires me to sit there and queue tests one at a time, cancel, reboot, repeat. I have everything up to Nitrate captured. Still need to finish Nitrate, Iodine, PH, GH, Iron, SO2, CO2, Potassium, and O2. Not worring about pool related tests not aware of anyone who would uses a bot for thier pool/spa.
 
I do. Are you just needing to reflash yours or are you looking to RE it? Asking because I can provide the zip if you need to reflash, if you are looking to 'hack' it for offline useage I can add you to my repo.
I like to RE it. Cause I don't like the cloud part. I want to use it offline
 
I'm not sure how much experience you have at coding (namely js), but I would take any help I can get. DM me your email or github username and I can add you to the repo. Leaving it private for now until it is in a testable state. I have the original SD I use for capturing the sequences and a second SD I swap to which is the locally hosted version.

The version I created that functions offline, has a UI to setup tests, vial locations, run test, etc. (see screenshots earlier in this post). As of right now, only API Calcium has been completed to test. I have majority of the test captured from the cloud, but need to sit and finish the rest (will very soonl). Once the test are captured and added into the DB (after removing the reagent posistions from the capture sequence and adding the variables in their place) it can be ran, but getting the color interpretation is still needed. With out each specific reagent on hand (or similiar for titration tests, i.e. green to blue) then it is difficult to dial it in accurately.

The command explorer screen as shown above is like a viewable (no input) terminal screen to show you the RPI and Arduino communication as well as real time color interpretation once it starts.

I do plan on adding a "manual cal" for each test should the interpretation color be off or for when a kit might be off. Meaning if a test is always returning 1, 2, or whatever readings high/low the user can set it as needed so they get the correct results and ploitting.

There is a lot I want to do with the UI and features, but trying to stick to making it functional for as many tests as I can first.
 
Hi!

Thanks for your reply! I would definitely love to contribute to your project.

I'm not a professional JavaScript developer, but I work extensively C#. With a little help from AI, I think I will be able to contribute. I've already built my own aquarium management platform, running on my Unraid server, which integrates my Fluval lighting, ReefBot measurements, and other aquarium equipment.

I've been investigating the same challenge: making it independent of the Reef Kinetics cloud while keeping the original hardware and control software intact.

My initial idea was also to keep the original ReefBot software running and replace the AWS backend with my own server. And seeing what you've already accomplished, I think collaborating makes much more sense than developing two separate solutions.

I can definitely help with capturing test sequences, analyzing the communication, testing functionality, and further developing the UI and backend. I'm particularly interested in getting freshwater tests working, since I use my ReefBot for a freshwater discus aquarium.

I'd really appreciate access to your private repository. I'll send you my GitHub username via DM.

I think we could make something really useful together, especially if we combine your existing offline implementation with the communication analysis and testing I've already done.

Looking forward to working together!
 
I can finish the capturing, have a script I use with Claude to capture the test, and if my cancel test doesnt work, it send a message to the cloud to trick it to thinking ot is done and clearing the queue.
 

WHEN YOU SEE A REEF2REEF POLL, WHAT’S YOUR USUAL MOVE?

  • Vote right away, then head to the comments

    Votes: 12 41.4%
  • Read the comments first...then decide what I think

    Votes: 1 3.4%
  • Vote and explain my choice in the comments

    Votes: 2 6.9%
  • Dude, I just vote...I don't care about the comments

    Votes: 12 41.4%
  • Vote, then come back later to see how it turned out

    Votes: 2 6.9%
  • Pick “Other” because my opinion is too nuanced to fit any of your simpleton boxes

    Votes: 1 3.4%
  • I usually read the comments but exercise my right not to vote

    Votes: 0 0.0%
  • I always get excited about Daniel’s daily polls, obviously 😎

    Votes: 3 10.3%
  • Other (Post in the comments)

    Votes: 3 10.3%
Back
Top
Home
Post thread…
Market
What's new