- Posts: 13
Creating off-grid system through SCC
- emiliano casati
- Topic Author
Less
More
01 Nov 2018 08:17 #6489
by emiliano casati
Creating off-grid system through SCC was created by emiliano casati
Dears,
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.
Let me know, and thanks in advance
Emiliano
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.
Let me know, and thanks in advance
Emiliano
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
02 Nov 2018 09:16 #6490
by pgilman
Replied by pgilman on topic Creating off-grid system through SCC
Dear Emiliano,
Yes, you can build a complete version of SAM, including the user interface, by following the instructions on the Wiki page of the SAM repository on GitHub.com:
github.com/nrel/sam/wiki
Note that the download features that require API keys will not work unless you modify the private.h file that contains those keys.
In the Wiki, You can also find links to the contribution policies, which you should follow if you would like NREL to consider including any features you develop in the NREL version of SAM.
Best regards,
Paul.
Yes, you can build a complete version of SAM, including the user interface, by following the instructions on the Wiki page of the SAM repository on GitHub.com:
github.com/nrel/sam/wiki
Note that the download features that require API keys will not work unless you modify the private.h file that contains those keys.
In the Wiki, You can also find links to the contribution policies, which you should follow if you would like NREL to consider including any features you develop in the NREL version of SAM.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- Juju
Less
More
- Posts: 4
14 Jun 2019 02:26 #7458
by Juju
Replied by Juju on topic Creating off-grid system through SCC
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.
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.
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
17 Jun 2019 09:55 #7462
by pgilman
Replied by pgilman on topic Creating off-grid system through SCC
Hi Jialei,
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.
Best regards,
Paul.
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.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- Juju
Less
More
- Posts: 4
18 Jun 2019 03:19 #7466
by Juju
Replied by Juju on topic Creating off-grid system through SCC
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.
Code:
// 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";
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
18 Jun 2019 14:41 - 25 Jun 2019 12:35 #7469
by pgilman
Replied by pgilman on topic Creating off-grid system through SCC
Hi Jialei,
The Welcome page should not show the message about setting up API keys if when you set the value of sam_api_key. You can see that around Line 234 of welcome.cpp:
github.com/NREL/SAM/blob/develop/src/welcome.cpp
If you create a PVWatts case, can you download a weather file on the Location and Resource page?
Best regards,
Paul.
The Welcome page should not show the message about setting up API keys if when you set the value of sam_api_key. You can see that around Line 234 of welcome.cpp:
github.com/NREL/SAM/blob/develop/src/welcome.cpp
If you create a PVWatts case, can you download a weather file on the Location and Resource page?
Best regards,
Paul.
Last edit: 25 Jun 2019 12:35 by pgilman.
Please Log in or Create an account to join the conversation.
Moderators: pgilman