Controlling Mobius enabled VorTech pump using 0-10V (and BLE)

MikeTheNewbie

Active Member
View Badges
Joined
Aug 16, 2020
Messages
423
Reaction score
277
Location
Michigan
Rating - 100%
1   0   0
Hi @mard, I think I'll be playing with this project tomorrow. Want to try capturing and resending specific messages with nRF connect. Have you made any progress lately?
 
OP
OP
mard

mard

Community Member
View Badges
Joined
Jul 8, 2020
Messages
35
Reaction score
81
Location
Minnesota
Rating - 0%
0   0   0
A couple days ago I was able to make some really good progress. Using my captured messages and the Mobius decompiled code I have been able to decipher the important messages for a VorTech pump. I feel I can also predict and build other messages based on what I have learned from the decompiled code. The Arduino library is also coming along well. I'm thinking the only thing a person will "need" to use the library is their pump's address, but it will allow for more complex requests if they know what they want to send. Currently the rough draft library methods are:
  • connect()
  • disconnect()
  • getCurrentScene()
  • startFeedScene()
  • startScene(sceneId)
  • enableSchedule()
  • setData(dataToSet) // for more advanced coders
  • getData(dataToGet) // for more advanced coders
However, I have noticed a few setbacks or disappointing events:
  • after updating my VorTech pump through the Mobius app, the pump was assigned a new address
  • it can take a while for the BLE to find the pump
  • it can take a couple times to successfully connect to the pump
  • it can take a couple times to acquire the necessary info to fully communicate with the pump
  • do NOT execute a delay() in the code while connected to the device (it can mess up the BLE library and freeze the Arduino)

There is one thing which I could use some help with though. For the mReserved section of "set" operations (for example this would be the 6th & 7th bytes when starting a scene), I am only seeing the value "0800". While I haven't spent too much time on it yet, I believe that is because of a manipulated group number. It could be helpful if you shared a set request for comparison. A couple examples of mine are:
02de180d00080009009101000104010000000a1f (starting the feed scene)
02de18b900080009009101000104fe7f0000aebc (starting a custom scene)

Good luck & have fun!
 

garbled

Well-Known Member
View Badges
Joined
Nov 10, 2018
Messages
772
Reaction score
1,045
Rating - 0%
0   0   0
do NOT execute a delay() in the code while connected to the device (it can mess up the BLE library and freeze the Arduino)
I'm guessing by that that the BLE library is async, so you need to write all your code in async style too, so you don't hit issues..
 

MikeTheNewbie

Active Member
View Badges
Joined
Aug 16, 2020
Messages
423
Reaction score
277
Location
Michigan
Rating - 100%
1   0   0
Hi do you know of a quick tutorial for the nRF connect app?
I can see the messages but I don't know how to repeat them.
BTW, have you noticed that every time you restart the devices they get a new MAC address?
 

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Great work! Love the fact you are exposing this data for others to use in DIY methods. Looking forward to reviewing your library and possible build out a Node-Red node to accomplish the same.
 
OP
OP
mard

mard

Community Member
View Badges
Joined
Jul 8, 2020
Messages
35
Reaction score
81
Location
Minnesota
Rating - 0%
0   0   0
Sorry for the delay, but I've finally published the first version of the library for Arduino boards. Please take a look at arduino-MobiusBLE.

It's not as... professional as I would have liked. But it does work, sometimes haha. The examples are a great place to look first because they give a decent idea of how I thought the library might be used.
Feedback is welcome! ;Nailbiting
 

MikeTheNewbie

Active Member
View Badges
Joined
Aug 16, 2020
Messages
423
Reaction score
277
Location
Michigan
Rating - 100%
1   0   0
Hi Mard, I took a look at your library in Github and it looks really professional!
Unfortunately I haven't been able to try it because I've been using ESP8266 and ESP32 and I couldn't find a port of the ArduinoBLE library for those.
What board are you currently using? I was thinking about getting an Arduino Nano 33 IoT just to try this out.
Do you have any plans to release a version that is compatible with either ESP8266 or ESP32?
Thanks!
 
OP
OP
mard

mard

Community Member
View Badges
Joined
Jul 8, 2020
Messages
35
Reaction score
81
Location
Minnesota
Rating - 0%
0   0   0
Thanks @MikeTheNewbie.
As I said previously I'm using an Arduino Nano 33 BLE. But if you decided to use an Arduino Nano 33 IoT, I believe you will need to include the "Arduino NINA-W102 firmware" v1.2.0 or later (there is a link in the library's readme).

A disclaimer though, my results haven't been very reliable. If I can get it to run the feed scene, it seems it will only work once. Then I have to reset the Arduino board and hope it works the next time. Right now I'm not sure if this is a hardware issue or an ArduinoBLE library issue. It seems too inconsistent to be a hardware issue. But at the same time I'm not sure I can blame the ArduinoBLE library from what I have seen. I may need to invest in another Arduino board to rule out the hardware issue.

As for plans for another library, well if I can't get the Arduino boards to work reliably then I will definitely be making another library for something else. Though I may end up creating another library for something else regardless because it was a fun challenge. :p
But all this will really depend on my available free time and the state of my tank. Lately I've been dealing with what I think is a velvet out break which has so far claimed three fish. :(
 
OP
OP
mard

mard

Community Member
View Badges
Joined
Jul 8, 2020
Messages
35
Reaction score
81
Location
Minnesota
Rating - 0%
0   0   0
The Arduino board and my corresponding library was not reliable enough. I felt lucky if it would connect and trigger the feed mode just once. So I made the switch to a ESP32 board.

Using the Arduino IDE and another ESP32 BLE library I was able to develop a second Mobius BLE library. It has basically the same API as its predecessor and I have been able to use it successfully for several days.

If anyone is interested, please take a look at esp32-MobiusBLE.
Feedback is (again) welcome.
 

jverdicchio

New Member
View Badges
Joined
Oct 1, 2021
Messages
1
Reaction score
0
Location
Derbyshire
Rating - 0%
0   0   0
Awesome, I'll check it over the weekend!
Mard, that is an amazing piece of work. I'm in the process of having a tank and sump built and then want to control everything via a raspberry pi 4. A 7" touch screen supplies the local output and record all the data via influxdb. Log the history using Grafana. Heaters and temperature relatively easy.
I'm going for Ecotech pumps and radion XR15 lights (probably a powerhead as well). If I could have these controlled via the Pi, that would be great.
I've been looking at https://atlas-scientific.com/ - they do a bunch of different probes (pH, conductivity and lots more) and dosing heads. I was thinking about doing my own dosing/titration system rather than spending a fortune on Neptune.
You post has inspired me to pursue this aim.
Did anyone try contacting Echotech first to see if they'd make their API available? I know, bit of a long shot.
 

MikeTheNewbie

Active Member
View Badges
Joined
Aug 16, 2020
Messages
423
Reaction score
277
Location
Michigan
Rating - 100%
1   0   0
I tried, they won't.
Hopefully after they merge with BRS the walled garden nonsense stops and we are finally able to control their products with Apex. Pulling data from Apex to InfluxDB2 is easy.
 

Gogi

Active Member
View Badges
Joined
Oct 8, 2019
Messages
100
Reaction score
72
Location
London, UK
Rating - 0%
0   0   0
@mard Does this work with multi device setup? Will triggering a mode on one Vortech also trigger the mode on others? Or would that require connecting to each Vortech separately?
 
OP
OP
mard

mard

Community Member
View Badges
Joined
Jul 8, 2020
Messages
35
Reaction score
81
Location
Minnesota
Rating - 0%
0   0   0
@mard Does this work with multi device setup? Will triggering a mode on one Vortech also trigger the mode on others? Or would that require connecting to each Vortech separately?
The library can be used to trigger the same mode (aka scene) on multiple VorTech devices. This would require connecting to each VorTech, though this isn't necessary a bad thing.
For example, when the ESP32 board detects a specified voltage it can cycle through all known MobiusDevices and set a corresponding scene on each.

Since I only have 1 VorTech, I have not had the opportunity to test what happens when multiple VorTechs are "linked" together (aka "sync" or "anti-sync"). So it might work by triggering one device and the others follow (though I would be very surprised if this was the case).
 

plankton

Active Member
View Badges
Joined
Oct 1, 2007
Messages
376
Reaction score
179
Location
Pleasanton, CA
Rating - 0%
0   0   0
Following along, have ordered ESP32 BLE dev board and ADC recommended and will attempt to reproduce in my environment with Radion G4 pros and Vortech MP40QD that connect to mobius today. Dump question for group. Since Black Mobius RF Modules are back ordered worldwide with no ETA on shipments would it be worthwhile to support old RF Modules and if so do you know the protocole that is used?

PS I have old Radion G3 Pro and MP10QD that are upgradable but with no black RF Modules available I have little choice but to use Reeflink (gave up on WXM module because super unreliable).
 

plankton

Active Member
View Badges
Joined
Oct 1, 2007
Messages
376
Reaction score
179
Location
Pleasanton, CA
Rating - 0%
0   0   0
Following along, have ordered ESP32 BLE dev board and ADC recommended and will attempt to reproduce in my environment with Radion G4 pros and Vortech MP40QD that connect to mobius today. Dump question for group. Since Black Mobius RF Modules are back ordered worldwide with no ETA on shipments would it be worthwhile to support old RF Modules and if so do you know the protocole that is used?

PS I have old Radion G3 Pro and MP10QD that are upgradable but with no black RF Modules available I have little choice but to use Reeflink (gave up on WXM module because super unreliable).
 
OP
OP
mard

mard

Community Member
View Badges
Joined
Jul 8, 2020
Messages
35
Reaction score
81
Location
Minnesota
Rating - 0%
0   0   0
What sort of update are you looking for? It has been working well for me with my MP40.
 

MikeTheNewbie

Active Member
View Badges
Joined
Aug 16, 2020
Messages
423
Reaction score
277
Location
Michigan
Rating - 100%
1   0   0
Nothing really, I haven't tested it but I had the impression that the SW wasn't reliable enough per one of your last comments. Sounds like once you moved to ESP32, it works better right?
I'm about to give it a try, so I wanted to ask before I start tinkering with it.
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top