mirror of
https://github.com/lehanspb/tuya-mqtt.git
synced 2025-12-16 09:44:36 +00:00
Added friendly topics for the devices behind gateway
You can now use: tuya/gw1/lv/dps/2/command instead of tuya/zgw1/2342cd828dfsxckkk/dps/2/command
This commit is contained in:
@@ -31,7 +31,6 @@ async function processExit(exitCode) {
|
||||
}
|
||||
|
||||
// Get new deivce based on configured type
|
||||
// For Tuya Gateway use GenericDevice
|
||||
function getDevice(configDevice, mqttClient) {
|
||||
const deviceInfo = {
|
||||
configDevice: configDevice,
|
||||
@@ -166,6 +165,11 @@ const main = async() => {
|
||||
const dpsKey = splitTopic[topicLength-2]
|
||||
device.processDpsKeyCommand(message, dpsKey)
|
||||
break;
|
||||
case 6:
|
||||
const subDevDpsKey = splitTopic[topicLength-2]
|
||||
const cidName = splitTopic[topicLength-4]
|
||||
device.processDpsKeyWcidNameCommand(message, subDevDpsKey, cidName)
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user