Export, MB Pro, not working as exspected, - pls.help ** Solved **.

This section covers the Meteobridge PRO, NANO SD and Raspberry Pi units exclusively

Moderator: Mattk

krischj
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Tue Mar 16, 2021 1:17 am

Export, MB Pro, not working as exspected, - pls.help ** Solved **.

Post by krischj »

HI, pls help
I love my new MB Pro, a fantastic pcs of kit. However yesterday evening me and MB had our first "falling out" :D

I was writing a an export-template, and I can't make it work, - NO WAY!

Template:
# Standard CSV template WIND
#
$# date, time, avg wind speed[m/s], avg wind speed[km/h], winddir degress, winddir direction
[YYYY]-[MM]-[DD],[hh]:[mm],[wind0wind-avg.1:--],[wind0wind-avg=kmh.1:--],[wind0dir-avg.0:--],[wind0dir-avg=endir.5:-----]

Result:
# date, time, avg wind speed[m/s], avg wind speed[km/h], winddir degress, winddir direction
2021-03-16,00:00,1.6,5.6,338,338.00000
2021-03-16,01:00,1.6,5.8,342,342.00000
2021-03-16,02:00,2.0,7.0,339,339.00000
2021-03-16,03:00,1.6,5.9,339,339.00000
2021-03-16,04:00,1.2,4.2,352,352.00000

As you can see, using Converters works fine - EXCEPT FOR the "endir", it is being ignored completely by the export.

No way I can make this "endir" work, so pls help.
It's OK to point out to me that I have missed something obvious, and indicating that my brain needs a server service check, as long as you point me in right direction :lol:

/kris

Mattk
Platinum Boarder
Platinum Boarder
Posts: 885
Joined: Mon Sep 22, 2014 3:24 am

Re: Export, MB Pro, not working as exspected, - pls.help

Post by Mattk »

endir produces 1 of 16 points of the compass as text so the .5 is not applicable
Try the following [wind0dir-avg=endir:-----]

krischj
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Tue Mar 16, 2021 1:17 am

Re: Export, MB Pro, not working as exspected, - pls.help

Post by krischj »

Thx, tried that, and now once again.

result:
# date, time, avg wind speed[m/s], avg wind speed[km/h], winddir degress, winddir direction
2021-03-16,16:00,1.6,5.9,338,338.0
2021-03-16,17:00,1.4,4.9,341,341.0
2021-03-16,18:00,0.5,1.7,326,326.0
2021-03-16,19:00,0.1,0.3,324,324.0
2021-03-16,20:00,0.0,0.0,324,324.0
2021-03-16,21:00,0.0,0.0,326,326.0

"endir" is just being ignored
/kris

krischj
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Tue Mar 16, 2021 1:17 am

Re: Export, MB Pro, not working as exspected, - pls.help

Post by krischj »

BTW
.5 should be applicable according to: Templates, Decimals
When a number is given instead of a substring qualifier, then the number defines the number of characters the resulting string is padded to. When the number is smaller than the string length, then only rightmost characters remain, otherwise the string is added with leading blanks to make it's size fit. When the number is negative, then string is cut on the right side resp. trailing blanks are added. Example: Assume that wind direction is "ENE" then :[wind0dir-act=endir.5]:[wind0dir-act=endir.-5]: will result into : ENE:ENE :

Mattk
Platinum Boarder
Platinum Boarder
Posts: 885
Joined: Mon Sep 22, 2014 3:24 am

Re: Export, MB Pro, not working as exspected, - pls.help

Post by Mattk »

Change the avg to act

Need to confirm if avg is a valid option for wind direction?

[wind0dir-act=endir:-----]

krischj
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Tue Mar 16, 2021 1:17 am

Re: Export, MB Pro, not working as exspected, - pls.help

Post by krischj »

"act" will not produce any result "back in time"

result.
# date, time, avg wind speed[m/s], avg wind speed[km/h], winddir degress, winddir direction
2021-03-16,19:00,0.1,0.3,324,-----
2021-03-16,20:00,0.0,0.0,324,-----
2021-03-16,21:00,0.0,0.0,326,-----
2021-03-16,22:00,0.0,0.0,326,-----

Mattk
Platinum Boarder
Platinum Boarder
Posts: 885
Joined: Mon Sep 22, 2014 3:24 am

Re: Export, MB Pro, not working as exspected, - pls.help

Post by Mattk »

"act" works fine this end, I am simply using it in a Email header but the context should be the same one would think

krischj
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Tue Mar 16, 2021 1:17 am

Re: Export, MB Pro, not working as exspected, - pls.help

Post by krischj »

Well, as you can see i dosen't. what you see is the result of this:

$# date, time, avg wind speed[m/s], avg wind speed[km/h], winddir degress, winddir direction
[YYYY]-[MM]-[DD],[hh]:[mm],[wind0wind-avg.1:--],[wind0wind-avg=kmh.1:--],[wind0dir-avg.0:--],[wind0dir-act=endir:-----]

I belive there is a fault somewhere..

/kris

krischj
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Tue Mar 16, 2021 1:17 am

Re: Export, MB Pro, not working as exspected, - pls.help

Post by krischj »

Any body having ideas?
//kris

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 6631
Joined: Mon Oct 01, 2007 10:51 pm

Re: Export, MB Pro, not working as exspected, - pls.help

Post by admin »

krischj wrote:
Wed Mar 17, 2021 12:10 am
Well, as you can see i dosen't. what you see is the result of this:

$# date, time, avg wind speed[m/s], avg wind speed[km/h], winddir degress, winddir direction
[YYYY]-[MM]-[DD],[hh]:[mm],[wind0wind-avg.1:--],[wind0wind-avg=kmh.1:--],[wind0dir-avg.0:--],[wind0dir-act=endir:-----]

I belive there is a fault somewhere..

/kris
"-act" is not defined for exports. What should "actual" mean when you iterate through data in the past? Try "-avg" instead.

krischj
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Tue Mar 16, 2021 1:17 am

Re: Export, MB Pro, not working as exspected, - pls.help

Post by krischj »

yes, that was what I replied ti Mattek, pls see my inital posting, That is my actual issue.

//kris

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 6631
Joined: Mon Oct 01, 2007 10:51 pm

Re: Export, MB Pro, not working as exspected, - pls.help

Post by admin »

I tried "[wind0dir-val=endir:-----]" within an export definition and it works, same with "[wind0dir-avg=endir:-----]".

No idea what issue you are talking about.

Mattk
Platinum Boarder
Platinum Boarder
Posts: 885
Joined: Mon Sep 22, 2014 3:24 am

Re: Export, MB Pro, not working as exspected, - pls.help

Post by Mattk »

admin wrote:
Thu Mar 18, 2021 12:03 am
I tried "[wind0dir-val=endir:-----]" within an export definition and it works, same with "[wind0dir-avg=endir:-----]".
Just checked endir in the body of an email ok but running both the above in an export template I get numeric values for both, not alpha direction?

krischj
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Tue Mar 16, 2021 1:17 am

Re: Export, MB Pro, not working as exspected, - pls.help. **solved**

Post by krischj »

Hi Mattk,
Yes, that's exatly my issue, "endir" is being "ignored" un export.
//kris

krischj
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Tue Mar 16, 2021 1:17 am

Re: Export, MB Pro, not working as exspected, - pls.help. **solved**

Post by krischj »

Hi Mattk,
Yes, that's exatly my issue, "endir" is being "ignored" un export.

Template:
# Standard CSV template WIND
#
$# date, time, avg wind speed[m/s], avg wind speed[km/h], winddir degress, winddir direction
[YYYY]-[MM]-[DD],[hh]:[mm],[wind0wind-avg.1:--],[wind0wind-avg=kmh.1:--],[wind0dir-avg.0:--],[wind0dir-avg=endir.5:-----]

Result:
# date, time, avg wind speed[m/s], avg wind speed[km/h], winddir degress, winddir direction
2021-03-16,00:00,1.6,5.6,338,338.00000
2021-03-16,01:00,1.6,5.8,342,342.00000
2021-03-16,02:00,2.0,7.0,339,339.00000
2021-03-16,03:00,1.6,5.9,339,339.00000
2021-03-16,04:00,1.2,4.2,352,352.00000

As you can see, using Converters works fine - EXCEPT FOR the "endir", it is being ignored completely by the export.

Post Reply