Posts: 17
Threads: 3
Joined: May 2017
Reputation:
0
Hello, guys.
I want to know if there´s a limit for the number of widgets in a project.
I have a project wich integrates more than 1000 Dali ballasts and the client need to have the possibilitie of individual control of them. My idea consists in selecting the ballast by a click and than show it´s controls and info in a determinated area of the workspace.
Widgets seems to be the perfect solution for this case. So, will SpaceLynk support a high number of widgets?
BR,
Jefferson Campos
Posts: 232
Threads: 57
Joined: May 2018
Reputation:
3
Then it altso would be nice to have the possibility to sort all your 1000 widgets alfabetically og something like that. Is this possible now?
BR
Kai-Roger
Posts: 4643
Threads: 24
Joined: Aug 2017
Reputation:
207
(22.11.2018, 12:13)suporte.arqtech Wrote: Hello, guys.
I want to know if there´s a limit for the number of widgets in a project.
I have a project wich integrates more than 1000 Dali ballasts and the client need to have the possibilitie of individual control of them. My idea consists in selecting the ballast by a click and than show it´s controls and info in a determinated area of the workspace.
Widgets seems to be the perfect solution for this case. So, will SpaceLynk support a high number of widgets?
BR,
Jefferson Campos
Hm, technically would do but 1000 widgets means X x 1000 objects which can be a problem if not well designed. If you have HW 3.0 then it might handle. If you put all on KNX TP then I'm more than sure it will not as bus wont handle it.
------------------------------
Ctrl+F5
Posts: 17
Threads: 3
Joined: May 2017
Reputation:
0
They will be divided in several lines, the SL will be on the main line wich has no other devices. I´ll let only the necessary information go to SL (like fault, switch, valor and status).
Posts: 940
Threads: 161
Joined: Jul 2015
Reputation:
33
Could you describe what kind of control you try create for every lamp? How this widget will look and how you will open it? There are a few methods how to do this without creating 1000 widgets.
Done is better than perfect
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
22.11.2018, 21:03
(This post was last modified: 23.11.2018, 08:34 by Erwin van der Zwart.)
Hi,
Why don’t you just create 1 widget with a value box for setting the GW 1 to xx and a value box with EVG nr. Under this you create a slider and a on/off button.
Then you can handle the rest in a single script..
Code: GW = grp.getvalue('1/1/1')
EVG = grp.getvalue('1/1/2')
if event.dst == '1/1/3' then -- bit value
grp.write('2/' .. GW .. '/' .. EVG, event.getvalue())
elseif event.dst == '1/1/4' then -- byte value
grp.write('3/' .. GW .. '/' .. EVG, event.getvalue())
end
This way the user just selects the GW and EVG by selector and the 2 elements control the selected EVG
BR,
Erwin
Posts: 71
Threads: 11
Joined: Jan 2016
Reputation:
1
(22.11.2018, 21:03)Erwin van der Zwart Wrote: hHi,
Why don’t you just create 1 widget with a value box for setting the GW 1 to xx and a value box with EVG nr. Under this you create a slider and a on/off button.
Then you can handle the rest in a single script..
Code: GW = grp.getvalue('1/1/1')
EVG = grp.getvalue('1/1/2')
if event.dst == '1/1/3' then — bit value
grp.write('2/' .. GW .. '/' .. EVG, event.getvalue())
elseif event.dst == '1/1/4'' then — byte value
grp.write('3/' .. GW .. '/' .. EVG, event.getvalue())
end
This way the user just selects the GW and EVG by selector and the 2 elements control the selected EVG
BR,
Erwin
Hi Erwin,
Great ! There are small errors on lines 3 (-- bit value) and line 5 ('1/1/4')
Do you have a solution to display string in the same time, along with GW and EVG numbers ?
B.R,
Chouaibou.
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
23.11.2018, 08:49
(This post was last modified: 23.11.2018, 08:53 by Erwin van der Zwart.)
Hi,
Yes i noticed the error (and corrected them), i should stop posting from iPhone, it doesn't work smooth (:
What do you mean by string? What should it display?
You could add this to display the group address name of the controlled EVG by a separate script attachted to the selection box events :
Code: GW = grp.getvalue('1/1/1')
EVG = grp.getvalue('1/1/2')
grp.update('1/1/4', 'Selected EVG = ' .. grp.find('2/' .. GW .. '/' .. EVG).name)
BR,
Erwin
Posts: 71
Threads: 11
Joined: Jan 2016
Reputation:
1
(23.11.2018, 08:49)Erwin van der Zwart Wrote: Hi,
Yes i noticed the error (and corrected them), i should stop posting from iPhone, it doesn't work smooth (:
What do you mean by string? What should it display?
You could add this to display the group address name of the controlled EVG by a separate script attachted to the selection box events :
Code: GW = grp.getvalue('1/1/1')
EVG = grp.getvalue('1/1/2')
grp.update('1/1/4', 'Selected EVG = ' .. grp.find('2/' .. GW .. '/' .. EVG).name)
BR,
Erwin
Hi Erwin,
That exactly what I mean by string, group address name.
B.R,
Chouaibou.
Posts: 17
Threads: 3
Joined: May 2017
Reputation:
0
(22.11.2018, 21:03)Erwin van der Zwart Wrote: Hi,
Why don’t you just create 1 widget with a value box for setting the GW 1 to xx and a value box with EVG nr. Under this you create a slider and a on/off button.
Then you can handle the rest in a single script..
Code: GW = grp.getvalue('1/1/1')
EVG = grp.getvalue('1/1/2')
if event.dst == '1/1/3' then -- bit value
grp.write('2/' .. GW .. '/' .. EVG, event.getvalue())
elseif event.dst == '1/1/4' then -- byte value
grp.write('3/' .. GW .. '/' .. EVG, event.getvalue())
end
This way the user just selects the GW and EVG by selector and the 2 elements control the selected EVG
BR,
Erwin
Hello, that´s a very interesting way to do it, I really didn´t think out this idea...
Thanks.
Posts: 237
Threads: 31
Joined: May 2018
Reputation:
2
Hello,
I would like to do something similar but without having to enter the address manually.
I have a visualization with a lot of blinds (I visualize the state) and what I want is to make a general widget for all these blinds.
I want this: When I click on the status icon, open the widget and update a table that I read when using the icons inside the widget.
I do not know how to execute a script using javascript when I click on the shutter status icon that reads the group address of that icon. All these icons would have the same class.
Thanks
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
17.12.2018, 23:03
(This post was last modified: 25.06.2019, 19:07 by Erwin van der Zwart.)
Hi,
Should be possible with this custom JS:
Code: $(function(){
// Declare vars
var MainObject = "0/0/0";
var StatusObject = "0/0/0";
var MainObjectSplitted = [];
var StatusObjectSplitted = [];
// Detect adresses linked to widget button and create arrays
$(".screen_widget").on("click", function(e) {
MainObject = $(this).data("object");
StatusObject = $(this).data("status-object");
if (typeof(MainObject) !== 'undefined') {
MainObjectSplitted = MainObject.split("/");
}
if (typeof(StatusObject) !== 'undefined') {
var StatusObjectSplitted = StatusObject.split("/");
}
});
function removelistener(src) {
var el = $(src) // source element reference
, addr = el.data('status-object') // group address of status object
, id = Scada.encodeGroupAddress(addr) // address to id
, obj = objectStore.objects[ id ]; // get object's store reference
if (obj) {
// find listener that is attached to the source element
$.each(obj.listeners, function(index, listener) {
// remove the listener
if (listener.bind.el && el.is(listener.bind.el)) {
obj.listeners.splice(index, 1);
}
});
}
}
// Remove original events from up button on widget
$(".screen_widget_up")
.off("vclick")
.on("vmousedown", function() {
var btnthis = $(this), objthis = btnthis.data("object")
removelistener(btnthis);
})
// Add new action to button
.on("vclick", function() {
var newaddressup = (Number(MainObjectSplitted[0])+0) + "" + (Number(MainObjectSplitted[1])+1) + "" + (Number(MainObjectSplitted[2])+0)
grp.write(newaddressup, true);
}
);
// Remove original events from down button on widget
$(".screen_widget_down")
.off("vclick")
.on("vmousedown", function() {
var btnthis = $(this), objthis = btnthis.data("object")
removelistener(btnthis);
})
// Add new action to button
.on("vclick", function() {
var newaddressdown = (Number(MainObjectSplitted[0])+0) + "" + (Number(MainObjectSplitted[1])+1) + "" + (Number(MainObjectSplitted[2])+0)
grp.write(newaddressdown, false);
}
);
});
BR,
Erwin
Posts: 237
Threads: 31
Joined: May 2018
Reputation:
2
Thanks! It Work Perfectly.
Another question:
I want to add a byte button that send shutter value (with circular bar or linear bar), not fixed value. But when I add the class with the same java script code, the value icon don´t open value bar in widget.
Can you help me?
Thanks
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
Hi,
I don’t fully understand what you are trying to do..
Can you eleborate?
BR,
Erwin
Posts: 237
Threads: 31
Joined: May 2018
Reputation:
2
Hi, sorry for my english level..
I want to include a "in line" slider or circular button in the widget, the same that apear whhen you put a byte object icon.
This slider will have "35/7/3" group adress.
When I write a value in this slider, i want to read it and send it to the corresponding shutter adress
|