Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

ClimateDataCalculation

Questions and comments specific to a particular plugin should go here.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: ClimateDataCalculation

Post by krambriw »

This is how it will look like
Skärmklipp.JPG
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: ClimateDataCalculation

Post by Mastiff »

Nice!
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: ClimateDataCalculation

Post by krambriw »

You can try this one:
CreateWindRoseHtml.zip
(2.56 KiB) Downloaded 134 times
Just unzip and replace the current file
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: ClimateDataCalculation

Post by Mastiff »

I'm afraid not. It's empty. Can that be because I haven't updated the High Charts in a long time? Do I need a new version of those?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: ClimateDataCalculation

Post by krambriw »

What is empty?

This file should be unzipped into in the "plugin/ClimateDataCalculation" folder

Then when you run the report, you need to set the path pointing into the HighChart folder wherever you have that one

I'm still using the old HighChart library, is working fine
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: ClimateDataCalculation

Post by Mastiff »

The result was an empty page, like before the update. I have it set to my EG webserver root, like always, where Highcharts index.html is in the same directory and the WS_Package is a subdirectory. And I get a blank page with only "EventGhost Climate Data Report Graph" and the Highcharts menu for downloading and printing. But I found out that I had an older version of the rest of the CDC package on that virtual machine, so I updated that, and now it works! Thanks! :mrgreen:
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: ClimateDataCalculation

Post by Mastiff »

Hi again! Would it be (easily) possible to combine the wind rose and the regular wind bar graph in a single page? The wind rose shows the direction and amount, but I would like to see the variations between days as well, in the same page.
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: ClimateDataCalculation

Post by Mastiff »

Finally, how can I log humitidy with variables? The code in "copy with python" does of course not work correctly since it doesn't contain the actual humidity. So where should I put that here?

Code: Select all

eg.plugins.ClimateDataCalculation.HumDataCapture(RoomNameVariable, SensorNumberVariable, 5, 70, 5, False, 5, False, u'equal-less-greater')
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: ClimateDataCalculation

Post by krambriw »

Would it be (easily) possible to combine the wind rose and the regular wind bar graph in a single page?
Just a lot of work
how can I log humitidy with variables?
You need to use the following plugin function:
eg.plugins.ClimateDataCalculation.plugin.SaveHumData(tableId, humidity, sInterval, setPoint, movAverage, useHysteresis, hysteresis, useRule, rule)

As for your example, use this syntax where humidityVariable holds the actual humidity level as an integer

Code: Select all

eg.plugins.ClimateDataCalculation.plugin.SaveHumData(RoomNameVariable, humidityVariable, 5, 70, 5, False, 5, False, u'equal-less-greater')
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: ClimateDataCalculation

Post by krambriw »

Just a lot of work
It was not too much work to fix, see pre-view below. New version (0.4.7) uploaded, just unzip and replace

BR Walter
Skärmklipp.JPG
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: ClimateDataCalculation

Post by Mastiff »

Great, thanks a lot! That really looks cool! :mrgreen: Two questions:

1. I tried to change "Back to previous page" to "Tilbake til temperaturoversikten" in the reports py files, but it didn't seem to take. Is there another place I have to change it too?

2. The report is to tall for a standard HD monitor (around 1400 pixels I would think). Is there a way to adjust size of the page in the file?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: ClimateDataCalculation

Post by krambriw »

1. I tried to change "Back to previous page"
If you open the CreateWindRoseHtml.py file and go to line 61, you see the following section

Code: Select all

    <script src="js/highcharts-more.js"></script>
    <script src="js/modules/data.js"></script>
    <script type="text/javascript">
    function GoBack(){
        history.back();
    }
    </script>
   	</body>
    </html>
    <td><button onMouseDown="GoBack()" style="background-color:white; height:50px; width:250px">&nbsp;Back to previous page</button></td>
    <br>
This function just uses the browser history. Means you can change the text in the button as you have already but history.back will not work if empty. So, if you have a main menu page with a link to the wind rose report it will go back to the main menu page if you first click the link. If you want a more specific navigation, you have to replace history.back() with some other javascript function, i.e. you can try window.location = 'http://www.yourdomain.com'

2. The report is to tall for a standard HD monitor
Go to line 595

Code: Select all

    c_code_0_2 = """' style="min-width: 1000px; height: 350px; margin: 0 auto"></div>"""
change to

Code: Select all

    c_code_0_2 = """' style="max-width: 1000px; height: 250px; margin: 0 auto"></div>"""
Here you can play with different values to see what fits best
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: ClimateDataCalculation

Post by Mastiff »

Thanks again! I will try that this evening! :mrgreen:
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: ClimateDataCalculation

Post by Mastiff »

Had to try earlier... I found out that the missing change in the "Back to..." was because I needed a restart of EG. So that's fixed. :mrgreen:

But I can't se any change from using the code for the size. It is on line 594, not 595 in my CreateWindRoseHtml.py, but there are no other lines near it, so I assume that's the one?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: ClimateDataCalculation

Post by krambriw »

Why don't you simply edit the generated html-file and refresh it in the browser? When you have found what fits best, then make the permanent change in the py-file
Post Reply