[APP][Pro] NEW: Dashboard Studio - A completely free-form dashboard designer

I was trying this, but don’t think I can achieve what I had in mind.
I hoped that I could connect the autoscale maximum of the y-axis to a topic, but this is not possible. The graph either uses auto max, or works with a manual value.

Let me explain what I want to achieve:

  • Have in one graph the total powerconsumption of my home and the production of he solar panels.
  • I do this by staking two graphs on top of eachother (you cannot have two variables/measurements in the same graph)
  • I would like to adjust the max and min of the y-axis based on the maximum and minimum of one of the two graphs (highest and lowest value)

Maybe I misunderstood this remark:

And then inside a homey flow create a comparison of the highest values and send it to the graph.

Does this mean that it somehow should be possible to compare in Homey the autoscale max of two (or more) graphs and return the maximum of one of those to all the graphs back to Dashboard Studio?
If so: how could I do this?

@Satoer Very impressive! All those new options you developed and the short time in which you did it…

One small thing I noticed about the gauge is the distance between the ticks and the labels. This is larger at the top than at the bottom. Is this due to a combination of settings I did?


If there is no solution for this, it might be worth considering allowing the labels to rotate along with the track.

I understand the issue. The simplest fix is manually tracking peak values. When power exceeds your stored variable, overwrite it and reset the value nightly. Compare all sources this way to find the highest peak.

Something like [power is changed] => power is more than [variable] => Overwrite [variable] with power.
And reset [variable] every night.

I would prefer calculations to happen outside Dashboard Studio. Perhaps I can modify the THEN insight card to output minimum, maximum, and average values. Ill let this brew a bit in my head.

I personally crammed 5 graphs into one and I gave each their own scale:

I use a fixed 31-hour window from midnight until 6:00 AM the following day. This allows me to monitor overnight activity and review the previous night’s data the next morning.

I build the graph tables myself. My hourly consumption data follows this format:

{“0”:1.232,“1”:0.543,“2”:4.929,“3”:5.114,“4”:5.131,“5”:5.086,“6”:0.452,“7”:0.51,“8”:-3.925,“9”:-4.034,“10”:-3.412,“11”:0.916,“12”:0,“13”:0,“14”:0,“15”:0,“16”:0,“17”:0,“18”:0,“19”:0,“20”:0,“21”:0,“22”:0,“23”:0,“24”:0,“25”:0,“26”:0,“27”:0,“28”:0,“29”:0,“30”:0}

A Homey flow updates the relevant hour every five minutes:

One script assigns values to the correct hour while another identifies the peak value. Because the timeline extends past hour 24 into hours 25 through 30, a reset script copies those values back into slots 0 through 6 each morning.

Thin red bar graph lines show consumption, turning dark green when returning power to the grid. The red number 5.13 indicates 5.13 kW. The green line graph represents solar power, currently peaking at 544W. Thick white/grey bars represent dynamic tariffs starting at a 17ct base (This is the tax-rate base). Green and red squares indicate battery charging and discharging. The hour labels at the bottom is also a separate text-based graph. (with just 0,2,4,6,8,…)

While this layout is complex, it provides for me an immediate and clear overview. It has even a WAF stamp :rofl: (The Wife Acceptance Factor) I could merge solar and consumption onto one scale or use calculated peaks for the max settings, but I prefer individual scales for now. Note: I haven’t updated this dashboard since before the Homey release, so it definitely needs some love haha. “The shoemaker’s children go barefoot”. I’ve been way too busy developing the software instead of actually use it! :joy:

1 Like

Nice inspiration and thank you again for taking the time to explain en think along!

Good suggestion to track min/max from Homey side. I have not had a use case yet to use Homey script, but this could be a good reason to start with that.

Up till now I used Grafana for visualisation of data stored in InfluxDB. So for making hourly totals etc. I need to find out what works best.

# New TEST version V1.3.2!

Fixed the distance problem and added optional rotating labels:

Old version:

New version:

I have added a special Advanced flow card that also has the Highest value, Lowest Value, Average value and the raw graph data inside tags.

Now it easy to extract the highest value, compare it with other graphs and send it to the “Manual Max” property. Or dump the raw data inside a Homeyscript and do whatever you want with it.

I have added a “lock” option, now widgets can be locked so it can not be moved or changed.

Full 1.3.2 changelog

Very nice, that will help a lot. Great how you take along user input so quick.

And the lock function is a nice addition too, great work!

1 Like

Thanks! I’m a freelancer and currently between projects, so I actually have the time to work on development full-time. Well, more than full-time if you include the evenings too haha. I’m trying to keep up with all the suggestions to prevent the list from growing too big.

1 Like

Very nice, that will help a lot. Great how you take along user input so quick.

And the lock function is a nice addition too, great work!

Played around a bit with it. Looks promising.
So what happens is:

  • You can set in DS a manual max for a graph or couple the max to a topic in Homey
  • Independend of this, DS sends back the actual maximum of the current data uploaded.
  • Tested it with a manual max in the graph of 100 while the data has lets say a max of 2000. The shown max of the graph in DS stays 100, and the flowcard returns the correct 2000. So this wil allow to compare and adjust based on calculations in Homey

Now I need to figure out how to get nice results starting on a whole hour from the existing insights. The setting “last 24 hours seem to be the current time - 24 hours”. So now (20:55) it will start with 20:55 yesterday. But would like to start either at 20:00 yesterday or 21:00 yesterday.

Or maybe I should start using Hoey Script for that :slight_smile:

By the way: donated again something for coffee or another drink. Enjoy!

Isn’t this a bit strange?

Is use this flow:

And get this graph:

There seems to be something off with the x-axis values. The only setting I can find to infuence it is the amount of values shown or hiding the minutes.

I have the feeling the x-axis shows the start time for the first bar and it shows the end time for the last bar and then it divides the time in between by the amount of intervals.

That would explain the strange jump in ±12 minutes every time. It makes more since to show the start time of each bar.

So not: 15:16, 16:28, 17:40 etc.
But: 15:16, 16:16, 17:16, etc.

And what would be even better is the option to show only the completed whole hours:
15:00, 16:00, 17:00.

And if possible add the current hour and update that bar as long is the time is within that hour. This would be a nice feature, but it would also work to only show the completed hours.

This is what I made in Grafana:

  • Totals per hour of last 24 hours
  • The last hour (which is the current hour) is updated during the hour

Great app!

I have issue with my lightning that only dim up but not down. Goes for several different lights and also grouped lights. I use the Slider widget. Any idea?

Homey uses a range from 0 to 1. Not 0 to 100. Have you set the slider to 0 to 1? You can also enable fractions if you do this to get a more accurate scale

The way the DS card converts the insight data is quite crude. There is no complicated code to average all the values neatly into the exact amount of resolution points. I intentionally didn’t want the code to be heavy. I’m afraid there might be users that want to generate graphs every second :sweat_smile:

Instead of doing heavy averaging math on the timespan, the code just looks at the total amount of raw data points Homey provides, divides that by the requested resolution to figure out the “step” (for example, picking every 12th data point), and then just picks the existing values at those intervals. Every sample that Homey stores has its own original timestamp (that is the exact moment of the sample), and the DS card uses that exact moment of time for the time data in the graph. That’s why it is not even.

So the graph is not wrong. It is showing the exact correct timestamp that is in the data.

I could just use the even timestamps. never gave this much thought to be honest. The whole X axis with timestamps was also that was a request much later in development :sweat_smile:

It’s going to be a Red Bull hahaha Thanks Frank! :clinking_beer_mugs:

Thnx, thats good to know. That helps knowing what to do to let DS show the right information.

Ah! Perfect thanks!

Maybe switch the button icon color settings from place, because above it’s also first Off and then On.

@Satoer, based on this image (green/red block) i am thinking to visual show optimal times to use a washer/dryer or dishwasher based on dynamic prices over (the next) 24h. I was thinking of 3 states (oke priceblock, perfect price block and bad priceblock). And operation times of those devices are different (washer/dryer only during daytime, etc.), but that could be represented by a red block. I looked at the helpfiles but couldn’t find this example (or a way to get going ;-)). Is it possible to share the way how you did setup this pricegraph and the red/green blocks at the bottom?

Edit: Thinking to difficult. I have placed a yellow bar behind the red green bar which doesn’t show a color for the zero value. That makes 3 color options. And i couldn’t find the setting to only have a size of one row heigh, but that was solved bij making the widget height smaller which auto formats the height of the bar.

image

Still not found out how to show the dynamic tarrifs based on (the next) 24 hours.

I’m using a Growatt Homey Battery, but the software that schedules the charge and discharge cycles sucks. To fix this, I wrote a complex Homey script specifically for my setup to calculate the ideal periods. I tried to design a sophisticated algorithm, Thought it would be easy, but it got way too complicated, so I went with a brute-force approach instead.

The script follows a specific set of rules. For example, it ensures you can’t charge once and then discharge three times, maintains a 1 hour charge = 1 hour discharge ratio for charge and discharge hours (Charge power, and discharge power is approx the same for my battery), and accounts for maximum capacity and minimum profit margins. It basically draws a line between the highest and lowest prices and then tests random cycles. It runs this simulation 10,000 times, and every time it finds a pattern with a better profit, it saves it. It sounds demanding, but the whole process takes less than a second and works great. And I only have to do this once a day.

The output is a simple table like {“0”:0,“1”:1,“2”:1,“3”:0,“4”:-1,“5”:-1,“6”:0,"7… etc} where 1 is charge, -1 is discharge, and 0 is do nothing. The numbers in the “1” is the hour. Homey checks this table every hour to trigger the battery, and I also send the data to a Dashboard Studio graph. I use a bar graph with the “show negative as positive” option set to red. Since the values are only 0 or 1, you can scale them to look like clean blocks or even circles. A 0 shows nothing, a 1 is a green block, and a -1 shows up as a red block.

My graph spans a full 31 hours, which is great because it lets me see the prices for the night too. I handle this by combining two JSONs within a Homeyscript, using the data provided by the Power by the Hour app:

The new prices show up at 6 o’clock, and as soon as the data for the following day becomes available, the script automatically adds them to the table. (and truncates it to 31 hours)

1 Like

Thank you.

I notice that using the label min/max values to set a variable results in a very short change (1 sec or so) of this variable. So it is correctly set and then the variable receives no value.

Is this intentional?

I am trying to understand the question. You are replying to a long post full of changes, so I am not entirely sure which part you are reacting to.

Are you referring to the label min/max values? The label widget does not have min/max values. Is this regarding the graph widget or the gauge widget? You mentioned making this value dynamic, which results in a very short change? Are you talking about a variable, specifically a Homey variable? I am sorry, Frank, I am happy to help, but could you please formulate the question with a bit more clarity and detail?:sweat_smile: