Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An unusual response - 2 #129

Open
msillano opened this issue Aug 8, 2023 · 1 comment
Open

An unusual response - 2 #129

msillano opened this issue Aug 8, 2023 · 1 comment
Labels
wontfix This will not be worked on

Comments

@msillano
Copy link

msillano commented Aug 8, 2023

This time the anomalous response is again provided by a gateway, but this time a BLE gateway (model ZXGWS-04).

The format is as follows:

payload:{
    deviceId: "123456789",
    deviceName: "BLE MESH(SIG)Gateway",
    data: {
        reqType: "subdev_online_stat_report",
        data: {
             offline: [ "987654321"]
    }}}

It is a new format, which differs from the previous one (see ISSUE#117).


Workaround:

A 'function node' acts like a filter:

if (typeof msg.payload.data.reqType  != "undefined") {
     msg.payload.data['dps'] = {
          [msg.payload.data.reqType]:msg.payload.data.data
           }  }
return msg;

producing a standard output message:

msg.payload:{     
       deviceId: "123456789",
       deviceName: "BLE MESH(SIG)Gateway",
       data: {
            "dps":{
                "subdev_online_stat_report": {
                       offline: [ "987654321"],
                       ...
                       }
            }}}

that uses the ad-hoc "subdev_online_stat_report" DP, having as value an object.

@stale
Copy link

stale bot commented Oct 15, 2023

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 stale bot added the wontfix This will not be worked on label Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant