-
Notifications
You must be signed in to change notification settings - Fork 69
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
continual_publish service #284
continual_publish service #284
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Hi @GeoDerp, this seems nice!
?? If so, then probably give it another name to avoid confusion. Ex: A comment. This maybe the opportunity to solve this issue about unique IDs: |
We can defiantly set up a Edit: oh sorry, yeah the publish is done automatically. |
I might see how difficult it would be to fix the unique_id issue |
No that's ok, I thought that it was a different parameters. But is the same sol let's keep |
@purcell-lab , whats your take on the Pull Request? |
This functionality is very welcome in 99% of cases I almost always have a publish command following an optimisation command. As I want my automations to take action as soon as a new set of optim results are available. In your flow diagram this is covered by the publish_data function. In the case if MPC is run every 1 or 7 minutes, it will immediately publish results without awaiting the loop? The other case is when we cross a time step boundary (e g minute /30) in many cases there is a new set of data awaiting publication from the last optim run, which should be published immediately. Is this the function of continual_publish? Does this need to run every minute or just every time step? |
Sorry for my delay. I created a video explaining on the progress of the PR (forgive my tiredness). Ill merge the latest changes tomorrow when I'm more awake. Side note. I am thinking of creating a couple of videos explaining my development process, and EMHASS workflow (once its finalized). Let me know if you like this video and ill consider. |
Wow those kind of videos are really genius! That type of tutorial will help a lot of people for first setups for example. Great job! Definitely go for them if you're willing, to explain the EMHASS workflow. For this PR it was already great with that flow diagram at the beginning, the video is a great to understand that even better. |
Just a note, the README will likely need to be improved more before the merge. I may have also missed some documentation in the README or docs, that would require adjustment for this PR . All help will be appreciated.
I agree, I think its best to leave the @davidusb-geek , Let me know if you would like unitests generated for this PR. |
Thank my Dad for noticing the DateTime Issue while testing. Bug Fixed. |
Hi @GeoDerp, is this good to go? |
Code should be good to go. I would recommend reading the README file first just to see if you're happy with it. (Definitely put more working into the code than the readme) |
continual_publish
A new parameter
continual_publish
(boolean) has been generated and will:data_path/entities
This Pull Request is a "functional" proof of concept. Feel free to comment, review or commit any pull requests.
I will likely refine this post and/or the code later.
Operation Example:
continual_publish
to true in the config fileMPC
anddayahead
MPC
anddayahead
entity results saved indata_path/entities
.json
file named under their entity_id (E.g.sensor.dh_p_pv_forecast
)Freq
now set to 1 minute, using the shortestfreq
saved (in this case, from MPC)MPC
anddayahead
entities (with updated current state) to HANotes
continual_publish
:continual_publish
tofalse
as a runtime parameter results in the data only being saved inopt_res_latest.csv
. Therefore, it would require a publish to be run to upload the resultsforecast_model_predict
andregressor_model_predict
:continual_publish
automated re-publish loop. This however can be changed if requested