Merge PR #139: Tasmota: Add support for 3ch devices
commit
d6bebd165b
|
|
@ -38,10 +38,12 @@ DevicePluginTasmota::DevicePluginTasmota()
|
|||
// Helper maps for parent devices (aka sonoff_*)
|
||||
m_ipAddressParamTypeMap[sonoff_basicDeviceClassId] = sonoff_basicDeviceIpAddressParamTypeId;
|
||||
m_ipAddressParamTypeMap[sonoff_dualDeviceClassId] = sonoff_dualDeviceIpAddressParamTypeId;
|
||||
m_ipAddressParamTypeMap[sonoff_triDeviceClassId] = sonoff_triDeviceIpAddressParamTypeId;
|
||||
m_ipAddressParamTypeMap[sonoff_quadDeviceClassId] = sonoff_quadDeviceIpAddressParamTypeId;
|
||||
|
||||
m_attachedDeviceParamTypeIdMap[sonoff_basicDeviceClassId] << sonoff_basicDeviceAttachedDeviceCH1ParamTypeId;
|
||||
m_attachedDeviceParamTypeIdMap[sonoff_dualDeviceClassId] << sonoff_dualDeviceAttachedDeviceCH1ParamTypeId << sonoff_dualDeviceAttachedDeviceCH2ParamTypeId;
|
||||
m_attachedDeviceParamTypeIdMap[sonoff_triDeviceClassId] << sonoff_triDeviceAttachedDeviceCH1ParamTypeId << sonoff_triDeviceAttachedDeviceCH2ParamTypeId << sonoff_triDeviceAttachedDeviceCH3ParamTypeId;
|
||||
m_attachedDeviceParamTypeIdMap[sonoff_quadDeviceClassId] << sonoff_quadDeviceAttachedDeviceCH1ParamTypeId << sonoff_quadDeviceAttachedDeviceCH2ParamTypeId << sonoff_quadDeviceAttachedDeviceCH3ParamTypeId << sonoff_quadDeviceAttachedDeviceCH4ParamTypeId;
|
||||
|
||||
// Helper maps for virtual childs (aka tasmota*)
|
||||
|
|
@ -57,6 +59,7 @@ DevicePluginTasmota::DevicePluginTasmota()
|
|||
// Helper maps for all devices
|
||||
m_connectedStateTypeMap[sonoff_basicDeviceClassId] = sonoff_basicConnectedStateTypeId;
|
||||
m_connectedStateTypeMap[sonoff_dualDeviceClassId] = sonoff_dualConnectedStateTypeId;
|
||||
m_connectedStateTypeMap[sonoff_triDeviceClassId] = sonoff_triConnectedStateTypeId;
|
||||
m_connectedStateTypeMap[sonoff_quadDeviceClassId] = sonoff_quadConnectedStateTypeId;
|
||||
m_connectedStateTypeMap[tasmotaSwitchDeviceClassId] = tasmotaSwitchConnectedStateTypeId;
|
||||
m_connectedStateTypeMap[tasmotaLightDeviceClassId] = tasmotaLightConnectedStateTypeId;
|
||||
|
|
|
|||
|
|
@ -84,6 +84,56 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "e1073af2-f207-4dc9-8caa-e933421885db",
|
||||
"name": "sonoff_tri",
|
||||
"displayName": "3 channel switch (Sonoff 3CH, Tuya 3CH...)",
|
||||
"createMethods": ["user"],
|
||||
"interfaces": [ "gateway" ],
|
||||
"paramTypes": [
|
||||
{
|
||||
"id": "b7532005-4157-4687-952f-ac3cd6b7f606",
|
||||
"name":"ipAddress",
|
||||
"displayName": "IP address",
|
||||
"type": "QString"
|
||||
},
|
||||
{
|
||||
"id": "93b97754-faa7-4b60-9d63-f7ee44570363",
|
||||
"name": "attachedDeviceCH1",
|
||||
"displayName": "Connected device 1",
|
||||
"type": "QString",
|
||||
"allowedValues": ["None", "Light", "Roller Shutter Up", "Roller Shutter Down"],
|
||||
"defaultValue": "None"
|
||||
},
|
||||
{
|
||||
"id": "8fc9e8e6-c6d9-4108-bffb-2563f8b93fa1",
|
||||
"name": "attachedDeviceCH2",
|
||||
"displayName": "Connected device 2",
|
||||
"type": "QString",
|
||||
"allowedValues": ["None", "Light", "Roller Shutter Up", "Roller Shutter Down"],
|
||||
"defaultValue": "None"
|
||||
},
|
||||
{
|
||||
"id": "7dada813-d341-4c9a-bb82-e2aef128bef6",
|
||||
"name": "attachedDeviceCH3",
|
||||
"displayName": "Connected device 3",
|
||||
"type": "QString",
|
||||
"allowedValues": ["None", "Light", "Roller Shutter Up", "Roller Shutter Down"],
|
||||
"defaultValue": "None"
|
||||
}
|
||||
],
|
||||
"stateTypes": [
|
||||
{
|
||||
"id": "e6439ea4-4373-4ac1-a790-748604cf2830",
|
||||
"name": "connected",
|
||||
"displayName": "Connected",
|
||||
"displayNameEvent": "Connected changed",
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"cached": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ae845ec9-be61-4bdf-9015-4c156f937da7",
|
||||
"name": "sonoff_quad",
|
||||
|
|
|
|||
Loading…
Reference in New Issue