Voltronic solar inverter mpsvii communication using esp8266 via rs232

Hello,
I am new here, i was trying to find a complete project about communicating with MPSV using arduino ESP8266 via RS232 communication port.
does anybody have an idea or a link to a complete blog that contains instruction.

As discussed in this topic…

The first step is either finding a non-Blynk solution and adding-in the Blynk functionality later, or figuring-out wiring, protocols, baud rate, response codes etc.

Pete.

hello again Dear,
I’m glad to tell you that I did found a non blynk solution and I can get the inverter’s data through MQTT broker, could you please help about how to add the blynk functionality in order to get those data on blynk app.
thank you in advance

Are you running your own MQTT broker - something like Mosquitto, or are you using an online MQTT service like Hivemq ?

If you’re running your own broker then what hardware are you using?

Are you using MQTT for anything else, or simply because it was built-in to this project?

Do you have access to the C++ code that does this Voltronic to MQTT transalation?

Pete.

Dear,
for now I am using broker.mqtt-dashboard.com and my inverter is connected to Arduino esp8266 D1-mini board via RS232-ttl. I used MQTT since it was built in to that project and in order to check if I am receiving data correctly, but once I learn how to send those data to blynk app there is no need for MQTT and the project I worked on includes all codes needed to communicate with the inverter.

here is the project link:

Okay, that’s going to be quite a difficult sketch to convert, because of its complexity and the way that it’s written.

One option is to set-up a device on your network - say a Raspberry Pi or Windows machine that runs 24/7 and install an MQTT broker (preferably Mosquitto) and Node-Red, then use Node-Red to send the MQTT reading to Blynk.
This is the setup I use for all of my Home Automation projects, and while it takes a bit of work to set-up, it functions very well.

Pete.

You mean that it is not possible to push the received data directly to the Blynk app ?
or maybe I can create a new code so I can send the queries and receive the data from Bynkg directly ??

Without wanting to lead you into wrong directions … but,

Is this so damn complicated to add Blynk IoT support?
In my “simplified world”, it would mean; every time you send to MQTT, you ALSO send to Blynk IoT.

I do this for one of my OLD blynk apps, i.e. with Blynk Legacy. Maybe different with Blynk IoT, but i think this should work.
What i did was; starting from my Blynk Legacy app which sends to Blynk, i just added the code to also send to MQTT. I am using a local Mosquitto MQTT broker. But it should not be different to use a public cloud broker. This does not seem to be “very hard”, does it?

I also realize I have another MQTT variant with Adafruit IO. They “hide” the MQTT stuff if you use their ESP API. But it is MQTT being used. That also works very well with ADAFRUIT IO (MQTT) and Blynk Legacy code in same ESP8266 device.

I read sometime ago someone not recommending to do this, but for me this works very well and stable. I also use the pubSubClient as you do. I have found this to be “poor” in error handling and tricky in reconnection handling. But if you have mastered this in your existing sketch, i think you have mastered the “big” problem already.

Of course, to get going with Blynk IoT for the first time is also a bit tricky. Many people ask for support to help in that …

Again,
I don’t want to steer you into the wrong direction. But for me, this sounds not too difficult.
Also, I will not be able to give support etc.
So listening to me will leave you alone … (unfortunately).
Listening to the Knight is then far better … :slight_smile:

My 25 cents.
/Jonas

You could strip-out the MQTT publish commands and replace them with Blynk virtualWrite commands, and add-in the required Blynk libraries. But looking at the code that isn’t likely to produce good results.

You could also take apart the code and work-out which parts are reading the data from the inverter and turning it into useable values, and incorporate this into a Blynk sketch.

It depends how good your programming skills are. My guess is that because you’re asking the question you probably don’t have the necessary skills.

Pete.

That’s what I was asking for, I will try to replace the MQTT publish commands with Blynk virtualWrite commands.
And regarding my programming skills, I am new at IoT and blynk issues but as per my knowledge regarding programming nothing is impossible to learn especially when you are a developer.
Meanwhile many thanks for your kind support.

Okay.
Things to look out for….

With Blynk you need to avoid the use of blocking delays, and the void loop needs to be kept clean.
The sketch you linked to uses delays and has a cluttered void loop. Presumably this is to allow data from the RS232 interface to be read correctly, but it doesn’t leans itself to Blynk and will require quite a bit of work to make it function reliably without regular disconnections from Blynk.

The software is already establishing a WiFi connection, so you should use Blynk.config and Blynk.connect rather than Blynk.begin - or rip-out all of the existing WiFi code and use Blynk.begin instead.

Obviously many hours of work and testing, compared to a couple of hours to go down the Node-Red route.

Good luck.

Pete.