mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-12 00:16:42 +02:00
0.8.39
* fix MqTT dis_night_comm in the morning #1309 #1286 * seperated offset for sunrise and sunset #1308 * **BREAKING CHANGE**: powerlimit (active power control) now has one decimal place (MqTT / API) #1199
This commit is contained in:
parent
2cda39c9f9
commit
ea29e49c93
7 changed files with 22 additions and 21 deletions
|
@ -1,8 +1,9 @@
|
|||
# Development Changes
|
||||
|
||||
## 0.8.39 - 2024-01-01
|
||||
* fix MqTT dis_night_comm in the morning #1309
|
||||
* fix MqTT dis_night_comm in the morning #1309 #1286
|
||||
* seperated offset for sunrise and sunset #1308
|
||||
* **BREAKING CHANGE**: powerlimit (active power control) now has one decimal place (MqTT / API) #1199
|
||||
|
||||
## 0.8.38 - 2023-12-31
|
||||
* fix Grid-Profile JSON #1304
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 2023 Ahoy, https://github.com/lumpapu/ahoy
|
||||
// 2024 Ahoy, https://github.com/lumpapu/ahoy
|
||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/4.0/deed
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
@ -392,7 +392,7 @@ class Communication : public CommQueue<> {
|
|||
DBGPRINT(F("has "));
|
||||
if(!accepted) DBGPRINT(F("not "));
|
||||
DBGPRINT(F("accepted power limit set point "));
|
||||
DBGPRINT(String(q->iv->powerLimit[0]));
|
||||
DBGPRINT(String(q->iv->powerLimit[0]/10));
|
||||
DBGPRINT(F(" with PowerLimitControl "));
|
||||
DBGPRINTLN(String(q->iv->powerLimit[1]));
|
||||
q->iv->actPowerLimit = 0xffff; // unknown, readback current value
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 2023 Ahoy, https://github.com/lumpapu/ahoy
|
||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
|
||||
// 2024 Ahoy, https://github.com/lumpapu/ahoy
|
||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/4.0/deed
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __HM_DEFINES_H__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 2023 Ahoy, https://www.mikrocontroller.net/topic/525778
|
||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
|
||||
// 2024 Ahoy, https://www.mikrocontroller.net/topic/525778
|
||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/4.0/deed
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __HM_INVERTER_H__
|
||||
|
@ -110,7 +110,7 @@ class Inverter {
|
|||
uint8_t id; // unique id
|
||||
uint8_t type; // integer which refers to inverter type
|
||||
uint16_t alarmMesIndex; // Last recorded Alarm Message Index
|
||||
uint16_t powerLimit[2]; // limit power output
|
||||
uint16_t powerLimit[2]; // limit power output (multiplied by 10)
|
||||
float actPowerLimit; // actual power limit
|
||||
bool powerLimitAck; // acknowledged power limit (default: false)
|
||||
uint8_t devControlCmd; // carries the requested cmd
|
||||
|
@ -152,7 +152,7 @@ class Inverter {
|
|||
|
||||
Inverter() {
|
||||
ivGen = IV_HM;
|
||||
powerLimit[0] = 0xffff; // 65535 W Limit -> unlimited
|
||||
powerLimit[0] = 0xffff; // 6553.5 W Limit -> unlimited
|
||||
powerLimit[1] = AbsolutNonPersistent; // default power limit setting
|
||||
powerLimitAck = false;
|
||||
actPowerLimit = 0xffff; // init feedback from inverter to -1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 2023 Ahoy, https://github.com/lumpapu/ahoy
|
||||
// 2024 Ahoy, https://github.com/lumpapu/ahoy
|
||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/4.0/deed
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
@ -177,10 +177,10 @@ class HmRadio : public Radio {
|
|||
mTxBuf[cnt++] = cmd; // cmd -> 0 on, 1 off, 2 restart, 11 active power, 12 reactive power, 13 power factor
|
||||
mTxBuf[cnt++] = 0x00;
|
||||
if(cmd >= ActivePowerContr && cmd <= PFSet) { // ActivePowerContr, ReactivePowerContr, PFSet
|
||||
mTxBuf[cnt++] = ((data[0] * 10) >> 8) & 0xff; // power limit
|
||||
mTxBuf[cnt++] = ((data[0] * 10) ) & 0xff; // power limit
|
||||
mTxBuf[cnt++] = ((data[1] ) >> 8) & 0xff; // setting for persistens handlings
|
||||
mTxBuf[cnt++] = ((data[1] ) ) & 0xff; // setting for persistens handling
|
||||
mTxBuf[cnt++] = (data[0] >> 8) & 0xff; // power limit, multiplied by 10 (because of fraction)
|
||||
mTxBuf[cnt++] = (data[0] ) & 0xff; // power limit
|
||||
mTxBuf[cnt++] = (data[1] >> 8) & 0xff; // setting for persistens handlings
|
||||
mTxBuf[cnt++] = (data[1] ) & 0xff; // setting for persistens handling
|
||||
}
|
||||
} else { //MI 2nd gen. specific
|
||||
uint16_t powerMax = ((iv->powerLimit[1] == RelativNonPersistent) ? 0 : iv->getMaxPower());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 2023 Ahoy, https://github.com/lumpapu/ahoy
|
||||
// 2024 Ahoy, https://github.com/lumpapu/ahoy
|
||||
// Creative Commons - https://creativecommons.org/licenses/by-nc-sa/4.0/deed
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
@ -50,10 +50,10 @@ class CmtRadio : public Radio {
|
|||
mTxBuf[cnt++] = cmd; // cmd -> 0 on, 1 off, 2 restart, 11 active power, 12 reactive power, 13 power factor
|
||||
mTxBuf[cnt++] = 0x00;
|
||||
if(cmd >= ActivePowerContr && cmd <= PFSet) { // ActivePowerContr, ReactivePowerContr, PFSet
|
||||
mTxBuf[cnt++] = ((data[0] * 10) >> 8) & 0xff; // power limit
|
||||
mTxBuf[cnt++] = ((data[0] * 10) ) & 0xff; // power limit
|
||||
mTxBuf[cnt++] = ((data[1] ) >> 8) & 0xff; // setting for persistens handlings
|
||||
mTxBuf[cnt++] = ((data[1] ) ) & 0xff; // setting for persistens handling
|
||||
mTxBuf[cnt++] = (data[0] >> 8) & 0xff; // power limit, multiplied by 10 (because of fraction)
|
||||
mTxBuf[cnt++] = (data[0] ) & 0xff; // power limit
|
||||
mTxBuf[cnt++] = (data[1] >> 8) & 0xff; // setting for persistens handlings
|
||||
mTxBuf[cnt++] = (data[1] ) & 0xff; // setting for persistens handling
|
||||
}
|
||||
|
||||
sendPacket(iv, cnt, isRetransmit);
|
||||
|
|
|
@ -399,7 +399,7 @@
|
|||
var html = ml("div", {}, [
|
||||
ml("div", {class: "row mb-3"}, [
|
||||
ml("div", {class: "col-12 col-sm-5 my-2"}, "Limit Value"),
|
||||
ml("div", {class: "col-8 col-sm-5"}, ml("input", {name: "limit", type: "number"}, "")),
|
||||
ml("div", {class: "col-8 col-sm-5"}, ml("input", {name: "limit", type: "number", step: "0.1", min: 1}, "")),
|
||||
ml("div", {class: "col-4 col-sm-2"}, sel("type", opt, "pct"))
|
||||
]),
|
||||
ml("div", {class: "row mb-3"}, [
|
||||
|
@ -450,7 +450,7 @@
|
|||
var obj = new Object();
|
||||
obj.id = id;
|
||||
obj.cmd = cmd;
|
||||
obj.val = val;
|
||||
obj.val = Math.round(val*10);
|
||||
getAjax("/api/ctrl", ctrlCb, "POST", JSON.stringify(obj));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue