Update comments

This commit is contained in:
Theo Arends 2020-11-29 15:59:40 +01:00
parent 95362af6e4
commit 7f1f9727ef
2 changed files with 116 additions and 116 deletions

View File

@ -27,7 +27,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
struct { // SetOption0 .. SetOption31
uint32_t save_state : 1; // bit 0 - SetOption0 - (Settings) Save power state (1) and use after restart
uint32_t button_restrict : 1; // bit 1 - SetOption1 - (Button) Control button single press (1) or multipress (0)
uint32_t ex_value_units : 1; // bit 2 - SetOption2 - (Not used) Add units to JSON status messages - removed 6.6.0.21
uint32_t ex_value_units : 1; // bit 2 - SetOption2 - (not used) Add units to JSON status messages - removed 6.6.0.21
uint32_t mqtt_enabled : 1; // bit 3 - SetOption3 - (MQTT) Enable (1)
uint32_t mqtt_response : 1; // bit 4 - SetOption4 - (MQTT) Switch between RESULT (0) or COMMAND (1)
uint32_t mqtt_power_retain : 1; // bit 5 - CMND_POWERRETAIN
@ -82,7 +82,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t tuya_serial_mqtt_publish : 1; // bit 16 (v6.6.0.21) - SetOption66 - (Tuya) Enable (1) TuyaMcuReceived messages over Mqtt
uint32_t buzzer_enable : 1; // bit 17 (v6.6.0.1) - SetOption67 - (Buzzer) Enable (1) buzzer when available
uint32_t pwm_multi_channels : 1; // bit 18 (v6.6.0.3) - SetOption68 - (Light) Enable multi-channels PWM (1) instead of Color PWM (0)
uint32_t ex_tuya_dimmer_min_limit : 1; // bit 19 (v6.6.0.5) - SetOption69 - (Obsolete) Limits Tuya dimmers to minimum of 10% (25) when enabled.
uint32_t ex_tuya_dimmer_min_limit : 1; // bit 19 (v6.6.0.5) - SetOption69 - (not used) Limits Tuya dimmers to minimum of 10% (25) when enabled
uint32_t energy_weekend : 1; // bit 20 (v6.6.0.8) - CMND_TARIFF
uint32_t dds2382_model : 1; // bit 21 (v6.6.0.14) - SetOption71 - (DDS2382) Select different Modbus registers (1) for Active Energy (#6531)
uint32_t hardware_energy_total : 1; // bit 22 (v6.6.0.15) - SetOption72 - (Energy) Enable (1) hardware energy total counter as reference (#6561)
@ -91,7 +91,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t grouptopic_mode : 1; // bit 25 (v7.0.0.1) - SetOption75 - (MQTT) GroupTopic replaces %topic% (0) or fixed topic cmnd/grouptopic (1)
uint32_t bootcount_update : 1; // bit 26 (v7.0.0.4) - SetOption76 - (Deepsleep) Enable incrementing bootcount (1) when deepsleep is enabled
uint32_t slider_dimmer_stay_on : 1; // bit 27 (v7.0.0.6) - SetOption77 - (Light) Do not power off (1) if slider moved to far left
uint32_t ex_compatibility_check : 1; // bit 28 (v7.1.2.6) - SetOption78 - (Obsolete) Disable OTA compatibility check
uint32_t ex_compatibility_check : 1; // bit 28 (v7.1.2.6) - SetOption78 - (not used) Disable OTA compatibility check
uint32_t counter_reset_on_tele : 1; // bit 29 (v8.1.0.1) - SetOption79 - (Counter) Enable resetting of counters (1) after telemetry was sent
uint32_t shutter_mode : 1; // bit 30 (v6.6.0.14) - SetOption80 - (Shutter) Enable shutter support (1)
uint32_t pcf8574_ports_inverted : 1; // bit 31 (v6.6.0.14) - SetOption81 - (PCF8574) Invert all ports on PCF8574 devices (1)
@ -121,7 +121,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t zerocross_dimmer : 1; // bit 17 (v8.3.1.4) - SetOption99 - (PWM Dimmer) Enable zerocross dimmer (1)
uint32_t remove_zbreceived : 1; // bit 18 (v8.3.1.7) - SetOption100 - (Zigbee) Remove ZbReceived form JSON message (1)
uint32_t zb_index_ep : 1; // bit 19 (v8.3.1.7) - SetOption101 - (Zigbee) Add the source endpoint as suffix to attributes, ex `Power3` (1) instead of `Power` (0) if sent from endpoint 3
uint32_t teleinfo_baudrate : 1; // bit 20 (v8.4.0.1) - SetOption102 - (Teleinfo) Set Baud rate for Teleinfo communication to 1200 (0) or 9600 (1))
uint32_t teleinfo_baudrate : 1; // bit 20 (v8.4.0.1) - SetOption102 - (Teleinfo) Set Baud rate for Teleinfo communication to 1200 (0) or 9600 (1)
uint32_t mqtt_tls : 1; // bit 21 (v8.4.0.1) - SetOption103 - (MQTT TLS) Enable TLS mode (1) (requires TLS version)
uint32_t mqtt_no_retain : 1; // bit 22 (v8.4.0.1) - SetOption104 - (MQTT) No Retain (1) - disable all MQTT retained messages, some brokers don't support it: AWS IoT, Losant
uint32_t white_blend_mode : 1; // bit 23 (v8.4.0.1) - SetOption105 - (Light) White Blend Mode (1) - used to be `RGBWWTable` last value `0`, now deprecated in favor of this option

View File

@ -50,50 +50,50 @@ from optparse import OptionParser
a_on_off = ["OFF","ON "]
a_setoption = [[
"Save power state and use after restart",
"Restrict button actions to single, double and hold",
"(not used) Show value units in JSON messages",
"MQTT enabled",
"Respond as Command topic instead of RESULT",
"MQTT retain on Power",
"MQTT retain on Button",
"MQTT retain on Switch",
"Convert temperature to Fahrenheit",
"MQTT retain on Sensor",
"MQTT retained LWT to OFFLINE when topic changes",
"Swap Single and Double press Button",
"Do not use flash page rotate",
"Button single press only",
"Power interlock mode",
"Do not allow PWM control",
"Reverse clock",
"Allow entry of decimal color values",
"CO2 color to light signal",
"HASS discovery",
"Do not control Power with Dimmer",
"Energy monitoring while powered off",
"MQTT serial",
"MQTT serial binary",
"Convert pressure to mmHg",
"KNX enabled",
"Use Power device index on single relay devices",
"KNX enhancement",
"RF receive decimal",
"IR receive decimal",
"Enforce HASS light group",
"Do not show Wifi and Mqtt state using Led"
"(Settings) Save power state (1) and use after restart",
"(Button) Control button single press (1) or multipress (0)",
"(Not used) Add units to JSON status messages",
"(MQTT) Enable (1)",
"(MQTT) Switch between RESULT (0) or COMMAND (1)",
"(MQTT) Retain on Power",
"(MQTT) Retain on Button",
"(MQTT) Retain on Switch",
"(Temperature) Switch between Celsius (0) or Fahrenheit (1)",
"(MQTT) Retain on Sensor",
"(MQTT) Control LWT message format, Offline (1) or none (0)",
"(Button) Swap (1) button single and double press functionality",
"(Settings) Switch between dynamic (0) or fixed (1) slot flash save location",
"(Button) Support only single press (1) to speed up button press recognition",
"(Interlock) Power interlock mode",
"(Light) Switch between commands PWM (1) or COLOR/DIMMER/CT/CHANNEL (0)",
"(WS2812) Switch between clockwise (0) or counter-clockwise (1)",
"(Light) Switch between decimal (1) or hexadecimal (0) output",
"(Light) Pair light signal (1) with CO2 sensor",
"(HAss) Control automatic discovery (1) (See SetOption59)",
"(Light) Control power in relation to Dimmer/Color/Ct changes (1)",
"(Energy) Show voltage even if powered off (1)",
"(MQTT) Serial",
"(MQTT) Serial binary",
"(Pressure) switch between hPa (0)or mmHg (1) unit",
"(KNX) Enabled",
"(MQTT, HAss) Switch between POWER (0) or POWER1 (1)",
"(KNX) Enhancement",
"(RF) Receive data format hexadecimal (0) or decimal (1)",
"(IR) Receive data format hexadecimal (0) or decimal (1)",
"(HAss) enforce autodiscovery as light (1)",
"(Wifi, MQTT) Control link led blinking (1)"
],[
"Key hold time (ms)",
"Sonoff POW Max_Power_Retry",
"Backlog delay (ms)",
"(Button) Key hold time (ms)",
"(Pow) Sonoff POW Max_Power_Retry",
"(Backlog) Delay (ms)",
"(not used) mDNS delayed start (Sec)",
"Boot loop retry offset (0 = disable)",
"RGBWW remap",
"IR Unknown threshold",
"CSE7766 invalid power margin",
"Ignore hold time (s)",
"Gratuitous ARP repeat time",
"Over temperature threshold (celsius)",
"(Boot loop) Retry offset (0 = disable)",
"(Light) RGBWW remap",
"(IR) Unknown threshold",
"(CSE7766) invalid power margin",
"(Button) Ignore hold time (s)",
"(Wifi) Gratuitous ARP repeat time",
"(Temperature) Over temperature threshold (celsius)",
"(not used) Tuya MCU max dimmer value",
"(not used) Tuya MCU voltage Id",
"(not used) Tuya MCU current Id",
@ -102,75 +102,75 @@ a_setoption = [[
"(not used) Energy Tariff2 start hour",
"",
],[
"Timers enabled",
"Generic ESP8285 GPIO enabled",
"Add UTC time offset to JSON message",
"Show hostname and IP address in GUI",
"Apply SetOption20 to Tuya",
"mDNS enabled",
"Use wifi network scan at restart",
"Use wifi network rescan regularly",
"Add IR raw data to JSON message",
"Change state topic from tele/STATE to stat/RESULT",
"Enable normal sleep instead of dynamic sleep",
"Force local operation when button/switch topic is set",
"Do not use retain flag on HOLD messages",
"Do not scan relay power state at restart",
"Use _ instead of - as sensor index separator",
"Disable fast power cycle detection for device reset",
"Enable TuyaMcuReceived messages over Mqtt",
"Enable buzzer when available",
"Enable multi-channels PWM instead of Color PWM",
"(not used) Limits Tuya MCU dimmers to minimum of 10% (25) when enabled",
"Enable Weekend Energy Tariff",
"Select different Modbus registers for Active Energy",
"Enable hardware energy total counter as reference",
"Detach buttons from relays and enable MQTT action state for multipress",
"Enable internal pullup for single DS18x20 sensor",
"GroupTopic replaces %topic% (0) or fixed topic cmnd/grouptopic (1)",
"Enable incrementing bootcount when deepsleep is enabled",
"Do not power off if slider moved to far left",
"Bypass Compatibility check",
"Enable resetting of counters after telemetry was sent",
"Enable shutter support",
"Invert PCF8574 ports"
"(Timers) Enabled",
"(GPIO) Enable ESP8285 user GPIO's (1)",
"(Time) Append timezone to JSON time (1)",
"(GUI) Show hostname and IP address in GUI main menu (1)",
"(Tuya) Apply SetOption20 settings to Tuya device (1)",
"(mDNS) Service on (1) or off (0)",
"(Wifi) Scan network at restart for configured AP's (1) or used stored AP (0)",
"(Wifi) Scan network every 44 minutes for configured AP's (1)",
"(IR) Add IR Raw data to JSON message (1)",
"(MQTT) Send tele/%topic%/STATE in addition to stat/%topic%/RESULT (1)",
"(Sleep) Enable normal sleep (1) instead of dynamic sleep (0)",
"(Button, Switch) Force local operation (1) when button/switch topic is set",
"(MQTT) Don't use retain flag on HOLD messages (1)",
"(Power) Don't scan relay power state at restart (1)",
"(JSON) Enable '_' (1) instead of '-' (0) as sensor index separator",
"(QPC) Disable (1) fast power cycle detection for device reset",
"(Tuya) Enable (1) TuyaMcuReceived messages over Mqtt",
"(Buzzer) Enable (1) buzzer when available",
"(Light) Enable multi-channels PWM (1) instead of Color PWM (0)",
"(not used) Limits Tuya dimmers to minimum of 10% (25) when enabled",
"(Energy) Enable Weekend Energy Tariff",
"(DDS2382) Select different Modbus registers (1) for Active Energy (#6531)",
"(Energy) Enable (1) hardware energy total counter as reference (#6561)",
"(Button) Detach buttons from relays (1) and enable MQTT action state for multipress",
"(DS18x20) Enable internal pullup (1) for single DS18x20 sensor",
"(MQTT) GroupTopic replaces %topic% (0) or fixed topic cmnd/grouptopic (1)",
"(Deepsleep) Enable incrementing bootcount (1) when deepsleep is enabled",
"(Light) Do not power off (1) if slider moved to far left",
"(not used) Disable OTA compatibility check",
"(Counter) Enable resetting of counters (1) after telemetry was sent",
"(Shutter) Enable shutter support (1)",
"(PCF8574) Invert all ports on PCF8574 devices (1)"
],[
"Reduced CT range for Alexa",
"Use FriendlyNames instead of ShortAddresses when possible",
"(AWS IoT) publish MQTT state to a device shadow",
"Enable Device Groups",
"PWM Dimmer Turn brightness LED's off 5 seconds after last change",
"PWM Dimmer Turn red LED on when powered off",
"PWM Dimmer Buttons control remote devices",
"Distinct MQTT topics per device for Zigbee",
"Disable non-json MQTT response",
"Enable light fading at start/power on",
"Set PWM Mode from regular PWM to ColorTemp control",
"Keep uncompressed rules in memory to avoid CPU load of uncompressing at each tick",
"Implement simpler MAX6675 protocol instead of MAX31855",
"Enable Wifi",
"Enable Ethernet (ESP32)",
"Set Baud rate for TuyaMCU serial communication (0 = 9600 or 1 = 115200)",
"Rotary encoder uses rules instead of light control",
"Enable zerocross dimmer on PWM DIMMER",
"Remove ZbReceived form JSON message",
"Add the source endpoint as suffix to attributes",
"Baud rate for Teleinfo communication (0 = 1200 or 1 = 9600)",
"TLS mode",
"Disable all MQTT retained messages",
"Enable White blend mode",
"Create a virtual White ColorTemp for RGBW lights",
"Select virtual White as (0) Warm or (1) Cold",
"Enable Teleinfo telemetry into Tasmota Energy MQTT (0) or Teleinfo only (1)",
"Force gen1 Alexa mode",
"Disable Zigbee auto-config when pairing new devices",
"Use frequency output for buzzer pin instead of on/off signal",
"Use friendly name in zigbee topic (use with SetOption89)",
"Set dimmer low on rotary dial after power off"
"(Alexa) Reduced CT range for Alexa (1)",
"(Zigbee) Use FriendlyNames (1) instead of ShortAddresses (0) when possible",
"(AWS IoT) publish MQTT state to a device shadow (1)",
"(DevGroups) Enable Device Groups (1)",
"(PWM Dimmer) Turn brightness LED's off (1) 5 seconds after last change",
"(PWM Dimmer) Turn red LED on (1) when powered off",
"(DevGroups) Enable relays in separate device groups/PWM Dimmer Buttons control remote devices (1)",
"(MQTT, Zigbee) Distinct MQTT topics per device for Zigbee (1) (#7835)",
"(MQTT) Disable non-json MQTT response (1)",
"(Light) Enable light fading at start/power on (1)",
"(Light) Set PWM Mode from regular PWM (0) to ColorTemp (1) control (Xiaomi Philips ...)",
"(Compress) Keep uncompressed rules in memory to avoid CPU load of uncompressing at each tick (1)",
"(MAXxxx) Implement simpler MAX6675 protocol (1) instead of MAX31855 (0)",
"(Wifi) Enable Wifi",
"(Eth) Enable Ethernet (ESP32)",
"(Tuya) Set Baud rate for TuyaMCU serial communication to 9600 (0) or 115200 (1)",
"(Rotary) Use rules (1) instead of light control (0)",
"(PWM Dimmer) Enable zerocross dimmer (1)",
"(Zigbee) Remove ZbReceived form JSON message (1)",
"(Zigbee) Add the source endpoint as suffix to attributes, ex `Power3` (1) instead of `Power` (0) if sent from endpoint 3",
"(Teleinfo) Set Baud rate for Teleinfo communication to 1200 (0) or 9600 (1)",
"(MQTT TLS) Enable TLS mode (1) (requires TLS version)",
"(MQTT) No Retain (1) - disable all MQTT retained messages, some brokers don't support it: AWS IoT, Losant",
"(Light) White Blend Mode (1) - used to be `RGBWWTable` last value `0`, now deprecated in favor of this option",
"(Light) Virtual CT (1) - Creates a virtual White ColorTemp for RGBW lights",
"(Light) Virtual CT Channel (1) - signals whether the hardware white is cold CW (true) or warm WW (false)",
"(Teleinfo) Enable Teleinfo + Tasmota Energy device (0) or Teleinfo raw data only (1)",
"(Alexa) Gen1 mode (1) - if you only have Echo Dot 2nd gen devices",
"(Zigbee) Disable auto-config (1) when pairing new devices",
"(Buzzer) Use frequency output (1) for buzzer pin instead of on/off signal (0)",
"(Zigbee) Use friendly name in zigbee topic (1) (use with SetOption89)",
"(Rotary) Set dimmer low on rotary dial after power off (1)"
],[
"Detach Switches from Relays and enable MQTT action state for all the SwitchModes",
"Enable ESP32 MI32 BLE",
"Disable auto-query of zigbee lights and devices",
"(Switch) Detach Switches from relays and enable MQTT action state for all the SwitchModes (1)",
"(ESP32 BLE) Enable ESP32 MI32 BLE (1)",
"(Zigbee) Disable auto-query of zigbee lights and devices (1)",
"",
"","","","",
"","","","",
@ -271,7 +271,7 @@ else:
obj = json.load(fp)
def StartDecode():
print ("\n*** decode-status.py v20201114 by Theo Arends and Jacek Ziolkowski ***")
print ("\n*** decode-status.py v20201129 by Theo Arends and Jacek Ziolkowski ***")
# print("Decoding\n{}".format(obj))
@ -304,14 +304,14 @@ def StartDecode():
split_register = [int(register[opt*2:opt*2+2],16) for opt in range(18)] # split register into 18 values
for opt_idx, option in enumerate(opt_group):
options.append(str("{0:2d} ({1:3d}) {2}".format(i, split_register[opt_idx], option)))
options.append(str("{0:3d} ({1:3d}) {2}".format(i, split_register[opt_idx], option)))
i += 1
if r in (0, 2, 3, 4): #registers 1 and 4 hold binary values
for opt_idx, option in enumerate(opt_group):
i_register = int(register,16)
state = (i_register >> opt_idx) & 1
options.append(str("{0:2d} ({1}) {2}".format(i, a_on_off[state], option)))
options.append(str("{0:3d} ({1}) {2}".format(i, a_on_off[state], option)))
i += 1
print("\nOptions")