-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
SolarThing almost running (Parse FLEXmax aux mode error) #81
Comments
log_debug.log contains:
|
My Google Sheet shows my data after manually capturing it from the serial to USB cable from the Mate to my iMac. https://docs.google.com/spreadsheets/d/1QEX0m8pC8CoDV7GOINe-g8fUpPDu2Ujw0IvWptkW8x4/edit?usp=sharing |
The first line that pops out at me is As for why there are so many errors going to stdout in your original post, I have never seen those errors before, but they seem to be related to Google Analytics. You can ignore them, but I will look into those errors some other time to see if I can make them go away. Thank you for being very thorough with your outputs. Makes it a lot easier for me to figure out what went wrong. |
Found a typo in mate_serial.json. ttyUS00 instead of ttyUSB0. Corrected that, and seems to run better. Sucess! I have data in log_debug.log as follows:
|
I have no experience with online databases. What do you recommend for me to use to get web access to my data? Thank you so much for your patience with me. I used to work on Unix workstations a long time ago, but have been retired for many years. I'm now 82 and a lot of that has come back while working on this project. |
Alright so first off, glad you got it somewhat working. Second off, thank you for helping me test the Outback stuff. I run SolarThing on a pretty old Outback system as well and have never gotten that error. It looks like your MX4 is in a particular aux mode. Do you know what mode that is? It seems to be some sort of mode that SolarThing is unfamiliar with and I would love help documenting it if you are able. |
I don't know what mode that is. I saw that when I was editing my spreadsheet. I may have to get my installer out to diagnose the system. This is one reason I wanted to get SolarThing running with a web database. My output has dropped and I suspect a bad panel or something. My system is fifteen years old. |
I'm happy to help you test the Outback stuff. |
This is usually an exercise for the reader because most people will want to set up Grafana to see graphs and stuff, but if you don't want to mess with that, I recommend this:
If you don't have a separate computer to install CouchDB on, you can install it on your Raspberry Pi, I just don't know how long the SD card will last. SolarThing GraphQL will provide a web interface for you to view data. EDIT: Some older Raspberry Pi models don't even support CouchDB, so there's that too. If you have an RPi 3 or above, I think you're ok. Also, I can't help you very much if the separate computer is not running Linux. The ideal setup is that the second computer is running Linux too. |
I'm running a Raspberry Pi 4 B model, so I am okay with that. The only other computers I have are my iMac which has a form of Linux for its OS, and an older Raspberry Pi 1. I want to get web-based real-time access even if it only updates every fifteen minutes or so. |
Depending on how much you want to help out, I would love to know the firmware of your Mate 2 and your MX 4 device. Also, is your MX 4 actually an MX, or is it a FlexMax (FM)? If it's a FlexMax, I suspect that the FlexMax is trying to report a specific aux mode to the mate, but the mate does not have new enough firmware to understand that mode. That's just a guess though. If you're able to look at your MX 4's screen, it might also have the aux mode on it somewhere. I suspect that your Mate cannot interpret your MX 4's aux mode if it's a FlexMax. No matter what the problem is, I'm gonna have to release an update to SolarThing at some point to make "63" a valid aux mode for MX/FM devices. |
I'm happy to help out as much as you need me to. My MXs are not Flexmax, they are MXs. I'll get the firmware version for you. Also, my Mate is not even a 2. I think it might be a Mate 1. It's fifteen years old. I'm going out to look at the MX screen for the Aux mode. |
It's definitely possible to get it running on your Mac OS device, but I don't have the time or Mac OS knowledge to help out with that. Best I can do is recommend to either just run CouchDB on your Pi and hope for the best, or plug a USB hard drive into the pi and have CouchDB's data stored on there (which I might be able to help with, but I'm not entirely sure). I imagine that this would be easiest for you if SolarThing could upload directly to PVOutput from the mate program, but that's not currently a feature, but it is one that I would consider adding after this. |
I need to think about my options a bit before proceeding. Just being able to capture the data log is a big plus for me. Even if I only display it locally, that's a big step up over the Mate and the MX buttons to navigate the data. If I can access the data file into a spreadsheet that would be a big help. Both MXs are showing Aux=off. So, the 63 mode code is a strange one. Edit: Installing CouchDB on my Mac sounds pretty easy. 1.3. Installation on macOS¶ 1.3.1. Installation using the Apache CouchDB native application¶ The easiest way to run CouchDB on macOS is through the native macOS application. Just follow the below instructions: Download Apache CouchDB for macOS. Old releases are available at archive. Run Apache CouchDB application |
I have CouchDB running on my Mac. No problem. Very easy. |
Mate version 32 |
Oh nice. I forgot how easy it can be to configure CouchDB on mac OS. You can configure SolarThing mate to upload data to there, then you have a couple of options. First, you are either going to configure SolarThing GraphQL on your Pi, or you are going to configure SolarThing PVOutput on your pi. If you configure GraphQL, you can view many aspects of your SolarThing data on a web page. This options contains no graphs. If you choose to upload to PVOutput, you will only see energy generated from solar panels and energy used by the FXs. So the decision on which one you want to go with is up to you.
SolarThing currently does not have a feature like this, but if all you care about is daily kWh (solar generation) and energy usage data, then I believe PVOutput may allow you to download data in a CSV format. Alternatively, there is a feature that I haven't used in forever that still exists in SolarThing. Instead of a CouchDB database configuration, you can have a configuration like so: {
"type": "latest",
"file": "/path/to/store/json/data.json"
} |
Okay, I have some options to choose from. I have a social obligation coming up shortly and will have to get back to this project later tonight or tomorrow. The json format data output sounds easy to get going. I usually get the most straightforward solution running and then tackle the more complex ones in order of complexity. I may choose the json configuration to get familiar with it. |
The particular bug that detecting a FLEXmax while using old mate firmware has been fixed and the fix is present in this release: https://github.com/wildmountainfarms/solarthing/releases/tag/v2023.1.0. Be sure to update. Alternatively, this bug is actually caused by having analytics enabled, as whether or not a charge controller is an MX or FLEXmax is one of the few things being reported. You can always disable analytics instead. Link to updating here: https://solarthing.readthedocs.io/en/latest/updating.html I'm going to leave this issue open to answer questions however I can, but the problem is effectively fixed now. |
Thanks for keeping the issue open. I have a few more questions. I will be shutting down for the day. Thanks so much for your wonderful support and responsiveness. |
Updated and ran SolarThing with the following output:
|
Sorry, I forgot to bump the version. Give the update a try now after pulling. Also, next time you need to paste output, please put triple backticks around your output to format it correctly. I edit responses that are not formatted correctly.
|
Running now. Output below:
|
To run the "latest" config, which creates a file representing the latest data do I edit the base.json config file? Do I add In there? |
You are going to edit the {
"type": "latest",
"file": "/path/to/store/json/data.json"
} Make sure to edit the path to wherever you want to be able to access the file. If you want to just have the file in Once you have that configuration done, you can now reference |
Right now my base.json file contains the reference to the Mate as: |
Couldn't parse data from file: /opt/solarthing/program/mate/config/latest.json Please make sure your JSON is correct. |
base.json
latest.json
Make sure the If you add a CouchDB database configuration to SolarThing in the future, you can still keep the |
2023-01-10 01:26:25.074 [main] INFO me.retrodaredevil.solarthing.program.SolarMain - SolarThing is shutting down. This is caused by an error in your configuration or in how your environment is set up. Detailed message below: Couldn't parse data from file: config/latest.json Please make sure your JSON is correct. latest.json
Checked file permissions and all have full read, write, and execute permissions. |
The AUX mode on my second MX reads "Vent Fan" on the MX display. That must be the mode 63 that I keep seeing. |
Sorry, that's my bad. Seems I forgot how I'm supposed to format configuration files. Try this in your latest.json
For more advanced configuration, use something like this:
That last example will be a little nicer on your pi's SD card, writing every 10 seconds rather than every one second. Yeah I suspect that the fact that the MX is reading 63 is not actually indicating what aux mode it is in, but rather reporting some sort of unknown, as it's weird to me that it would report 5 1s (63 = 11111 in binary). I saw a similar issue here: https://forum.outbackpower.com/viewtopic.php?f=14&t=8268&sid=710ecc3edc75cf26584532c3b93d5aef Can you tell me if your charge controller is actually an MX, or if it is a FlexMax? The Mate display will probably always call it an MX because of its old firmware, but I'm wondering what your charge controller calls itself? |
My Pi is humming away logging data. I used the ten-second config file you provided. Thanks for that. I would be happy to figure out a way to import the json files into a Google Sheets file. I still am interested in something like Grafana using CouchDB. I need to take a little break from this project, but I will work towards that now that I am capturing data successfully. I have two charge controllers. I had to replace one of them two or three years ago. The newer one is a FlexMax, but as you suggest, the Mate will always call it an MX. |
Awesome. Glad you got it working. If you have more questions about stuff relating to the above, comment on this issue again. I'm going to close this issue, so if you come back and have questions about setting up CouchDB, I think that would be better organized in a new issue. |
SolarThing Output
rbrown3rd@bobspi01:/opt/solarthing/program/mate$ solarthing check --port /dev/ttyUSB0 --type mate
Going to open serial port using MATE's default serial configuration...
Successfully opened serial port...
Got 4 packets
Got 4 packets
Got 4 packets
Got 4 packets
Got data from mate!
Running SolarThing outputs the following:
Program seems to be running here, but not output to screen after the above.
Contents of base.json file is as follows:
The text was updated successfully, but these errors were encountered: