Skip to content
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

Add damping factor #131

Merged
merged 9 commits into from
Jan 31, 2024
Merged

Add damping factor #131

merged 9 commits into from
Jan 31, 2024

Conversation

coltc50
Copy link
Contributor

@coltc50 coltc50 commented Jan 25, 2024

Add damping factor to pv tab. Quick and dirty...

adding damping factor
&damping=1,0.3
Admin add damping factor setting
add variable of damping factor in main
add damping in pv section
Copy link
Contributor

@klein0r klein0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add changelog to README
  • Add damping / conversion for other providers (e.g. solcast)
  • Update documentation

"sort": false,
"default": 0
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix indentation

main.js Outdated
@@ -659,10 +659,10 @@ class Pvforecast extends utils.Adapter {
if (this.config.service === 'forecastsolar') {
if (this.hasApiKey) {
// https://api.forecast.solar/:apikey/estimate/:lat/:lon/:dec/:az/:kwp
url = `https://api.forecast.solar/${this.config.apiKey}/estimate/${this.pvLatitude}/${this.pvLongitude}/${plant.tilt}/${plant.azimuth}/${plant.peakpower}?time=utc`;
url = `https://api.forecast.solar/${this.config.apiKey}/estimate/${this.pvLatitude}/${this.pvLongitude}/${plant.tilt}/${plant.azimuth}/${plant.peakpower}?time=utc&damping=${plant.dampingm},${plant.dampinge}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the config attributes are dampe and dampm

@@ -306,6 +306,52 @@
"filter": false,
"sort": false,
"default": 0
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix indentation

show configuration only when forecast solar is choosen
revert change for hiden
@coltc50
Copy link
Contributor Author

coltc50 commented Jan 26, 2024

Sorry, was too late yesterday... now I correct all typos and it should work.

I would like to show the damping factor only when choose solar cast, but
"hidden": "data.service !== 'forecastsolar'",
dosen't work at this time...

EDIT:
The log throw a warning... don't know what's wrong or what I missing?
pvforecast has an invalid jsonConfig: [{"instancePath":"","schemaPath":"#/additionalProperties","keyword":"additionalProperties","params":{"additionalProperty":"iconPosition"},"message":"must NOT have additional properties"}]

@klein0r
Copy link
Contributor

klein0r commented Jan 26, 2024

but "hidden": "data.service !== 'forecastsolar'", dosen't work at this time...

In tables you have to use globalData - data references other fields in the same row.

don't know what's wrong or what I missing?

Nothing. That's an issue with the schema validation.

@klein0r klein0r merged commit 38ea1ba into iobroker-community-adapters:main Jan 31, 2024
10 of 11 checks passed
klein0r added a commit that referenced this pull request Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants