-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No data although serial comm. is working with MPPT #3
Comments
Which serial port on the ESP are you connecting the solar controller to? This code is expecting to use serial port 2 for this. Debug output is produced over serial port 0 (the default serial port connected to the usb if you're using a dev board; it is on GPIO1 & 3 for tx & rx). Serial port 2 is GPIO 17 & 16 for tx & rx. This is explained in more detail in the readme. Did you update the config.json file in the data directory with the WiFi credentials for your network? Is the ESP connecting? WiFi progress is logged to serial port 0. This should be displayed in the serial monitor in the Arduino IDE. There isn't any logging for the victron activity, but you could easily add this in the loop function. I'm just curious; what is the goal you're working toward regarding talking to the charge controller? --Rich |
I connected the MPPT to the Serial2. My project is to build a dashboard to monitor and control my van (electricity, water, lights, temperatures and so on). Clément |
If you look at the javascript on the web page it serves you can see the craziness it does to figure out where the websocket server is. You could hardcode that part. I've had issues with a different project connecting to the websocket when I don't have an internet connection. That would explain the lack of data. I don't know why you would only get a single shot of output. Did you also comment in the json line below it? Did whatever data you got look correct? My project plans are the same. I have not run this code for a long time, and it has now been re-organized into a new project on here called ve.direct-temp-mqtt. There is also ve.direct-hex-mqtt which implements the hex protocol and allows changing settings on charge controllers or bmv. Both projects need a discovery server which I have not uploaded the code for yet, but I can. I run that and the mqtt broker on a raspberry pi. Node-RED provides the web interface from the pi for now. Both are a work in progress. I need to get back to them. I had one of my charge controllers fail right after plugging/unplugging my esp32 stuff. Thankfully victron replaced it for free. I think it was just a coincidence (because they are replacing any controller that gets the error mine threw, which has to do with current sensing), but I've been afraid to mess with them since then! Even if you don't have an mqtt server or a pi around, you could still try the new code pretty easily because all of the victron stuff has been encapsulated into classes. I'm using PlatformIO now instead of Arduino IDE, but the classes for the victron stuff would still work just fine if you add all the hpp and cpp files to a new arduino project. Same goes for the main code, which is called main.cpp under PlatformIO. You can simply rename it to .ino, where "your-project-name" is the name of the arduino project (and directory) you created. There is no serial logging in those projects because they are set up to use all 3 hardware serial ports to talk to 3 different victron devices at the same time (a bmv and two mppt controllers in my case). You could easily change that at the end of setup() by changing the first input to the serial port you are using and commenting the other two out. Then fix the for loop in loop() to not count all the way up to 3, just 1 or 2 depending on how many you connect. There will someday be a variable to control that... You would have to comment a few other things out as well, unless you happen to be using an Si7021 temp/humidity sensor. Anyway, try some of that if you want and let me know where you're getting hung up and we'll figure it out! --Rich |
Hi,
I obtained this result. But not only once, it updates periodically this time.
FYI, I run the MPPT on a lab power supply, powered on battery side, no PV panels connected. Here is a snap of raw text sent by the MPPT :
The current value matches the one your sketch update. But only this one is recognized. On my project, I'm not sure I'll implement a web interface (I know basically nothing of HTML, javascript...) only C (and even tho, at an intermediate level). If you're interested to join the project, it would be a great pleasure ! Clément |
I believe this version of the code only sends fields that have changed. If you don't have any panels attached, most of the fields wouldn't change and so it makes sense that maybe only the current was fluctuating a little. It still should have shown you everything once, so I'm not sure what happened there. One thing I've noticed is that after uploading new code, the serial monitor can sometimes take a second to connect again. Sometimes I don't see the first few messages when this happens. Could you try resetting your esp board with the monitor running so we're sure you get everything? This probably isn't the problem, but I don't have any other ideas at the moment. Given what you said about html, look up mqtt and node-red. The new version of this code is using mqtt to send out its data. Once in that form, there are lots of tools already out there to consume it. One of those tools is node-red, and it lets you manipulate the data using a concept called a flow and also has facilities for creating a decent web interface without any programming. The architecture I'm currently shooting for has a bunch of esp32s gathering data/controlling whatever systems I want to integrate and a raspberry pi running node-red to manage it all. That could change if I learn of a better framework, but out of what I've learned so far this looks like the best course, at least for me. Please have a look at the newer projects, ve.direct-temp-mqtt or ve.direct-hex-mqtt. Those are the ones I will be actively developing from here forward, specifically the hex version. We are both heading for the same goal, so in a way we are joined already! I'd be happy to share information and code along the way. --Rich |
Hi,
I can't see any data on the web page from ESP32 although I successfully receive data if I upload a basic "Serial pass-though" sketch to the ESP32 hooked to a 75/15 MPPT.
Could you point me out how to troubleshoot ?
It would have been great to add some debug over serial to know how things are going in the ESP32.
Anyway, thanks for this nice project !
Clément LP
The text was updated successfully, but these errors were encountered: