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

Ahoy API change by Ahoy version 0.5.93 and above #65

Merged
merged 5 commits into from
Apr 2, 2023

Conversation

dsteinkopf
Copy link
Collaborator

see Test data from #54

Ahoi API implementation source: https://github.com/lumapu/ahoy/blob/main/src/web/RestApi.h

@dsteinkopf
Copy link
Collaborator Author

@henne49 @GallusMax Could try this branch on your systems?

@dsteinkopf dsteinkopf marked this pull request as ready for review April 1, 2023 15:17
@henne49
Copy link
Owner

henne49 commented Apr 2, 2023

I have installed the new code and it seems to work:
grafik

Copy link
Owner

@henne49 henne49 left a comment

Choose a reason for hiding this comment

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

just a few minor changes required

dbus-opendtu.py Outdated Show resolved Hide resolved
dbus-opendtu.py Outdated Show resolved Hide resolved
dbus-opendtu.py Outdated Show resolved Hide resolved
refactor to have seperate modules instead of one big module
add timing for fetch_url
load OpenDTU test data from docs
add constants
dbus_service.py Fixed Show fixed Hide fixed
dbus_service.py Fixed Show fixed Hide fixed
dbus_service.py Fixed Show fixed Hide fixed
Comment on lines +487 to +488
logging.warning(f"Recovered inverter {self.pvinverternumber} ({self._get_name()}): "
f"Successfully fetched data now: {'NOT' if not self.is_data_up2date() else 'Is'} up-to-date")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (password)](1) as clear text. This expression logs [sensitive data (password)](2) as clear text.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ich würde sagen, hier ist eindeutig kein Passwort im Spiel. @henne49 stimmt's?

) # id assigned by Victron Support from SDM630v2.py
self._dbusservice.add_path("/ProductName", productname)
self._dbusservice.add_path("/CustomName", self._get_name())
logging.info(f"Name of Inverters found: {self._get_name()}")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (password)](1) as clear text. This expression logs [sensitive data (password)](2) as clear text. This expression logs [sensitive data (password)](3) as clear text.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ich würde sagen, hier ist eindeutig kein Passwort im Spiel. @henne49 stimmt's?

self._dbusservice[pre + "/Energy/Forward"] = pvyield
self._dbusservice["/Ac/Energy/Forward"] = pvyield

logging.debug("Inverter #%d Power (/Ac/Power): %s", self.pvinverternumber, power)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (password)](1) as clear text. This expression logs [sensitive data (password)](2) as clear text.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ich würde sagen, hier ist eindeutig kein Passwort im Spiel. @henne49 stimmt's?

self._dbusservice["/Ac/Energy/Forward"] = pvyield

logging.debug("Inverter #%d Power (/Ac/Power): %s", self.pvinverternumber, power)
logging.debug("Inverter #%d Energy (/Ac/Energy/Forward): %s", self.pvinverternumber, pvyield)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (password)](1) as clear text. This expression logs [sensitive data (password)](2) as clear text.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ich würde sagen, hier ist eindeutig kein Passwort im Spiel. @henne49 stimmt's?

self.last_update_successful = True
else:
# It happens that this warning appears without an Exception being logged above. Why?
logging.warning(f"Error while processing inverter {self.pvinverternumber} ({self._get_name()})")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (password)](1) as clear text. This expression logs [sensitive data (password)](2) as clear text. This expression logs [sensitive data (password)](1) as clear text. This expression logs [sensitive data (password)](2) as clear text.
@henne49 henne49 merged commit 6ec4dca into main Apr 2, 2023
@dsteinkopf dsteinkopf deleted the update_for_ahoy_0_5_93+ branch April 2, 2023 21:09
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.

2 participants