rmyro take #2

45 views
Skip to first unread message

Kevin Schuchmann

unread,
Jul 17, 2023, 1:51:51 PM7/17/23
to weewx-user
What does one do with a driver issue if the person that wrote it is not around?  
I reprogrammed my rm young 26800 to mimic a response one unit. Used 2to3 on rmyro.py to fix errors since it was python2 not 3 and got it to run, data was collected and reports generated. But there are some issues, one is it looks to be in debug mode always dumping lots of data on what it is doing, two is that it double posts to WU.  I have tried  setting log success to false no change, tried wee_device rm_young.conf -- help to configure it and it just ends showing nothing.  All of these things work fine on my other station which uses the CC3000 driver. I know nothing about programming in python, I have looked at the other drivers to see if maybe I could mimic a different wx station but all seem to have interaction with the device and I can't mimic that. Any help or suggestions would be appreciated.
Below is an example of what I amy trying to fix.

 Jul 17 10:10:03 Satcom python3[32727]: weewx-rm_young[32727] INFO weewx.restx: Wunderground-RF: Published record 2023-07-17 10:10:03 PDT (1689613803)
Jul 17 10:10:03 Satcom python3[32727]: weewx-rm_young[32727] INFO weewx.restx: Wunderground-RF: Published record 2023-07-17 10:10:03 PDT (1689613803)
Jul 17 10:10:04 Satcom python3[32261]: weewx-rainwise[32261] INFO weewx.restx: Wunderground-RF: Published record 2023-07-17 10:10:00 PDT (1689613800)
Jul 17 10:10:05 Satcom weewxd[32727]: rmyro: primary raw: 0A 30 20 30 39 2E 33 31 20 32 30 32 2E 30 20 30 32 34 2E 35 20 30 33 34 2E 33 20 30 39 31 34 2E 36 20 30 30 30 30 30 20 30 30 2A 30 31 39 34 36 0D
Jul 17 10:10:05 Satcom weewxd[32727]: rmyro: primary parsed: {'wind_speed': 9.31, 'wind_dir': 202.0, 'temperature': 24.5, 'humidity': 34.3, 'pressure': 914.6, 'rain': 0.0}
Jul 17 10:10:05 Satcom weewxd[32727]: rmyro: mapped: {'windSpeed': 9.31, 'windDir': 202.0, 'outTemp': 24.5, 'outHumidity': 34.3, 'pressure': 914.6, 'rain_total': 0.0, 'dateTime': 1689613806, 'usUnits': 17, 'rain': 0.0}
Jul 17 10:10:05 Satcom weewxd[32727]: rmyro: primary raw: 0A 30 20 30 39 2E 38 35 20 31 39 37 2E 31 20 30 32 34 2E 35 20 30 33 34 2E 33 20 30 39 31 34 2E 36 20 30 30 30 30 30 20 30 30 2A 30 31 39 36 39 0D
Jul 17 10:10:05 Satcom weewxd[32727]: rmyro: primary parsed: {'wind_speed': 9.85, 'wind_dir': 197.1, 'temperature': 24.5, 'humidity': 34.3, 'pressure': 914.6, 'rain': 0.0}
Jul 17 10:10:05 Satcom weewxd[32727]: rmyro: mapped: {'windSpeed': 9.85, 'windDir': 197.1, 'outTemp': 24.5, 'outHumidity': 34.3, 'pressure': 914.6, 'rain_total': 0.0, 'dateTime': 1689613806, 'usUnits': 17, 'rain': 0.0}
Jul 17 10:10:05 Satcom weewxd[32727]: rmyro: primary raw: 0A 30 20 30 38 2E 34 38 20 32 30 30 2E 35 20 30 32 34 2E 35 20 30 33 34 2E 33 20 30 39 31 34 2E 36 20 30 30 30 30 30 20 30 30 2A 30 31 39 35 36 0D
Jul 17 10:10:05 Satcom weewxd[32727]: rmyro: primary parsed: {'wind_speed': 8.48, 'wind_dir': 200.5, 'temperature': 24.5, 'humidity': 34.3, 'pressure': 914.6, 'rain': 0.0}
Jul 17 10:10:05 Satcom weewxd[32727]: rmyro: mapped: {'windSpeed': 8.48, 'windDir': 200.5, 'outTemp': 24.5, 'outHumidity': 34.3, 'pressure': 914.6, 'rain_total': 0.0, 'dateTime': 1689613806, 'usUnits': 17, 'rain': 0.0} 

vince

unread,
Jul 17, 2023, 4:24:13 PM7/17/23
to weewx-user
Short answer is 'if you run unmainted code then you need to freeze to a setup that works forever, or you need to handle it yourself'.   Looks like you got 2to3 to get you python3 compatible (good) so you're most of the way there so I'd say keep going on your adventure since you're close....

log_success doesn't change debugging logging at all.

You'd have to point us to a copy of your modified driver to help for certain, but if you're starting with https://github.com/abillits/weewx-rmyro/blob/master/rmyro.py then it looks like it always runs with debugging messages chattering a lot.   Check out the genLoopPackets(self) routine around line 345  in the try: block for places where it says logdbg(something).  You can quiet things down at least temporarily by commenting those 5 lines in the try: part of the try/except block out.  Better long term fix would be to make it a little more configurable, but leave that for later.

try: raw_primary = self._station.get_primary_sensor_data() ##### logdbg("primary raw: %s" % _fmt(raw_primary)) data = Station.parse_primary_sensor_data(raw_primary) ##### logdbg("primary parsed: %s" % data) #if self._secondary is 'enabled': if "enabled" in self._secondary: raw_secondary = self._station.get_secondary_sensor_data() ##### logdbg("primary raw: %s" % _fmt(raw_secondary)) data_secondary = Station.parse_secondary_sensor_data(raw_secondary) ##### logdbg("secondary parsed: %s" % data_secondary) data.update(data_secondary) packet = self._data_to_packet(data) ##### logdbg("mapped: %s" % packet) if packet: yield packet break



You haven't provided any logs showing your WU double post issue, so I can't comment there.

Kevin Schuchmann

unread,
Jul 17, 2023, 6:31:01 PM7/17/23
to weewx-user
Thank You Vince for taking the time to look into this.. 
The double post was at the begining of the stuff I posted
Jul 17 10:10:03 Satcom python3[32727]: weewx-rm_young[32727] INFO weewx.restx: Wunderground-RF: Published record 2023-07-17 10:10:03 PDT (1689613803)
Jul 17 10:10:03 Satcom python3[32727]: weewx-rm_young[32727] INFO weewx.restx: Wunderground-RF: Published record 2023-07-17 10:10:03 PDT (1689613803)

Two entries with the same time stamp, not sure if that was a glitch in reporting or if WU was really receiving two.
But it doesn't matter now as commenting out those lines you suggested has not only stopped all the verbage in the logs but also appears to have stopped the double posting in the log.
I had tried on my own to comment out some lines or to make changes to get it out of debug mode but it always resulted in the program crashing.
I was concerned that running 2to3 had created the issue and had not converted the code quite right, but you see the verbage in the original rmyro.py.

The only other changes I did was changing the baud rate to 9600.

Once again Thank You, You quickly fixed several days of frustration.
 Kevin
Reply all
Reply to author
Forward
0 new messages