vinodsr / node-red-contrib-tuya-smart-device

a node-red module for managing tuya smart devices
https://flows.nodered.org/node/node-red-contrib-tuya-smart-device
MIT License
47 stars 15 forks source link

An unusual response #117

Open msillano opened 1 year ago

msillano commented 1 year ago

Not an issue, only a report. Trying a gateway (IR + Bluetooth + ZigBee), I met a PUSHed message never seen before in Tuya devices, Perfectly decoded, but NOT in the standard format.

4 May 09:18:02 - [info] [tuya-smart-device:Multimode Gateway] Data from device [event:data]: {"online":["a4c138******","a4c1383********","a4c138f******","804b50*******"],"offline":[], "nearby":["a4c138******"]}

Standard format, as I know:

msg.payload:{     
        "deviceId":    gatewayID|deviceid,   // from subdevices => "deviceId": gatewayId
        "deviceName":  name,                     // from tuya-smart-device node,
        "data": {
            "t": Math.floor( Date.now() / 1000 );       // timestamp (sec), by tuya-smart node
            "cid": deviceid;                                        // only from subdevices, mandatory
            "dps":{
                [dp]: value                               //  atomic or string or encoded, 
               ...                                              //  more than one dp in some cases
            }}}}

Nothing serious, I intercept and process it adequately (I replace it with 4 connected subdevice messages), but if custom formats were to proliferate, it would lead to confusion! Best regards. m.s.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.