tmorse305 Posted August 30, 2020 Posted August 30, 2020 Hi kewashi, When you import the variables can you also import the ISY ID number associated with it? It looks like you are assigning the variable number sequentially. The problem is that the ID numbers assigned on the ISY side may not be sequential. I my case I deleted a bunch of variables a while back so my state variable ID numbers run 1 through 7 and then jump to 27. See below. Thank you for all your great work on this. HousePanel # HP precision ISY ID state_1=0 prec_state_1=0 1 state_2=0 prec_state_2=0 2 state_3=0 prec_state_3=0 3 state_4=0 prec_state_4=0 4 state_5=0 prec_state_5=0 5 state_6=0 prec_state_6=0 6 state_7=0 prec_state_7=0 7 state_8=0 prec_state_8=0 27 state_9=2 prec_state_9=0 28 state_10=0 prec_state_10=0 29 state_11=1 prec_state_11=0 30 state_12=1 prec_state_12=0 31 state_13=1 prec_state_13=0 32 etc...
kewashi Posted August 30, 2020 Author Posted August 30, 2020 (edited) Yes you are right. This is a relatively easy change to make. Putting it on top of my dev queue. [EDIT] Update developed and being tested - will post this evening. So glad you noted this because it was in fact a bug because the websocket update already used the proper ISY ID and the initial tile didn’t. Now they both do. Many thanks for all the testing. Edited August 31, 2020 by kewashi Progress 2
kewashi Posted September 1, 2020 Author Posted September 1, 2020 Posted update Version 2.322 with Variables bugfix that loads the actual node ID numbers for variables. Kudos to @tmorse305 for identifying this bug. This update also implements minor error checking for Hubitat hubs.
tmorse305 Posted September 1, 2020 Posted September 1, 2020 Hi @kewashi, I updated to 2.322 which did fix the variable numbering problem, thanks for such a quick turn around! I'm trying to implement your suggestion to create a blank or custom tile with a single variable referenced. See screen shot, I did it for both a blank and custom tile, the rule is showing for the custom tile. The variable appears in the tile but I can't change the value using the arrows. The value blanks out briefly when the arrows are pressed but does not change. If I use the arrows in the variable tile the value does change in the variable tile but does not change in the blank or custom tile. Do I have the link created correctly?
kewashi Posted September 1, 2020 Author Posted September 1, 2020 9 hours ago, tmorse305 said: If I use the arrows in the variable tile the value does change in the variable tile but does not change in the blank or custom tile. Do I have the link created correctly? Yes, you did it right. Sounds like you uncovered another bug ... I tested links extensively to confirm that they stay in sync with their parent but I confess that this testing did not include an ISY variable link. As I think about how the arrows work I can see how they wouldn’t work i the custom tile because they aren’t setup as a JavaScript onclick... but the original arrow should change both. I will look into fixing both tonight. 1
kewashi Posted September 1, 2020 Author Posted September 1, 2020 (edited) Hey @tmorse305 thanks again for the debugging help. I fixed the variable bug with links and a few related bugs with other links. Update V2.325 is posted with the update. Here is a screen shot of an int and state variable linked custom tile showing that it works. Thanks again for the assistance. [EDIT] One clarification, you can only implement a RULE on the original variables tile. It unfortunately doesn't work to put the rule in a custom or blank tile that has the linked field. You have to put the rule in the original variables tile if you want it to be triggered on a variable value change. You can hide the rule so it doesn't show there so this shouldn't be a problem. I posted a minor tweak as V2.325 that includes a few other tweaks and minor very obscure bugs that hopefully you would never notice. Again - thanks for the debugging help. Edited September 2, 2020 by kewashi clarification and a tweak - updated to V2.325 1
kewashi Posted September 2, 2020 Author Posted September 2, 2020 Hi folks. I'm posting a full screen shot of my home use of HousePanel showcasing some of the latest innovations available in HousePanel. This page shows several tiles composed of linked tiles, rules, and more. The clock tile has a hidden rule that updates the weather tile by calling the "refresh" function supported by the SmartThings hub. The "Now Playing" tile is a custom tile with the song graphic and a few controls linked from that tile on another tab. The green tile on the right has several Harmony hub buttons linked into a single tile with text fields added for clarity. The Set Location Mode tile has a rule that turns the office lights off on another tab when the mode is set to away or night. This is only possible with a HP rule because the mode is in SmartThings while the office lights are in ISY - but HousePanel works across multiple hubs seamlessly. Thought this might inspire a few new users... Enjoy. Latest version 2.325 is posted on GitHub in the usual location at https://github.com/kewashi/hpserver Next up is a Polyglot install that I'm working on actively. Hope to have it soon. 1
tmorse305 Posted September 2, 2020 Posted September 2, 2020 Hi @kewashi, I think I found another issue related to running ISY programs. I noticed that the status of certain programs was not updating, see screen shot. These 2 programs trigger each other on the ISY side so that only one can be true. If you trigger away for example it forces home to be false. The away tile is not updating the status, the home tile is working. I wonder if it's related to the ISY ID? The ID for home is 0069, for away it is 006E. It looks like they're hex values, maybe you are treating them as decimal? The log is attached with the ISY debug set to true. The very last entries are related to pressing those 2 tiles. I see a reference to a program 0006 which made me wonder about the hex value. Thank you. hpserver.log
kewashi Posted September 2, 2020 Author Posted September 2, 2020 (edited) Program ID’s are handled as strings so it must be some other issue. Will investigate. curious why your away or home or night status isn’t handled with an integer variable? You could set to 1, 2, 3 for states via the programs and style the variable accordingly Edited September 2, 2020 by kewashi
tmorse305 Posted September 2, 2020 Posted September 2, 2020 (edited) On 8/23/2020 at 7:44 PM, kewashi said: Yea I noticed that too. This is the value that ISSy pushes via the websocket— I have no idea why or what the numbers signal. I considered converting 31 to true but resisted the urge. Maybe @Michel Kohanim can shed some light. I also noted that the date and time pushed via websocket is in a shorter format compared with the original node query. Have no idea why. Hi @kewashi, I found the secret decoder ring for the program status information(21/31 instead of True/False) coming from the websocket, see below. (Thank you @Michel Kohanim!) When HousePanel first starts you must gather to status information some other way, a REST call? Just curious. On the away/home question, you're right I could use a variable, the approach was a legacy one for this particular activity, long story but you're right it's a better approach. Edited September 3, 2020 by tmorse305 1
KMan Posted September 3, 2020 Posted September 3, 2020 On 9/1/2020 at 7:36 PM, kewashi said: Hey @tmorse305 thanks again for the debugging help. I fixed the variable bug with links and a few related bugs with other links. Update V2.325 is posted with the update. Here is a screen shot of an int and state variable linked custom tile showing that it works. Thanks again for the assistance. @kewashi Thanks for your quick responses! Note that the custom tile display does not get updated if the ISY Variables tile isn't present. If I put the ISY variables tile on the page, everything works great ... but if I remove that tile, the custom tile linked to it does not get updated. Everything seems to work, the variable gets updated in the ISY, and housepanel receives the notification (verified by DEBUG9) ... but the custom tile display doesn't get updated.
tazman Posted September 3, 2020 Posted September 3, 2020 I have the digital clock on my display and I just started to notice the time falls behind and the seconds stop counting regularly and makes big jumps. If I restart the browser it counts normally for a short period. I restarted the Pi computer and it is good for a short period again but not much different than restarting the browser.
kewashi Posted September 3, 2020 Author Posted September 3, 2020 2 hours ago, KMan said: tile display does not get updated if the ISY Variables tile isn't present Yes, this is a known limitation of how Links work. The linked to tile has to be on the panel somewhere. You can stick it on its own tab that you never look at and that will work just fine. 2
kewashi Posted September 3, 2020 Author Posted September 3, 2020 4 hours ago, tmorse305 said: I found the secret decoder ring for the program status information(21/31 instead of True/False) coming from the websocket, see below. (Thank you @Michel Kohanim!) When HousePanel first starts you must gather to status information some other way, a REST call? Awesome... thanks for the info! I can now without hesitation implement a translation... thanks for providing this. And yes, when the server starts I make a REST api call to the hub to obtain the initial status, which returns true and false values for status.
kewashi Posted September 3, 2020 Author Posted September 3, 2020 1 hour ago, tazman said: I just started to notice the time falls behind and the seconds stop counting regularly and makes big jumps. HousePanel by default makes lots of websocket pushes and also implements a once a second update in javascript to update the digital clock second hand, plus the analog clock does the same internal within its module to keep the second hand moving. All this is to say that some systems simply can't keep up with all of this. I recently implemented a new feature that also updates the clock and calls the rule engine once a minute so this added load may be pushing your system over the edge. I have been worried about this but never saw it manifest as a problem until now. The issue is likely only happening on your clients and not the server. Does it do this same behavior in a browser window or only on a tablet? Do you have any other app running that could be hogging cycle time? Do you have all the debug settings turned off? Did you set fast_timer or slow_timer values? If so, set them to zero on the Options page as they could be hogging cycles. If you can't get it to improve, you can change the time format to ignore seconds using the tile customizer. Edit the digital clock tile in tile customizer and set a custom TEXT field named "fmt_time" set to "h:I A" and it will only print hours and minutes AM/PM. The default fmt_time value is "h:I:S A" which includes the seconds values.
tazman Posted September 3, 2020 Posted September 3, 2020 19 minutes ago, kewashi said: HousePanel by default makes lots of websocket pushes and also implements a once a second update in javascript to update the digital clock second hand, plus the analog clock does the same internal within its module to keep the second hand moving. All this is to say that some systems simply can't keep up with all of this. I recently implemented a new feature that also updates the clock and calls the rule engine once a minute so this added load may be pushing your system over the edge. I have been worried about this but never saw it manifest as a problem until now. The issue is likely only happening on your clients and not the server. Does it do this same behavior in a browser window or only on a tablet? Do you have any other app running that could be hogging cycle time? Do you have all the debug settings turned off? Did you set fast_timer or slow_timer values? If so, set them to zero on the Options page as they could be hogging cycles. If you can't get it to improve, you can change the time format to ignore seconds using the tile customizer. Edit the digital clock tile in tile customizer and set a custom TEXT field named "fmt_time" set to "h:I A" and it will only print hours and minutes AM/PM. The default fmt_time value is "h:I:S A" which includes the seconds values. Thanks for the reply kewashi. I run the client and server on the same machine which is a Pi 4 with 4 G of ram and the only other thing it does is runs one video feed on the sub setting. I have noticed the clock 2 minutes slow at times. I don't know about the debug settings I just use the command to start the server but the slow timer was set to 300000 so I put that to 0 and I will see if that fixes it.
kewashi Posted September 4, 2020 Author Posted September 4, 2020 (edited) On 9/2/2020 at 11:11 AM, tmorse305 said: I wonder if it's related to the ISY ID? The ID for home is 0069, for away it is 006E. It looks like they're hex values, maybe you are treating them as decimal? Dude... you were so right. I forgot that I assumed they were integers. I am working on a fix... stay tuned, and thanks so much. [EDIT] Fixed in update posted tonight in V2.326 This update also exposes by default several new Program Tile fields, including: "enable, disable, status, enabled, runAtStartup". As usual these can be hidden with the Tile Editor or more easily by editing the customtiles.css file and uncommenting the lines that would otherwise hide them - they are near the bottom of the file. You can also paste those lines into your customtiles.css file Thanks again @tmorse305 for finding this bug. It was quite obscure and I doubt I would have stumbled upon it without your help. Edited September 4, 2020 by kewashi posted fix 1
kewashi Posted September 4, 2020 Author Posted September 4, 2020 (edited) On 9/3/2020 at 12:57 AM, tazman said: I run the client and server on the same machine which is a Pi 4 rPI's are terribly inefficient at running a video screen so that is taking up all your cycles and preventing the HP clock from keeping up. I wish there was a better answer. For my own setup I run my panel on some Amazon Fire Tablets using Kiosk Fully Browser and it works like a champ. I do all my testing running HP on my dev windows desktop. My server runs on a rPI and it handles the load fine because it isn't trying to push graphics to a video screen at the same time. By the way, I would change the slow timer back to 300000 because this isn't the problem. That setting just forces all your devices to get refreshed once every 5 minutes. Edited September 4, 2020 by kewashi 1
tazman Posted September 5, 2020 Posted September 5, 2020 I tried the latest version 2.326 with just the clocks on afresh install and the time still will not stay in sync. Unfortunately 2.314 is the newest that keeps the time right with everything running but that does not have the update for inserting the characters after my temperatures.
tmorse305 Posted September 5, 2020 Posted September 5, 2020 On 9/3/2020 at 10:24 PM, kewashi said: As usual these can be hidden with the Tile Editor or more easily by editing the customtiles.css file and uncommenting the lines that would otherwise hide them - they are near the bottom of the file. You can also paste those lines into your customtiles.css file I loaded 2.326 and it fixed the program issue, thank you! Your comment above suggests there is a customtiles.css file on Github but I don't see one. I do have one on my RPi but it sounds like there is a 2nd one somewhere.
kewashi Posted September 5, 2020 Author Posted September 5, 2020 1 hour ago, tmorse305 said: I do have one on my RPi but it sounds like there is a 2nd one somewhere There is not one in GitHub. It is created when yo first run the app. All edits you make in the TileEditor gets saved here and it just grows and grows over time. It is a good place to put custom CSS because it won't get overridden by future HP updates since it is unique to your own installation. 1
kewashi Posted September 5, 2020 Author Posted September 5, 2020 2 hours ago, tazman said: Unfortunately 2.314 is the newest that keeps the time right with everything running but that does not have the update for inserting the characters after my temperatures. Very strange but thanks for the detailed info - it will help me track down what is going on. I am not seeing this but who knows what could be wrong... I will stay in touch.
tazman Posted September 5, 2020 Posted September 5, 2020 8 hours ago, kewashi said: Very strange but thanks for the detailed info - it will help me track down what is going on. I am not seeing this but who knows what could be wrong... I will stay in touch. Having the new version with just the clocks on it I also noticed it is just the digital clock the analog one keeps running on time. It also does it on a remote tablet and laptop.
tmorse305 Posted September 6, 2020 Posted September 6, 2020 (edited) Hi @kewashi, I want to move Housepanel to a different RPi. I have HP up and running on the new RPi, the hubs are authorized. Can I move file(s) from the old to the new to preserve all the work I have created? I assume customtiles.css is one but I suspect other's are needed too. Thank you. Edited September 6, 2020 by tmorse305
kewashi Posted September 6, 2020 Author Posted September 6, 2020 (edited) Hey @tmorse305 you can move all the css files in your skin folders as well as your hm*.cfg files in the main folder. Just ensure your port setting is correct. EDIT - thought I would elaborate. The following files are needed to preserve your look and feel: - hmoptions.cfg — main config file with hub auth info and all custom links and rules. Edits made in the tile configurator are here - hm_default.cfg — config file for user “default”. Repeat for any other user you have defined. This file has the room and tile configuration for this user. Each user can have a unique config. - skin-housepanel/customtiles.css — all the custom edits made in the tile editor are here. if you already authorized hubs you should manually merge your hmoptions.cfg files. Edited September 7, 2020 by kewashi 1
Recommended Posts