consoleWD - Ubuntu Server 14.04 - ttyS0 - Davis Weather Monitor II

Fresh install of Ubuntu Server 14.04 (32bit).
Weather Station: Davis Weather Monitor II
History: This same PC in the past ran XP and a very old version of Weather Display. It also ran Ui-View for APRS.
Primary purpose of PC: Act as an APRS I-Gate and local Digipeater, also to gather weather station data and pass on to APRS.

As XP was old and tired, I have migrated most of my computers to Ubuntu or Centos depending upon application needs.

Installed consoleWD to get the Davis Weather Monitor II data. Primary need is to build the wxnow.txt file.

I spent a few hours yesterday trying to get consoleWD to give me data…No success.
I have read the last few years of posts on this forum…

Computer has a serial port on the MB that is ttyS0 and an add in PCI card with serial ports on ttyS4 and ttyS5

  • I can talk to other devices (used an old modem and minicom to confirm) on all three serial ports.

With the attached config.txt file and only changing the “comport number” line from =/dev/ttyS0 to =/dev/ttyS4 I get the following results.

  • NOTE that in BOTH cases when starting consoleWD the program shows to be opening /dev/ttyS0

starting consoleWD as non-root with ./GoWdconsole.sh I get:
[sudo] password for mcheavens:
Weather station type is a Davis WMII
OWW file location= ←
program location= /packages/weatherwdconsole/<-
Davis VP IP data logger port= 22222<
Davis VP IP data logger IP= 192.168.2.3<-
Latitude= 37.6
Longitude= -107.8
Station name =Columbine
Daily rain startup= 0.0
Monthly rain startup= 0.0
wunderground username =
wunderground password =
wunderground utc =-7
Dir offset= 0
Barooffset= 0.0
Davis com method d
No Revb Davis VP
Davis rain gauge .01 inch
mysql username =
mysql server =
mysql databasename =
mysql tablename =
Will do mysql metric
mysql time interval = 300
cwop station id =
cwop call sign = KC5EVE-15 // -1 is default (you do not have a Ham
cwop latitude=
cwop longitude=
FTP server =
FTP username =
FTP port = 21
FTPremote dir =
FTPremote dir wx.html=
Will do ftp passive
remote file =
FTP time interval = 60
wu =Y
Will save logfile
logfile metric
Custom file name = wx.html
Custom file name 2=
Custom file name 3=
Custom file name 4=
Custom file name 5=
wind units = mph
baro metric= N
rain metric= N
Will run cron files
Custom log out = customlogout.txt
will update wxnow.txt
wxnow.txt dir=/packages/<-
WOW id=<-
WOW pass=<-
Modified rain gauge= <
windfinder id=<-
windfinder pass=<-
utc hour=14
local hour=8
Weather Display vers WD_console_10.1
If use this program,then please consider sending a PayPal donation to info@weath
er-display.com (Brian Hamilton)
to help with costs, and support, thanks!
www.weather-display.com
Comport /dev/ttyS0 opened
setting baud rate to 2400 ->0
ser_read error Resource temporarily unavailable
requesting data
ser_read error Resource temporarily unavailable
requesting data
ser_read error Resource temporarily unavailable
-----(repeating)--------
Starting as root with ./consolewd:
[root@CO-GX260 /packages/weatherwdconsole] # ./consolewd
Weather station type is a Davis WMII
OWW file location= ←
program location= /packages/weatherwdconsole/<-
Davis VP IP data logger port= 22222<
Davis VP IP data logger IP= 192.168.2.3<-
Latitude= 37.6
Longitude= -107.8
Station name =Columbine
Daily rain startup= 0.0
Monthly rain startup= 0.0
wunderground username =
wunderground password =
wunderground utc =-7
Dir offset= 0
Barooffset= 0.0
Davis com method d
No Revb Davis VP
Davis rain gauge .01 inch
mysql username =
mysql server =
mysql databasename =
mysql tablename =
Will do mysql metric
mysql time interval = 300
cwop station id =
cwop call sign = KC5EVE-15 // -1 is default (you do not have a Ham
cwop latitude=
cwop longitude=
FTP server =
FTP username =
FTP port = 21
FTPremote dir =
FTPremote dir wx.html=
Will do ftp passive
remote file =
FTP time interval = 60
wu =Y
Will save logfile
logfile metric
Custom file name = wx.html
Custom file name 2=
Custom file name 3=
Custom file name 4=
Custom file name 5=
wind units = mph
baro metric= N
rain metric= N
Will run cron files
Custom log out = customlogout.txt
will update wxnow.txt
wxnow.txt dir=/packages/<-
WOW id=<-
WOW pass=<-
Modified rain gauge= <
windfinder id=<-
windfinder pass=<-
utc hour=14
local hour=8
Weather Display vers WD_console_10.1
If use this program,then please consider sending a PayPal donation to info@weath
er-display.com (Brian Hamilton)
to help with costs, and support, thanks!
www.weather-display.com
Opened
Opening the serial port /dev/ttyS0
Saving serial configuration
Serial port /dev/ttyS0 opened File desc = 3
Comport /dev/ttyS0 opened
setting speed to 2400
setting baud rate to 2400 ->0
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
requesting data
Write size 1 : 4c
Write size 1 : 4f
Write size 1 : 4f
Write size 1 : 50
Write size 1 : ff
Write size 1 : ff
Write size 1 : 0d
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
requesting data
Write size 1 : 4c
Write size 1 : 4f
Write size 1 : 4f
Write size 1 : 50
Write size 1 : ff
Write size 1 : ff
Write size 1 : 0d
ser_read : Entering
------(repeating)-------

Changed config.txt comport line to: /dev/ttyS4 (NOTE that comport still shows to be opening /dev/ttyS0) !!!

[mcheavens@CO-GX260 /packages/weatherwdconsole] $ ./GoWdconsole.sh
Weather station type is a Davis WMII
OWW file location= ←
program location= /packages/weatherwdconsole/<-
Davis VP IP data logger port= 22222<
Davis VP IP data logger IP= 192.168.2.3<-
Latitude= 37.6
Longitude= -107.8
Station name =Columbine
Daily rain startup= 0.0
Monthly rain startup= 0.0
wunderground username =
wunderground password =
wunderground utc =-7
Dir offset= 0
Barooffset= 0.0
Davis com method d
No Revb Davis VP
Davis rain gauge .01 inch
mysql username =
mysql server =
mysql databasename =
mysql tablename =
Will do mysql metric
mysql time interval = 300
cwop station id =
cwop call sign = KC5EVE-15 // -1 is default (you do not have a Ham
cwop latitude=
cwop longitude=
FTP server =
FTP username =
FTP port = 21
FTPremote dir =
FTPremote dir wx.html=
Will do ftp passive
remote file =
FTP time interval = 60
wu =Y
Will save logfile
logfile metric
Custom file name = wx.html
Custom file name 2=
Custom file name 3=
Custom file name 4=
Custom file name 5=
wind units = mph
baro metric= N
rain metric= N
Will run cron files
Custom log out = customlogout.txt
will update wxnow.txt
wxnow.txt dir=/packages/<-
WOW id=<-
WOW pass=<-
Modified rain gauge= <
windfinder id=<-
windfinder pass=<-
utc hour=14
local hour=8
Weather Display vers WD_console_10.1
If use this program,then please consider sending a PayPal donation to info@weath
er-display.com (Brian Hamilton)
to help with costs, and support, thanks!
www.weather-display.com
Comport /dev/ttyS0 opened
setting baud rate to 2400 ->0
ser_read error Resource temporarily unavailable
requesting data
ser_read error Resource temporarily unavailable
requesting data
ser_read error Resource temporarily unavailable
-----(repeating)—

NOTE: Notice that Comport still says /dev/ttyS0 opened!!!


And as root:
[root@CO-GX260 /packages/weatherwdconsole] # ./consolewd
Weather station type is a Davis WMII
OWW file location= ←
program location= /packages/weatherwdconsole/<-
Davis VP IP data logger port= 22222<
Davis VP IP data logger IP= 192.168.2.3<-
Latitude= 37.6
Longitude= -107.8
Station name =Columbine
Daily rain startup= 0.0
Monthly rain startup= 0.0
wunderground username =
wunderground password =
wunderground utc =-7
Dir offset= 0
Barooffset= 0.0
Davis com method d
No Revb Davis VP
Davis rain gauge .01 inch
mysql username =
mysql server =
mysql databasename =
mysql tablename =
Will do mysql metric
mysql time interval = 300
cwop station id =
cwop call sign = KC5EVE-15 // -1 is default (you do not have a Ham
cwop latitude=
cwop longitude=
FTP server =
FTP username =
FTP port = 21
FTPremote dir =
FTPremote dir wx.html=
Will do ftp passive
remote file =
FTP time interval = 60
wu =Y
Will save logfile
logfile metric
Custom file name = wx.html
Custom file name 2=
Custom file name 3=
Custom file name 4=
Custom file name 5=
wind units = mph
baro metric= N
rain metric= N
Will run cron files
Custom log out = customlogout.txt
will update wxnow.txt
wxnow.txt dir=/packages/<-
WOW id=<-
WOW pass=<-
Modified rain gauge= <
windfinder id=<-
windfinder pass=<-
utc hour=14
local hour=8
Weather Display vers WD_console_10.1
If use this program,then please consider sending a PayPal donation to info@weath
er-display.com (Brian Hamilton)
to help with costs, and support, thanks!
www.weather-display.com
Opened
Opening the serial port /dev/ttyS0
Saving serial configuration
Serial port /dev/ttyS0 opened File desc = 3
Comport /dev/ttyS0 opened
setting speed to 2400
setting baud rate to 2400 ->0
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
requesting data
Write size 1 : 4c
Write size 1 : 4f
Write size 1 : 4f
Write size 1 : 50
Write size 1 : ff
Write size 1 : ff
Write size 1 : 0d
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
requesting data
Write size 1 : 4c
Write size 1 : 4f
Write size 1 : 4f
Write size 1 : 50
Write size 1 : ff
Write size 1 : ff
Write size 1 : 0d
ser_read : Entering
------(repeating)------

Suggestions?


config.txt (3.98 KB)

Looks like my problem is related to serial port speed. I can use a terminal program (Minicom) on /dev/ttyS0 and send a “LOOP” request and get data…

Looks like my WMII is set to 1200 baud… It is in Colorado, I am in Texas (1,000 miles apart). I don’t see in config.txt where to change the baud rate from 2400 to 1200.

Mark

that will be one problem…consolewd expects it to be set to 2400
i could add ability to set to use that slower speed

You could just add it as a different weather station type. Then you would not have to change your config.txt setup. I also could not find a full list of supported weather stations and the station type number, only those listed in the config.txt file.

Mark

Hi
use
http://www.weather-display.com/downloadfiles/consolewdtestwizard.zip
and set the station type as 34 in the config.txt

No joy…
NOTE: This is a Weather Monitor II, not a weather wizard, I think the difference is mine has barometer (?)

  • Just making sure you are aware…

[root@CO-GX260 /packages/weatherwdconsole] # ./consolewd
Weather station type is a Davis Wizard 1200 baud
OWW file location= ←
program location= /packages/weatherwdconsole/<-
Davis VP IP data logger port= 22222<
Davis VP IP data logger IP= 192.168.2.3<-
Latitude= 37.6
Longitude= -107.8
Station name =Columbine
Daily rain startup= 0.0
Monthly rain startup= 0.0
wunderground username =
wunderground password =
wunderground utc =-7
Dir offset= 0
Barooffset= 0.0
Davis com method d
No Revb Davis VP
Davis rain gauge .01 inch
mysql username =
mysql server =
mysql databasename =
mysql tablename =
Will do mysql metric
mysql time interval = 300
cwop station id =
cwop call sign = KC5EVE-15 // -1 is default (you do not have a Ham
cwop latitude=
cwop longitude=
FTP server =
FTP username =
FTP port = 21
FTPremote dir =
FTPremote dir wx.html=
Will do ftp passive
remote file =
FTP time interval = 60
wu =Y
Will save logfile
logfile metric
Custom file name = wx.html
Custom file name 2=
Custom file name 3=
Custom file name 4=
Custom file name 5=
wind units = mph
baro metric= N
rain metric= N
Will run cron files
Custom log out = customlogout.txt
will update wxnow.txt
wxnow.txt dir=/packages/<-
WOW id=<-
WOW pass=<-
Modified rain gauge= <
windfinder id=<-
windfinder pass=<-
utc hour=2
local hour=20
Weather Display vers WD_console_11.6
If use this program,then please consider sending a PayPal donation to info@weath
er-display.com (Brian Hamilton)
to help with costs, and support, thanks!
www.weather-display.com
Comport /dev/ttyS0 opened
setting baud rate to 1200 ->0
requesting data
requesting data
requesting data
^C

the problem then could be that it needs to be other than ttyS0 ?

I can send a and I get the appropriate response in a terminal window of ! (Invalid request).
I can send a LOOP and START and STOP and get data flowing.

(and NO I did not have the terminal application running when I tried to run consolewd - hmmmm, which made me think about and try that…)

When I have minicom running an start consolewd I can see data flowing from the weather station (Same as if I do a LOOP command)

  • Which is telling me TWO things:
  1. consolewd is not checking the lock status on /dev/ttyS0 (If you try to run minicom a second time you get a lock message)
  2. consolewd IS sending the request, it is just not parsing the response.

Two attachments:
consolewd-1.jpg is just me sending from minicom to the weather station.
consolewd-2.jpg is the same minicom session after starting consolewd (twice) and watching the data come in. (without a lock message!)

Mark


consolewd-2.jpg

consolewd-1.jpg

Just thought of and did a third test…

  1. Started consolewd
  2. tried to start minicom (which DID start)

Results:
consolewd is not placing a lock on /dev/ttyS0 (from test previously I knew it was not looking for the lock).

When minicom started (with consolewd running) It did have data flowing.

  • Stopping consolewd stops the data flow, so it must be exiting properly.

Mark

try another download, same URL as above, and set the station type as 5

It does build the WXNOW.TXT file, but the data in it is not correct.
Sample output: ( I know the humidity is not 000, I would expect the temp to be about 72 right now). I can see from webcams we have a slight breeze (Not 000/000))

[mcheavens@CO-GX260 /packages] $ cat WXNOW.TXT
Aug 25 2015 16:22
000/000g000t055r000p000P000h00b10130
[mcheavens@CO-GX260 /packages] $ cat WXNOW.TXT
Aug 25 2015 16:23
000/000g000t055r000p000P000h00b10130
[mcheavens@CO-GX260 /packages] $ cat WXNOW.TXT
Aug 25 2015 16:24
000/000g000t055r000p000P000h00b10130

  • When starting it says “stationless” (as it did before when I tried station type 4) (now 5)
  • in both cases of 4 or 5 it does not open the serial port. (as it does with 33/34)
    Here is the relevant output: (it does not show to open the com port)

(snip)
remote file =
FTP time interval = 60
wu =Y
Will save logfile
logfile metric
Custom file name = wx.html
Custom file name 2=
Custom file name 3=
Custom file name 4=
Custom file name 5=
wind units = mph
baro metric= N
rain metric= N
Will run cron files
Custom log out = customlogout.txt
will update wxnow.txt
wxnow.txt dir=/packages/<-
WOW id=<-
WOW pass=<-
Modified rain gauge= <
windfinder id=<-
windfinder pass=<-
utc hour=22
local hour=16
Weather Display vers WD_console_11.7
If use this program,then please consider sending a PayPal donation to info@weath
er-display.com (Brian Hamilton)
to help with costs, and support, thanks!
www.weather-display.com
**** doing minute routines now 16:32:00
Stationless
**** updating clientraw extra files
**** updating data logs
updating wxnow
^C
[root@CO-GX260 /packages/weatherwdconsole] #

I suspect you have the config.txt station type entry with no trailing spaces or similar
I have tested here and its OK (tried to open port) with 2 spaces before the // after setting the number
e.g
weather station type=5 // Irox (etc)

Looks like you are on to something…
I had a SINGLE space.
Before (single space): Weather station type=5 // WMII= 4 wizard=33,Irox=59,WMR100=232,WMR200=233,(trim)
Now (double space): Weather station type=5 // WMII= 4 wizard=33,Irox=59,WMR100=232,WMR200=233,(trim)

Now I get:
Weather station type is a Davis WMII 1200 baud
OWW file location= ←
program location= /packages/weatherwdconsole/<-
Davis VP IP data logger port= 22222<
(snip)
Weather Display vers WD_console_11.7
If use this program,then please consider sending a PayPal donation to info@weath
er-display.com (Brian Hamilton)
to help with costs, and support, thanks!
www.weather-display.com
Comport /dev/ttyS0 opened 3
ser_read error Resource temporarily unavailable
ser_read error Resource temporarily unavailable
ser_read error Resource temporarily unavailable
ser_read error Resource temporarily unavailable

(/dev/ttyS0 is not in use by any other programs. I can open minicom and start data/close minicom just fine)

What does “opened 3” mean?

Mark Cheavens

is it a davis wmii
the 3 is just the handle to the port number

Ok,
I have been debugging some more…

  • consoleWD is opening the port, it is sending the request for data.
  • If I start mincom and send a I get a “!” (invalid) response.
  • If I start consolewd I get the “ser_read…” error.
  • If I THEN open minicom and send a I get a valid weather packet back.

If I leave consolewd running and open minicom (again I should not be able to, but you are not locking the port) I can send a and I get a valid weather packet back…
(one for each , so they are buffered, but you can’t get the resource for some reason. You are doing the send, but failing on the read.

!
!
:spades::smiling_face:?:slight_smile:p​:slight_smile::heart:↔?U▲4X#Uv
:spades::smiling_face:?:slight_smile:p​:slight_smile::heart:↔?U▲4X#Uv

Mark

try a new download update again, same URL

No change…Same results after testing the same methods…

Mark

humm, it should say something about received /decoding data

From my perspective in testing. You are sending the request, and the weather station is receiving the request. From what I see your read of the serial port is not working.

  • When I open minicom and send it a I get a line of data.

I wish there was more debug information.

Mark

Weather Display vers WD_console_11.7
If use this program,then please consider sending a PayPal donation to info@weath
er-display.com (Brian Hamilton)
to help with costs, and support, thanks!
www.weather-display.com
Comport /dev/ttyS0 opened 3
setting baud rate to 1200 ->0
ser_read error Resource temporarily unavailable
ser_read error Resource temporarily unavailable
ser_read error Resource temporarily unavailable
ser_read error Resource temporarily unavailable
ser_read error Resource temporarily unavailable
ser_read error Resource temporarily unavailable
ser_read error Resource temporarily unavailable
ser_read error Resource temporarily unavailable

Ok,
Found another early post…
export DEBUG=

Now ran and I get this (Looping)

Opening the serial port /dev/ttyS0
Saving serial configuration
Serial port /dev/ttyS0 opened File desc = 3
Comport /dev/ttyS0 opened 3
setting speed to 1200
setting baud rate to 1200 ->0
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
Write size 7 : 4c 4f 4f 50 ff ff 0a
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :