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

smarthome Tasmota: changed json reporting since version 14.x #2839

Open
hawa-lc4 opened this issue May 30, 2024 · 1 comment
Open

smarthome Tasmota: changed json reporting since version 14.x #2839

hawa-lc4 opened this issue May 30, 2024 · 1 comment

Comments

@hawa-lc4
Copy link

Since Tasmota version 14.x the json reporting is changed and it seems to be the case this beeing the new standard there.
The documentation regarding this however seems to be weak.
For smarthome devices based on Tasmota the actual power and power state is requested in "watt.py" by using the response of the Status command.
The response for "Status" changed regarding the power state from an integer value (e.g. ...,"Power":3,.....) representing the power state of all configured relais to a string value showing each relais in a bitwise state (e.g. ...,"Power":"011",.....).
As a result the script "watt.py" is no longer able to determine the power state correctly.

My working solution is as attached file watt.py and has an addition to report also the consumed energy.
This works for Tasmota version 12.x/13.x and 14.x as well, assuming the primary relais controlled by openWB is always the first (or only) relais and is reported as "POWER" or "POWER1" by "Status 11" command.
watt.py.txt

@benderl
Copy link
Collaborator

benderl commented May 30, 2024

When you already have a solution, please open a pull request.

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 a pull request may close this issue.

2 participants