Hi Jim,

thank you for your answer. I'll try it with the "string methode". Before I 
tried to adapt the lines at the bottom of the aleksander's (the original) 
driver version:



*            if 'windSpeed_mwd' in data and data['windSpeed_mwd'] is not 
None:                data['windSpeed'] = data['windSpeed_mwd']            
elif 'windSpeed_mda' in data and data['windSpeed_mda'] is not 
None:                data['windSpeed'] = data['windSpeed_mda']*
With my above added dictonary entry "SOG_kn":







*                try:                    data['COG_degTrue'] = 
float(buf[1])                    data['COG_degMag'] = 
float(buf[3])                    data['SOG_kn'] = 
float(buf[5])                    data['SOG_kmh'] = 
float(buf[7])                except (ValueError):                    
pass                    loginf("Wrong data format '%s, %s, %s, %s'" % 
(buf[1], buf[3], buf[5], buf[7]))*
But weewx always complains about *KeyError: 'SOG_kn'. *After some 
google-sessions I found out, that this is python typical, if there is no 
dictonary entry for SOG_kn...which is fine, as long as I am testing on the 
desk with no GPS signal, but outside with values for SOG_kn (even 
displayable in grafana) I'm still receiving this error.

And, I'm afraid, that I am not the Dennis who works with Cooper in Denmark 
;-)
I'm here in Munich, Germany ;-)
[email protected] schrieb am Montag, 10. August 2020 um 21:10:19 UTC+2:

>
> by the way,  are you the same Dennis that works with Cooper in Denmark?
> On Monday, August 10, 2020 at 1:28:40 PM UTC-4 [email protected] wrote:
>
>>
>> I wonder if your values are strings rather than floating point numbers?
>>
>> If so, then you would need:
>> *data['windSpeed_true'] = 
>> str(float(data['windSpeed_rel_mwv'])-float(data['SOG_kn'])* ) 
>>
>> I had to run my version of "airmar.py" independent of WeeWx in order to 
>> more easily debug.
>> When I was satisfied with my tests, then I went back to WeeWx.
>>
>> I had my driver working for awhile but then had some trouble related, I 
>> think, to the RaspberryPi not having a good clock.
>> After I get a real clock and get things going again, I will document my 
>> driver development for Airmar 200Wx modified from Rob's.
>>
>> -JiM.
>>
>> On Saturday, August 8, 2020 at 3:14:11 PM UTC-4 [email protected] wrote:
>>
>>> Edit: I ment subtract not divide...sorry about that
>>>
>>> [email protected] schrieb am Samstag, 8. August 2020 um 21:07:44 UTC+2:
>>>
>>>> First of all thank you Jim and Rob for your patience ;-)
>>>>
>>>> Second I'd like to ask, if someone (more python versed) can tell me how 
>>>> to divide two values in the airmar driver. In my specific case it would be 
>>>> the *windSpeed_rel_mwv* - *SOG_kn.* SOG_kn is an value I extracted 
>>>> from the message 
>>>> *$GPVTD. *
>>>> If I use *data['windSpeed_true'] = 
>>>> data['windSpeed_rel_mwv']-data['SOG_kn']* I get an error. So can 
>>>> anyone tell me, where my mistake is?
>>>> What I have learned, it is not the exact or 100% right way to calculate 
>>>> "true wind" but I think I would be close enough ;-)
>>>>
>>>> Thank you in advance and best regards,
>>>>
>>>> Dennis
>>>>
>>>> [email protected] schrieb am Samstag, 1. August 2020 um 22:29:51 UTC+2:
>>>>
>>>>> Hi Rob,
>>>>>
>>>>> if I didn't get the technical manual for the wx unit wrong not all 
>>>>> messages are enabled by default. So some messages have to be activated 
>>>>> manually. Did anyone managed to do so? When I start minicom the sensor 
>>>>> ist 
>>>>> talking but never listening.
>>>>> @James: how are you coming on with this topic?
>>>>>
>>>>> Thank you and best regards,
>>>>>
>>>>> Dennis
>>>>>
>>>>> [email protected] schrieb am Donnerstag, 9. Juli 2020 um 22:04:31 
>>>>> UTC+2:
>>>>>
>>>>>> Hi Dennis,
>>>>>>
>>>>>> One option to see the raw data in the terminal would be to put kplex 
>>>>>> between the usb and the weewx. Configure kplex to receive the messages 
>>>>>> from 
>>>>>> usb, and publish on a tcp server socket. Configure weewx to connect to 
>>>>>> that 
>>>>>> socket for messages.
>>>>>>
>>>>>> Kplex will log to a file if you configure it so, or you can simply 
>>>>>> telnet to the kplex tcp port and see the raw messages. You're looking 
>>>>>> for 
>>>>>> $WIVWT messages.
>>>>>>
>>>>>> http://www.stripydog.com/kplex/configuration.html
>>>>>>
>>>>>> I hope this helps,
>>>>>> Rob.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, 9 Jul 2020 at 20:02, Dennis Füß <[email protected]> wrote:
>>>>>>
>>>>>>> Hi Jim and Rob,
>>>>>>>
>>>>>>> first of all: thank you for your fast reply.
>>>>>>> For the moment I have used windSpeed_rel_mwv but it turned out, that 
>>>>>>> the data I'm getting is the windspeed without the subtracted vessel 
>>>>>>> speed. 
>>>>>>> The main problem is, that I'm the "engineer" for the system but have 
>>>>>>> no possibility to test it in person on the lake, where the vessel is 
>>>>>>> located :-/
>>>>>>>
>>>>>>> Maybe I explain my setup:
>>>>>>> Airmar 150WX goes via NMEA 0183 cable to an RS422 to USB converter 
>>>>>>> to a raspberry pi 3 running weewx. Weewx stores the data in an influxdb 
>>>>>>> and 
>>>>>>> grafana is showing them.
>>>>>>>
>>>>>>> @Jim: thank you. But where have you specified the mentioned data? I 
>>>>>>> mean in which configuration file?
>>>>>>>
>>>>>>> @Rob: you asked if I would receive the values for 
>>>>>>> windSpeed_true_vess etc. -> I tried to call it in grafana but it didn't 
>>>>>>> show me data, so I guess I don't receive them. Or is there a way to see 
>>>>>>> all 
>>>>>>> received data/variables in terminal (probably a stupid question, but 
>>>>>>> for 
>>>>>>> the moment I don't know). When I open grafana it shows me the available 
>>>>>>> data from its database, so I don't see any reason why available data 
>>>>>>> shouldn't be stored in there, right?
>>>>>>>
>>>>>>> So I hope, that I didn't forget anything and stay thrilled for Jim's 
>>>>>>> findings ;-)
>>>>>>> Thank you in advance and best regards,
>>>>>>>
>>>>>>> Dennis
>>>>>>> Am Mittwoch, 8. Juli 2020 10:24:16 UTC+2 schrieb Rob Fuller:
>>>>>>>>
>>>>>>>> Hi Dennis,
>>>>>>>>
>>>>>>>> The device we use is at a fixed position so it's not something I've 
>>>>>>>> looked at before.
>>>>>>>>
>>>>>>>> Looking quickly at the code I see it does try to 
>>>>>>>> parse windAngle_true_vess and windSpeed_true_vess from the $WIVWT 
>>>>>>>> message. 
>>>>>>>> Does your device send that?
>>>>>>>>
>>>>>>>> Otherwise I'm waiting to see what James Manning comes up with ;-)
>>>>>>>>
>>>>>>>> Kind regards,
>>>>>>>> Rob.
>>>>>>>>
>>>>>>>> On Tue, 7 Jul 2020 at 20:38, Dennis Füß <[email protected]> wrote:
>>>>>>>>
>>>>>>>>> Hi Rob,
>>>>>>>>>
>>>>>>>>> maybe you can help me out since Aleksandar seems to be gone for a 
>>>>>>>>> while.
>>>>>>>>> I have an Airmar 150WX up and running but i doesn't seem to give 
>>>>>>>>> me any values for *windSpeed_true_vess*. Or in other words I 
>>>>>>>>> don't get the windspeed subtracted from the vessel's speed. 
>>>>>>>>>
>>>>>>>>> Do you have any idea, how to accomplish this?
>>>>>>>>>
>>>>>>>>> Thank you and best regards in advance,
>>>>>>>>>
>>>>>>>>> Dennis
>>>>>>>>>
>>>>>>>>> Am Mittwoch, 10. Juni 2020 09:12:48 UTC+2 schrieb Rob Fuller:
>>>>>>>>>>
>>>>>>>>>> Hi James,
>>>>>>>>>>
>>>>>>>>>> I haven't looked at this for a while, but anyhow it was working 
>>>>>>>>>> okay. At Marine Institute we did something like this:
>>>>>>>>>>
>>>>>>>>>> wget -O bin/weewx/drivers/airmar.py 
>>>>>>>>>> https://raw.githubusercontent.com/fullergalway/weewx-airmar-150wx-driver/master/airmar.py
>>>>>>>>>>  
>>>>>>>>>> && chmod 755 bin/weewx/drivers/airmar.py
>>>>>>>>>>
>>>>>>>>>> In the weewx conf we included these lines
>>>>>>>>>> [Station]
>>>>>>>>>> ...
>>>>>>>>>> station_type = Airmar
>>>>>>>>>>
>>>>>>>>>> [Airmar]
>>>>>>>>>>     model = Airmar 200WX
>>>>>>>>>>     port = socket://10.11.104.5:10000
>>>>>>>>>>     driver = weewx.drivers.airmar 
>>>>>>>>>>
>>>>>>>>>> I hope this helps!
>>>>>>>>>> Rob.
>>>>>>>>>>
>>>>>>>>>> On Tue, 9 Jun 2020 at 20:50, 'James Manning - NOAA Federal' via 
>>>>>>>>>> weewx-development <[email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Rob-
>>>>>>>>>>>
>>>>>>>>>>> First, thanks MUCH for posting your "airmar.py" on github.
>>>>>>>>>>>
>>>>>>>>>>> I am a very novice weewx user.  I just got the "simulator" 
>>>>>>>>>>> working on my RaspberryPi and now I want to hook up my Arimar 200WX.
>>>>>>>>>>> From what I understand,  I need to take two basic steps:
>>>>>>>>>>>
>>>>>>>>>>> 1) modify the weewx.conf to point to new station_type and set 
>>>>>>>>>>> driver=weewx.drivers.airmar
>>>>>>>>>>> 2) put the "airmar.py" in my "user" directory which I think is 
>>>>>>>>>>> /home/pi
>>>>>>>>>>>
>>>>>>>>>>> Is that right?
>>>>>>>>>>> -JiM.
>>>>>>>>>>>
>>>>>>>>>>> On Wednesday, May 20, 2015 at 12:05:58 PM UTC-4, Rob Fuller 
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks Aleksandar,
>>>>>>>>>>>>
>>>>>>>>>>>> I needed to make a couple of small changes for it to work with 
>>>>>>>>>>>> our device (Airmar 200WX). Mostly:
>>>>>>>>>>>>
>>>>>>>>>>>> 1. use pyserial socket:// url, since we are exposing the 
>>>>>>>>>>>> weatherstation using ftdi driver and kplex
>>>>>>>>>>>> 2. added some detail in the log messages
>>>>>>>>>>>> 3. added some leniency on the checksum verification (" F" == 
>>>>>>>>>>>> "0F")
>>>>>>>>>>>>
>>>>>>>>>>>> For the 200WX I'm still getting a couple of warnings, but 
>>>>>>>>>>>> haven't looked into it yet, and generally things seem ok. The 
>>>>>>>>>>>> warnings are:
>>>>>>>>>>>>
>>>>>>>>>>>> weewx[11]: airmar: Wrong data format for windchill_rel ''
>>>>>>>>>>>> weewx[11]: airmar: Wrong data format for windchill ''
>>>>>>>>>>>> weewx[11]: airmar: Wrong data format for heatindex ''
>>>>>>>>>>>>
>>>>>>>>>>>> I put the source on github for the moment here if someone is 
>>>>>>>>>>>> running with it:
>>>>>>>>>>>> https://github.com/fullergalway/weewx-airmar-150wx-driver
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks again,
>>>>>>>>>>>> Rob.
>>>>>>>>>>>>
>>>>>>>>>>>> On Tuesday, April 28, 2015 at 11:20:47 AM UTC+1, Aleksandar 
>>>>>>>>>>>> Tsankov wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>> I followed the mwall's advice and went back to original 
>>>>>>>>>>>>> wxservices.py. The logic for deciding which windSpeed and windDir 
>>>>>>>>>>>>> to be 
>>>>>>>>>>>>> used is putted in the driver.
>>>>>>>>>>>>> Now everything works as supposed.
>>>>>>>>>>>>> Since I want to have some real-time application running on 
>>>>>>>>>>>>> tablet, is it possible weewx to generate Weather Display's 
>>>>>>>>>>>>> clientraw.txt 
>>>>>>>>>>>>> file in order WDL (or something similar) to be used?
>>>>>>>>>>>>> I'm attaching the new version of driver.
>>>>>>>>>>>>>
>>>>>>>>>>>> -- 
>>>>>>>>>>> You received this message because you are subscribed to a topic 
>>>>>>>>>>> in the Google Groups "weewx-development" group.
>>>>>>>>>>> To unsubscribe from this topic, visit 
>>>>>>>>>>> https://groups.google.com/d/topic/weewx-development/q6IHzkmyhBo/unsubscribe
>>>>>>>>>>> .
>>>>>>>>>>> To unsubscribe from this group and all its topics, send an email 
>>>>>>>>>>> to [email protected].
>>>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>>>> https://groups.google.com/d/msgid/weewx-development/b9035cdf-fd4d-41b4-ab20-95c9535968ddo%40googlegroups.com
>>>>>>>>>>>  
>>>>>>>>>>> <https://groups.google.com/d/msgid/weewx-development/b9035cdf-fd4d-41b4-ab20-95c9535968ddo%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>>>> .
>>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>> You received this message because you are subscribed to a topic in 
>>>>>>>>> the Google Groups "weewx-development" group.
>>>>>>>>> To unsubscribe from this topic, visit 
>>>>>>>>> https://groups.google.com/d/topic/weewx-development/q6IHzkmyhBo/unsubscribe
>>>>>>>>> .
>>>>>>>>> To unsubscribe from this group and all its topics, send an email 
>>>>>>>>> to [email protected].
>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>> https://groups.google.com/d/msgid/weewx-development/a35bd773-b6b8-4c2d-979d-22337bbcd127o%40googlegroups.com
>>>>>>>>>  
>>>>>>>>> <https://groups.google.com/d/msgid/weewx-development/a35bd773-b6b8-4c2d-979d-22337bbcd127o%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to a topic in 
>>>>>>> the Google Groups "weewx-development" group.
>>>>>>> To unsubscribe from this topic, visit 
>>>>>>> https://groups.google.com/d/topic/weewx-development/q6IHzkmyhBo/unsubscribe
>>>>>>> .
>>>>>>>
>>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>>>> [email protected].
>>>>>>> To view this discussion on the web visit 
>>>>>>> https://groups.google.com/d/msgid/weewx-development/ff51ce20-4659-405e-90b6-b981e671f096o%40googlegroups.com
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/weewx-development/ff51ce20-4659-405e-90b6-b981e671f096o%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/951a49fb-1907-4b33-a8f6-864215939331n%40googlegroups.com.

Reply via email to