Extra Sensors in Block StationData
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Extra Sensors in Block StationData
No, did not correct anything.
The problem arose when I added the support for extrasensor.
I added a few bugs when 'rationalizing the block'.
Moreover the simplified method I used to extract main sensor and extrasensor data ( from 2 different database tables ) has a 'couple of weakness':
1) when dealing with extrasensor data that has a different sampling/recording interval than main sensor data ( ex: 10 minutes for extrasensor and 5 minutes for main sensors )
2) when dealing with main sensor/extrasensor data that has a varying sampling/recording interval ( ex: part of the data are recorded at 10 minutes interval, part at 5 minutes interval, this may happen when importing old data which has a different recording interval )
3) when dealing with extrasensor data that has a reduced 'time coverage' respect to main sensor data
It should be fixed in the next revision ( in the next days ).
NOTE
Point 2) need to be fixed also by uniforming the recording interval
The problem arose when I added the support for extrasensor.
I added a few bugs when 'rationalizing the block'.
Moreover the simplified method I used to extract main sensor and extrasensor data ( from 2 different database tables ) has a 'couple of weakness':
1) when dealing with extrasensor data that has a different sampling/recording interval than main sensor data ( ex: 10 minutes for extrasensor and 5 minutes for main sensors )
2) when dealing with main sensor/extrasensor data that has a varying sampling/recording interval ( ex: part of the data are recorded at 10 minutes interval, part at 5 minutes interval, this may happen when importing old data which has a different recording interval )
3) when dealing with extrasensor data that has a reduced 'time coverage' respect to main sensor data
It should be fixed in the next revision ( in the next days ).
NOTE
Point 2) need to be fixed also by uniforming the recording interval
- MeteoElMasnou
- Observer
- Posts: 26
- Joined: Sat Feb 05, 2022 1:56 pm
- Location: El Masnou / Catalunya
- Station model: Davis Vantage Vue
- Software: Weewx
- Contact:
Re: Extra Sensors in Block StationData
Thanks Davidefa for the clarification.
We will be attentive to new versions.
Regards
We will be attentive to new versions.
Regards
- BONSAI
- Observer
- Posts: 35
- Joined: Sat Sep 23, 2017 10:59 am
- Location: San Sebastian
- Station model: Davis Vantage Pro2 Plus
- Software: Meteobridge
- Contact:
Re: Extra Sensors in Block StationData
Hello everyone.
I have updated this block and I can't find the icons of CO2, PM2.5, PM10 .... in which folder in the template are they saved?
Thank you
I have updated this block and I can't find the icons of CO2, PM2.5, PM10 .... in which folder in the template are they saved?
Thank you
- MeteoElMasnou
- Observer
- Posts: 26
- Joined: Sat Feb 05, 2022 1:56 pm
- Location: El Masnou / Catalunya
- Station model: Davis Vantage Vue
- Software: Weewx
- Contact:
Re: Extra Sensors in Block StationData
Hello David,davidefa wrote: ↑Mon Jun 27, 2022 11:07 am No, did not correct anything.
The problem arose when I added the support for extrasensor.
I added a few bugs when 'rationalizing the block'.
Moreover the simplified method I used to extract main sensor and extrasensor data ( from 2 different database tables ) has a 'couple of weakness':
1) when dealing with extrasensor data that has a different sampling/recording interval than main sensor data ( ex: 10 minutes for extrasensor and 5 minutes for main sensors )
2) when dealing with main sensor/extrasensor data that has a varying sampling/recording interval ( ex: part of the data are recorded at 10 minutes interval, part at 5 minutes interval, this may happen when importing old data which has a different recording interval )
3) when dealing with extrasensor data that has a reduced 'time coverage' respect to main sensor data
It should be fixed in the next revision ( in the next days ).
NOTE
Point 2) need to be fixed also by uniforming the recording interval
Has there been any progress in the results of this block?
Thank you
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Extra Sensors in Block StationData
Please zip your stationData block directory so I can take a look ( with your configuration )
The icons are the 'mt-icons' you can find them in http://meteodonostia.es/frog/css/font/i ... rence.html
P.S.
I think your CO_2 sensor should be named CO2_1, see the wiki
( but this has nothing to do with your 'icon problem' that should be related to some 'configuration naming' issue )
- Attachments
-
- co2_01.png (33.26 KiB) Viewed 2889 times
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Extra Sensors in Block StationData
Sorry still working on it...MeteoElMasnou wrote: ↑Sun Jul 24, 2022 5:28 am Hello David,
Has there been any progress in the results of this block?
Thank you
- MeteoElMasnou
- Observer
- Posts: 26
- Joined: Sat Feb 05, 2022 1:56 pm
- Location: El Masnou / Catalunya
- Station model: Davis Vantage Vue
- Software: Weewx
- Contact:
Re: Extra Sensors in Block StationData
No problem.davidefa wrote: ↑Sun Jul 24, 2022 8:28 amSorry still working on it...MeteoElMasnou wrote: ↑Sun Jul 24, 2022 5:28 am Hello David,
Has there been any progress in the results of this block?
Thank you
Thank you very much for trying
Regards
- BONSAI
- Observer
- Posts: 35
- Joined: Sat Sep 23, 2017 10:59 am
- Location: San Sebastian
- Station model: Davis Vantage Pro2 Plus
- Software: Meteobridge
- Contact:
Re: Extra Sensors in Block StationData
Thank you very much David. You are a perfect companion. Always fast and very attentive.davidefa wrote: ↑Sun Jul 24, 2022 8:26 amPlease zip your stationData block directory so I can take a look ( with your configuration )
The icons are the 'mt-icons' you can find them in http://meteodonostia.es/frog/css/font/i ... rence.html
P.S.
I think your CO_2 sensor should be named CO2_1, see the wiki
( but this has nothing to do with your 'icon problem' that should be related to some 'configuration naming' issue )
I understand that you want me to send you a zip of my stationData block. If so, tell me how can I send it to you?
Thanks again
- BONSAI
- Observer
- Posts: 35
- Joined: Sat Sep 23, 2017 10:59 am
- Location: San Sebastian
- Station model: Davis Vantage Pro2 Plus
- Software: Meteobridge
- Contact:
Re: Extra Sensors in Block StationData
But I have problems with pm10, pm2.5 (don’t have) and co2 icons. I cant see this icons. Only can see the 1h icon.
if (($par == "TIN") || ($par == "T"))
{return "mticon-temp";}
if (($par == "HIN") || ($par == "H"))
{return "mticon-humidity";}
if ($par == "UV")
{return "mticon-uv";}
if ($par == "L")
{return "mticon-storm";}
if ($par == "PP2")
{return "mticon-pm10";}
if ($par == "PP3")
{return "mticon-pm2_5";}
if ($par == "CO_2")
{return "mticon-co2";}
return "mticon-1h";
}
if (($par == "TIN") || ($par == "T"))
{return "mticon-temp";}
if (($par == "HIN") || ($par == "H"))
{return "mticon-humidity";}
if ($par == "UV")
{return "mticon-uv";}
if ($par == "L")
{return "mticon-storm";}
if ($par == "PP2")
{return "mticon-pm10";}
if ($par == "PP3")
{return "mticon-pm2_5";}
if ($par == "CO_2")
{return "mticon-co2";}
return "mticon-1h";
}
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Extra Sensors in Block StationData
You can attach the zipped archive to a post ( it does not contain any sensible/personal information ), or upload somewhere and pm me the link
- BONSAI
- Observer
- Posts: 35
- Joined: Sat Sep 23, 2017 10:59 am
- Location: San Sebastian
- Station model: Davis Vantage Pro2 Plus
- Software: Meteobridge
- Contact:
Re: Extra Sensors in Block StationData
Perfect. Tomorrow I'll do it because I'm now with a tablet.
- BONSAI
- Observer
- Posts: 35
- Joined: Sat Sep 23, 2017 10:59 am
- Location: San Sebastian
- Station model: Davis Vantage Pro2 Plus
- Software: Meteobridge
- Contact:
Re: Extra Sensors in Block StationData
Good morning.
I send you as you told me the file StationData.
Thank you
I send you as you told me the file StationData.
Thank you
- Attachments
-
- statioData.rar
- (8.89 KiB) Downloaded 35 times
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Extra Sensors in Block StationData
This version should correct the discrepancies you noted.
ver 10.8
- corrected database query for alldata/alldataExtra tables
P.S.
While working with the block I have found a little problem in my database ( that causes an incorrect rain calculation ):
- found that in a few cases the rain in my database is not reset at 00:00 but at 00:05
- this causes an incorrect 'rain duplication'
Not sure why this happen ( but it has something to do with api.php ).
If you want to test if you suffer this problem too I have added an option 'Fix for rain at 00:00':
- if you find that enabling this option your rain totals ( for current year, for example ) change... you are a member of the club : - (
ver 10.8
- corrected database query for alldata/alldataExtra tables
P.S.
While working with the block I have found a little problem in my database ( that causes an incorrect rain calculation ):
- found that in a few cases the rain in my database is not reset at 00:00 but at 00:05
- this causes an incorrect 'rain duplication'
Not sure why this happen ( but it has something to do with api.php ).
If you want to test if you suffer this problem too I have added an option 'Fix for rain at 00:00':
- if you find that enabling this option your rain totals ( for current year, for example ) change... you are a member of the club : - (
- Attachments
-
- stationData_10.8.zip
- (9.7 KiB) Downloaded 61 times
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Extra Sensors in Block StationData
@BONSAI
In your folder you have a mix of different version of the block ( maybe the result of an incomplete update? ).
Delete the content of the folder ( except the settings.php script with your configuration ), reinstall the block and you should be good to go
In your folder you have a mix of different version of the block ( maybe the result of an incomplete update? ).
Delete the content of the folder ( except the settings.php script with your configuration ), reinstall the block and you should be good to go
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: Extra Sensors in Block StationData
Ciao, the latest version works fine, great.
to be a perfectionist, the lightning displays (today, yesterday, ...) rightly the last detection even days ago, but it would not be better to do a sort of daily reset (I mean, today it should not indicate the number of lightning strikes detected 5 days ago)
thanks
to be a perfectionist, the lightning displays (today, yesterday, ...) rightly the last detection even days ago, but it would not be better to do a sort of daily reset (I mean, today it should not indicate the number of lightning strikes detected 5 days ago)
thanks
- Attachments
-
- ScreenShot01094.jpg (6.54 KiB) Viewed 2762 times
- MeteoElMasnou
- Observer
- Posts: 26
- Joined: Sat Feb 05, 2022 1:56 pm
- Location: El Masnou / Catalunya
- Station model: Davis Vantage Vue
- Software: Weewx
- Contact:
Re: Extra Sensors in Block StationData
David,
I just installed it to test it and it works perfectly. Luckily I was not affected by the rain issue.
Changed colors etc. and working.
The only thing is to change the icons of the PM, since they are all the same. Nothing important
Thank you for your work.
Greetings.
I just installed it to test it and it works perfectly. Luckily I was not affected by the rain issue.
Changed colors etc. and working.
The only thing is to change the icons of the PM, since they are all the same. Nothing important
Thank you for your work.
Greetings.
- BONSAI
- Observer
- Posts: 35
- Joined: Sat Sep 23, 2017 10:59 am
- Location: San Sebastian
- Station model: Davis Vantage Pro2 Plus
- Software: Meteobridge
- Contact:
Re: Extra Sensors in Block StationData
Thank you so much for all your help. Having people like you is wonderful.davidefa wrote: ↑Tue Aug 02, 2022 5:52 pm @BONSAI
In your folder you have a mix of different version of the block ( maybe the result of an incomplete update? ).
Delete the content of the folder ( except the settings.php script with your configuration ), reinstall the block and you should be good to go
-
- Advisor
- Posts: 89
- Joined: Fri Sep 24, 2021 10:41 pm
- Station model: Barani MeteoHelix
- Software: meteobridge
Re: Extra Sensors in Block StationData
How did you get those red and blue colors in your interactiveGraph and stationData blocks?meteoesine wrote: ↑Wed Aug 03, 2022 8:19 am Ciao, the latest version works fine, great.
to be a perfectionist, the lightning displays (today, yesterday, ...) rightly the last detection even days ago, but it would not be better to do a sort of daily reset (I mean, today it should not indicate the number of lightning strikes detected 5 days ago)
thanks
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: Extra Sensors in Block StationData
amending the stationDataBlock.php file starting around line 240
to be added style color#xxxx for each parameter
see below in bold type
<tr>
<td>
<span class="mticon-temp stationDataIcon tooltip" title="<?php echo lang('temperature','c')?>">
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsTAvg" class="records"></span>
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsTMax" style="color:#FA5858" class="records"></span>
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsTMin" style="color:#0cf" class="records"></span>
</td>
</tr>
<tr>
<td>
<span class="mticon-humidity stationDataIcon tooltip" title="<?php echo lang('humidity','c')?>">
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsHAvg" class="records"></span>
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsHMax" style="color:#FA5858" style="color:#FA5858" class="records"></span>
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsHMin" style="color:#0cf" class="records"></span>
</td>
</tr>
.........
to be added style color#xxxx for each parameter
see below in bold type
<tr>
<td>
<span class="mticon-temp stationDataIcon tooltip" title="<?php echo lang('temperature','c')?>">
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsTAvg" class="records"></span>
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsTMax" style="color:#FA5858" class="records"></span>
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsTMin" style="color:#0cf" class="records"></span>
</td>
</tr>
<tr>
<td>
<span class="mticon-humidity stationDataIcon tooltip" title="<?php echo lang('humidity','c')?>">
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsHAvg" class="records"></span>
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsHMax" style="color:#FA5858" style="color:#FA5858" class="records"></span>
</td>
<td style="border-bottom:1px solid #9b9b8c">
<span id="recordsHMin" style="color:#0cf" class="records"></span>
</td>
</tr>
.........
-
- Advisor
- Posts: 89
- Joined: Fri Sep 24, 2021 10:41 pm
- Station model: Barani MeteoHelix
- Software: meteobridge
Re: Extra Sensors in Block StationData
Thanks, that works.
Only addition to this extra sensors in the stationData block I could think of is the ordering of the tables.
For example, I have 3 T sensors in total showing now, and it would be nice to have them stacked near each other.
I tried doing this already myself, tinkering the php layout, but it fails because the extra sensors have a count that's not relevant to the tables that need to go under it. I would ideally have it like:
T1
T
T2
H1
H
H2
all the rest as normal.
But come to think of it, a better option would be a combined interactive graph block. I'm going to try modifying the existing interactive graph so that it shows 3 T sensors in color. This was easily accomplished with the weatherstation plugin for wordpress, where you can generate graphs using any sensor basically combined with any other sensor(s) you want.
Never mind, you already created it!. Man, Davide, you should be paid by Jachym
Only addition to this extra sensors in the stationData block I could think of is the ordering of the tables.
For example, I have 3 T sensors in total showing now, and it would be nice to have them stacked near each other.
I tried doing this already myself, tinkering the php layout, but it fails because the extra sensors have a count that's not relevant to the tables that need to go under it. I would ideally have it like:
T1
T
T2
H1
H
H2
all the rest as normal.
But come to think of it, a better option would be a combined interactive graph block. I'm going to try modifying the existing interactive graph so that it shows 3 T sensors in color. This was easily accomplished with the weatherstation plugin for wordpress, where you can generate graphs using any sensor basically combined with any other sensor(s) you want.
Never mind, you already created it!. Man, Davide, you should be paid by Jachym
-
- Advisor
- Posts: 89
- Joined: Fri Sep 24, 2021 10:41 pm
- Station model: Barani MeteoHelix
- Software: meteobridge
Re: Extra Sensors in Block StationData
For some really strange reason, most likely after having updated php (still 7.4), both the StationData and the CustomGraph blocks stop loading proper data. The stationData block no longer shows Min or Max values. And similarly, because of that same failure to see historical values, the customGraph can't draw.
@davidefa, do you have any idea what can cause this? I've researched all the logs, but can't find what's causing this.
It's not config, I have restored it to a backup of the entire /etc folder, and changed nothing. So it's probably not file corruption. Perhaps an update has changed permissions somewhere, but mariadb access is all fine.
This is at the bottom of LatestApiLog.txt;
I figure you would know what this could be, since I run both blocks from your later (alpha) versions of these Blocks with some custom modifications showing 3 T sensors in one graph and such. This is my site: https://weer.broekermeer.nl/indexDesktop.php
@davidefa, do you have any idea what can cause this? I've researched all the logs, but can't find what's causing this.
It's not config, I have restored it to a backup of the entire /etc folder, and changed nothing. So it's probably not file corruption. Perhaps an update has changed permissions somewhere, but mariadb access is all fine.
This is at the bottom of LatestApiLog.txt;
Code: Select all
ERRORS:
No max temperature data provided.
No min temperature data provided.
Meteotemplate MySQL Error: Incorrect file format 'alldata' with query:
INSERT INTO alldata
(DateTime,T,Tmax,Tmin,H,P,W,G,B,R,RR,S,D,A)
values ('2022-11-06 23:35:00',10.5,10.5,10.5,93.0,1003.8,7.9,9.8,198,11.5,0.1,0.0,9.4,8.9
)
Meteotemplate MySQL Error: Incorrect file format 'alldataExtra' with query:
INSERT INTO alldata
(DateTime,T,Tmax,Tmin,H,P,W,G,B,R,RR,S,D,A)
values ('2022-11-06 23:35:00',10.5,10.5,10.5,93.0,1003.8,7.9,9.8,198,11.5,0.1,0.0,9.4,8.9
)
-
- Advisor
- Posts: 89
- Joined: Fri Sep 24, 2021 10:41 pm
- Station model: Barani MeteoHelix
- Software: meteobridge
Re: Extra Sensors in Block StationData
Suddenly occurred to me that this also coincides with the Daylight Savings Time change! This error has started after restarting the server, but only after the winter-time had been going live.. This could explain the error(s).
Oh how I hate DST.
Oh how I hate DST.
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Extra Sensors in Block StationData
The 'incorrect file format' error should mean that the table is corrupted
You can repair tables alldata and alldataExtra with the following command ( in phpmyadmin select the meteotemplate database and in the SQL tab execute the following commands )
P.S.
It is always a good idea to make a backup of the database before executing these commands ( not sure the backup will succeed in this case, but I'm not a db expert )
You can repair tables alldata and alldataExtra with the following command ( in phpmyadmin select the meteotemplate database and in the SQL tab execute the following commands )
Code: Select all
repair table alldata use_frm;
Code: Select all
repair table alldataExtra use_frm;
It is always a good idea to make a backup of the database before executing these commands ( not sure the backup will succeed in this case, but I'm not a db expert )
-
- Advisor
- Posts: 89
- Joined: Fri Sep 24, 2021 10:41 pm
- Station model: Barani MeteoHelix
- Software: meteobridge
Re: Extra Sensors in Block StationData
Unfortunately, this did not fix it. Still not working.
And now even the netatmo data says "Offline", while it's still there when I look at netatmo itself.
Strange. Still pretty sure this has to do with updated php modules. It all stopped working right after that..
And now even the netatmo data says "Offline", while it's still there when I look at netatmo itself.
Strange. Still pretty sure this has to do with updated php modules. It all stopped working right after that..
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Extra Sensors in Block StationData
I see in cache/apiLog.txt that the last update is dated 2022-11-07 00:25:02 and from weatherflowNet plugin
Is the cron job executing correctly?
Try calling in your browser ( insert your update password ):
Does it report any fatal error/warning ?
You may also update api.php script with the attached one ( it should correct a bug when calling api.php using 'require' from inside another script, as done by the weaterflowNet plugin )
Code: Select all
2022-11-07 00:25:02
INFOS:
Handling data from weatherflowNet
update 'U' = 1667777056 (2022-11-07 00:24:16)
Try calling in your browser ( insert your update password ):
Code: Select all
https://weer.broekermeer.nl/load/cron.php?password=YOURPASSWORD&errors
You may also update api.php script with the attached one ( it should correct a bug when calling api.php using 'require' from inside another script, as done by the weaterflowNet plugin )
- Attachments
-
- api_3.5.zip
- (12.63 KiB) Downloaded 42 times