Further to this, and referencing the following article...
https://www.element14.com/community/groups/internet-of-things/blog/2015/01/07/old-meets-new-the-1-wire-weather-station-on-the-spark-core-part-5

You have reed switches that are normally open (off).
They are connected to identifiable locations (unique DS2401 id code
corresponding to a compass direction.)
Depending on the position of the wind vane, the magnet will close the
reed switch and power up the DS2401 when the DS2407 is turned on.

So, If the DS2407 is queried , by turning it on (and immediately
afterwards it must be turned off ) then the ID of the DS2401 can be
read by the bus, that value can then be passed to the software where
its cardinal value can be returned. It can easily return 8 points,
with a little more interpretation it can return up to 16 points (if it
reads 2 DS2401 ids).

Seems reasonably simple. :-) Don't think I missed any show stoppers!

It would be within the scope of owfs.py, once a mechanism of cleanly
querying the DS2407 is worked out.
owfs.py can certainly read an id, and the comparison function might be
a little unwieldy but its not a unique problem. (The example above
already has the getValues() {[...]} code which translates to a series
of python elif 's)

If the unit still works (testing the unit as per my previous post with
OWW) then it would be worth pursuing (nothing worse than a dead unit
when writing code! Been there done that.)



On 24/03/2020, Glenn McKechnie <glenn.mckech...@gmail.com> wrote:
> I don't have one of these, so what follows is only building on what
> you've reported.
>
> As you say, the weewx-owfs driver appears to be focused on voltage
> sensing/conversion.
> As I recall the AAG windvane (at least the one I had and can't find)
> used reed switches so its logic started from simple switching and that
> worked with the OWW software. The very early AAG windvane was a direct
> copy of the original Dallas windvane so perhaps there is code in OWW
> for it?
>
> Viewing the src/weather.c from OWW it mentions a DS2407 in association
> with 8 DS2401's and while that references Dallas's original Win32
> software there is another reference. Later in the file it suggests OWW
> does a search for a DS2407 Vane switch and is happy if it finds one...
>
> line number 3281 of weather.c
>
> ReadWindDirection ( /*uchar SwitchID[8] */ int vane)
> {
>   int dira = -1, dirb = -1, i, found = 0;
>   uchar DirSN[MAX_DEVS_SEARCH][8];
>   int p ;
>   p = devices_portnum(vane) ;
>
>   memset ((void *) DirSN, 0, MAX_DEVS_SEARCH * 8 * sizeof (uchar));
>
>   /* Access the Vane Switch - Vane IDs are behind this */
>
>   if (!devices_access (vane))
>   {
>     werr (WERR_AUTOCLOSE, _("Could not access Vane Switch"));
>     return -1;
>   }
>
>   /* connect channel B of DS2407 */
>   /* There shouldn't be any trouble here, but may as well
>    * use the robust function */
>   if (!set_switch_robust (vane, SWITCH_AOFF_BON, SWITCH_TRIES))
>   {
>     werr (WERR_DEBUG0, "Connect channel B of DS2407 failed");
>     return -1;
>   }
>
>   /* delay to allow presence pulse to proceed */
>   msDelay (10);
>
>   /* record all of DS2401's found */
>
> In short, it appears to have some relevant code. (Assuming I'm reading
> it correctly)
>
> Also, looking back in the weewx-user archive I note that you detected
> 2 DS2406s using OWFS.py The DS2407 is the next gen version of that
> semi.
>
> Have you tried running this using OWW?
> https://sourceforge.net/projects/oww/
>
> If that works, well ... ?
>
> As a final note, I just found the following that was linked from a
> 2015 weewx-user post
> https://groups.google.com/forum/#!topic/weewx-user/Nn0P0xzxTaY
> and that points to a very informative document
> https://web.archive.org/web/20061018205111/http://archives.sensorsmag.com/articles/0698/wir0698/
>
> On 24/03/2020, Bret Craytor <bretcray...@gmail.com> wrote:
>> I have searched high and low on this group to look for old threads, seems
>> everyone has the voltage Wind Direction using OWFS.
>> Can someone just point me in the right direction or to the right forum?
>> Looked at OWW too.  Thanks for any and all input.
>>
>> Bret Craytor
>>
>> On Monday, March 23, 2020 at 11:55:52 AM UTC-5, Bret Craytor wrote:
>>>
>>> Hey!
>>>
>>> Which sensor type should I use in my OWFS WEEWX conf file?  I have the
>>> addresses of the DS2401's on the PCB layout:
>>>
>>>
>>>      D     E     F
>>>      C            G
>>>      B     A     H
>>>             II
>>>             II  -mount side (viewed from top of PCB
>>>
>>>
>>> A:  01.B5374A040000
>>> B:  01.B2374A040000
>>> C:  01.BA374A040000
>>> D:  01.B7374A040000
>>> E:  01.C6374A040000
>>> F:  01.C3374A040000
>>> G:  01.BD374A040000
>>> H:  01.AE374A040000
>>>
>>> As you can see, the first two digits after the dot are the only values
>>> that change.  Surely someone out there has already made a sensor type
>>> file
>>>
>>> for this, and can help with my weewx.conf file setup.
>>>
>>> I had some earlier posts and recieved great help, but have had to keep
>>> putting the project down to do other tasks, but with the COVID-19
>>> instructions for staying home, here I am!  Thanks for your help WEEWX
>>> community!
>>>
>>> Bret Craytor
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to weewx-user+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/f7f62c61-c80f-46a3-b06e-47fa18978dc1%40googlegroups.com.
>>
>
>
> --
>
>
> Cheers
>  Glenn
>
> rorpi - read only raspberry pi & various weewx addons
> https://github.com/glennmckechnie
>


-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAAraAzg%2BKfZhTYU_isxnGHDCEEhJgdabL2gUnVYGvKyB71trGA%40mail.gmail.com.

Reply via email to