new airQualitySensor block ( updated airQualityEcowitt )

davidefa
Expert
Expert
Posts: 652
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

new airQualitySensor block ( updated airQualityEcowitt )

Post by davidefa » Sat Feb 20, 2021 4:59 pm

New block to show data from particulate sensor ( in my case a Plantower pms7003 ).
Shows different readings pm1.0/pm2.5/pm10.0 from same or different sensors ( configurable )

NOTE
The block is derived from airQualityEcowitt module ( only slight modifications )
Attachments
airQualitySensor_1.2.zip
(45.96 KiB) Downloaded 86 times
Image

andyk1
Professional
Professional
Posts: 379
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by andyk1 » Tue Mar 09, 2021 5:41 am

Sorry, I just saw this. I did try some of your mods and have the ecowitt PP1 working with modes of my own but not the battery status and a few others. I go back to looking at it from time to time but can't seem to get some ecowitt sensors to read such as lightning. I am also using an Rpi 4B as my new Meteobridge.
Image

davidefa
Expert
Expert
Posts: 652
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by davidefa » Tue Mar 09, 2021 4:15 pm

The ecowitt block expects the WBAT, RBAT, LBAT... fields for the sensors battery status. these are read from the meteotemplateLive.txt file.
You should configure meteobridge to upload these fields too.
I have a little bit updated the block adding the WH65 and WH25 sensors reported by my wh2650.

Code: Select all

		"WS80"    => array("module_name" => "WS80", "battery_percent" => ($apiData['WBAT'] * 31), "last_seen" => $apiData['U'], "data_type" => array("Wind","Temperature","Humidity","Pressure","UV"), "firmware" => $firmware, "rf_status" => (117 - ($apiData['WBAT'] * 18)) ),
		"WH65"    => array("module_name" => "WH65", "battery_percent" => ($apiData['WH65BAT'] * 31), "last_seen" => $apiData['U'], "data_type" => array("Wind","Temperature","Humidity","Pressure","Rain","Sun","UV"), "firmware" => $firmware, "rf_status" => (117 - ($apiData['WBAT'] * 18)) ),
		"WH25"    => array("module_name" => "WH25", "battery_percent" => ($apiData['WH25BAT'] * 31), "last_seen" => $apiData['U'], "data_type" => array("Temperature","Humidity","Pressure"), "firmware" => $firmware,  "rf_status" => (117 - ($apiData['WH25BAT'] * 18)) ),
		"WH40"    => array("module_name" => "WH40", "battery_percent" => ($apiData['RBAT'] * 62), "last_seen" => $apiData['U'], "data_type" => array("Rain"), "firmware" => $firmware, "rf_status" => (89 - ($apiData['RBAT'] * 18)) ),
		"WH41"    => array("module_name" => "WH41", "battery_percent" => ($apiData['PP1BAT'] * 18), "last_seen" => $apiData['U'], "data_type" => array("pp25"), "firmware" => $firmware, "rf_status" => (150 - ($apiData['PP1BAT'] * 18)) ),
		"WH51_1"  => array("module_name" => "WH51_1", "battery_percent" => ($apiData['SM1BAT'] * 58), "last_seen" => $apiData['U'], "data_type" => array("Soil"), "firmware" => $firmware, "rf_status" => (91 - ($apiData['SM1BAT'] * 18)) ),
		"WH51_2"  => array("module_name" => "WH51_2", "battery_percent" => ($apiData['SM2BAT'] * 58), "last_seen" => $apiData['U'], "data_type" => array("Soil"), "firmware" => $firmware, "rf_status" => (91 - ($apiData['SM2BAT'] * 18)) ),
		"WH57"    => array("module_name" => "WH57", "battery_percent" => ($apiData['LBAT'] * 19), "last_seen" => $apiData['U'], "data_type" => array("Lightning"), "firmware" => $firmware, "rf_status" => (150 - ($apiData['LBAT'] * 18)) ),

In the lightning block, I see there's a reference to L, LD, LT, so you should upload these fields too ( I have no sensor so I'm not 100% sure about this )

Code: Select all

		$lightning_num = $apiData["L"];		//Number of lightning from the power on
		$lightning_dist = $apiData["LD"];	//Distance of last thunderstorm
		$lightning_time = $apiData["LT"];	//Unix Time last lightning
Attachments
ecowittModules_1.3.zip
(3.51 KiB) Downloaded 63 times
Image

mchd17
Forecaster
Forecaster
Posts: 188
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by mchd17 » Mon Apr 19, 2021 12:42 pm

any thoughts on getting this to work with a davis airlink?
Image

davidefa
Expert
Expert
Posts: 652
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by davidefa » Mon Apr 19, 2021 2:14 pm

This block shows the PP1-PP4 fields of the alldataExtra database table.
Once you feed your sensor's data to PP1-PP4 you should be good to go.
So it should work with an AirLink.
Check ( in the control panel ) that the extra sensors are shown correctly.


extraSensors.png
extraSensors.png (184.17 KiB) Viewed 3816 times
Image

mchd17
Forecaster
Forecaster
Posts: 188
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by mchd17 » Mon Apr 19, 2021 3:22 pm

PP1 and PP2 show up in alldataExtra database table. I see no PP3.
airlink1.png
airlink1.png (173.48 KiB) Viewed 3813 times
I see no PP3 and PP4 within the API file on the Extra Table Setup. I have PP1 and PP2 Save to Database. Using meteobridge Nano.
airlink2.png
airlink2.png (167.72 KiB) Viewed 3813 times
Airqualitysensor block shows nothing.
airlink3.png
airlink3.png (353.01 KiB) Viewed 3813 times
Image

davidefa
Expert
Expert
Posts: 652
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by davidefa » Mon Apr 19, 2021 4:43 pm

Ok, you are receiving only 2 of the 3 measurements of the davis airlink.

You can't include PP3 ( in configuration ) as PP3 is not present in alladataExtra ( the query to database will fail ).
If your airlink measure pm1.0, pm2.5 and pm10.0 you should verify why the third data is not received.
The files in the cache directory ( apiLog.txt, apiCache.txt... ) should give you a hint.

P.S.
I took a glimpse of your cache data, here an extract:
update PP0: 21.2

update PP1: 18.2

update PP2: 13.6
You should 'shift' your PP0-PP2 to PP1-PP3 ( after fixing this your block configuration should be ok )
Image

mchd17
Forecaster
Forecaster
Posts: 188
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by mchd17 » Mon Apr 19, 2021 6:15 pm

Do I do this shift in meteobridge?
Image

mchd17
Forecaster
Forecaster
Posts: 188
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by mchd17 » Mon Apr 19, 2021 6:39 pm

airlink6.png
airlink6.png (235.64 KiB) Viewed 3803 times
airlink5.png
airlink5.png (169.12 KiB) Viewed 3803 times
Image

davidefa
Expert
Expert
Posts: 652
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by davidefa » Mon Apr 19, 2021 7:03 pm

Yes you should do it in meteobridge ( but I don't know how )

One momentary and partial solution is to change your block configuration as follow (
This will permit your block to show only pm2.5 and pm10.0 data until you fix the meteobridge upload ):


airQuality.png
airQuality.png (268.58 KiB) Viewed 3801 times
Image

mchd17
Forecaster
Forecaster
Posts: 188
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by mchd17 » Mon Apr 19, 2021 8:00 pm

airlink7.png
airlink7.png (297.31 KiB) Viewed 3797 times
This is how i had to do it. I compared the API file to Meteobridge Live Data. So my PP0 is actually the PM10.

Thanks for helping out this far
Image

Ironside1977
Observer
Observer
Posts: 11
Joined: Thu Apr 09, 2020 5:21 am
Location: Inca
Station model: Davis Vue
Software: Cumulus
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by Ironside1977 » Sat Jul 03, 2021 4:57 pm

Hola buenas tardes,

Alguien podría explicar como instalar un sensor de calidad del aire al PC, he estado mirando por internet pero no se como empezar.

Saludos.

Hello, good afternoon,

Could someone explain how to install an air quality sensor to the PC, I have been looking on the internet but I don't know how to start.

Thanks.
Image

davidefa
Expert
Expert
Posts: 652
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by davidefa » Mon Jul 05, 2021 7:40 pm

Ironside1977 wrote: Sat Jul 03, 2021 4:57 pm
Could someone explain how to install an air quality sensor to the PC, I have been looking on the internet but I don't know how to start.

Thanks.
Do you want to connect the air quality sensor to your Davis Vue or do you want a sensor that connect directly to the pc ( via usb for example )?
A Davis AirLink a Purple Air or a diy 'luftdaten' could do the job
Image

Ironside1977
Observer
Observer
Posts: 11
Joined: Thu Apr 09, 2020 5:21 am
Location: Inca
Station model: Davis Vue
Software: Cumulus
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by Ironside1977 » Sun Jul 11, 2021 7:16 pm

davidefa wrote: Mon Jul 05, 2021 7:40 pm
Ironside1977 wrote: Sat Jul 03, 2021 4:57 pm
Could someone explain how to install an air quality sensor to the PC, I have been looking on the internet but I don't know how to start.

Thanks.
Do you want to connect the air quality sensor to your Davis Vue or do you want a sensor that connect directly to the pc ( via usb for example )?
A Davis AirLink a Purple Air or a diy 'luftdaten' could do the job
Thanks for the info¡¡¡¡

Another question, is there a block for davis Airlink ??

Thanks in advance....
Image

Julius
Observer
Observer
Posts: 42
Joined: Fri Sep 24, 2021 10:41 pm
Station model: Barani MeteoHelix
Software: meteobridge

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by Julius » Tue Sep 28, 2021 11:01 am

davidefa wrote: Sat Feb 20, 2021 4:59 pm New block to show data from particulate sensor ( in my case a Plantower pms7003 ).
Shows different readings pm1.0/pm2.5/pm10.0 from same or different sensors ( configurable )

NOTE
The block is derived from airQualityEcowitt module ( only slight modifications )
It does not show any values when used with a nettigo/sensor.community sensor-suite. While they do show up in the live data txt as PP0 (which is PM10) and PP1 (which is PM2.5). It draws conclusions (i.e. it's all green), but the values aren't shown, even though the ug/m unit is. Is this on purpose?

davidefa
Expert
Expert
Posts: 652
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by davidefa » Tue Sep 28, 2021 11:48 am

Please provide a link to your site, I can take a look
Image

Julius
Observer
Observer
Posts: 42
Joined: Fri Sep 24, 2021 10:41 pm
Station model: Barani MeteoHelix
Software: meteobridge

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by Julius » Fri Oct 01, 2021 8:57 am

davidefa wrote: Tue Sep 28, 2021 11:48 am Please provide a link to your site, I can take a look
That is useless, you can't see server-logs or anything. It's a test-page now; https://weer.stro.men

User avatar
Daali
Advisor
Advisor
Posts: 56
Joined: Mon Jul 26, 2021 8:06 pm
Location: Georgia, US
Station model: Ecowitt GW1002
Software: Meteobridge, FOSHKplugin
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by Daali » Fri Oct 01, 2021 11:37 am

Julius wrote: Fri Oct 01, 2021 8:57 am
davidefa wrote: Tue Sep 28, 2021 11:48 am Please provide a link to your site, I can take a look
That is useless, you can't see server-logs or anything. It's a test-page now; https://weer.stro.men
/cache is not locked down by default, and lots of errors can be derived from apiLog/cache/ecowitt.txt and inspection.
https://www.jeffersonweather.com
GW1000 gateway
WS68 Anemometer
WH40 Rain Gauge
WH32 Temp/Hum
WH57 Lightning
WH41 PM2.5 Air Quality
WH45 PM2.5/10/Co2 Air Quality
WN34S Soil temperature
WH31SM Soil Moisture

Julius
Observer
Observer
Posts: 42
Joined: Fri Sep 24, 2021 10:41 pm
Station model: Barani MeteoHelix
Software: meteobridge

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by Julius » Sun Oct 03, 2021 9:29 am

Daali wrote: Fri Oct 01, 2021 11:37 am /cache is not locked down by default, and lots of errors can be derived from apiLog/cache/ecowitt.txt and inspection.
but this is not an ecowitt.txt, the sensor is an SDS011 (from a nettigo kit) for sensor.community i.e. luftdaten.
Either way, the meteobridge puts it out as follows towards meteotemplateLive.txt :

,"SW":"meteobridge","T":12.9,"TMX":12.9,"TMN":12.9,"H":94,"P":995,"W":5.4,"G":14.8,"B":247,"R":24.5,"RR":0,"S":61.5,"UV":0.6,"TIN":12.9,"HIN":94,"T1":15,"H1":85,"PP0":5.2,"PP1":1.6,"UTime":1633253073,"SWTime":1633253073,"TTime":1633253073,"TMXTime":1633253073,"TMNTime":1633253073,"HTime":1633253073,"PTime":1633253073,"WTime":1633253073,"GTime":1633253073,"BTime":1633253073,"RTime":1633253073,"RRTime":1633253073,"STime":1633253073,"UVTime":1633253073,"TINTime":1633253073,"HINTime":1633253073,"T1Time":1633253073,"H1Time":1633253073,"PP0Time":1633253073,"PP1Time":1633253073,"D":11.9,"DTime":1633253073,"A":12.5,"ATime":1633253073}

Where "PP0" is PM 10 and "PP1" is PM 2.5. I have tried to switch the PP0 around, so that PP1 is the first, and PP2 would be the second, but I can't seem to get meteobridge to do that.

andyk1
Professional
Professional
Posts: 379
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by andyk1 » Sun Jan 02, 2022 1:06 am

What I found that works in MB is adding a second station. Primary and Station one. Use the same IP address for both and for some reason you can switch pm10 and pm2.5 around. I had to do this to also get my lightning sensor to work.

Andy
Image

Gerrit
Observer
Observer
Posts: 32
Joined: Wed Feb 06, 2019 1:31 pm
Station model: Vantage pro 2 plus
Software: Meteobridge
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by Gerrit » Tue Mar 29, 2022 4:16 pm

Good day to you,

I can only see two sensors of the airlink, has anyone managed to get all three visible?

Gerrit

davidefa
Expert
Expert
Posts: 652
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by davidefa » Tue Mar 29, 2022 4:54 pm

in your cache/apiLog.txt I see your sensors are:

Code: Select all

update PP0: 36.7
update PP1: 31.9
update PP2: 17.6
Meteotemplate uses PP1-PP8 ( so you should 'shift the names by 1' )
Image

Gerrit
Observer
Observer
Posts: 32
Joined: Wed Feb 06, 2019 1:31 pm
Station model: Vantage pro 2 plus
Software: Meteobridge
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by Gerrit » Tue Mar 29, 2022 5:08 pm

There are only 2 visible the 1pm and the 2.5pm see attachment



Gerrit
Attachments
B09A4B51-A3EB-4FAF-BAED-7253E199DAC4.jpeg
B09A4B51-A3EB-4FAF-BAED-7253E199DAC4.jpeg (468.97 KiB) Viewed 1941 times
26AD43CA-0259-48CD-939C-241B5615C11D.jpeg
26AD43CA-0259-48CD-939C-241B5615C11D.jpeg (253.96 KiB) Viewed 1941 times

davidefa
Expert
Expert
Posts: 652
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by davidefa » Tue Mar 29, 2022 8:16 pm

Your meteobridge is sending 3 particulate values: PP0, PP1, and PP2, but only PP1 and PP2 are saved in meteotemplate db.
The airqualitysensor block, retrieves ppm data from db, and so can only access PP1 and PP2.
I think you should reconfigure meteobridge to send air quality data as PP1, PP2 and PP3
Image

Gerrit
Observer
Observer
Posts: 32
Joined: Wed Feb 06, 2019 1:31 pm
Station model: Vantage pro 2 plus
Software: Meteobridge
Contact:

Re: new airQualitySensor block ( updated airQualityEcowitt )

Post by Gerrit » Wed Mar 30, 2022 1:58 pm

As far as I know you cannot change sensor names and numbers in meteobridge.
I will ask on the meteobridge forum if they have a solution,

Gerrit

Post Reply