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
155
Reaction score
75
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.
 

WHEN REEFING GETS TOUGH, WHAT KEEPS YOU MOST INVESTED?

  • My livestock depends on me, so I keep showing up for them

    Votes: 15 55.6%
  • I look for small signs that things are improving

    Votes: 3 11.1%
  • I want to figure out what’s going wrong

    Votes: 1 3.7%
  • I remind myself that rough stretches will pass...just keep reefing

    Votes: 4 14.8%
  • I lean on other reefers for advice or encouragement

    Votes: 0 0.0%
  • I simplify, step back from tinkering, and give the tank time

    Votes: 2 7.4%
  • Honestly, sometimes I wonder if I want to keep going

    Votes: 2 7.4%
  • Other (Post in the comments)

    Votes: 0 0.0%
Back
Top
Home
Post thread…
Market
What's new