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