As you know, I currently have 4 different solar stations, which I used for the tests, and which allow me to reduce my electricity consumption. Each station has its own application, which is not practical at all for monitoring its total photovoltaic production, and estimating the savings made. So I centralized all that in Jeedom, in order to have a complete follow-up in one place. A very good use case to show you how to use variables in Jeedom to do some calculations, and display them graphically in the interface…
The necessary equipment
Each solar station uses a different system for its production monitoring: ekwatteur uses a circuit breaker connected, Sunology et Supersola a connected socket, and Beem its own box. If for the first three it would be quite possible to use the plugin WifiLight allowing to recover Tuya products in Jeedom (because yes, despite the different brands, all these devices work very well in the Tuya application), this is impossible for Beem, which uses a proprietary solution.
So I made the choice, for convenience, to connect each solar station to a Us brand ZigBee connected socket, with consumption monitoring. We find this taken in batches of 4 for about sixty euroswhich corresponded perfectly to my needs (also available individually or in pairs).
For the installation, nothing complicated: I plugged each solar station into one of these sockets, and each socket is paired with my Jeedom Atlas and its official ZigBee plugin.
I thus obtain these 4 widgets:
The socket allows us here to check the status of the socket (which must always be On to take advantage of the photovoltaic production), see the current power, and calculate the total production since the start of the socket on the station solar. This is important data, on which we will rely for our calculations. Even though this outlet is designed to track the consumption of an appliance, it also works very well to track the production of a solar station. Just rename the commands as desired to make it clearer.
The scenarios for the calculations
For my production tracking calculations, I have two scenarios here.
The first, very simple, will pass the production of the day as the production of the day before, every day at midnight: we therefore use the “Scheduled” scenario mode, and we request an execution every day at midnight by clicking on the “?” next to the field, which will make it easier to configure this condition.
In the scenario, we use an “Action” block, then a “variable” command. We define the variable with a name, here “vPVTotalVeil“, which will be used to store the total production of the day before. And in value, we indicate “variable(vPVTotalJour)”: thus the value of the variable vPVTotalJourwhich will contain the day’s production, will be assigned to the variable vPVTotalVeil at each change of day.
The second scenario is also a programmed scenario, but to run this time every 10min. We can do less or more, depending on the needs, but personally an accuracy of 10min is enough for me.
Same principle again at the command level: we create an “Action” block, which launches two “variable” commands.
In the first variable vPVTotalJourI attribute to it the sum of the productions of my different solar stations:
[Labo][Station Solaire Beem][Production]#+#[Labo][Station Solaire ekWateur][Production]#+#[Labo][Station Solaire Sunology][Production]#+#[Labo][Station Solaire Supersola][Production]
It’s actually a matter of adding up the consumption counters of each We plug, which in fact serves as an index, in a way.
In the second variable vPVJourI calculate the difference between the sum of the current indexes, and the sum of the indexes of the day before:
variable(vPVTotalJour) - variable(vPVTotalVeille)
As we can see, these are very simple calculations on variables. We can of course do much more complex things, but that are not necessary here.
Creating a virtual widget
Our variables are calculated, but we now need to be able to visualize them easily. The value of all these variables can be viewed via the Tools / Variables menu. But it’s not the most convenient. So I created a virtual widget, via the plugin of the same name. We give a name to our virtual widget, we activate it, and we make it visible:
In the commands part, I created two virtual infos:
The first “Total production of the day”, simply displays the value of the variable calculated by the scenario: variable(vPVDay)
The second uses this same variable, but multiplies it by 0.18 to obtain the savings made in euros (0.18 being the cost of a kilowatt normally billed by my electricity supplier).
Be sure to check “display” and “log” for these commands. You then have to adjust two small details on each order, by clicking on the toothed wheel to the right of each line.
For each of them, we round to 2 digits after the decimal point, and in smoothing mode, we select Maximum. Because what interests us here is to know the total production each day, and the savings made, and not an average.
We then obtain this simple little widget in Jeedom, but which shows us at a glance the photovoltaic production of the day, cumulated from the 4 solar stations, as well as an estimate of the savings made on the electricity bill in euros .
Creation of a global dashboard
We now have on one side a widget for each solar station, and on the other side a widget for the global production. But we can create a dashboard containing all this information, in graphical form, for a better visual representation.
For this you can create a new view in Jeedom (Home / View).
In this view, I created 4 areas:
A first graphic zone, “Live”, which shows the power of each solar station. Here you can assign the color you want to each value, and configure the type of chart. I’m sticking here with something very simple, a line chart.
The second zone “Equipment” will simply display the widgets of the 4 solar stations.
The third zone is on the same principle, but to display the virtual widget which displays the overall production and the savings made. We can group with the previous zone if we wish.
Finally, the last zone is again a graphic zone, which will display the history of the total production of the day. We therefore use here the “maximum per day” grouping for this graph.
In the end, we obtain this view which groups all the information configured in the view:
This allows me to monitor at a glance that all the panels are producing correctly, and to follow the savings made day after day, without having to make calculations through 4 different applications.
The situation here is a bit exceptional, few people will have solar stations of different brands, the easiest way being all the same to opt directly for the number of panels necessary on the same solution. It is above all a pretext to approach a little the use of variables and their representation on Jeedom. Because if many users are content to keep Jeedom’s classic widgets, sometimes regretting an impractical interface, many users are actually unaware of the many customization possibilities of the system.
Here we have seen how to use variables to perform calculations in scenarios. This can be useful for adding up the water consumption of several irrigation valves for example (on the same principle as these solar stations, suddenly), grouping the consumption of several electrical appliances, for a total per room or per type of device, or monitor your electricity consumption when you have a special subscription. At home, for example, I have a subscription with off-peak hours on Wednesdays and all weekend. Unfortunately, if Jeedom’s Energy plugin is very well done, it only knows how to manage off-peak hours on daily time slots. If I want a follow-up of this subscription in Jeedom, in consumption and in euros, I have no other choice but to go through variables and automatic calculations every day.
We then saw how to display this information, whether via a virtual widget or a dedicated view in Jeedom, which allows everything to be grouped in one place.
Of course, I stayed here on relatively simple usage and configuration. It is possible to go much further in the exploitation of data and their representation in Jeedom, by doing very nice things. Some users create superb dashboards to display on a screen in the home. You have to spend a little time there, but it is quite feasible in Jeedom. By the way, if you have done this kind of thing yourself, do not hesitate to share in the comments, it always gives good ideas!