Thanks again for the manual install instructions worked great. Really like your app and have used it for a number of items.
I ran into a problem building a Weather Tile 2. After initial setup and use, I slowly modified or added items to the default view. Got 95% done and then got the following log error:
2021-01-16 10:54:35.257 am errorjava.lang.NullPointerException: Cannot get property 'parse_func' on null object on line 1554 (getGraph)
At that point it looked like I lost all my work since the tile only showed an error message. It's nice to have source code! I worked around the issue by surrounding the offending code with a try / recover. The tile then showed two elements I had tried to create a while before this happened. They were "visibility" elements and nothing seemed to show up after each attempt to create them. With the fix they showed up over another tiles still with no data, but I was able to delete them and things have worked since.
I did not take the time to really understand your code, just did a quick workaround, I am sure you can do better. Here is my quick fix:
Another thing seemed strange when customizing the elements (sub tiles). When I tried to replace the icon on the existing tile with no icon "x", it showed the x in place of the icon in the finished tile. Is this a bug or am I doing something wrong?
@Jost, I have your requests on my backlog. It should be about a week to address them. (I am currently in learning mode and on the cusp of releasing a self-generating Denon AVR driver)...I believe #1 is doable, #2 I can look into (there is quite a bit of logic to try to "force fill", #3 - See #2. #4 is simple.
Limits? There are none! Seriously though... see below.
The warning you see is per device on that graph. It estimates the number of points to aid in display. For example, if your graph (displayed) is 200 pixels wide, it makes no sense to display 1000 points. Google Charts (the underlying API) just averages down. By lowering the number of points you can set the combine function (min, max, mean, mid, sum) and have it function correctly.
LTS is a solution to help aid in some ... weaknesses Hubitat has. Since the early days, the have (needfully) reduced the number of stored events. This has drastically improved hub performance, but took away the ability to store up to 2000 points; by default. A user can still adjust the device to store more at the expense of performance.
LTS allows the user to store off a vast number of events and support displaying a graph for weeks (if that is what you want). As an example, my temperature graph produces 2000 events (Hubitat max) in 2 days. If I want a week long graph, then I will need LTS.
Finally, LTS strength is that it stores as much as you need WITHOUT affecting the database performance. It's weakness... if you reconfigure or reset, you loose all the stored data. (I am waiting with great anticipation for filesystem storage access).
*Access LTS from the setup screen on Time Graphs.
@oliver9, Added another fix for your specific issue. I am not sure why your date-timestamp is unique, but this fix should do it. Sorry it took a month.
Thanks for taking a look. Yes; the issue that you are seeing is known (to me) and one of the weaknesses of the "Hubitat" way of saving preferences to the app. The long explanation is this:
The entire design is based on the design tool updating preferences after each change.
Anytime you make an update, the design tool "sends" text to the app that stores it.
Once the data is stored, the app refreshes.
Part of the refresh is to updates the design tool
If everything goes off well, no issues. If steps 1-4 take too long and the user starts to make another change, things can get out of sync. When things get out of sync, you see symptoms like you observed. I have a weather tile with over 60 elements. It took 1/2 hour to build since I had to wait up to a minute for the refresh...
I am looking at a way to manually "save" things. That way you can go crazy and not update until you are ready. The disadvantage here is that you won't see "actual" data (for sizing and other features) until updating....
That sounds good to me. Perhaps you can solve two or three problems at once :). I suspect the following would be too much work but here goes. How about having a text interface sort of like you have with apps and drivers, or perhaps something like "Layout" in dashboard. Perhaps add an export feature that outputs a textual description of the current graph app. The user could mod, and then import it back. You would do syntax checking etc. on the import. This could be used for graph backup, and also an easy way to duplicate graphs.
Ok, I know that unless you are already headed that direction, that's a lot work.
Back to you idea, if you can put the app into a delayed accept mode that would be something I would likely use.
Okay, I took your ideas into account. In the end I was able to make thing easier than I thought. I have made the following changes
Adding/Moving/Deleting Tiles will save immediately
Formatting/Icons are still saved by clicking the green save icon
The tiles no longer try to update the Weather Data/Decimals/Centering until either 1) the page is refreshed OR 2) You double click and choose a new icon I put in the menu.
When you click the new "refresh cloud icon" I change the cursor to "wait" until it is done refreshing.
Give it a try and please let me know what you think.