Skip to content

Widget won't update status #69

@wertzui

Description

@wertzui

I have a toggle switch triple horizontal at position 7 as a group by sending the following to /nspanel/cmd/nspsend:

{
  "HMI_resources": [
    {
      "index": 7,
      "ctype": "group",
      "id": "7",
      "uiid": 3
    }
  ]
}

I've also set all the other widgets in the correct order from 1 to 8 (so the message for 7 was the 2nd to last message).

It correctly shows up on the NSPanel and when I touch "OUTLET 3", it turns on and the following message is received on /nspanel/RESULT:

{
  "NSPanel": {
    "ctype": "group",
    "id": "7",
    "params": {
      "switches": [
        {
          "switch": "off",
          "outlet": 0
        },
        {
          "switch": "on",
          "outlet": 1
        },
        {
          "switch": "off",
          "outlet": 2
        }
      ]
    }
  }
}

After a couple of seconds, the "OUTLET 3" is turned off on the screen.

I now want to manipulate the status of "OUTLET 3" through an MQTT message.
I'm sending the following to /nspanel/cmd/nspsend:

{
  "relation": {
    "ctype": "group",
    "id": "7",
    "params": {
      "switches": [
        {
          "switch": "off",
          "outlet": 0
        },
        {
          "switch": "off",
          "outlet": 1
        },
        {
          "switch": "on",
          "outlet": 2
        }
      ]
    }
  }
}

I get the following back on /nspanel/RESULT:

{
  "NSPSend":"Done"
}

However the status of "OUTLET 3" on the screen is still "off".
What do I need to change here to get it working?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions