MB Pro sensor data missing (lightning and PM2.5) in meteotemplate upload

This section covers the Meteobridge PRO, PRO2, NANO SD, Raspberry Pi and VM platforms exclusively

Moderator: Mattk

Post Reply
User avatar
Gyvate
Platinum Boarder
Platinum Boarder
Posts: 453
Joined: Thu May 14, 2020 4:36 pm
Location: Saarbrücken, Germany

MB Pro sensor data missing (lightning and PM2.5) in meteotemplate upload

Post by Gyvate »

My MB Pro is connected to the meteotemplate via WeatherMets tab
The Meteotemplate-API provides for 4 Soil-Moisture (default), 1 Lightning and 4 particulate matter (PM2.5 or PM10) sensor values.
I have 5 Soil-Moisture, 2 PM2.5 and 1 lightning sensors - all shown in the live data in MB and in the database (Pro)
Meteotemplate_API_excerpt.JPG
Meteotemplate_API_excerpt.JPG (116.39 KiB) Viewed 1225 times
What arrives at the meteotemplate is:
4 Soil-Moisture (as per Meteotemplate API description the number of sensors is not limited here, but MB sent only 4)
1 PM2.5 (should be 2 and 4 could be sent in the standard/default database definition; MB just sends one)
0 Lightning (where meteotemplate expects the strikes per day; MB sends nothing, no value with the header L: to be found).

=> Meteobridge doesn't send data of the 2nd (or more) PM2.5, noned of the one and only lightning sensor value(s) and not more than 4 Soil moisture sensor data values.
The missing sensors should be included in the upload definition/script/... at the MB side.
Some more work for Boris to do ! :roll:


(the lightning sensors in general are still "under construction", still open issues. See other postings of mine in this context)

here the respective meteotemplateLive.txt file content: (underline and bold by me)
[that's the file which is created by the api.php on meteotemplate when invoked with a live data upload]

{"U":1596801785,"SW":"meteobridge","T":33.7,"TMX":33.7,"TMN":33.7,"H":35,"P":1018.5,"W":0.4,"G":1.8,"B":96,"R":0,"RR":0,"S":769,"UV":7,"TIN":30.5,"HIN":40,"T1":34.4,"H1":35,"SM1":35,"SM2":35,"SM3":31,"SM4":41,"PP1":7,"UTime":1596801785,"SWTime":1596801785,"TTime":1596801785,"TMXTime":1596801785,"TMNTime":1596801785,"HTime":1596801785,"PTime":1596801785,"WTime":1596801785,"GTime":1596801785,"BTime":1596801785,"RTime":1596801785,"RRTime":1596801785,"STime":1596801785,"UVTime":1596801785,"TINTime":1596801785,"HINTime":1596801785,"T1Time":1596801785,"H1Time":1596801785,"SM1Time":1596801785,"SM2Time":1596801785,"SM3Time":1596801785,"SM4Time":1596801785,"PP1Time":1596801785,"D":16.2,"DTime":1596801785,"A":35.6,"ATime":1596801785}

There should be also values for SM5:, PP2:, L:
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
User avatar
Gyvate
Platinum Boarder
Platinum Boarder
Posts: 453
Joined: Thu May 14, 2020 4:36 pm
Location: Saarbrücken, Germany

MB Pro sensor data missing (lightning and PM2.5) in meteotemplate upload - update

Post by Gyvate »

As this obvious lack of functionality in the Meteotemplate (MT) upload was not attended so far and neither was there even an acknowledgement of the issue, and my digging in the flie system of MB Pro wasn't crowned by success, I had to sort of re-invent the wheel and create my own http service feeding the MT API myself with the missing data. It's now working and the Meteotemplate Weather Network entry in Meteobridge has been disabled as it's not working properly. Below an excerpt from the APILog.txt file from a 1-minute update, created by the MT api.php after being fed directly from my http service.

If anyone is interested in the API call syntax (calling the API as a service in Meteobridge) and wants to have their data stored and displayed in MT, before, maybe sometime in the future, this issue gets solved in MB Pro, feel free to contact me via PM.

-----------------------------------APILog.txt -------------------------------
Authorized access.
Current date/time: 2020-08-27 17:29:55
api called by http
update U: 1598542190 (Unix time, seconds since 01-Jan-1970 00:00:00 UTC)
update T: 25.5
update TMX: 27.3
update TMN: 10.5
update H: 40.0
update P: 1012.5
update W: 1.8
update G: 2.0
update B: 273.0
update R: 0.0
update RR: 0.0
update S: 370.0
update UV: 3.0
update TIN: 27.1
update HIN: 39.0
update T1: 25.8
update H1: 37.0
update SM1: 35
update SM2: 36
update SM3: 36
update SM4: 68
update SM5: 39
update PP1: 6.0
update PP2: 7.0
Begin of common part of api script
Start handling live data
Checking if extra sensors should be logged
Extra sensors data to save in db: TIN, HIN, UV, T1, H1, SM1, PP1, SM2, PP2, SM3, SM4
(that SM5 is not logged, and not [yet] saved in the database, is an issue at the MT end which has been reported to Jachym)
add live data: D: 11.8
add live data: DTime: 1598542165
add live data: A: 26.5
add live data: ATime: 1598542165
calculated D: 10.9
calculated A: 25.4
Save meteotemplateLive.txt: {"U":1598542190,"T":25.5,"TMX":27.300000000000000710542735760100185871124267578125,"TMN":10.5,"H":40,"P":1012.5,"W":1.8000000000000000444089209850062616169452667236328125,"G":2,"B":273,"R":0,"RR":0,"S":370,"UV":3,"TIN":27.10000000000000142108547152020037174224853515625,"HIN":39,"T1":25.800000000000000710542735760100185871124267578125,"H1":37,"SM1":35,"SM2":36,"SM3":36,"SM4":68,"SM5":39,"PP1":6,"PP2":7,"UTime":1598542195,"TTime":1598542195,"TMXTime":1598542195,"TMNTime":1598542195,"HTime":1598542195,"PTime":1598542195,"WTime":1598542195,"GTime":1598542195,"BTime":1598542195,"RTime":1598542195,"RRTime":1598542195,"STime":1598542195,"UVTime":1598542195,"TINTime":1598542195,"HINTime":1598542195,"T1Time":1598542195,"H1Time":1598542195,"SM1Time":1598542195,"SM2Time":1598542195,"SM3Time":1598542195,"SM4Time":1598542195,"SM5Time":1598542195,"PP1Time":1598542195,"PP2Time":1598542195,"D":10.9000000000000003552713678800500929355621337890625,"DTime":1598542195,"A":25.39999999999999857891452847979962825775146484375,"ATime":1598542195}
MT-from-MBPro-with-PM25sensors.JPG
MT-from-MBPro-with-PM25sensors.JPG (306.94 KiB) Viewed 1180 times
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
User avatar
Gyvate
Platinum Boarder
Platinum Boarder
Posts: 453
Joined: Thu May 14, 2020 4:36 pm
Location: Saarbrücken, Germany

Re: MB Pro sensor data missing (lightning and PM2.5) in meteotemplate upload

Post by Gyvate »

The inbuilt Weather-Netupload for meteotemplate is still faulty/incomplete - still only 4 Soil-Moisture and only 1 PM2.5 and no lightning sensor values posted. In the live data and history these sensor data are available, but they are probably missing in the upload string (call of the meteotemplate api.php)
That's what is sent by MB-Pro:
MB-Pro-to-meteotemplate-inbuilt-http_api.php.jpg
MB-Pro-to-meteotemplate-inbuilt-http_api.php.jpg (193.64 KiB) Viewed 1098 times
and this it what should be sent (my own http call as nothing is moving at this front here):
MB-Pro-to-meteotemplate-customized-http_api.php.jpg
MB-Pro-to-meteotemplate-customized-http_api.php.jpg (202.17 KiB) Viewed 1098 times
@Boris:
if you want, you can use my api call :) - see below

@anybody else using meteotemplate and want to have more than 1 PM2.5, more than 4 Soil Moisture sensors and at least one of the lightning values stored in the meteotemplate database:

http://YOUR-SITE/yourpath-to-the-templa ... api.php?U=[epoch.1:]&T=[th0temp-lastval.1:]&TMX=[th0temp-max5:]&TMN=[th0temp-min5:]&H=[th0hum-lastval.1:]&P=[thb0seapress-lastval:1]&W=[wind0avgwind-lastval=kmh:1]&G=[wind0wind-lastval=kmh:1]&B=[wind0dir-lastval:1]&R=[rain0total-daysum:--]&RR=[rain0rate-lastval:1]&S=[sol0rad-lastval:2]&UV=[uv0index-lastval:1]&TIN=[thb0temp-lastval.1:]&HIN=[thb0hum-lastval.1:]&T1=[th1temp-lastval.1:]&H1=[th1hum-lastval.1:]&SM1=[th20hum-lastval.0:]&SM2=[th21hum-lastval.0:]&SM3=[th22hum-lastval.0:]&SM4=[th23hum-lastval.0:]&SM5=[th24hum-lastval.0:]&L=[lgt0energy-lastval.0:]&PP1=[air0pm-lastval:2]&PP2=[air1pm-lastval:2]&PASS=yourpassword
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
Post Reply