ioBroker / ioBroker.vis-2

Next generation visualisation for ioBroker platform.
Other
29 stars 4 forks source link

vis2.x: servConn.setState() does no longer work #55

Open ice987987 opened 1 year ago

ice987987 commented 1 year ago

Describe the bug
servConn.setState('', '') does not work

To Reproduce
import following widget:

[
  {
    "tpl": "tplHtml",
    "data": {
      "refreshInterval": "0",
      "g_common": true,
      "html": "<div onclick=\"servConn.setState('0_userdata.0.test.boolean', true)\">I am a button (boolean)</div>\n<div onclick=\"servConn.setState('0_userdata.0.test.number', 12)\">I am a button (number)</div>\n<div onclick=\"servConn.setState('0_userdata.0.test.string', 'blablablubb')\">I am a button (string)</div>"
    },
    "style": {
      "left": "100",
      "top": "100",
      "width": "400",
      "height": "100"
    },
    "_id": "i000001"
  }
]

Expected behavior
allow to set DP's from vis (same as in vis1.x)

Versions:

MuesliP commented 8 months ago

Hi All, Is there an update on this topic? I am currently trying to switch from VIS1 to VIS2 and have unfortunately noticed that servConn.getStates no longer works. vis.setValue works perfectly. I use the HTML basic widget a lot and run JavaScript code in combination with HTML and CSS. Thanks for any hints/tips!