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

Widget won't update status #69

Open
wertzui opened this issue May 27, 2024 · 0 comments
Open

Widget won't update status #69

wertzui opened this issue May 27, 2024 · 0 comments

Comments

@wertzui
Copy link

wertzui commented May 27, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant