BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Victron BMV 700 - WEMOS D1 Mini

esp8266

#1

Hi
This is my first post on this forum so firstly, Hi to everyone.
I’m a total noob with any code so anything I’ve learned so far is thanks to you guys.

I would like to interface a Victron BMV 700 battery monitor with my Wemos D1 Mini and deliver the output to my iPhone using Blynk.

So far I’ve tried a few examples of others which have written code to successfully talk to the Victron BMV 700 but I can’t see anything so far that interfaces with Blynk.

Any ideas gratefully received.


#2

A quick search reveals that

“There are two ways of communicating. One is the text protocol. The Victron spews out plain text every second… The second is their Hex Protocol which allows a conversation and sending commands

http://caravanersforum.com/viewtopic.php?t=63614

Timing can be an issue when using Blynk, as the Blynk background processes demand processor time on a frequent basis, and waiting for data to be “spewed out” then processing that data could cause some Blynk timing issues.

Better to take the approach that the author of the article did, and make this a triggered conversation at a frequency of your choice. However, the code to do this can’t be in the void loop as in the example code. It must be in a separate function that you call with a Blynk timer. The same function can be used to process the results and write them to Blynk. Take care not to call the function too often - probably every 5 seconds will be more than enough.

The author of the article used an Arduino, which uses 5v logic levels, so he needed a level shifter to conver to the 3.3v used by the device. Your Wemos uses 3.3v logic levels, so you don’t need to worry about level shifting.

I’d start by getting his code (or another example that uses the same data polling principal) running without Blynk, then modifying it to be Blynk friendly by cleaning-up the void loop with a Blynk timer.

When this is working, add-in the Blynk connection code and some virtual write commands to push the data to Blynk.

It will be difficult for others to help you, unless you find someone already using the same hardware, but we’ll try to point you in the right direction if we can.

Pete.