KSchex Posted December 26, 2016 Posted December 26, 2016 I have an 8-scene (button) mini remote keypad that is used to command various lamps. All 8 addresses are displayed on the "Devices" page with status and ON/OFF pushbuttons. I would like to hide these 8 lines of this device. I also have several Hidden Door Sensors and Open/Closed Sensors that have status and ON/OFF buttons displayed. The ON/OFF buttons make no sense in my system. Is there a way to get rid of only the associated ON/OFF buttons? Any ideas, where to begin, code, etc. would be appreciated. Thanks...Keith
bmercier Posted December 26, 2016 Posted December 26, 2016 I have an 8-scene (button) mini remote keypad that is used to command various lamps. All 8 addresses are displayed on the "Devices" page with status and ON/OFF pushbuttons. I would like to hide these 8 lines of this device. I also have several Hidden Door Sensors and Open/Closed Sensors that have status and ON/OFF buttons displayed. The ON/OFF buttons make no sense in my system. Is there a way to get rid of only the associated ON/OFF buttons? Any ideas, where to begin, code, etc. would be appreciated. Thanks...Keith Are you using your own installation of HAD? Or are you using ISY Portal or the Firmware version? If you are using the firmware version or ISY Portal version, there is currently no way to hide them. If you host it yourself, then you can setup your own device table, and just include the devices that you want. Benoit.
KSchex Posted December 26, 2016 Author Posted December 26, 2016 Are you using your own installation of HAD? Or are you using ISY Portal or the Firmware version? If you are using the firmware version or ISY Portal version, there is currently no way to hide them. If you host it yourself, then you can setup your own device table, and just include the devices that you want. Benoit. Hi Benoit...I am hosting external to ISY. I am working on my device table but ran into a problem. I am trying to run a program that turns on two ON/OFF switches. Program runs in the "Programs" tab but not in my customizable tab. This is what I have in the table: { location: "Lights", list : [ { name : "All_Lts_ON", typeControl:"Pgm", program:"All_Lts_ON", refreshOpt:"Pgm" }, { name : "Rm 3 Light" }, { name : "Rm 1 Light" } ]} Any recommendations...Thanks..Keith
bmercier Posted December 26, 2016 Posted December 26, 2016 Hi Benoit...I am hosting external to ISY. I am working on my device table but ran into a problem. I am trying to run a program that turns on two ON/OFF switches. Program runs in the "Programs" tab but not in my customizable tab. This is what I have in the table: { location: "Lights", list : [ { name : "All_Lts_ON", typeControl:"Pgm", program:"All_Lts_ON", refreshOpt:"Pgm" }, { name : "Rm 3 Light" }, { name : "Rm 1 Light" } ]} Any recommendations...Thanks..Keith Your syntax looks correct. Make sure your program is named All_Lts_ON with the same capital letters and underscores. Alternatively, you can use the program ID to refer to your program, instead of the name. This is actually preferred. Example: { name : "All_Lts_ON", typeControl:"Pgm", programId:"0001", refreshOpt:"Pgm" }, To find out your program ID, use the following URL: http://<yourISY>/rest/programs/?subfolders=true Benoit
KSchex Posted December 26, 2016 Author Posted December 26, 2016 Your syntax looks correct. Make sure your program is named All_Lts_ON with the same capital letters and underscores. Alternatively, you can use the program ID to refer to your program, instead of the name. This is actually preferred. Example: { name : "All_Lts_ON", typeControl:"Pgm", programId:"0001", refreshOpt:"Pgm" }, To find out your program ID, use the following URL: http://<yourISY>/rest/programs/?subfolders=true Benoit I used the Rest command and changed it to programid:"0017", still nothing. It works on the "programs" tab when I press the THEN button, but not the customized tab. Would the buttons have something to do with it? The custom says on off but the programs tab says then/else. Thanks again..
bmercier Posted December 27, 2016 Posted December 27, 2016 I used the Rest command and changed it to programid:"0017", still nothing. It works on the "programs" tab when I press the THEN button, but not the customized tab. Would the buttons have something to do with it? The custom says on off but the programs tab says then/else. Thanks again.. Try with programId:"0017" (Capital i) If it still does not work, look at the browser console and see if you have a javascript error. Benoit.
KSchex Posted December 27, 2016 Author Posted December 27, 2016 Thanks for the help...looks like there must have been some hidden characters (?). I finally deleted the line and retyped it from scratch using the programId and it worked. I have a couple of other HAD questions....should I pose these in an email to support? Thanks again, Keith
bmercier Posted December 27, 2016 Posted December 27, 2016 Thanks for the help...looks like there must have been some hidden characters (?). I finally deleted the line and retyped it from scratch using the programId and it worked. I have a couple of other HAD questions....should I pose these in an email to support? Thanks again, Keith Here is a good place for questions, as this can benefit others as well. Others can also chime in. Benoit
KSchex Posted December 28, 2016 Author Posted December 28, 2016 Is there a way to not display the 0/255 and ON/OFF buttons on a hidden switch? Ultimately I would like to just display OPEN/CLOSED. Thanks...Keith
bmercier Posted December 30, 2016 Posted December 30, 2016 Is there a way to not display the 0/255 and ON/OFF buttons on a hidden switch? Ultimately I would like to just display OPEN/CLOSED. Thanks...Keith You can change the ON/OFF buttons so they display something else: Just add: labelOn:"OPEN", labelOff:"CLOSE" If you want to hide the buttons, add: hideControls:"Yes" If you want to hide the device status, just use a non-existent device: name:"" But you will want the buttons to control something, so override the device to control using: control:"<your device>" Benoit
KSchex Posted January 1, 2017 Author Posted January 1, 2017 Hi Benoit, Thanks for the reply. I don't think I clear in what I asked, one answer leads to more questions: - Is there a recommended way to breakpoint the code and/or display a javascript variable? - I would like to, within the web program, be able to retrieve the raw status of specific devices for manipulation and display operations. Can you recommend where and how I should do this? I do not want this logic within the ISY. I am trying desperately to understand the detailed inter-workings (data retrieval and display) of HAD. I have downloaded all the HAD samples and documents posted, in an effort to understand the data structures and access. Any additional detail charts or documents that can help would be appreciated. Thanks and Happy New Year, Keith
bmercier Posted January 1, 2017 Posted January 1, 2017 Hi Benoit, Thanks for the reply. I don't think I clear in what I asked, one answer leads to more questions: - Is there a recommended way to breakpoint the code and/or display a javascript variable? - I would like to, within the web program, be able to retrieve the raw status of specific devices for manipulation and display operations. Can you recommend where and how I should do this? I do not want this logic within the ISY. I am trying desperately to understand the detailed inter-workings (data retrieval and display) of HAD. I have downloaded all the HAD samples and documents posted, in an effort to understand the data structures and access. Any additional detail charts or documents that can help would be appreciated. Thanks and Happy New Year, Keith Hi Keith, Here's a page to get you started with debugging web applications: http://www.w3schools.com/js/js_debugging.asp Personnally, I've used extensively console.log() to log variable to the browser console, and not so much the debugger. HAD does not keep an internal structure, except for the device table (deviceList). Normally your customizations should be in custom.js. At the top of the file, there's a few variables at the top that controls what gets loaded at page load time (config, devices, variables, programs). Then, you have a few hooks you can use to work with the data loaded: UDFconfigLoaded UDFdevLoaded UDFvarsDefLoaded UDFpgmLoaded You can use these to initialize something else in the UI. Alternatively, in real time, you may want to retrive the status of a device. In that case, you can use a function like: deviceGetStatusByAddress() Example: deviceGetStatusByAddress('<device address>') .done(function(status) { // Do what you want with the status, like update a field }); Hope that helps Benoit
Recommended Posts
Archived
This topic is now archived and is closed to further replies.