No RainData in Database (Ecowitt GW1000 driver)

187 views
Skip to first unread message

Marcus Zurhorst

unread,
Sep 17, 2022, 2:12:17 AM9/17/22
to weewx-user
Hello all,

I installed my WS90 some days ago and was surprised how easy this was going.  The captured temperatures seem reasonable.

Now we had some rain, but the rain is not showing up in Weewx. I am using the WDC skin.
I have now checked the MysSQL database. The columns with rain/rain rate are Null or 0.

But the WS90 is for sure working. I am sending data to the Ecowitt.net cloud, and this one shows me the rain data.

What would be the next thing that I should check?
The skin is probably not the culprit when the DB is empty.  Is this now the driver? -- Does this require any special configuration?

Thanks a lot and best regards,
   Marcus
 

Balla

unread,
Sep 17, 2022, 4:24:21 AM9/17/22
to weewx-user
Do you perhaps have "lower_case_table_names          = 1" set in my.cnf? Weewx use camelCase so if you have that set you need to disable it and then restart mysqld and rename the columns after restarting the database.
//R

Marcus Zurhorst

unread,
Sep 17, 2022, 4:44:22 AM9/17/22
to weewx...@googlegroups.com
Hi, and thanks. 
No, I have not changed the MariaDB default. 
The columns are the also there, they only contain Null and 0 in all records.

Regards, Marcus 



--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/38QcK6E2wh0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/585d415c-d04d-4990-a4ef-3153eb9700aan%40googlegroups.com.

gjr80

unread,
Sep 17, 2022, 5:08:18 AM9/17/22
to weewx-user
The problem you are experiencing is that the Ecowitt Gateway driver (formerly the GW1000 driver) emits the WS90 haptic rainfall data in fields with a p_ prefix (eg p_rain instead of the default WeeWX field rain). The reason for this is so as to not break support for existing tipping rain gauges such as the WH40.

You have two courses of action. If you have no plans to add a tipping rain gauge, such as the WH40, you can simply map the required internal Ecowitt Gateway driver haptic rainfall fields to the traditional WeeWX rain fields. Alternatively, if you may add a tipping rain gauge in the future you may wish to modify the WeeWX database to store the haptic rainfall data. You would then need to modify the Seasons skin to display the haptic rainfall data.

Mapping the haptic rain fields to the traditional WeeWX rainfall fields can be achieved with an alteration to the Ecowitt Gateway driver field map. To do this:
1. edit weewx.conf and locate the [GW1000] stanza
2. at the end of the [GW1000] stanza contents (and before the next [] stanza starts) add the following:
    [[field_map_extensions]]
        rain = p_rain
        rainRate = p_rainrate
3. save weewx.conf

Restart WeeWX and the WeeWX rain and rainRate fields should now be populated with haptic rainfall data (when it rains of course). The Seasons skin should now display rain data/plots without alteration.

If you wish to use the second approach you need to:
1. stop WeeWX if it is running
2. use the wee_database utility with the --add-column action to add the columns (fields) p_rain and p_rainRate to the database
3. edit the Seasons skin config file skin.conf (it should be located in /home/weewx/skins/Seasons or /etc/weewx/skins/Seasons depending on your WeeWX install type) and locate the [DisplayOptions] stanza
4. add p_rain and p_rainRate to the observations_current settings, it should now look something like:
    observations_current = outTemp, heatindex, windchill, dewpoint, outHumidity, barometer, windSpeed, rain, rainRate, p_rain, p_rainRate, UV, radiation, lightning_strike_count, inTemp, inHumidity, extraTemp1, extraHumid1, extraTemp2, extraHumid2, pm1_0, pm2_5, pm10_0
    note that obs will be displayed (if they exist) in the order they appear in the list
5. repeat step 4 for the observations_stats, obs_type_sum and obs_type_max (p_rainRate only) settings
6. locate the [ImageGenerator] [[dayimages]] [[[dayrain]]] stanza and replace [[[[rain]]]] with [[[[p_rain]]]], eg: 

        [[[dayrain]]]
            # Make sure the y-axis increment is at least 0.02 for the rain plot
            yscale = None, None, 0.02
            plot_type = bar
            [[[[p_rain]]]]
                aggregate_type = sum
                aggregate_interval = hour
                label = Rain (hourly total)
7. repeat step 6 for [weekimages], [monthimages] and [yearimages]
8. save skin.conf

Restart WeeWX and you should find the p_rain and p_rainRate fields now exist in the database and are populated (when it rains) and the Seasons skin should display the haptic rain data. Note the Seasons skin will also display the tradition rain data without modification if you ever add a tipping rain gauge, but there will need to be some modification to the image plot definitions to include both rain and p_rain data in order for both rain and p_rain to be plotted.

Gary

Marcus Zurhorst

unread,
Sep 17, 2022, 7:33:31 AM9/17/22
to weewx...@googlegroups.com
Thanks a lot, Gary.  👍

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/38QcK6E2wh0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.


--
Marcus Zurhorst
Zum Baerler Busch 6
47199 Duisburg

+49 (2841) 94 91 95 9
+49 (176) 70 52 92 75

Marcus Zurhorst

unread,
Sep 17, 2022, 9:09:45 AM9/17/22
to weewx-user
Hi Gary, all,

am I assuming correctly that I need to map further fields beyond the ones you mentioned?
I was looking up "p_rain" and found this [1] conversation from early summer. 

Regards,
  Marcus



gjr80

unread,
Sep 18, 2022, 3:30:55 AM9/18/22
to weewx-user
I forgot about that earlier post. It is up to you, the Seasons skin does not use any of the other fields, only rain and rainRate. I believe some of the RESTful uploads use dayRain if it exists, if dayRain does not exist todays rainfall is calculated from the database. There is little point in saving any of the other cumulative fields to database; they just take up space for none, if any, benefit as WeeWX can calculate day, week, month and year totals from WeeWX field rain.

Gary
Reply all
Reply to author
Forward
0 new messages