Author Topic: Problems with VP2 with Moteino and Weewx  (Read 978 times)

0 Members and 1 Guest are viewing this topic.

Offline badhairday

  • Member
  • *
  • Posts: 11
Problems with VP2 with Moteino and Weewx
« on: February 28, 2019, 02:26:39 PM »
Hi, I am hoping someone can tell me what I am doing wrong.  My hardware is a Vantage Pro 2, Moteino and RPI.  Software Weewx ver 3.9.1, latest version of weewx-meteostick driver and Mcrossley firmware WxReceiver. 

I have modified WxReceiver slightly to use a BME280.  It seems everything starts up okay, but weewx never updates, stopping at "Starting main packet loop."

Testing the Moteino using mimicom shows it working.
Code: [Select]
Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Apr 22 2017, 09:14:19.
Port /dev/ttyUSB0, 11:09:06

Press CTRL-A Z for help on special keys

# WxReceiver v2016071301 ready to accept commands
?
# OK listening to 1
# OK band US
B 0 0 2 101601 0 0 25
B 0 0 2 101604 0 0 25
I 102 50 00 D4 FF 71 00 E6 6D  -48 0 -27
I 104 80 01 FD 1A BB 00 9E EF  -48 5128036 -28
I 106 50 02 0F FF 73 00 72 90  -49 5128020 -28
I 108 80 02 2C 1A BB 00 AE 8A  -48 5128024 -27
I 110 50 01 33 FF 73 00 FF 99  -48 5128040 -27
I 112 80 01 3E 1A B9 00 D0 F5  -50 5128036 -28
I 114 50 01 56 FF 73 00 1A 0E  -48 5128044 -27
I 117 E0 02 59 27 01 00 79 90  -48 7692056 -27
I 119 40 01 59 FF C1 00 AC 0B  -49 5128040 -27
B 0 0 2 101608 18 9 25
I 121 E0 01 59 27 01 00 97 42  -46 5128056 -27
I 123 90 01 59 03 01 24 EC 3E  -49 5128024 -28
I 125 E0 00 59 27 01 00 3D 13  -49 5128052 -28
I 127 A0 00 59 71 29 00 34 22  -48 5128032 -28
I 132 A0 00 59 71 29 00 34 22  -51 10256068 -28

Running weewx, the syslog looks like:
Code: [Select]
Feb 28 10:52:42 nancy weewx[1633]: Starting weewx weather system: weewx.
Feb 28 10:52:42 nancy weewx[1649]: engine: Using configuration file /etc/weewx/weewx.conf
Feb 28 10:52:42 nancy systemd[1]: Started LSB: weewx weather system.
Feb 28 10:52:42 nancy weewx[1649]: engine: Loading station type Meteostick (user.meteostick)
Feb 28 10:52:42 nancy weewx[1649]: meteostick: driver version is 0.60
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using rain_bucket_type 1
Feb 28 10:52:42 nancy weewx[1649]: meteostick: sensor map is: {'leafWet2': 'leaf_wetness_2', 'outHumidity': 'humidity', 'extraHumid1': 'humid_1', 'inTempBatteryStatus': 'bat_th_2', 'rainBatteryStatus': 'bat_leaf_soil', 'windDir': 'wind_dir', 'outTemp': 'temperature', 'outTempBatteryStatus': 'bat_th_1', 'radiation': 'solar_radiation', 'windSpeed': 'wind_speed', 'extraTemp3': 'temp_3', 'inTemp': 'temp_in', 'referenceVoltage': 'solar_power', 'supplyVoltage': 'supercap_volt', 'soilTemp1': 'soil_temp_1', 'soilTemp2': 'soil_temp_2', 'soilTemp3': 'soil_temp_3', 'soilTemp4': 'soil_temp_4', 'pressure': 'pressure', 'extraHumid2': 'humid_2', 'rxCheckPercent': 'pct_good', 'extraTemp2': 'temp_2', 'leafTemp2': 'leaf_temp_2', 'leafTemp1': 'leaf_temp_1', 'extraTemp1': 'temp_1', 'leafWet1': 'leaf_wetness_1', 'txBatteryStatus': 'bat_iss', 'windBatteryStatus': 'bat_anemometer', 'UV': 'uv', 'soilMoist3': 'soil_moisture_3', 'soilMoist2': 'soil_moisture_2', 'soilMoist1': 'soil_moisture_1', 'inHumidity': 'humidity_in', 'soilMoist4': 'soil_moisture_4'}
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using serial port /dev/ttyUSB0
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using baudrate 115200
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using frequency US
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using rf sensitivity 90 (-90 dB)
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using iss_channel 1
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using anemometer_channel 1
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using leaf_soil_channel 0
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using temp_hum_1_channel 1
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using temp_hum_2_channel 0
Feb 28 10:52:42 nancy weewx[1649]: meteostick: using transmitters 03
Feb 28 10:52:42 nancy weewx[1649]: meteostick: establish communication with the meteostick
Feb 28 10:52:44 nancy weewx[1649]: meteostick: reset: # WxReceiver v2016071301 ready to accept commands
Feb 28 10:52:45 nancy weewx[1649]: meteostick: configure meteostick to logger mode
Feb 28 10:52:46 nancy weewx[1649]: engine: StdConvert target unit is 0x1
Feb 28 10:52:46 nancy weewx[1649]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
Feb 28 10:52:46 nancy weewx[1649]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Feb 28 10:52:46 nancy weewx[1649]: engine: Archive will use data binding wx_binding
Feb 28 10:52:46 nancy weewx[1649]: engine: Record generation will be attempted in 'hardware'
Feb 28 10:52:46 nancy weewx[1649]: engine: Using archive interval of 300 seconds (specified in weewx configuration)
Feb 28 10:52:46 nancy weewx[1649]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
Feb 28 10:52:46 nancy weewx[1649]: manager: Starting backfill of daily summaries
Feb 28 10:52:46 nancy weewx[1649]: restx: StationRegistry: Registration not requested.
Feb 28 10:52:46 nancy weewx[1649]: restx: Wunderground: Posting not enabled.
Feb 28 10:52:46 nancy weewx[1649]: restx: PWSweather: Posting not enabled.
Feb 28 10:52:46 nancy weewx[1649]: restx: CWOP: Posting not enabled.
Feb 28 10:52:46 nancy weewx[1649]: restx: WOW: Posting not enabled.
Feb 28 10:52:46 nancy weewx[1649]: restx: AWEKAS: Posting not enabled.
Feb 28 10:52:46 nancy weewx[1649]: engine: Starting up weewx version 3.9.1
Feb 28 10:52:46 nancy weewx[1649]: engine: Starting main packet loop.

I have spent days on this and at a complete loss.  Any ideas what I am doing wrong?

Thanks,
Chris

Offline Lucas

  • Member
  • *
  • Posts: 18
    • Weerstation Paramaribo
Re: Problems with VP2 with Moteino and Weewx
« Reply #1 on: February 28, 2019, 11:01:29 PM »
In the Meteostick section of weewx.conf set the parameters for serial and parse logging at the highest level and restart weewx.
debug_parse = 3
debug_serial = 3

Also set debug = 1

Please post the log to detect the problem.

Cheers, Luc
(co-author of weewx meteostick driver)
« Last Edit: February 28, 2019, 11:05:31 PM by Lucas »

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Problems with VP2 with Moteino and Weewx
« Reply #2 on: March 01, 2019, 04:33:57 AM »
@badhairday: sorry about that, the WxReceiver sketch and my lib is having problems with US reception (based on your log sample, it's a US system). In that regard, Mark's code is just a copy of mine - he has made a RelayRxTx sketch where he tuned things and that works perfectly (after some more manual tuning), but that's not for the WeeWx driver. I plan to fix it if/when I acquire a US-based SIM board. You can also try my slightly modified (and at places, more accurate) version of the driver for a similar receiver, too. I should put a warning in my repo to wait for the US band to be fixed...

Offline badhairday

  • Member
  • *
  • Posts: 11
Re: Problems with VP2 with Moteino and Weewx
« Reply #3 on: March 01, 2019, 12:45:20 PM »
@Lucus, I added debug_parse = 3 debug_serial = 3 to my weewx.conf and also set debug to 1.  After restarting the syslog is as follows.
Code: [Select]
Mar  1 09:24:16 nancy systemd[1]: Starting LSB: weewx weather system...
Mar  1 09:24:17 nancy weewx[1408]: engine: Initializing weewx version 3.9.1
Mar  1 09:24:17 nancy weewx[1408]: engine: Using Python 2.7.13 (default, Nov 24 2017, 17:33:09) #012[GCC 6.3.0 20170516]
Mar  1 09:24:17 nancy weewx[1408]: engine: Platform Linux-4.14.62-v7+-armv7l-with-debian-9.4
Mar  1 09:24:17 nancy weewx[1408]: engine: Locale is 'en_GB.UTF-8'
Mar  1 09:24:17 nancy weewx[1408]: engine: pid file is /var/run/weewx.pid
Mar  1 09:24:17 nancy weewx[1397]: Starting weewx weather system: weewx.
Mar  1 09:24:17 nancy weewx[1413]: engine: Using configuration file /etc/weewx/weewx.conf
Mar  1 09:24:17 nancy systemd[1]: Started LSB: weewx weather system.
Mar  1 09:24:17 nancy weewx[1413]: engine: Debug is 1
Mar  1 09:24:17 nancy weewx[1413]: engine: Initializing engine
Mar  1 09:24:17 nancy weewx[1413]: engine: Loading station type Meteostick (user.meteostick)
Mar  1 09:24:17 nancy weewx[1413]: meteostick: driver version is 0.60
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using rain_bucket_type 1
Mar  1 09:24:17 nancy weewx[1413]: meteostick: sensor map is: {'leafWet2': 'leaf_wetness_2', 'outHumidity': 'humidity', 'extraHumid1': 'humid_1', 'inTempBatteryStatus': 'bat_th_2', 'rainBatteryStatus': 'bat_leaf_soil', 'windDir': 'wind_dir', 'outTemp': 'temperature', 'outTempBatteryStatus': 'bat_th_1', 'radiation': 'solar_radiation', 'windSpeed': 'wind_speed', 'extraTemp3': 'temp_3', 'inTemp': 'temp_in', 'referenceVoltage': 'solar_power', 'supplyVoltage': 'supercap_volt', 'soilTemp1': 'soil_temp_1', 'soilTemp2': 'soil_temp_2', 'soilTemp3': 'soil_temp_3', 'soilTemp4': 'soil_temp_4', 'pressure': 'pressure', 'extraHumid2': 'humid_2', 'rxCheckPercent': 'pct_good', 'extraTemp2': 'temp_2', 'leafTemp2': 'leaf_temp_2', 'leafTemp1': 'leaf_temp_1', 'extraTemp1': 'temp_1', 'leafWet1': 'leaf_wetness_1', 'txBatteryStatus': 'bat_iss', 'windBatteryStatus': 'bat_anemometer', 'UV': 'uv', 'soilMoist3': 'soil_moisture_3', 'soilMoist2': 'soil_moisture_2', 'soilMoist1': 'soil_moisture_1', 'inHumidity': 'humidity_in', 'soilMoist4': 'soil_moisture_4'}
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using serial port /dev/ttyUSB0
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using baudrate 115200
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using frequency US
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using rf sensitivity 90 (-90 dB)
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using iss_channel 1
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using anemometer_channel 1
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using leaf_soil_channel 0
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using temp_hum_1_channel 1
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using temp_hum_2_channel 0
Mar  1 09:24:17 nancy weewx[1413]: meteostick: using transmitters 03
Mar  1 09:24:17 nancy weewx[1413]: meteostick: open serial port /dev/ttyUSB0
Mar  1 09:24:17 nancy weewx[1413]: meteostick: establish communication with the meteostick
Mar  1 09:24:19 nancy weewx[1413]: meteostick: reset: # WxReceiver v2016071301 ready to accept commands
Mar  1 09:24:19 nancy weewx[1413]: meteostick: full response to reset: # WxReceiver v2016071301 ready to accept commands
Mar  1 09:24:19 nancy weewx[1413]: meteostick: configure meteostick to logger mode
Mar  1 09:24:19 nancy weewx[1413]: meteostick: cmd: '?': # OK t1 f1 o0 m1 x190 stopped
Mar  1 09:24:19 nancy weewx[1413]: meteostick: cmd: 'x180':
Mar  1 09:24:20 nancy weewx[1413]: meteostick: cmd: 't3':
Mar  1 09:24:20 nancy weewx[1413]: meteostick: cmd: 'f1':
Mar  1 09:24:20 nancy weewx[1413]: meteostick: cmd: 'r1':
Mar  1 09:24:20 nancy weewx[1413]: meteostick: cmd: 'o3':
Mar  1 09:24:20 nancy weewx[1413]: meteostick: cmd: 'm0':
Mar  1 09:24:20 nancy weewx[1413]: engine: Loading service weewx.engine.StdTimeSynch
Mar  1 09:24:20 nancy weewx[1413]: engine: Finished loading service weewx.engine.StdTimeSynch
Mar  1 09:24:20 nancy weewx[1413]: engine: Loading service weewx.engine.StdConvert
Mar  1 09:24:20 nancy weewx[1413]: engine: StdConvert target unit is 0x1
Mar  1 09:24:20 nancy weewx[1413]: engine: Finished loading service weewx.engine.StdConvert
Mar  1 09:24:20 nancy weewx[1413]: engine: Loading service weewx.engine.StdCalibrate
Mar  1 09:24:20 nancy weewx[1413]: engine: Finished loading service weewx.engine.StdCalibrate
Mar  1 09:24:20 nancy weewx[1413]: engine: Loading service weewx.engine.StdQC
Mar  1 09:24:20 nancy weewx[1413]: engine: Finished loading service weewx.engine.StdQC
Mar  1 09:24:20 nancy weewx[1413]: engine: Loading service weewx.wxservices.StdWXCalculate
Mar  1 09:24:20 nancy weewx[1413]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
Mar  1 09:24:20 nancy weewx[1413]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Mar  1 09:24:20 nancy weewx[1413]: engine: Finished loading service weewx.wxservices.StdWXCalculate
Mar  1 09:24:20 nancy weewx[1413]: engine: Loading service weewx.engine.StdArchive
Mar  1 09:24:20 nancy weewx[1413]: engine: Archive will use data binding wx_binding
Mar  1 09:24:20 nancy weewx[1413]: engine: Record generation will be attempted in 'hardware'
Mar  1 09:24:20 nancy weewx[1413]: engine: Using archive interval of 300 seconds (specified in weewx configuration)
Mar  1 09:24:20 nancy weewx[1413]: engine: Use LOOP data in hi/low calculations: 1
Mar  1 09:24:20 nancy weewx[1413]: manager: Daily summary version is 2.0
Mar  1 09:24:20 nancy weewx[1413]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
Mar  1 09:24:20 nancy weewx[1413]: manager: Starting backfill of daily summaries
Mar  1 09:24:20 nancy weewx[1413]: engine: Finished loading service weewx.engine.StdArchive
Mar  1 09:24:20 nancy weewx[1413]: engine: Loading service weewx.restx.StdStationRegistry
Mar  1 09:24:21 nancy weewx[1413]: restx: StationRegistry: Registration not requested.
Mar  1 09:24:21 nancy weewx[1413]: engine: Finished loading service weewx.restx.StdStationRegistry
Mar  1 09:24:21 nancy weewx[1413]: engine: Loading service weewx.restx.StdWunderground
Mar  1 09:24:21 nancy weewx[1413]: restx: Wunderground: Posting not enabled.
Mar  1 09:24:21 nancy weewx[1413]: engine: Finished loading service weewx.restx.StdWunderground
Mar  1 09:24:21 nancy weewx[1413]: engine: Loading service weewx.restx.StdPWSweather
Mar  1 09:24:21 nancy weewx[1413]: restx: PWSweather: Posting not enabled.
Mar  1 09:24:21 nancy weewx[1413]: engine: Finished loading service weewx.restx.StdPWSweather
Mar  1 09:24:21 nancy weewx[1413]: engine: Loading service weewx.restx.StdCWOP
Mar  1 09:24:21 nancy weewx[1413]: restx: CWOP: Posting not enabled.
Mar  1 09:24:21 nancy weewx[1413]: engine: Finished loading service weewx.restx.StdCWOP
Mar  1 09:24:21 nancy weewx[1413]: engine: Loading service weewx.restx.StdWOW
Mar  1 09:24:21 nancy weewx[1413]: restx: WOW: Posting not enabled.
Mar  1 09:24:21 nancy weewx[1413]: engine: Finished loading service weewx.restx.StdWOW
Mar  1 09:24:21 nancy weewx[1413]: engine: Loading service weewx.restx.StdAWEKAS
Mar  1 09:24:21 nancy weewx[1413]: restx: AWEKAS: Posting not enabled.
Mar  1 09:24:21 nancy weewx[1413]: engine: Finished loading service weewx.restx.StdAWEKAS
Mar  1 09:24:21 nancy weewx[1413]: engine: Loading service weewx.engine.StdPrint
Mar  1 09:24:21 nancy weewx[1413]: engine: Finished loading service weewx.engine.StdPrint
Mar  1 09:24:21 nancy weewx[1413]: engine: Loading service weewx.engine.StdReport
Mar  1 09:24:21 nancy weewx[1413]: engine: Finished loading service weewx.engine.StdReport
Mar  1 09:24:21 nancy weewx[1413]: engine: Starting up weewx version 3.9.1
Mar  1 09:24:21 nancy weewx[1413]: engine: Station does not support reading the time
Mar  1 09:24:21 nancy weewx[1413]: engine: Starting main packet loop.

I wonder about this line
Code: [Select]
Mar  1 09:24:20 nancy weewx[1413]: meteostick: cmd: 't3': .  It seems to me that it should be 't1'.  I thought it was setting the channel of my ISS, which is 1.  Just a guess.

@kobuki, Yes, I am in the US.  It seems that WxReceiver from Mark's repository works fine for me when using a serial monitor.  It takes a minute or two before it syncs up, but then it works okay, from my limited testing. 

Many thanks to both of you for your help.
Chris

Edit:
I think I fixed the 't3' issue above.  I believe I misunderstood what anenometer etc. settings were for in weewx.conf.  Now I see 't1' where I saw 't3'before.  It still doesn't do anything beyond "Starting main packet loop."  Below are the Meteostick portion of  weewx.conf and the latest syslog.

Code: [Select]
##############################################################################

[Meteostick]
    # This section is for the Meteostick USB receiver.

    # The serial port to which the meteostick is attached, e.g., /dev/ttyS0
    port = /dev/ttyUSB0
    debug_parse = 3
    debug_serial = 3
    # Radio frequency to use between USB transceiver and console: US, EU or AU
    # US uses 915 MHz
    # EU uses 868.3 MHz
    # AU uses 915 MHz but has different frequency hopping values than US
    transceiver_frequency = US

    # A channel has value 0-8 where 0 indicates not present
    # The channel of the Vantage Vue, Pro, or Pro2 ISS
    iss_channel = 1
    # Additional channels apply only to Vantage Pro or Pro2
    anemometer_channel = 0
    leaf_soil_channel = 0
    temp_hum_1_channel = 0
    temp_hum_2_channel = 0

    # Rain bucket type: 0 is 0.01 inch per tip, 1 is 0.2 mm per tip
    rain_bucket_type = 1

    # The driver to use
    driver = user.meteostick
                             

Code: [Select]
Mar  1 10:44:56 nancy systemd[1]: Starting LSB: weewx weather system...
Mar  1 10:44:56 nancy weewx[973]: engine: Initializing weewx version 3.9.1
Mar  1 10:44:56 nancy weewx[973]: engine: Using Python 2.7.13 (default, Nov 24 2017, 17:33:09) #012[GCC 6.3.0 20170516]
Mar  1 10:44:56 nancy weewx[973]: engine: Platform Linux-4.14.62-v7+-armv7l-with-debian-9.4
Mar  1 10:44:56 nancy weewx[973]: engine: Locale is 'en_GB.UTF-8'
Mar  1 10:44:56 nancy weewx[973]: engine: pid file is /var/run/weewx.pid
Mar  1 10:44:56 nancy weewx[962]: Starting weewx weather system: weewx.
Mar  1 10:44:56 nancy systemd[1]: Started LSB: weewx weather system.
Mar  1 10:44:56 nancy weewx[977]: engine: Using configuration file /etc/weewx/weewx.conf
Mar  1 10:44:56 nancy weewx[977]: engine: Debug is 1
Mar  1 10:44:56 nancy weewx[977]: engine: Initializing engine
Mar  1 10:44:56 nancy weewx[977]: engine: Loading station type Meteostick (user.meteostick)
Mar  1 10:44:56 nancy weewx[977]: meteostick: driver version is 0.60
Mar  1 10:44:56 nancy weewx[977]: meteostick: using rain_bucket_type 1
Mar  1 10:44:56 nancy weewx[977]: meteostick: sensor map is: {'leafWet2': 'leaf_wetness_2', 'outHumidity': 'humidity', 'extraHumid1': 'humid_1', 'inTempBatteryStatus': 'bat_th_2', 'rainBatteryStatus': 'bat_leaf_soil', 'windDir': 'wind_dir', 'outTemp': 'temperature', 'outTempBatteryStatus': 'bat_th_1', 'radiation': 'solar_radiation', 'windSpeed': 'wind_speed', 'extraTemp3': 'temp_3', 'inTemp': 'temp_in', 'referenceVoltage': 'solar_power', 'supplyVoltage': 'supercap_volt', 'soilTemp1': 'soil_temp_1', 'soilTemp2': 'soil_temp_2', 'soilTemp3': 'soil_temp_3', 'soilTemp4': 'soil_temp_4', 'pressure': 'pressure', 'extraHumid2': 'humid_2', 'rxCheckPercent': 'pct_good', 'extraTemp2': 'temp_2', 'leafTemp2': 'leaf_temp_2', 'leafTemp1': 'leaf_temp_1', 'extraTemp1': 'temp_1', 'leafWet1': 'leaf_wetness_1', 'txBatteryStatus': 'bat_iss', 'windBatteryStatus': 'bat_anemometer', 'UV': 'uv', 'soilMoist3': 'soil_moisture_3', 'soilMoist2': 'soil_moisture_2', 'soilMoist1': 'soil_moisture_1', 'inHumidity': 'humidity_in', 'soilMoist4': 'soil_moisture_4'}
Mar  1 10:44:56 nancy weewx[977]: meteostick: using serial port /dev/ttyUSB0
Mar  1 10:44:56 nancy weewx[977]: meteostick: using baudrate 115200
Mar  1 10:44:56 nancy weewx[977]: meteostick: using frequency US
Mar  1 10:44:56 nancy weewx[977]: meteostick: using rf sensitivity 90 (-90 dB)
Mar  1 10:44:56 nancy weewx[977]: meteostick: using iss_channel 1
Mar  1 10:44:56 nancy weewx[977]: meteostick: using anemometer_channel 0
Mar  1 10:44:56 nancy weewx[977]: meteostick: using leaf_soil_channel 0
Mar  1 10:44:56 nancy weewx[977]: meteostick: using temp_hum_1_channel 0
Mar  1 10:44:56 nancy weewx[977]: meteostick: using temp_hum_2_channel 0
Mar  1 10:44:56 nancy weewx[977]: meteostick: using transmitters 01
Mar  1 10:44:56 nancy weewx[977]: meteostick: open serial port /dev/ttyUSB0
Mar  1 10:44:56 nancy weewx[977]: meteostick: establish communication with the meteostick
Mar  1 10:44:58 nancy weewx[977]: meteostick: reset: # WxReceiver v2016071301 ready to accept commands
Mar  1 10:44:58 nancy weewx[977]: meteostick: full response to reset: # WxReceiver v2016071301 ready to accept commands
Mar  1 10:44:59 nancy weewx[977]: meteostick: configure meteostick to logger mode
Mar  1 10:44:59 nancy weewx[977]: meteostick: cmd: '?': # OK t1 f1 o0 m1 x190 stopped
Mar  1 10:44:59 nancy weewx[977]: meteostick: cmd: 'x180':
Mar  1 10:44:59 nancy weewx[977]: meteostick: cmd: 't1':
Mar  1 10:44:59 nancy weewx[977]: meteostick: cmd: 'f1':
Mar  1 10:45:00 nancy weewx[977]: meteostick: cmd: 'r1':
Mar  1 10:45:00 nancy weewx[977]: meteostick: cmd: 'o3':
Mar  1 10:45:00 nancy weewx[977]: meteostick: cmd: 'm0':
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.engine.StdTimeSynch
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.engine.StdTimeSynch
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.engine.StdConvert
Mar  1 10:45:00 nancy weewx[977]: engine: StdConvert target unit is 0x1
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.engine.StdConvert
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.engine.StdCalibrate
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.engine.StdCalibrate
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.engine.StdQC
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.engine.StdQC
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.wxservices.StdWXCalculate
Mar  1 10:45:00 nancy weewx[977]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
Mar  1 10:45:00 nancy weewx[977]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.wxservices.StdWXCalculate
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.engine.StdArchive
Mar  1 10:45:00 nancy weewx[977]: engine: Archive will use data binding wx_binding
Mar  1 10:45:00 nancy weewx[977]: engine: Record generation will be attempted in 'hardware'
Mar  1 10:45:00 nancy weewx[977]: engine: Using archive interval of 300 seconds (specified in weewx configuration)
Mar  1 10:45:00 nancy weewx[977]: engine: Use LOOP data in hi/low calculations: 1
Mar  1 10:45:00 nancy weewx[977]: manager: Daily summary version is 2.0
Mar  1 10:45:00 nancy weewx[977]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
Mar  1 10:45:00 nancy weewx[977]: manager: Starting backfill of daily summaries
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.engine.StdArchive
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.restx.StdStationRegistry
Mar  1 10:45:00 nancy weewx[977]: restx: StationRegistry: Registration not requested.
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.restx.StdStationRegistry
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.restx.StdWunderground
Mar  1 10:45:00 nancy weewx[977]: restx: Wunderground: Posting not enabled.
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.restx.StdWunderground
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.restx.StdPWSweather
Mar  1 10:45:00 nancy weewx[977]: restx: PWSweather: Posting not enabled.
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.restx.StdPWSweather
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.restx.StdCWOP
Mar  1 10:45:00 nancy weewx[977]: restx: CWOP: Posting not enabled.
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.restx.StdCWOP
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.restx.StdWOW
Mar  1 10:45:00 nancy weewx[977]: restx: WOW: Posting not enabled.
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.restx.StdWOW
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.restx.StdAWEKAS
Mar  1 10:45:00 nancy weewx[977]: restx: AWEKAS: Posting not enabled.
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.restx.StdAWEKAS
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.engine.StdPrint
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.engine.StdPrint
Mar  1 10:45:00 nancy weewx[977]: engine: Loading service weewx.engine.StdReport
Mar  1 10:45:00 nancy weewx[977]: engine: Finished loading service weewx.engine.StdReport
Mar  1 10:45:00 nancy weewx[977]: engine: Starting up weewx version 3.9.1
Mar  1 10:45:00 nancy weewx[977]: engine: Station does not support reading the time
Mar  1 10:45:00 nancy weewx[977]: engine: Starting main packet loop.
M
« Last Edit: March 01, 2019, 02:00:55 PM by badhairday »

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Problems with VP2 with Moteino and Weewx
« Reply #4 on: March 01, 2019, 02:47:57 PM »
@kobuki, Yes, I am in the US.  It seems that WxReceiver from Mark's repository works fine for me when using a serial monitor.  It takes a minute or two before it syncs up, but then it works okay, from my limited testing.

No, unfortunately you miss every other packet (the actual issue with current code). There should be about 2.5s between packets, whereas you have about 5s. See the lines with the hex codes (decoded packet bytes), the number before the last is the delay in ms between the current and the last received packet.

The t command takes a bit field, where the bits represent the channels to listen to, starting from the LSB which means channel 1, to the MSB which is channel 8. If your ISS is on channel 1, you need 't1' and in the WeeWx config, use 'iss_channel = 1'.

What I can't see in your logs is the setting responses, like 'OK output raw 10B' in response to 'o3' or 'OK band US' in response to 'm0'. I suggest trying my fork of the driver. It's better tested with the Moteino receivers and there are fixes Mark might not have pulled.


Offline badhairday

  • Member
  • *
  • Posts: 11
Re: Problems with VP2 with Moteino and Weewx
« Reply #5 on: March 01, 2019, 03:58:06 PM »
Okay, I see.  Switching to your code, it is still around 5 seconds between updates.  I really appreciate your help.  Not sure where to go from here.

Thanks,
Chris


Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Problems with VP2 with Moteino and Weewx
« Reply #6 on: March 01, 2019, 04:01:26 PM »
Yeah, as I told, the current code is not very good with the US band, sorry. Until I acquire a suitable board for testing, I might not be able to fix it. I might try sometime this month. I have an idea which I haven't tried yet.

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 480
    • Wilmslow Astro
Re: Problems with VP2 with Moteino and Weewx
« Reply #7 on: March 01, 2019, 06:39:25 PM »
I suggest trying my fork of the driver. It's better tested with the Moteino receivers and there are fixes Mark might not have pulled.
Agreed, my repo is behind the master by some way now I think. I wouldn't recommend using it for anything other than the RelayRxTx sketch.
I haven't found the time to merge any updates in.
Mark

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 480
    • Wilmslow Astro
Re: Problems with VP2 with Moteino and Weewx
« Reply #8 on: March 01, 2019, 06:43:15 PM »
If you are having the every other packet issue, then one option - that would involve a bit of work on your part - would be to merge the WxReceiver serial output code into my RelayRxTx and just not use the transmit capability?
Mark

Offline Lucas

  • Member
  • *
  • Posts: 18
    • Weerstation Paramaribo
Re: Problems with VP2 with Moteino and Weewx
« Reply #9 on: March 01, 2019, 08:33:03 PM »
@badhairday, two questions:
Did the driver worked ok before your modification or did it never work?
If it did work before, can you revert your change?
and
Do you have more than one usb device plugged in?
The reason why I asked is that another usb device might have gotten usb0 and your motino got usb1. Just a thougt. I had this issue with both the Vantage Pro console and the Meteostick.
They got ‘random’ usb0 and usb1.

Offline badhairday

  • Member
  • *
  • Posts: 11
Re: Problems with VP2 with Moteino and Weewx
« Reply #10 on: March 02, 2019, 03:19:51 PM »
I finally have it working.  :-)  I took Mark's idea to merge his RelayRxTx into WxReceiver.  There is a lot of cleanup to do, but Weewx is now updating the webpage. 

Many thanks to all,
Chris

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Problems with VP2 with Moteino and Weewx
« Reply #11 on: March 02, 2019, 06:04:28 PM »
Nice you have it figured. I also had the idea of merging Mark's stuff into mine but the hand-tuning his code requires deterred me from it. And well, I'd rather set my own code straight or rewrite it finally, but there isn't exactly a very high demand for this DIY kind of thing so...

Offline tnt76

  • Member
  • *
  • Posts: 4
Re: Problems with VP2 with Moteino and Weewx
« Reply #12 on: September 04, 2019, 08:35:24 PM »
Hi all,

I have been struggling to connect my vantage pro2 to weewx via a couple of different ways for several weeks.  I  started with a feather mo with rfm69 and the Hydrosense version of the kobuki's ISSRx sketch and had very good reception of 99% packets over a couple days. But that sketch doesn't have a corresponding driver for weewx or other popular software's.
I also had a moteino delivered soon after the feather and proceeded to upload the Dekay console emulator with the addition of a bme280 temp/hum/baro sensor instead of what he used.  That worked ok with weewx, but reception was ordinary and rain was never recorded.

Now I have uploaded the wxreceiver sketch with meteostick weewx driver setup.  After a my usual technique of stumbling through the code and bastardising everyone else's code, then going back to the original version, I got it working.

The final stumbling block landed me on this thread and having the program stuck at the "starting main packet loop" and not progressing. I took notice of kobuki's comment about not seeing the "ok" response to the hardware initialising sequence. It seemed to respond to the 'r' reset but nothing after that, in my case o3, m2, x150.  A bit of googling found a site with a similar scenario.
The fix was a simple addition of output='' (two single quote marks, not a single double quote) under the self.send_command('m2') at approx line 526 in the meteostick driver of kobuki tools.
This now sends the commend to the moteino to initialise it, instead of hanging.
I only needed to add this under one command.

I hope this helps others

PS I am by absolutely no means a coder or programmer. Like I said, I stumble my way through code and try many things before usually giving up.:)

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Problems with VP2 with Moteino and Weewx
« Reply #13 on: September 05, 2019, 05:04:12 AM »
@tnt76 glad you got it working. Could you please show the url of exactly which version you used of what? I'm kinda lost a bit regarding those as you mentioned multiple forks and changes. I might be able to add your changes as a fix for your problem in my original repo.

Offline tnt76

  • Member
  • *
  • Posts: 4
Re: Problems with VP2 with Moteino and Weewx
« Reply #14 on: September 05, 2019, 08:49:12 PM »
@kobuki  I'm glad I got something working too, after a few dead ends.

the meteostick version I used was your version v2016071301 located
https://github.com/kobuki/weewx-meteoRX/blob/master/bin/user/meteostick.py

I added:
output=''
at line 526.

I also just remembered I changed line 525, the '?' (show defaults) to 'm2' (changed to AU freq's), which I gather starts the logger mode.

This thread was the kicker for me:
https://github.com/ktbyers/netmiko/issues/330

I am using a moteinoUSB with incorporated rfm69hcw 915mHz with a lowpowerlab weather shield on Aus freq.


Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Problems with VP2 with Moteino and Weewx
« Reply #15 on: September 06, 2019, 04:53:28 AM »
Thanks for the update. The weird thing is, there is no variable or class member named "output" anywhere. I'm not really sure if this was that helped you.

You don't need to change the '?' to 'm2' either, as this is done a few lines later. What you need is the proper frequency band definition in your weewx.conf. Again, I'm not sure how it helps if at all.

The weewx-meteoRX driver and the wxreceiver sketch are meant to work together well, and generally they do, without any changes. It has weird timing issues on the US band, but with EU and apparently AU bands it's working just fine as it can be seen. I really want to refine it so you don't have to fiddle with it, but I'm not sure where to look as your changes don't look to be a fit for any problem. I might add delays or input timeout logic to allow serial responses stay in sync with the host, though.
« Last Edit: September 06, 2019, 04:58:51 AM by kobuki »

Offline tnt76

  • Member
  • *
  • Posts: 4
Re: Problems with VP2 with Moteino and Weewx
« Reply #16 on: September 09, 2019, 07:51:39 PM »
@Kobuki. Thanks for checking it out.

I understand that I didn't need to change the '?' to 'm2' as it is done lower down, as you described.  It was in my process of trying things out and realising that the 'r' command was being sent to serial but none of the "setup" commands only a few lines down were being sent, that's when I shuffled the 'm2' up a few lines up to test.

I'm not sure if this is suppose to happen, but when connected to a serial console, I don't receive any weather data until one of the "setup" commands are sent.

I have a spare raspberry pi here that I can start from scratch and try with only the one change and see if that works.  I'll let you know how I go.