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 missing energyMeter data to emoncmss_publish() #580

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

KipK
Copy link
Collaborator

@KipK KipK commented Mar 27, 2023

forgot this one

Also put the deprecated properties in create_rapi_json as they are missing for emoncms publish

( time to ask emoncms to use the new properties before deprecation )

edit: is there a good reason why data are sent separately to emoncms instead of using event_send like websocket & mqtt?
Also it seems we should send the full /status topic to emoncms instead of create_rapi_json as more data are now coming from ESP32 and not RAPI.

@jeremypoulter
Copy link
Collaborator

EmonCMS only accepts numeric data and does not necessarily need all the data exposed by event_send. Also as EmonCMS will typically be remote and WS/MQTT local sending less data is best.

Copy link
Collaborator

@jeremypoulter jeremypoulter left a comment

Choose a reason for hiding this comment

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

I think the logic to event the data should be removed from the energy_monitor and just add evse.createEnergyMeterJsonDoc to create_rapi_json so it is inline with the previous implementation and does not hit the EmonCMS severs more than previously

@KipK
Copy link
Collaborator Author

KipK commented Mar 29, 2023

I'm agree, and not sure :) I've wanted to move it out of this create_rapi_json() because it's not RAPI data.
Saying this, there's other data not coming from RAPI in this function like manual_override, freeram, divertmode, srssi, time.
Wouldn't it be cleaner to start separate thoses in prepration of a future properties refactoring ?

edit: for now I've moved it back to create_rapi_json

@jeremypoulter
Copy link
Collaborator

For now it is probably best to make that change, we can rename that function to make it clearer that it is not just RAPI if you want.

…sing data to emoncms )

move deprecated properties in create_rapi_json ( were missing for emoncms )
@KipK
Copy link
Collaborator Author

KipK commented Mar 29, 2023

rebased and ready

@jeremypoulter jeremypoulter merged commit 2d34a3a into OpenEVSE:master Mar 29, 2023
@glynhudson
Copy link
Collaborator

glynhudson commented Mar 30, 2023

I've just tested this and total_energy doesn't seem to be posting to Emoncms.org

Apologies, ignore that. I was using the wrong build :-/

It's actually working great 👍

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.

3 participants