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

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 :

Ok,
How about this…
You are sending: Write size 7 : 4c 4f 4f 50 ff ff 0a
LOOP $chr(255) $chr(255) $chr(10) - Or New Line
When I send “CR” $chr(13) I flush the buffer.

  • The Davis spec says to send CR or 0D in hex.

I’ll bet if I could time my “CR” just right before you try to read the buffer it might work…

Mark

try another update,…should say about reading data more
is it a davis wmii?

I think I have the davis wmii working in the raspberry pi version of consolewd so I could try compiling that version

As the subject says. It IS a Weather Monitor II

  • I really think the issue is you are sending 0a instead of 0d (line feed vs carrage return).
    (see bottom for more information)

Here is the output:
*****Received count = -----------------------------> 0
Write size 7 : 4c 4f 4f 50 ff ff 0a
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
Write size 7 : 4c 4f 4f 50 ff ff 0a
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
ser_read : Entering
Read size 0 :
ser_read : Exiting

Here is a quick snippit from the Davis serial protocol techref document. (Would be glad to email you the entire document if you don’t have it).
VI. Command Description
Commands must be in upper case and terminated with a
carriage return (0dh). Do not insert spaces between binary data
arguments. If an argument description uses the character ‘|’ then
one byte of data is to be formed from the 4 bit values on either
side. For example: “bank | n-1” becomes the single byte “0x13”
where bank = 1 and n = 4
Rev E links must also include a two byte CRC code with each
command so that the WeatherLink can verify correct transmission.
The CRC code is transmitted BEFORE the command. It is possible to
program Rev E links to use the Rev D communication protocol, if
desired.
If a command is understood, an ASCII 6 (0x06) (ACK) is
returned (before any returned data). If the command was not
understood, an ASCII 33 (0x21) (!) is returned. Note that this
implies that the command passed its CRC check sum if the link is
a Rev E. For Rev E links, if the command does not pass its CRC
check sum, then an ASCII 24 (0x18) (CAN) is returned.
Some commands return a data stream and a CRC check sum. The
generator polynomial for the check sum is x^16 + x^12 + x^5 + 1
(CRC-CCITT backward).

Mark
(PS - Off to bed…Will look again first light North America Central time)

ok, changed that
download a new update :slight_smile: (same url)

Closer ? :slight_smile:
Below is the output. I did let it run for a couple of minutes to see if any of the “minute routines” would do anything. Never did.

No serial read errors.
If I monitor the serial port the is now working! I can see data requested, and sent back.

  • Now the “problem lies in your set”
    Looks to me like the data is there and you are not seeing it/grabbing/retrieving the serial buffer? (Your “read size” is always “0”)
  • Again I CAN see your are sending the correct byte pattern as the weather display is now sending data without me sending a .

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 3
setting speed to 1200
setting baud rate to 1200 ->0
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
Write size 7 : 4c 4f 4f 50 ff ff 0d
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
ser_read : Entering
Read size 0 :
ser_read : Exiting
*****Received count = -----------------------------> 0
Write size 7 : 4c 4f 4f 50 ff ff 0d

Mark

Working!!!

  • Here is what I changed (as I have done during each testing routine before as well with no change previously).
  • It is not documented what “Davis com method=” does or when it is needed. During all previous testing I always tested both with a 1 and with a 2.
  • In my previous post the test was done with “1”. I just changed it to “2” and we are now getting the proper results!!!
  • I was also testing with changing the "Revb Davis VP=Y/N - Currently on N and have not tested with Y as it is now working!

Again, all I changed from the previous post with your version “4” test is to change the Davis com method.

Wish list:
Better documentation (in the config.txt) as to what each setting does.
When building test versions, that you change the version number each time.

Are you going to build a regular build now?


output:
station type found → 5<-
Weather station type is a Davis WMII 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=11
local hour=5
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
Opened
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
*****Received count = -----------------------------> -1
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
*****Received count = -----------------------------> -1
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
*****Received count = -----------------------------> -1
Write size 7 : 4c 4f 4f 50 ff ff 0d
ser_read : Entering
Read size 19 : 06 01 ee 02 31 02 02 62 01 f0 55 20 49 5e 23 00 00 18 ed
ser_read : Exiting
*****Received count = -----------------------------> 19
*****Received count = -----------------------------> 19
WMII Data OK
Current data : Temperature= 56.1 Windspeed =0.0 Gustspeed =2.0 Direction =354 Hu
midity=73 Barometer=29.9 Daily Rain=0.0
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
*****Received count = -----------------------------> -1
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
*****Received count = -----------------------------> -1
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
*****Received count = -----------------------------> -1
Write size 7 : 4c 4f 4f 50 ff ff 0d
ser_read : Entering
Read size 19 : 06 01 ee 02 31 02 02 62 01 f0 55 20 49 5e 23 00 00 18 ed
ser_read : Exiting
*****Received count = -----------------------------> 19
*****Received count = -----------------------------> 19
WMII Data OK
Current data : Temperature= 56.1 Windspeed =0.1 Gustspeed =2.0 Direction =354 Hu
midity=73 Barometer=29.9 Daily Rain=0.0
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
*****Received count = -----------------------------> -1
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
*****Received count = -----------------------------> -1
ser_read : Entering
ser_read error Resource temporarily unavailable
Read size -1 :
ser_read : Exiting
*****Received count = -----------------------------> -1
Write size 7 : 4c 4f 4f 50 ff ff 0d

the davis 2 method is for if you have a usb data logger
but I would not have thought that would apply to the WMII
so if you set that back , does it still work?

re make it the normal download ,I will do that,but I there are not many WMII users

davis com method=1 (gets no data)
davis com method=2 (gets data??? but has not changed in 8 hours…)

We are still not correct -

  • I’m sure the temperature now is above 56.1. Currently that is about the overnight low. Humidity should be lower now (73 is about what it would be at 6am)
    (Valid data would be about the same as “Rico, Colorado” - Although it is currently raining which would make it cool. The rain should be over 0.0)

WMII Data OK
Current data : Temperature= 56.1 Windspeed =1.7 Gustspeed =2.0 Direction =354 Hu
midity=73 Barometer=29.9 Daily Rain=0.0
ser_read error Resource temporarily unavailable
*****Received count = -----------------------------> -1
ser_read error Resource temporarily unavailable
*****Received count = -----------------------------> -1
ser_read error Resource temporarily unavailable
*****Received count = -----------------------------> -1
*****Received count = -----------------------------> 19
*****Received count = -----------------------------> 19
WMII Data OK
Current data : Temperature= 56.1 Windspeed =1.9 Gustspeed =2.0 Direction =354 Hu
midity=73 Barometer=29.9 Daily Rain=0.0
ser_read error Resource temporarily unavailable
*****Received count = -----------------------------> -1
ser_read error Resource temporarily unavailable
*****Received count = -----------------------------> -1

humm, the windspeed value is changing though…?