Commit 369824e2250c9392e0e9368a3f57ae64ae0a8058
1 parent
80b2b412
fix: send command to the gateway device
Showing
1 changed file
with
13 additions
and
8 deletions
... | ... | @@ -13820,15 +13820,20 @@ class HandleDataInteraction { |
13820 | 13820 | method: "methodThingskit", |
13821 | 13821 | params: JSON.parse(value), |
13822 | 13822 | } |
13823 | - if (slaveDeviceId) { | |
13824 | - queue.push(() => { | |
13825 | - fn(way, slaveDeviceId, data) | |
13826 | - }) | |
13827 | - } else if (deviceId) { | |
13823 | + if (deviceId) { | |
13828 | 13824 | queue.push(() => { |
13829 | 13825 | fn(way, deviceId, data) |
13830 | 13826 | }) |
13831 | 13827 | } |
13828 | + // if (slaveDeviceId) { | |
13829 | + // queue.push(() => { | |
13830 | + // fn(way, slaveDeviceId, data) | |
13831 | + // }) | |
13832 | + // } else if (deviceId) { | |
13833 | + // queue.push(() => { | |
13834 | + // fn(way, deviceId, data) | |
13835 | + // }) | |
13836 | + // } | |
13832 | 13837 | } |
13833 | 13838 | |
13834 | 13839 | Promise.all(queue.map(fn => fn())) |
... | ... | @@ -13942,9 +13947,9 @@ class HandleDataInteraction { |
13942 | 13947 | method: "methodThingskit", |
13943 | 13948 | params: data, |
13944 | 13949 | } |
13945 | - if (slaveDeviceId) { | |
13946 | - deviceId = slaveDeviceId | |
13947 | - } | |
13950 | + // if (slaveDeviceId) { | |
13951 | + // deviceId = slaveDeviceId | |
13952 | + // } | |
13948 | 13953 | |
13949 | 13954 | const [err, res = []] = await to(ConfigurationNodeApi.deviceIsOnLine(deviceId)) |
13950 | 13955 | const { value: onlineFlag } = res[0] || {} | ... | ... |