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

Feature Request: Rest-Api call to get result of adjust power level #553

Closed
3 of 5 tasks
modem-man-gmx opened this issue Jan 5, 2023 · 4 comments
Closed
3 of 5 tasks
Assignees
Labels
enhancement New feature or request fixed dev fixed

Comments

@modem-man-gmx
Copy link
Contributor

Hardware

  • ESP8266
  • ESP32
  • Raspberry Pi

Modelname: Any
Retailer URL: n.a.

nRF24L01+ Module

n.a.

Software

  • AhoyDTU
  • OpenDTU

Version / Git SHA:

Version: any next version

From Discord discussion:
Mo had a question about the statement
"http:https://192.168.0.142/api/ctrl"
and there the payload
{"id": "0", "cmd": "limit_persistent_absolute", "val": "30"}
must be POSTed as content type application/json:

Q (Mo): Is there an immediate return code from which one can see whether the HM understood and implemented the command?

A (lumapu): Yes, it is read back and the value is then also transmitted via MQTT, but it feels like it takes about a minute. I don't know the exact MQTT path at the moment

Q (Mo): It would be nice to also have a rest-api call for this, then you can process the order and the check via the same interface (and maybe don't have to wait up to 1 minute?).

@stefan123t
Copy link
Collaborator

IMHO the two call(s) should remain async as the REST API would otherwise be blocked not only until the 0x0B ActivePowerContr / Limit Command has been accepted by the Inverter. But the ask here to wait until the 0x05 SystemConfigPara where the inverter updates the DTU on the current Power Limit set, may return a valid result only some ~1 minute after the successful 0x0B command has been sent and received / acknowledged.

@lumapu
Copy link
Owner

lumapu commented Jan 6, 2023

  1. We could introduce another Mqtt publish to show the acknowledge of new power limit setpoint.
  2. After approx. one minute the new limit will be published of the Readback (0x05) value. The second point is already implemented.

lumapu added a commit that referenced this issue Jan 7, 2023
added SH1106 to automatic build
added IP address to MQTT (version, device and IP are retained and only transmitted once after boot) #556
added `set_power_limit` acknowledge MQTT publish #553
changed: version, device name are only published via MQTT once after boot
added `Login` to menu if admin password is set #554
added `development` to second changelog link in `index.html` #543
added interval for MQTT (as option). With this settings MQTT live data is published in a fixed timing (only if inverter is available) #542, #523
added MQTT `comm_disabled` #529
@lumapu lumapu self-assigned this Jan 7, 2023
@lumapu lumapu added the fixed dev fixed label Jan 7, 2023
@modem-man-gmx
Copy link
Contributor Author

Will check this soon, thank you!

@lumapu
Copy link
Owner

lumapu commented Jan 7, 2023

for me the acknowledge works as expected, the field ack_pwr_limit was set to true at 07:50:58, the field active_PowerLimit (read-back value) was set to 100 at 07:51:30

@stefan123t stefan123t added the enhancement New feature or request label Jan 12, 2023
@lumapu lumapu closed this as completed Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed dev fixed
Projects
None yet
Development

No branches or pull requests

3 participants