Data extra sensors not transfered from Meteobridge to Meteotemplate
-
Meteo Heijningen
- Observer

- Posts: 19
- Joined: Tue Feb 08, 2022 10:23 am
- Station model: Ecowitt Wittboy GM2001
- Software: Meteobridge
Data extra sensors not transfered from Meteobridge to Meteotemplate
Reposting this problems as I received no reaction so maybe posted it in the wrong topic.
Recently I'm having extra sensors available like Ligntning, CO2 and PM's, but struggling to get the data from Meteobridge to Meteotemplate, the message in the Extra Table Setup Extended says they are still not available.
The fields and values are in the Meteobridge livedata.cgi file:
20240926141748 th0 22.4 70 16.7 0
20240926141748 uv0 0.0 0
20240926141748 rain0 0.0 0.0 0.0 0
20240926141748 thb0 22.9 63 15.5 990.0 990.2 -1 0
20240926141748 wind0 184 0.0 0.0 22.4 0
20240926141720 thb0 22.6 66 15.9 987.6 988.1 1 0
20240926141720 th0 20.3 65 13.5 0
20240926141720 wind0 225 2.9 3.1 22.8 1
20240926141720 t9 22.8 0
20240926141720 rain0 0.0 7636.2 0.0 0
20240926141758 th0 20.1 69 14.2 0
20240926141722 thb0 21.9 66 15.3 988.4 988.6 -1 0
20240926141758 wind0 192 4.8 4.1 20.1 0
20240926141758 sol0 305 0
20240926141746 uv0 2.0 0
20240926141722 lgt0 20.0 5 32 0 0
20240926141740 rain1 0.0 9.1 0.0 0
20240926141746 th9 20.8 67 14.4 0
20240926141722 air4 1.1 0
20240926141722 air5 1.0 0
20240926141722 air6 0.9 0
20240926141722 air7 1.0 0
20240926141722 data4 404.00 0
20240926141801 data10 42.00 0
20240926141801 data11 428.08 0
20240926141801 data12 9.00 0
20240926141801 data13 77.00 0
20240926141801 data15 56.00 0
20240926141801 data16 2.00 0
20240926141801 data14 2.26 0
20240926141801 data17 5.57 0
20240926141801 data18 0.41 0
20240926141801 data19 684513.32 0
20240926141801 data20 1935921.59 0
20240926141801 thb9 45.9 20 17.6 987.6 987.8 -1 0
but not appearing in meteotemplatelive.txt.
For me it looks like it's a mapping issue f.i. the CO2 field in meteobridge is called data4 and it might be that's not recognized by the api.php?
Hopefully somebody can help me with this to get it working
Thanks
Eddy
Recently I'm having extra sensors available like Ligntning, CO2 and PM's, but struggling to get the data from Meteobridge to Meteotemplate, the message in the Extra Table Setup Extended says they are still not available.
The fields and values are in the Meteobridge livedata.cgi file:
20240926141748 th0 22.4 70 16.7 0
20240926141748 uv0 0.0 0
20240926141748 rain0 0.0 0.0 0.0 0
20240926141748 thb0 22.9 63 15.5 990.0 990.2 -1 0
20240926141748 wind0 184 0.0 0.0 22.4 0
20240926141720 thb0 22.6 66 15.9 987.6 988.1 1 0
20240926141720 th0 20.3 65 13.5 0
20240926141720 wind0 225 2.9 3.1 22.8 1
20240926141720 t9 22.8 0
20240926141720 rain0 0.0 7636.2 0.0 0
20240926141758 th0 20.1 69 14.2 0
20240926141722 thb0 21.9 66 15.3 988.4 988.6 -1 0
20240926141758 wind0 192 4.8 4.1 20.1 0
20240926141758 sol0 305 0
20240926141746 uv0 2.0 0
20240926141722 lgt0 20.0 5 32 0 0
20240926141740 rain1 0.0 9.1 0.0 0
20240926141746 th9 20.8 67 14.4 0
20240926141722 air4 1.1 0
20240926141722 air5 1.0 0
20240926141722 air6 0.9 0
20240926141722 air7 1.0 0
20240926141722 data4 404.00 0
20240926141801 data10 42.00 0
20240926141801 data11 428.08 0
20240926141801 data12 9.00 0
20240926141801 data13 77.00 0
20240926141801 data15 56.00 0
20240926141801 data16 2.00 0
20240926141801 data14 2.26 0
20240926141801 data17 5.57 0
20240926141801 data18 0.41 0
20240926141801 data19 684513.32 0
20240926141801 data20 1935921.59 0
20240926141801 thb9 45.9 20 17.6 987.6 987.8 -1 0
but not appearing in meteotemplatelive.txt.
For me it looks like it's a mapping issue f.i. the CO2 field in meteobridge is called data4 and it might be that's not recognized by the api.php?
Hopefully somebody can help me with this to get it working
Thanks
Eddy
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
I'm not a meteobridge expert so can't guide you step by step... but yes you have to rename the 'data4' sensor ( see wiki ).
- CO2 sensors should be named: CO2_#
- PM sensors should be named: PP#
where # is a digit from 1 to 4 ( or 1 to 8 )
P.S.
If you have a ws2001 gateway you can use the ecowitt plugin to send data directly to meteotemplate ( bypassing the meteobridge ) using the custom upload option of the gateway
- CO2 sensors should be named: CO2_#
- PM sensors should be named: PP#
where # is a digit from 1 to 4 ( or 1 to 8 )
P.S.
If you have a ws2001 gateway you can use the ecowitt plugin to send data directly to meteotemplate ( bypassing the meteobridge ) using the custom upload option of the gateway
-
Meteo Heijningen
- Observer

- Posts: 19
- Joined: Tue Feb 08, 2022 10:23 am
- Station model: Ecowitt Wittboy GM2001
- Software: Meteobridge
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
Thanks David that helps.
In case of Meteobridge it means I cannot use the API anymore cause in the mapping part (unfortenately) It's not possible to map data4 to CO2_1 for instance, so can only be done by an event. Will try that first.
But I have a GW2001 gateway which is now sending all data to my Meteobridge Pro.
As you said the GW2001 can also sent data directly to Meteotemplate, I need to figure out it can do both as I need the data in Meteobridge too for other purposes.
Regards
Eddy
In case of Meteobridge it means I cannot use the API anymore cause in the mapping part (unfortenately) It's not possible to map data4 to CO2_1 for instance, so can only be done by an event. Will try that first.
But I have a GW2001 gateway which is now sending all data to my Meteobridge Pro.
As you said the GW2001 can also sent data directly to Meteotemplate, I need to figure out it can do both as I need the data in Meteobridge too for other purposes.
Regards
Eddy
-
alexvanuxem
- Forecaster

- Posts: 212
- Joined: Mon Jan 31, 2022 4:41 pm
- Location: Sint-Katelijne-Waver, Belgium
- Station model: Davis Vantage Pro 2
- Software: Meteobridge
- Contact:
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
there's been a update today on meteobridge that enables sending CO2 data, maybe this helps
-
Meteo Heijningen
- Observer

- Posts: 19
- Joined: Tue Feb 08, 2022 10:23 am
- Station model: Ecowitt Wittboy GM2001
- Software: Meteobridge
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
Thanks Alex for the remark but the update to 6.1 unfortenately failed, and after a reboot, Meteobridge stopped working!
Took me several hours to get MB back online, as there was no communication possible with MB, thanks to "luci" I got it up and running again.
So I stick to 6.0 for the time being.
Thanks
Eddy
Took me several hours to get MB back online, as there was no communication possible with MB, thanks to "luci" I got it up and running again.
So I stick to 6.0 for the time being.
Thanks
Eddy
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
Do you have a log of the call to api.php script generated by your mb?
If you can't 'adjust it' in mb we can do it in meteotemplate itself ( using an existing plugin with no or minor modifications )
If you can't 'adjust it' in mb we can do it in meteotemplate itself ( using an existing plugin with no or minor modifications )
-
Meteo Heijningen
- Observer

- Posts: 19
- Joined: Tue Feb 08, 2022 10:23 am
- Station model: Ecowitt Wittboy GM2001
- Software: Meteobridge
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
Hi David,
The only log file I can see in the Meteobridge web application is a start-up logfile.
What I can see in the Mapping table is the name of the physical sensor and where it's mapped to, and in the live data I can see the mapped sensors and the non mapped sensors, like data#4 (which is coming from the Ecowitt GW2000) for CO2, including their values.
As a test I changed the 0 into 1 for some extra sensors in the apisettings.txt
{"CO2_1":1,"L":1,"LD":1,"LT":1,"UV":1} ignore the UV that's working well, same for solar.
In the Meteotemplate api.log I can see it's looking for the sensors but of course it cannot find them.
Solar radiation is OK and within the allowed limits
Now parsing extra sensors.
Sensor: CO2 sensor 1 not found in API file, skipping...
Sensor: lightning not found in API file, skipping...
Sensor: lightning distance not found in API file, skipping...
Sensor: lightning time not found in API file, skipping...
Sensor UV raw value: 0.0
Limits for this sensor: 0 to 20
Sensor data within acceptable limits.
Initially I thought to map the data#4 sensor to CO2_1 for instance in Meteobridge, but that's not possible, because it's apparently a fixed table.
So if there could be some "mapping mechanism" in Meteotemplate to map CO2, Lightning, Soil, Air etc. and store them to their corresponding place in the database that would be great.
Willing to help you with that.
Thanks
Eddy
The only log file I can see in the Meteobridge web application is a start-up logfile.
What I can see in the Mapping table is the name of the physical sensor and where it's mapped to, and in the live data I can see the mapped sensors and the non mapped sensors, like data#4 (which is coming from the Ecowitt GW2000) for CO2, including their values.
As a test I changed the 0 into 1 for some extra sensors in the apisettings.txt
{"CO2_1":1,"L":1,"LD":1,"LT":1,"UV":1} ignore the UV that's working well, same for solar.
In the Meteotemplate api.log I can see it's looking for the sensors but of course it cannot find them.
Solar radiation is OK and within the allowed limits
Now parsing extra sensors.
Sensor: CO2 sensor 1 not found in API file, skipping...
Sensor: lightning not found in API file, skipping...
Sensor: lightning distance not found in API file, skipping...
Sensor: lightning time not found in API file, skipping...
Sensor UV raw value: 0.0
Limits for this sensor: 0 to 20
Sensor data within acceptable limits.
Initially I thought to map the data#4 sensor to CO2_1 for instance in Meteobridge, but that's not possible, because it's apparently a fixed table.
So if there could be some "mapping mechanism" in Meteotemplate to map CO2, Lightning, Soil, Air etc. and store them to their corresponding place in the database that would be great.
Willing to help you with that.
Thanks
Eddy
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
Appended below there is an extract of the first lines of your cache/apiLog.txt file, it contains all the sensors received by meteotemplate ( all the lines starting with "update" ).
As you can see the pm sensors are named PP0, PP1 and PP2, while meteotemplate expects them to be named PP1, PP2 and PP3, ( this can be corrected in api.php, for example, without problem ).
You have SM1-SM4 ( which should be soil moisture ), T1-T3 and H1-H3, but no other additional extra sensors.
The line saying
means that you have enabled saving these sensors in the meteotemplate database.
But CO2_1, L, LD and LT are not present in the data received ( mb is not sending them )..
What I mean is that if you can send the co2 data to meteotemplate, even if it is called "data4" or in any other way we can rename it in CO2_1, in meteotemplate ( using, for example, the ecowitt pliugin for example )
But how to enable mb to send these additional data, I have no idea.
As you can see the pm sensors are named PP0, PP1 and PP2, while meteotemplate expects them to be named PP1, PP2 and PP3, ( this can be corrected in api.php, for example, without problem ).
You have SM1-SM4 ( which should be soil moisture ), T1-T3 and H1-H3, but no other additional extra sensors.
The line saying
Code: Select all
Extra sensors data to save in db: CO2_1, L, LD, LT, UVBut CO2_1, L, LD and LT are not present in the data received ( mb is not sending them )..
What I mean is that if you can send the co2 data to meteotemplate, even if it is called "data4" or in any other way we can rename it in CO2_1, in meteotemplate ( using, for example, the ecowitt pliugin for example )
But how to enable mb to send these additional data, I have no idea.
Code: Select all
starting log: 2024-12-09 22:05:24
INFOS:
Authorized access.
Current date/time: 2024-12-09 22:05:24
api called by http
update U: 1733778323
update SW: meteobridge
update T: 6.0
update TMX: 6.0
update TMN: 6.0
update H: 87
update P: 1028.8
update W: 26.8
update G: 31.3
update B: 21
update R: 0.0
update RR: 0.0
update S: 0.0
update UV: 0.0
update TIN: 12.0
update HIN: 67
update T1: 7.6
update H1: 92
update T2: 13.7
update H2: 59
update T3: 23.2
update H3: 38
update SM1: 36.0
update SM2: 27.0
update SM3: 29.0
update SM4: 0.0
update PP0: 6.4
update PP1: 6.7
update PP2: 5.8
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: CO2_1, L, LD, LT, UV
add live data: D: 4
add live data: DTime: 1733778287
add live data: A: -0.1
add live data: ATime: 1733778287
calculated D: 4
calculated A: -0.5
Save meteotemplateLive.txt: {"U":1733778323,"SW":"meteobridge","T":6,"TMX":6,"TMN":6,"H":87,"P":1028.8,"W":26.8,"G":31.3,"B":21,"R":0,"RR":0,"S":0,"UV":0,"TIN":12,"HIN":67,"T1":7.6,"H1":92,"T2":13.7,"H2":59,"T3":23.2,"H3":38,"SM1":36,"SM2":27,"SM3":29,"SM4":0,"PP0":6.4,"PP1":6.7,"PP2":5.8,"UTime":1733778324,"SWTime":1733778324,"TTime":1733778324,"TMXTime":1733778324,"TMNTime":1733778324,"HTime":1733778324,"PTime":1733778324,"WTime":1733778324,"GTime":1733778324,"BTime":1733778324,"RTime":1733778324,"RRTime":1733778324,"STime":1733778324,"UVTime":1733778324,"TINTime":1733778324,"HINTime":1733778324,"T1Time":1733778324,"H1Time":1733778324,"T2Time":1733778324,"H2Time":1733778324,"T3Time":1733778324,"H3Time":1733778324,"SM1Time":1733778324,"SM2Time":1733778324,"SM3Time":1733778324,"SM4Time":1733778324,"PP0Time":1733778324,"PP1Time":1733778324,"PP2Time":1733778324,"D":4,"DTime":1733778324,"A":-0.5,"ATime":1733778324}
Start data parsing
Parsing date; Server time: 2024-12-09 22:05:24
Validating date: 1733778323 (2024-12-09 22:05:23)
Date is valid; difference with server time is -1 s
-
Meteo Heijningen
- Observer

- Posts: 19
- Joined: Tue Feb 08, 2022 10:23 am
- Station model: Ecowitt Wittboy GM2001
- Software: Meteobridge
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
Small correction to your remarks David, the CO2_1, L, LD and LT are not stored in the database, I only changed the 0 to 1 in the apisettings.txt to see what's happens, The apisetup.php still saying for all the extra sensors NOT AVAILABLE.
Regarding the air quality sensors, yesterday I mapped 3 of them, (there are 4 of them but I can only map 3!)
air0!4pm to air1pm air quality (2.5 microns)
air0!5pm to air0pm air quality (10 microns or default)
air0!6pm to air2pm air quality (1 micron)
The apilog.txt tells me they are picked up by MT and updated in the MT database
update SM1: 36.0
update SM2: 27.0
update SM3: 30.0
update SM4: 0.0
update PP0: 9.1
update PP1: 9.8
update PP2: 8.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: CO2_1, L, LD, LT, UV
add live data: D: 3.4
add live data: DTime: 1733829803
add live data: A: -0.5
add live data: ATime: 1733829803
calculated D: 3.6
calculated A: -0.7
Save meteotemplateLive.txt: {"U":1733829832,"SW":"meteobridge","T":5.5,"TMX":5.5,"TMN":5.4,"H":88,"P":1029.6,"W":24.7,"G":32,"B":28,"R":0,"RR":0,"S":26,"UV":0,"TIN":14.8,"HIN":62,"T1":7.9,"H1":90,"T2":15.2,"H2":55,"T3":22.1,"H3":41,"SM1":36,"SM2":27,"SM3":30,"SM4":0,"PP0":9.1,"PP1":9.8,"PP2":8,"UTime":1733829833,"SWTime":1733829833,"TTime":1733829833,"TMXTime":1733829833,"TMNTime":1733829833,"HTime":1733829833,"PTime":1733829833,"WTime":1733829833,"GTime":1733829833,"BTime":1733829833,"RTime":1733829833,"RRTime":1733829833,"STime":1733829833,"UVTime":1733829833,"TINTime":1733829833,"HINTime":1733829833,"T1Time":1733829833,"H1Time":1733829833,"T2Time":1733829833,"H2Time":1733829833,"T3Time":1733829833,"H3Time":1733829833,"SM1Time":1733829833,"SM2Time":1733829833,"SM3Time":1733829833,"SM4Time":1733829833,"PP0Time":1733829833,"PP1Time":1733829833,"PP2Time":1733829833,"D":3.6,"DTime":1733829833,"A":-0.7,"ATime":1733829833}
Start data parsing
Parsing date; Server time: 2024-12-10 12:23:53
Same for Soil moisture, they are not mapped in MB but seen in MB as th0!20hum, th0!21hum, th0!22hum, th0!23hum
However according to apisetup.php none of them are stored as it says not available, maybe the fieldname is not correct as it says the fieldnames are PM# and SM#.
For me there's somewhere in the API something that tells for instance PP0 it has to pickup the air0pm in MB, and store them in the database. I only cannot see them in the apisetup.php.
Regarding the above for CO2 something same should happen, MT should look for data#4 in MB (which is available in MB) and rename that to CO2_1 and put the value in the CO2_2 field in MT.
Hopefully I'm clear
Thanks
Eddy
Regarding the air quality sensors, yesterday I mapped 3 of them, (there are 4 of them but I can only map 3!)
air0!4pm to air1pm air quality (2.5 microns)
air0!5pm to air0pm air quality (10 microns or default)
air0!6pm to air2pm air quality (1 micron)
The apilog.txt tells me they are picked up by MT and updated in the MT database
update SM1: 36.0
update SM2: 27.0
update SM3: 30.0
update SM4: 0.0
update PP0: 9.1
update PP1: 9.8
update PP2: 8.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: CO2_1, L, LD, LT, UV
add live data: D: 3.4
add live data: DTime: 1733829803
add live data: A: -0.5
add live data: ATime: 1733829803
calculated D: 3.6
calculated A: -0.7
Save meteotemplateLive.txt: {"U":1733829832,"SW":"meteobridge","T":5.5,"TMX":5.5,"TMN":5.4,"H":88,"P":1029.6,"W":24.7,"G":32,"B":28,"R":0,"RR":0,"S":26,"UV":0,"TIN":14.8,"HIN":62,"T1":7.9,"H1":90,"T2":15.2,"H2":55,"T3":22.1,"H3":41,"SM1":36,"SM2":27,"SM3":30,"SM4":0,"PP0":9.1,"PP1":9.8,"PP2":8,"UTime":1733829833,"SWTime":1733829833,"TTime":1733829833,"TMXTime":1733829833,"TMNTime":1733829833,"HTime":1733829833,"PTime":1733829833,"WTime":1733829833,"GTime":1733829833,"BTime":1733829833,"RTime":1733829833,"RRTime":1733829833,"STime":1733829833,"UVTime":1733829833,"TINTime":1733829833,"HINTime":1733829833,"T1Time":1733829833,"H1Time":1733829833,"T2Time":1733829833,"H2Time":1733829833,"T3Time":1733829833,"H3Time":1733829833,"SM1Time":1733829833,"SM2Time":1733829833,"SM3Time":1733829833,"SM4Time":1733829833,"PP0Time":1733829833,"PP1Time":1733829833,"PP2Time":1733829833,"D":3.6,"DTime":1733829833,"A":-0.7,"ATime":1733829833}
Start data parsing
Parsing date; Server time: 2024-12-10 12:23:53
Same for Soil moisture, they are not mapped in MB but seen in MB as th0!20hum, th0!21hum, th0!22hum, th0!23hum
However according to apisetup.php none of them are stored as it says not available, maybe the fieldname is not correct as it says the fieldnames are PM# and SM#.
For me there's somewhere in the API something that tells for instance PP0 it has to pickup the air0pm in MB, and store them in the database. I only cannot see them in the apisetup.php.
Regarding the above for CO2 something same should happen, MT should look for data#4 in MB (which is available in MB) and rename that to CO2_1 and put the value in the CO2_2 field in MT.
Hopefully I'm clear
Thanks
Eddy
-
alexvanuxem
- Forecaster

- Posts: 212
- Joined: Mon Jan 31, 2022 4:41 pm
- Location: Sint-Katelijne-Waver, Belgium
- Station model: Davis Vantage Pro 2
- Software: Meteobridge
- Contact:
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
you should read this post:
https://www.wxforum.net/index.php?topic=40447.0
there it is explained how to upload extra sensors from MB to MT.
succes!!
https://www.wxforum.net/index.php?topic=40447.0
there it is explained how to upload extra sensors from MB to MT.
succes!!
-
Meteo Heijningen
- Observer

- Posts: 19
- Joined: Tue Feb 08, 2022 10:23 am
- Station model: Ecowitt Wittboy GM2001
- Software: Meteobridge
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
Thanks Alex,
The string below as I understood is sending all data from MB to MT including the extra sensors.
..../template/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:]&T2=[th2temp-lastval.1:]&H2=[th2hum-lastval.1:]&T3=[th3temp-lastval.1:]&H3=[th3hum-lastval.1:]&T4=[th4temp-lastval.1:]&H4=[th4hum-lastval.1:]&SM1=[th20hum-lastval.0:]&SM2=[th21hum-lastval.0:]&SM3=[th22hum-lastval.0:]&SM4=[th23hum-lastval.0:]&SM5=[th24hum-lastval.0:]&L=[lgt0!0total-dmax.0:]&LD=[lgt0!0dist-lastval.0:77]<=[lgt0!0total-nonzerotime=epoch:]&PP1=[air0!0pm-lastval:2]&PP2=[air0!1pm-lastval:2]&PP3=[air0!4pm-lastval:2]&PP4=[air0!5-lastval:2]&CO2_1=[data4num-lastval:2]&TS1=[th5temp-lastval.1:]&TS2=[th6temp-lastval.1:]&TS3=[th7temp-lastval.1:]&T5=[th5temp-lastval.1:]&T6=[th6temp-lastval.1:]&H6=[th6hum-lastval.1:]&T7=[th7temp-lastval.1:]&H7=[th7hum-lastval.1:]&T8=[th0temp-lastval.1:]&H8=[th0hum-lastval.1:]&PASS=xxxxxxxx
But they still have to land in the MT database, at the moment the air quality and soil moisture are already pickup by MT, they only land somewhere in de database where I can't see them I guess. Today I tried to add the PP1 and SM1 in the graphCombined block, but the result was a blanc block with nothing in it, all the other data was gone too!
But just saying all this, and that's something I would ask to David, is it possible that the "normal" sensor can be retieved by the standard API and the extra senors via the HTTP protocol, so separately?
In the HTTP "package" the mapping can be done for instance CO2, see "&CO2_1=[data4num-lastval:2]".
Thanks
Eddy
The string below as I understood is sending all data from MB to MT including the extra sensors.
..../template/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:]&T2=[th2temp-lastval.1:]&H2=[th2hum-lastval.1:]&T3=[th3temp-lastval.1:]&H3=[th3hum-lastval.1:]&T4=[th4temp-lastval.1:]&H4=[th4hum-lastval.1:]&SM1=[th20hum-lastval.0:]&SM2=[th21hum-lastval.0:]&SM3=[th22hum-lastval.0:]&SM4=[th23hum-lastval.0:]&SM5=[th24hum-lastval.0:]&L=[lgt0!0total-dmax.0:]&LD=[lgt0!0dist-lastval.0:77]<=[lgt0!0total-nonzerotime=epoch:]&PP1=[air0!0pm-lastval:2]&PP2=[air0!1pm-lastval:2]&PP3=[air0!4pm-lastval:2]&PP4=[air0!5-lastval:2]&CO2_1=[data4num-lastval:2]&TS1=[th5temp-lastval.1:]&TS2=[th6temp-lastval.1:]&TS3=[th7temp-lastval.1:]&T5=[th5temp-lastval.1:]&T6=[th6temp-lastval.1:]&H6=[th6hum-lastval.1:]&T7=[th7temp-lastval.1:]&H7=[th7hum-lastval.1:]&T8=[th0temp-lastval.1:]&H8=[th0hum-lastval.1:]&PASS=xxxxxxxx
But they still have to land in the MT database, at the moment the air quality and soil moisture are already pickup by MT, they only land somewhere in de database where I can't see them I guess. Today I tried to add the PP1 and SM1 in the graphCombined block, but the result was a blanc block with nothing in it, all the other data was gone too!
But just saying all this, and that's something I would ask to David, is it possible that the "normal" sensor can be retieved by the standard API and the extra senors via the HTTP protocol, so separately?
In the HTTP "package" the mapping can be done for instance CO2, see "&CO2_1=[data4num-lastval:2]".
Thanks
Eddy
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
To save extrasensors in database you have to use the meteotemplate control panel ( apiSetup.php you refer to ).
First of all revert the changes you made in apiSettings.txt.
Then in apiSetup.php set the extrasensors you want to be saved in db ( this will update the apiSettings.txt, but also create the fields in the alldataExtra database table ).
You are allowed to do it only for 'received' sensors ( those received by api.php and present in meteotemplateLive.txt ), in your case only PP1-2, SM1-SM4, T1-3, H1-3
So, generally, you have to send the data ( containing extrasensors ) to api.php then you may save extra sensors in database.
Yes, for the first co2 sensor you have to send "&CO2_1=XXX" to meteotemplate ( so if the syntax is ok for mb, "&CO2_1=[data4num-lastval:2]" )
Also send pm sensors data as PP1, PP2 and PP3
Also if you need more than 4 extrasensors you may use one of my mod.
First of all revert the changes you made in apiSettings.txt.
Then in apiSetup.php set the extrasensors you want to be saved in db ( this will update the apiSettings.txt, but also create the fields in the alldataExtra database table ).
You are allowed to do it only for 'received' sensors ( those received by api.php and present in meteotemplateLive.txt ), in your case only PP1-2, SM1-SM4, T1-3, H1-3
So, generally, you have to send the data ( containing extrasensors ) to api.php then you may save extra sensors in database.
Yes, for the first co2 sensor you have to send "&CO2_1=XXX" to meteotemplate ( so if the syntax is ok for mb, "&CO2_1=[data4num-lastval:2]" )
Also send pm sensors data as PP1, PP2 and PP3
Also if you need more than 4 extrasensors you may use one of my mod.
-
Meteo Heijningen
- Observer

- Posts: 19
- Joined: Tue Feb 08, 2022 10:23 am
- Station model: Ecowitt Wittboy GM2001
- Software: Meteobridge
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
In the apisetup.php I see the extrasensors with values (except Lightning and CO2) I changed the 'do not save in database' to 'save in database'.
After that I clicked on save, but when I reopen the apisetup.php all extra sensors were changed back to 'do not save in database', and the apisettings.txt is completely empty.
No idea what's happening here!
After that I clicked on save, but when I reopen the apisetup.php all extra sensors were changed back to 'do not save in database', and the apisettings.txt is completely empty.
No idea what's happening here!
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
That's not good, seems like some error happened.
The 'magic' is done calling the following link ( you should already be logged as administrator ), in which you can enable any extra sensor, it should show a pop whith the result of the sensor creation, I added an extra "&error" at the end to add extra verbosity, to understand what's going wrong. If the apiSettings.txt is not present it will be regenerated.
In this link only UV is enabled
The 'magic' is done calling the following link ( you should already be logged as administrator ), in which you can enable any extra sensor, it should show a pop whith the result of the sensor creation, I added an extra "&error" at the end to add extra verbosity, to understand what's going wrong. If the apiSettings.txt is not present it will be regenerated.
In this link only UV is enabled
Code: Select all
http://famgladdines.nl/meteotemplate/template/update/saveAPISettings.php?TIN=0&HIN=0&UV=1&SN=0&SD=0&L=0&NL=0&SS=0&T1=0&H1=0&TS1=0&LW1=0<1=0&SM1=0&CO2_1=0&NO2_1=0&SO2_1=0&CO_1=0&PP1=0&O3_1=0&T2=0&H2=0&TS2=0&LW2=0<2=0&SM2=0&CO2_2=0&NO2_2=0&SO2_2=0&CO_2=0&PP2=0&O3_2=0&T3=0&H3=0&TS3=0&LW3=0<3=0&SM3=0&CO2_3=0&NO2_3=0&SO2_3=0&CO_3=0&PP3=0&O3_3=0&T4=0&H4=0&TS4=0&LW4=0<4=0&SM4=0&CO2_4=0&NO2_4=0&SO2_4=0&CO_4=0&PP4=0&O3_4=0&error-
Meteo Heijningen
- Observer

- Posts: 19
- Joined: Tue Feb 08, 2022 10:23 am
- Station model: Ecowitt Wittboy GM2001
- Software: Meteobridge
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
I've run the line http://famgladdines.nl/meteotemplate/te ... .......etc and the result is this message in my browser 'Checking columns...' and then it stops!
The apisettings.txt only showing this []
Maybe I need an update of the php scripts in the update folder?
The apisettings.txt only showing this []
Maybe I need an update of the php scripts in the update folder?
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
Attached is the stock meteotemplate 19.0 script, I've only enabled a few debug prints.
This is the result I obtain with the following call
Do the alldataExtra table exist in your database? And which fields does it contains?
This is the result I obtain with the following call
Code: Select all
http://famgladdines.nl/meteotemplate/template/update/saveAPISettings.php?TIN=1&HIN=1&UV=1&SN=1&SD=0&L=0&NL=0&SS=0&T1=0&H1=0&TS1=1&LW1=0<1=0&SM1=1&CO2_1=0&NO2_1=0&SO2_1=0&CO_1=0&PP1=1&O3_1=0&T2=0&H2=0&TS2=0&LW2=0<2=0&SM2=0&CO2_2=0&NO2_2=0&SO2_2=0&CO_2=0&PP2=0&O3_2=0&T3=0&H3=0&TS3=0&LW3=0<3=0&SM3=0&CO2_3=0&NO2_3=0&SO2_3=0&CO_3=0&PP3=0&O3_3=0&T4=0&H4=0&TS4=0&LW4=0<4=0&SM4=0&CO2_4=0&NO2_4=0&SO2_4=0&CO_4=0&PP4=0&O3_4=0Code: Select all
key=TIN value=1
key=HIN value=1
key=UV value=1
key=SN value=1
key=SD value=0
key=L value=0
key=NL value=0
key=SS value=0
key=T1 value=0
key=H1 value=0
key=TS1 value=1
key=LW1 value=0
key=LT1 value=0
key=SM1 value=1
key=CO2_1 value=0
key=NO2_1 value=0
key=SO2_1 value=0
key=CO_1 value=0
key=PP1 value=1
key=O3_1 value=0
key=T2 value=0
key=H2 value=0
key=TS2 value=0
key=LW2 value=0
key=LT2 value=0
key=SM2 value=0
key=CO2_2 value=0
key=NO2_2 value=0
key=SO2_2 value=0
key=CO_2 value=0
key=PP2 value=0
key=O3_2 value=0
key=T3 value=0
key=H3 value=0
key=TS3 value=0
key=LW3 value=0
key=LT3 value=0
key=SM3 value=0
key=CO2_3 value=0
key=NO2_3 value=0
key=SO2_3 value=0
key=CO_3 value=0
key=PP3 value=0
key=O3_3 value=0
key=T4 value=0
key=H4 value=0
key=TS4 value=0
key=LW4 value=0
key=LT4 value=0
key=SM4 value=0
key=CO2_4 value=0
key=NO2_4 value=0
key=SO2_4 value=0
key=CO_4 value=0
key=PP4 value=0
key=O3_4 value=0
Table already exists.
Checking columns...
Checking column: TIN
This column already exists, skipping.
Checking column: HIN
This column already exists, skipping.
Checking column: UV
This column already exists, skipping.
Checking column: SN
This column does not exist, creating it.
query: ALTER TABLE `alldataExtra` ADD `SN` DECIMAL(5,1) NULL
error num = 0
error =
Checking column: TS1
This column already exists, skipping.
Checking column: SM1
This column already exists, skipping.
Checking column: PP1
This column already exists, skipping.- Attachments
-
- saveAPISettings.zip
- (1.65 KiB) Downloaded 512 times
-
Meteo Heijningen
- Observer

- Posts: 19
- Joined: Tue Feb 08, 2022 10:23 am
- Station model: Ecowitt Wittboy GM2001
- Software: Meteobridge
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
I replaced the saveAPISettings.php and it starts working now,
In the apiSettings I see:
{"TIN":"1","HIN":"1","UV":"1","SN":"0","SD":"0","L":"0","LD":"0","LT":"0","NL":"0","SS":"0","T1":"1","H1":"1","TS1":"0","LW1":"0","LT1":"0","SM1":"1","CO2_1":"0","NO2_1":"0","SO2_1":"0","CO_1":"0","PP1":"1","O3_1":"0","T2":"1","H2":"1","TS2":"0","LW2":"0","LT2":"0","SM2":"1","CO2_2":"0","NO2_2":"0","SO2_2":"0","CO_2":"0","PP2":"1","O3_2":"0","T3":"1","H3":"1","TS3":"0","LW
3":"0","LT3":"0","SM3":"1","CO2_3":"0","NO2_3":"0","SO2_3":"0","CO_3":"0","PP3":"0","O3_3":"0","T4":"0","H4":"0","TS4":"0","LW4":"0","LT4":"0","SM4":"1","CO2_4":"0","NO2_4":"0","SO2_4":"0","CO_4":"0","PP4":"0","O3_4":"0"}
In the apilog.txt I see this:
update UV: 0.0
update TIN: 15.4
update HIN: 66
update T1: 7.1
update H1: 97
update T2: 15.2
update H2: 55
update T3: 18.2
update H3: 50
update SM1: 36.0
update SM2: 26.0
update SM3: 29.0
update SM4: 0.0
update PP0: 12.3
update PP1: 11.0
update PP2: 9.5
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, T2, H2, SM2, PP2, T3, H3, SM3, SM4
If I open tableEditeExtra.php these sensors TIN, HIN, UV, T1, H1, SM1, PP1, T2, H2, SM2, PP2, T3, H3, SM3, SM4 including their values. The PP0 is missing and according the apilog it's pickedup by the API but not present in the database.
I also see the fieldnames SN and TS1 but no values (no idea what sensors they are) and ofcourse the fields L, LD, LT, CO2_1 which is obvious as they are not pickedup by the API.
I put the T1, SM1 and PP1 as a test in the stationdata block, and that works fine, only units and sensor type/name is missing, you can have a look on my website, they are still there
What I'm going to try next is to get CO2 and lightning via HTTP to MT but I'm afraid doing this will bite the API as he gets 2 calls now as the regular sensors are retrieved via the normal network services in MB (thus the API) en the other ones via an HTTP event in MB which is also calling the api?
But I'm already happy that a big part is working now.
In the apiSettings I see:
{"TIN":"1","HIN":"1","UV":"1","SN":"0","SD":"0","L":"0","LD":"0","LT":"0","NL":"0","SS":"0","T1":"1","H1":"1","TS1":"0","LW1":"0","LT1":"0","SM1":"1","CO2_1":"0","NO2_1":"0","SO2_1":"0","CO_1":"0","PP1":"1","O3_1":"0","T2":"1","H2":"1","TS2":"0","LW2":"0","LT2":"0","SM2":"1","CO2_2":"0","NO2_2":"0","SO2_2":"0","CO_2":"0","PP2":"1","O3_2":"0","T3":"1","H3":"1","TS3":"0","LW
3":"0","LT3":"0","SM3":"1","CO2_3":"0","NO2_3":"0","SO2_3":"0","CO_3":"0","PP3":"0","O3_3":"0","T4":"0","H4":"0","TS4":"0","LW4":"0","LT4":"0","SM4":"1","CO2_4":"0","NO2_4":"0","SO2_4":"0","CO_4":"0","PP4":"0","O3_4":"0"}
In the apilog.txt I see this:
update UV: 0.0
update TIN: 15.4
update HIN: 66
update T1: 7.1
update H1: 97
update T2: 15.2
update H2: 55
update T3: 18.2
update H3: 50
update SM1: 36.0
update SM2: 26.0
update SM3: 29.0
update SM4: 0.0
update PP0: 12.3
update PP1: 11.0
update PP2: 9.5
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, T2, H2, SM2, PP2, T3, H3, SM3, SM4
If I open tableEditeExtra.php these sensors TIN, HIN, UV, T1, H1, SM1, PP1, T2, H2, SM2, PP2, T3, H3, SM3, SM4 including their values. The PP0 is missing and according the apilog it's pickedup by the API but not present in the database.
I also see the fieldnames SN and TS1 but no values (no idea what sensors they are) and ofcourse the fields L, LD, LT, CO2_1 which is obvious as they are not pickedup by the API.
I put the T1, SM1 and PP1 as a test in the stationdata block, and that works fine, only units and sensor type/name is missing, you can have a look on my website, they are still there
What I'm going to try next is to get CO2 and lightning via HTTP to MT but I'm afraid doing this will bite the API as he gets 2 calls now as the regular sensors are retrieved via the normal network services in MB (thus the API) en the other ones via an HTTP event in MB which is also calling the api?
But I'm already happy that a big part is working now.
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
1) I think you should use only one method, that described in the wxforum link, for sending all the sensors you have in one call ( obviously no need to send the one you don't have ), this will also fix the PP0 issue.
2) Is your api.php the original script included in meteotemplate 19?
If this is the case you will be able to save all 'meteotemplate well known' extra sensors ( those described in the wiki ), this does not include the LD and LT sensors. If this is not a problem you can keep the 'stock api.php'
3) SN is snowfall, TS1 is soil temperature
2) Is your api.php the original script included in meteotemplate 19?
If this is the case you will be able to save all 'meteotemplate well known' extra sensors ( those described in the wiki ), this does not include the LD and LT sensors. If this is not a problem you can keep the 'stock api.php'
3) SN is snowfall, TS1 is soil temperature
-
Alvaro Poggiani
- Advisor

- Posts: 79
- Joined: Fri Dec 29, 2023 3:29 pm
- Station model: Davis Vantage Pro2 Plus
- Software: Meteobridge Pro2
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
Davide e Eddy, continuate così.
In generale seguo da tempo “Davide Fa” con profondo interesse e curiosa attenzione nei suoi vari aggiornamenti e, nello specifico, seguo questo argomento trattato con Eddy perché la risoluzione del problema riguarda anche me.
Anche io infatti non riesco a far comunicare Meteobridge Pro (che registra e invia i dati Ecowitt di un rilevatore WH57 trasmessi da una GW1100) con il database di Meteotemplate.
Purtroppo le mie conoscenze in materia sono alquanto limitate per cui, pur cercando di seguirvi, capisco il senso del discorso e dove si annida il problema, ma quando la spiegazione pern risolvere si addentra (necessariamente) negli specifici dei dettagli tecnici
…mi perdo nel mare magnum della mia ignoranza e non riesco ad andare avanti con la comprensione.
Come dicevo sono curioso e interessato ma dove e come potrei riuscire a colmare quelle lacune che mi impediscono di districarmi tra i tecnicismi gergali che non conosco ?
Capisco e so che, probabilmente, occorrerebbe cominciare da “troppo lontano” ma vi assicuro che, da parte mia, la curiosità è tanta così come lo sono l’interesse e la volontà.
Continuate così, dicevo all’inizio:
continuerò a seguirvi e magari riuscirò anch’io a fare un po’ di questa strada che porta alla conoscenza ...nonostante che per me sia in salita.
Grazie
Alvaro
https://www.meteovarazze.it
In generale seguo da tempo “Davide Fa” con profondo interesse e curiosa attenzione nei suoi vari aggiornamenti e, nello specifico, seguo questo argomento trattato con Eddy perché la risoluzione del problema riguarda anche me.
Anche io infatti non riesco a far comunicare Meteobridge Pro (che registra e invia i dati Ecowitt di un rilevatore WH57 trasmessi da una GW1100) con il database di Meteotemplate.
Purtroppo le mie conoscenze in materia sono alquanto limitate per cui, pur cercando di seguirvi, capisco il senso del discorso e dove si annida il problema, ma quando la spiegazione pern risolvere si addentra (necessariamente) negli specifici dei dettagli tecnici
…mi perdo nel mare magnum della mia ignoranza e non riesco ad andare avanti con la comprensione.
Come dicevo sono curioso e interessato ma dove e come potrei riuscire a colmare quelle lacune che mi impediscono di districarmi tra i tecnicismi gergali che non conosco ?
Capisco e so che, probabilmente, occorrerebbe cominciare da “troppo lontano” ma vi assicuro che, da parte mia, la curiosità è tanta così come lo sono l’interesse e la volontà.
Continuate così, dicevo all’inizio:
continuerò a seguirvi e magari riuscirò anch’io a fare un po’ di questa strada che porta alla conoscenza ...nonostante che per me sia in salita.
Grazie
Alvaro
https://www.meteovarazze.it
-
Meteo Heijningen
- Observer

- Posts: 19
- Joined: Tue Feb 08, 2022 10:23 am
- Station model: Ecowitt Wittboy GM2001
- Software: Meteobridge
Re: Data extra sensors not transfered from Meteobridge to Meteotemplate
Davide I like to know how the ecowittNet plugin works as in the past weekend I connected it with my GW2000 and in the setup page I saw all the sensors and values available in the GW2000 so the connection works perfect.
As a test I 'mapped' the co2 to the MT Field CO2_1, enabled it and clicked on save.
The settings.php is showing this, regarding the CO2:
$MTDescription = json_decode('{"outdoor":"","indoor":"","solar_and_uvi":"","rainfall":"","rainfall_piezo":"","wind":"","pressure":"","lightning":"Lightning","co2_aqi_combo":"CO2","pm25
and
"co2_aqi_combo":{"co2":{"value":"CO2_1","time":""},"24_hours_average":{"value":"","time":""}
and
"co2_aqi_combo":{"co2":{"value":"yes","time":"yes"},"24_hours_average":{"value":"yes","time":"yes"}
So it looks like the setting is ok, but, after starting the cronjob, nothing appears in the database, so my question is actually what should happen?
Btw I'm using api v3.4, I tried 3.6 but after a while it stops loading so I reverted back to 3.4
As a test I 'mapped' the co2 to the MT Field CO2_1, enabled it and clicked on save.
The settings.php is showing this, regarding the CO2:
$MTDescription = json_decode('{"outdoor":"","indoor":"","solar_and_uvi":"","rainfall":"","rainfall_piezo":"","wind":"","pressure":"","lightning":"Lightning","co2_aqi_combo":"CO2","pm25
and
"co2_aqi_combo":{"co2":{"value":"CO2_1","time":""},"24_hours_average":{"value":"","time":""}
and
"co2_aqi_combo":{"co2":{"value":"yes","time":"yes"},"24_hours_average":{"value":"yes","time":"yes"}
So it looks like the setting is ok, but, after starting the cronjob, nothing appears in the database, so my question is actually what should happen?
Btw I'm using api v3.4, I tried 3.6 but after a while it stops loading so I reverted back to 3.4