Skip to content

Feature phase_number configuration option - #104

Merged
TheRealMoeder merged 4 commits into
TheRealMoeder:mainfrom
oldboys92:feature_phase-number
Apr 10, 2026
Merged

Feature phase_number configuration option#104
TheRealMoeder merged 4 commits into
TheRealMoeder:mainfrom
oldboys92:feature_phase-number

Conversation

@oldboys92

Copy link
Copy Markdown
Contributor

Adds phase_number configuration and update power data handling for mono-phase and tri-phase

@TheRealMoeder TheRealMoeder left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

All good, maybe you could add a little sentence to the documentation what this configuration option does?

@TheRealMoeder TheRealMoeder added the enhancement New feature or request label Apr 6, 2026
@oldboys92

Copy link
Copy Markdown
Contributor Author

I've also realized, that this option is not considered for JSON path parsing routines. Feeling a little bit unsure to touch that code base :-) What do you think?

@TheRealMoeder

Copy link
Copy Markdown
Owner

what do you mean by that?

@oldboys92

Copy link
Copy Markdown
Contributor Author

I mean the phase number is not used in the HTTP and MQTT JSON path parsing functions, only for the adapted functions setPowerData and setEnergyData.

@oldboys92
oldboys92 requested a review from TheRealMoeder April 9, 2026 22:06

@TheRealMoeder TheRealMoeder left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I would clarify in the documentation, that phase_number is the energy2shelly output configuration, as in how the emulator presents the input data in the Shelly emulation output. This makes it clearer, that TRIPHASE in Jsonpath settings is for input configuration and phase_number represents how whatever input data is presented to the Shelly output.

To be consistent, we should extend the triphase setPowerData, so that it sums up TRIPHASE input data and outputs on a single phase for cases where phase_power is 1. What do you think?

BTW, this will also be the correct solution for #89

…improved power data handling for monophase and triphase setups
@TheRealMoeder

Copy link
Copy Markdown
Owner

Great, thanks for the changes. With this implemented we could also add EM1.GetStatus to the rpc handler when in monophase mode, right?

@TheRealMoeder
TheRealMoeder merged commit e2285de into TheRealMoeder:main Apr 10, 2026
2 checks passed
@oldboys92

Copy link
Copy Markdown
Contributor Author

Great, thanks for the changes. With this implemented we could also add EM1.GetStatus to the rpc handler when in monophase mode, right?

Not sure. I need to double check it. Can you open an issue and link it, so we can look into it?

@oldboys92

Copy link
Copy Markdown
Contributor Author

@TheRealMoeder if I understand correctly, the EM1 component is for ShellyProEM, do we want to support this?

@TheRealMoeder

Copy link
Copy Markdown
Owner

I had a very lengthy discussion in #28 if you have time to read it up....but I think other things have higher priority

@oldboys92

Copy link
Copy Markdown
Contributor Author

Long thread #28. I agree, if somebody really needs that, he can do a PR quite easy now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants