1. Restructured configuration: Moved config_other and console to top level 2. Added common _match_pattern function for regex pattern matching 3. Implemented Unifi Hostname bug fix in is_hostname_unknown 4. Created common get_device_hostname function to eliminate code duplication 5. Added comprehensive test scripts for all new functionality 6. Added detailed documentation for all changes
60 lines
2.5 KiB
JSON
60 lines
2.5 KiB
JSON
{
|
|
"unifi": {
|
|
"host": "https://192.168.6.1",
|
|
"username": "Tasmota",
|
|
"password": "TasmotaManager12!@",
|
|
"site": "default",
|
|
"network_filter": {
|
|
"NoT_network": {
|
|
"name": "NoT",
|
|
"subnet": "192.168.8",
|
|
"exclude_patterns": [
|
|
"^homeassistant*",
|
|
"^.*sonos.*"
|
|
],
|
|
"unknown_device_patterns": [
|
|
"^tasmota_*",
|
|
"^tasmota-*",
|
|
"^esp-*",
|
|
"^ESP-*"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"mqtt": {
|
|
"Host": "homeassistant.NoT.mgeppert.com",
|
|
"Port": 1883,
|
|
"User": "mgeppert",
|
|
"Password": "mgeppert",
|
|
"Topic": "%hostname_base%",
|
|
"FullTopic": "%prefix%/%topic%/",
|
|
"NoRetain": false
|
|
},
|
|
"config_other": {
|
|
"TreatLife_SW_SS01S": "{\"NAME\":\"TL SS01S Swtch\",\"GPIO\":[0,0,0,0,52,158,0,0,21,17,0,0,0],\"FLAG\":0,\"BASE\":18}\n",
|
|
"TreatLife_SW_SS02S": "{\"NAME\":\"Treatlife SS02\",\"GPIO\":[0,0,0,0,288,576,0,0,224,32,0,0,0,0],\"FLAG\":0,\"BASE\":18}",
|
|
"TreatLife_SW_SS02S_Orig": "{\"NAME\":\"Treatlife SS02\",\"GPIO\":[0,0,0,0,289,0,0,0,224,32,0,0,0,0],\"FLAG\":0,\"BASE\":18}",
|
|
"TreatLife_DIM_DS02S": "{\"NAME\":\"DS02S Dimmer\",\"GPIO\":[0,107,0,108,0,0,0,0,0,0,0,0,0],\"FLAG\":0,\"BASE\":54}",
|
|
"CloudFree_SW1": "{\"NAME\":\"CloudFree SW1\",\"GPIO\":[0,224,0,32,320,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"FLAG\":0,\"BASE\":1}",
|
|
"Gosund_WP5_Plug": "{\"NAME\":\"Gosund-WP5\",\"GPIO\":[0,0,0,0,17,0,0,0,56,57,21,0,0],\"FLAG\":0,\"BASE\":18}",
|
|
"Gosund_Plug": "{\"NAME\":\"Gosund-WP5\",\"GPIO\":[0,0,0,0,32,0,0,0,320,321,224,0,0,0],\"FLAG\":0,\"BASE\":18}",
|
|
"CloudFree_X10S_Plug": "{\"NAME\":\"Aoycocr X10S\",\"GPIO\":[56,0,57,0,21,134,0,0,131,17,132,0,0],\"FLAG\":0,\"BASE\":45}\n",
|
|
"Sonoff_S31_PM_Plug": "{\"NAME\":\"Sonoff S31\",\"GPIO\":[17,145,0,146,0,0,0,0,21,56,0,0,0],\"FLAG\":0,\"BASE\":41}",
|
|
"Sonoff S31": ""
|
|
},
|
|
"console": {
|
|
"SwitchRetain": "Off",
|
|
"ButtonRetain": "Off",
|
|
"PowerRetain": "On",
|
|
"PowerOnState": "3",
|
|
"SetOption1": "0",
|
|
"SetOption3": "1",
|
|
"SetOption4": "1",
|
|
"SetOption13": "0",
|
|
"SetOption19": "0",
|
|
"SetOption32": "8",
|
|
"SetOption53": "1",
|
|
"SetOption73": "1",
|
|
"rule1": "on button1#state=10 do power0 toggle endon"
|
|
}
|
|
} |