mirror of https://github.com/arendst/Tasmota.git
Add support for energy dummy relays
Add support for energy dummy relays using SO48
This commit is contained in:
parent
6dd8aabeef
commit
139ac367f0
|
@ -408,7 +408,7 @@ enum SO32_49Index { P_HOLD_TIME, // SetOption32 - (Button/Switch) K
|
||||||
P_BISTABLE_PULSE, // SetOption45 - (Bistable) Pulse time for two coil bistable latching relays (default 40)
|
P_BISTABLE_PULSE, // SetOption45 - (Bistable) Pulse time for two coil bistable latching relays (default 40)
|
||||||
P_POWER_ON_DELAY, // SetOption46 - (PowerOn) Add delay of 10 x value milliseconds at power on
|
P_POWER_ON_DELAY, // SetOption46 - (PowerOn) Add delay of 10 x value milliseconds at power on
|
||||||
P_POWER_ON_DELAY2, // SetOption47 - (PowerOn) Add delay of value seconds at power on before activating relays
|
P_POWER_ON_DELAY2, // SetOption47 - (PowerOn) Add delay of value seconds at power on before activating relays
|
||||||
P_SO48_FREE, // SetOption48
|
P_DUMMY_RELAYS, // SetOption48 - (Energy) Support energy dummy relays
|
||||||
P_SO49_FREE // SetOption49
|
P_SO49_FREE // SetOption49
|
||||||
}; // Max is PARAM8_SIZE (18) - SetOption32 until SetOption49
|
}; // Max is PARAM8_SIZE (18) - SetOption32 until SetOption49
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ bool NrgDummyCommand(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NrgDummyDrvInit(void) {
|
void NrgDummyDrvInit(void) {
|
||||||
uint32_t phase_count = (Energy->phase_count_virtual > 0) ? Energy->phase_count_virtual : TasmotaGlobal.devices_present;
|
uint32_t phase_count = (Settings->param[P_DUMMY_RELAYS] > 0) ? Settings->param[P_DUMMY_RELAYS] : TasmotaGlobal.devices_present; // SetOption48 - (Energy) Support energy dummy relays
|
||||||
if (TasmotaGlobal.gpio_optiona.dummy_energy && phase_count) {
|
if (TasmotaGlobal.gpio_optiona.dummy_energy && phase_count) {
|
||||||
Energy->phase_count = (phase_count < ENERGY_MAX_PHASES) ? phase_count : ENERGY_MAX_PHASES;
|
Energy->phase_count = (phase_count < ENERGY_MAX_PHASES) ? phase_count : ENERGY_MAX_PHASES;
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ a_setoption = [[
|
||||||
"(Bistable) Pulse time in milliseconds for two coil bistable latching relays (default 40)",
|
"(Bistable) Pulse time in milliseconds for two coil bistable latching relays (default 40)",
|
||||||
"(PowerOn) Add delay of 10 x value milliseconds at power on",
|
"(PowerOn) Add delay of 10 x value milliseconds at power on",
|
||||||
"(PowerOn) Add delay of value seconds at power on before activating relays",
|
"(PowerOn) Add delay of value seconds at power on before activating relays",
|
||||||
"(not used) Energy Tariff2 start hour",
|
"(Energy) Support energy dummy relays",
|
||||||
"",
|
"",
|
||||||
],[
|
],[
|
||||||
"(Timers) Enabled",
|
"(Timers) Enabled",
|
||||||
|
@ -325,7 +325,7 @@ else:
|
||||||
obj = json.load(fp)
|
obj = json.load(fp)
|
||||||
|
|
||||||
def StartDecode():
|
def StartDecode():
|
||||||
print ("\n*** decode-status.py v12.5.0.3 by Theo Arends and Jacek Ziolkowski ***")
|
print ("\n*** decode-status.py v13.0.0.1 by Theo Arends and Jacek Ziolkowski ***")
|
||||||
|
|
||||||
# print("Decoding\n{}".format(obj))
|
# print("Decoding\n{}".format(obj))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue