Im trying to do custom widgets myself in Touch Config. I've been some documentation about it, but i have some questions.
Do I need to use a specific program to compile a .js file (JavaScript)? or can i use the Tool defined in "Config"?
Futhermore, in Touch Config Panel, there is a upload button. Do I have to use it to upload the .js file where the widget is?
Hi
No special tool, notepad++ or similar will just do.
You have to zip it to tra.gz format. You can use 7zip for that.
What is important while uploading the widget ID must be unique for example here
28.02.2018, 11:29 (This post was last modified: 28.02.2018, 11:37 by JoseJimenez94.)
Thank you!
But now I have a problem. When i try to modify a widget and upload then, nothing happens.
I have tried to modify just the tittle and when i upload the .tar.gz, the widget doesn't appear (error message doesn't appear neither).
i don't understand what is happens.
I just want to do a widget of two switches (a general switch for one detector and a switch for one light, in parallel) on/off (with their status), but there is no way to get it
Or maybe there is some way to put two different widgets together?
(28.02.2018, 11:29)JoseJimenez94 Wrote: Thank you!
But now I have a problem. When i try to modify a widget and upload then, nothing happens.
I have tried to modify just the tittle and when i upload the .tar.gz, the widget doesn't appear (error message doesn't appear neither).
i don't understand what is happens.
I just want to do a widget of two switches (a general switch for one detector and a switch for one light, in parallel) on/off (with their status), but there is no way to get it
Or maybe there is some way to put two different widgets together?
Make sure that you use widget ID as Key and it is unique.
(28.02.2018, 11:29)JoseJimenez94 Wrote: Thank you!
But now I have a problem. When i try to modify a widget and upload then, nothing happens.
I have tried to modify just the tittle and when i upload the .tar.gz, the widget doesn't appear (error message doesn't appear neither).
i don't understand what is happens.
I just want to do a widget of two switches (a general switch for one detector and a switch for one light, in parallel) on/off (with their status), but there is no way to get it
Or maybe there is some way to put two different widgets together?
Make sure that you use widget ID as Key and it is unique.
Im sure. I just change the tittle (in objects), i dont change Key or nothing more. I use the same widget ID as key.
yes, when i upload your file, the widget appears.It's ok
But if i change the number 3 in 4 in the code, and i use Key: alarm_fire_alert4, it doesn't appear.
I'm using the program "Brackets", maybe it's the problem? I dont know...
yes, when i upload your file, the widget appears.It's ok
But if i change the number 3 in 4 in the code, and i use Key: alarm_fire_alert4, it doesn't appear.
I'm using the program "Brackets", maybe it's the problem? I dont know...
Remember that widget ID is in two places in JS. Make sure you changed both.
yes, when i upload your file, the widget appears.It's ok
But if i change the number 3 in 4 in the code, and i use Key: alarm_fire_alert4, it doesn't appear.
I'm using the program "Brackets", maybe it's the problem? I dont know...
Remember that widget ID is in two places in JS. Make sure you changed both.
Well, i discovered that the problem was how i was compressing the files. I used the program PeaZip and it works
Now i'm trying to use the icon "General switch" of Touch Config for my program but i'm not sure how to put into. Is there any special class to use in the template?
Someone knows if it's possible to put together (in the same widget) one general switch and another switch(light) in the app Mosaic. I'm trying to modify the templates to join them, but it doesn't work.
In Touch all the CSS and JS are grouped in to common file. CSS contain all the graphics too. If you want to modify something you have to use it.
Send me your email to PM so I will send you the files. Too big to drop here.