Re: [weewx-user] Re: What directory are the drivers stored in? Texas Wx Intruments driver question

2023-03-23 Thread pannetron
Dale,

If you replace your /usr/share/weewx/user/twi.py with the one I emailed you 
a while back, you should be good to go.  I created a pull request to have 
my fixes incorporated into the official version, you can find my fork 
at https://github.com/pannetron/weewx-twi.  Both versions hard code the 
baud rate at 19200.  Make sure you can putty to the station at that baud 
rate.  If you're stuck on 9600, simply change the string "19200" in twi.py 
to "9600".  After copying and/or changing twi.py, I restart weewx using the 
"sudo /etc/init.d/weewx restart" method.  My corrected version of twi.py 
has been working perfectly for me for several months now.  If you're in an 
area where you experience negative outdoor temperatures, you'll also 
benefit from a bug fix for TWI firmware that I developed years ago for 
wview and ported into the weewx twi.py driver.  I poll my station every 5 
seconds vs. the default 15 so my MQTT real-time stream is updated more 
often to display more of our crazy winds.  You can see my data at 
https://panneton.net/weather.

Cheers,

Russ

On Wednesday, March 22, 2023 at 5:02:00 PM UTC-6 DR wrote:

> This is very helpful, thank you.
>
> Dale
>
>
>

-- 
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/f8f7ec1d-0838-4a14-b0b2-28bc8ba51999n%40googlegroups.com.


Re: [weewx-user] Re: What directory are the drivers stored in? Texas Wx Intruments driver question

2023-03-22 Thread DR

This is very helpful, thank you.

Dale


--
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/5b01e4ee-40c0-d9ec-4a02-c0ad25c391da%40gmail.com.


[weewx-user] Re: What directory are the drivers stored in? Texas Wx Intruments driver question

2023-03-22 Thread vince
See https://weewx.com/docs/usersguide.htm#Where_to_find_things - drivers 
are under the executables tree so look in /usr/share/weewx/weewx/drivers 
for the core drivers.  If you added them as an extension they'd be under 
/usr/share/weewx/user and the extension would show as installed if you run 
"wee_extension --list".

The init.d command runs the service like it does at boot.  The 'sudo 
weewxd' command runs the executable in the foreground, typically for 
debugging problems.

The sources for weewx-twi seem to say the baud rate is hard-set to 19200 in 
the twi.py file.  It looks like you can run the driver in a diagnostic mode 
if you look at the __main__ part at the bottom of the file.  I'd say set 
debug=1 in weewx.conf as well as a best practice at least until you get it 
running.


On Wednesday, March 22, 2023 at 10:39:44 AM UTC-7 DR wrote:

> I am hoping this is an easy question to answer.
>
> I have Python 3 running on a Raspberry 400 with the Raspbian OS.
>
> I used the setup program to install WeeWX that leaves the majority of 
> stuff in the /etc/weewx directory.
>
> I am trying to get the driver for the Texas Weather Instruments system 
> running over a /ttyUSB0 port.  I have the port at 9600 baud, and have 
> used PuTTY to talk to the station and get back expected data sentences.
>
>
> I have installed the latest (I hope) version of Matthew Wall's TWI 
> driver from GitHub, and I think that Tom had tweaked a few things about 
> 6 months ago after the 4.9 release of WeeWX came out.
>
>
> Having installed it, I did a sudo wee_config  --reconfigure command and 
> ran through the questions, but choosing the TWI option rather than the 
> simulator which I had used to verify that the WeeWX was running OK in 
> the environment, letting it run for a couple days and looking at the 
> index.html file that it produced to show the graphs and statistics.
>
> I used sudo tail -f /var/log/syslog to monitor what was being written to 
> that file, and see every 15 seconds a command 'b r' which should be 
> right according to the command looking for the current conditions (and 
> was what I used to verify with PuTTY that the connection to the station 
> was working.
>
>
> The next line on the display says that the station responded with:  and 
> is blank.  I watched the blinky lights on the USB dongle and there is no 
> change, unlike when I did PuTTY and the transmit/receive and say them 
> change with the command and when I received the data sentence.
>
>
> My concern is that there is something that the driver is needing, like 
> the baud rate, and while WeeWX is asking for data via the driver, the 
> station isn't seeing it and not responding.  I have changed the baud 
> rate to other values, like the native 19.2kBaud that the station uses by 
> default but can obviously be changed otherwise.  I did set the PuTTY to 
> 9600 baud in the start up screen for it and that is how I know that part 
> works.
>
>
> So I have been searching for where the installed driver is kept on the 
> Raspberry 400 file structure to look there to see if there is something 
> I'm missing, but doesn't seem to be anywhere in the /etc/WeeWX directory 
> where the skins are kept.
>
>
> One more question:  When I do some tinkering, I usually shut down ( I 
> think) WeeWX by saying in a terminal window:  "sudo /etc/init.d/weewx 
> stop" and then restart with "sudo /etc/init.d/weewx start"
>
> Should I be using 'sudo weewxd" instead?
>
> Dale
>
>
>

-- 
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/bc735370-1fd4-4815-bcfd-60fb42239023n%40googlegroups.com.