before i dig into it, I'd like to have your confirmation that I understood right: it is possible to access the SAM source code through the SSC repository files, modify it, and then rebuild the whole application with GUI and everything.
Am I correct?
My purpose is to build an off-grid CSP system, which produces electricity following an imposed load request.
Hi, Paul, I'm new one for SAM, about Api keys I got confused.
My situation is, I want to build own version by SAM source code and I did as wiki content, but SAM user interface always showed "Please setup API keys, see private.h for details..." ,(I have filled with information of Google_API_KEY, BING_API_KEY, DEVELOPER_API_KEY.)
My problem is:
1. what is sam_api_key? The code annotation shows "API keys for SAM to use with developer.nrel.gov services." That's the same as Developer API? 2. When I modified the private.h file and saved, do I need to do any other things to let it work?
Now, I have modified the private.h file, but it didn't work. And also, I found a bug(battery storage model cannot be selected), I'm not sure whether it is true bug or just caused by api key setting.
I moved this thread to the SAM Open Source category.
The sam_api_key and DEVELOPER_API_KEY variables both store keys from developer.nrel.gov. You can search the code to find where those keys are used. It probably makes sense to change that to use a single variable named something like NREL_DEVELOPER_API_KEY and key to avoid confusion.
Can you provide more information about what happened when you modified private.h? All you should need to do is insert valid keys between the quotes to make the API calls active, assuming you can access the APIs from your computer and location.
The webapis.conf file in the runtime folder lists the URLs SAM uses for API calls.
Thanks for your response. As I said before I modified and saved, and I restarted the software, but the front end still showed "Please setup API keys, see private.h for details...". The private file I modified is shown as below(hide some part of keys). If you want to see the actual keys, we could contact in email.
// can be used to indicate specialized releases for particular testers, i.e. 'iscc-ge'
// by default, should be NULL
static const char *version_label = 0; //"iscc-ge";
// API keys for SAM to use with developer.nrel.gov services.
const char *sam_api_key ="3973a0b5-0875-XXXX-XXXX-XXXXXXXXXXXX";
// Google APIs:
// login to developer api console at: https://code.google.com/apis/console
static const char *GOOGLE_API_KEY = "AIzaSyA5jY-XXXXXXXXXXXXXXXXX";
// Bing Map APIs:
// login to account center at: https://www.bingmapsportal.com/
static const char *BING_API_KEY = "AmX94Ku2evXP38F17pMlNc1CjC1cXXXXXXXXX_XXXX";
// Developer APIs:
// login to account center at: https://developer.nrel.gov/
static const char *DEVELOPER_API_KEY = "YwwEGrXXXXXXXXXXXXXXXXXXXX";