[weewx-user] Rsync - how to prevent directory from deletion

2024-05-26 Thread 'Tomasz Lewicki' via weewx-user
Dear Weewx users.

I'd like to ask how can I prevent Rsync called by Weewx from deleting a 
directory or file on a remote server when refreshing the site with weather 
observations?

The problem is: I wrote short documentation for people visiting my PWS 
site. It is in directory called 'docs'. I put it manually to the main 
directory of remote WWW server (public_html). When my Weewx updates files 
and is sending them by Rsync, 'docs' directory is being deleted from 
server. I can't protect it by 'chatrr +i' in Linux because this is hosted 
server and I can't use all normal Linux system tools.

Some hints...? 

-- 
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/64c3f516-d468-4957-ad16-4810ee735b3fn%40googlegroups.com.


[weewx-user] Re: Remove/update archive (history) data

2024-04-30 Thread 'Tomasz Lewicki' via weewx-user
OK, sorry for a noise. I found instructions on the 
wiki: https://github.com/weewx/weewx/wiki/Cleaning-up-old-'bad'-data

But it's strange that I see April's values in history section despite 
weewx.sdb oldest data is 2024-05-01 00:00:00. 

środa, 1 maja 2024 o 06:55:45 UTC+2 Tomasz Lewicki napisał(a):

> Dear Weewx users.
>
> My station was in "test mode" until midnight May 1. Now I want to remove 
> all data before this date. SQLite database is modified and has only data 
> after May 1, 00:00:00. But in my archive (history) data on website I see 
> earlier months and max/min values too. How to get rid of them? I suppose 
> some 'weectl database' command but which one?
>

-- 
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/53cec26d-06c5-4bab-be0e-6b67054cab74n%40googlegroups.com.


[weewx-user] Remove/update archive (history) data

2024-04-30 Thread 'Tomasz Lewicki' via weewx-user
Dear Weewx users.

My station was in "test mode" until midnight May 1. Now I want to remove 
all data before this date. SQLite database is modified and has only data 
after May 1, 00:00:00. But in my archive (history) data on website I see 
earlier months and max/min values too. How to get rid of them? I suppose 
some 'weectl database' command but which one?

-- 
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/ad80433c-42c0-4942-b4a9-368f7be7fa93n%40googlegroups.com.


[weewx-user] Re: rsync: host key verification failed - problem

2024-02-08 Thread 'Tomasz Lewicki' via weewx-user
In my weewx.conf I have a section:

[[RSYNC]]
enable = true
server = XYZ # It's only identifier needed for file described below. 
Can be anything, for example MY_SECRET_SERVER
path = /path/to/files/on/my/remote/server # for example: 
/domains/my-domain/public_html/pws

And in /root/.ssh I have file named simply 'config':

Host XYZ
HostName my.remote.server.com # HostName can be also direct IP address
Port 45678 # Port to SSH if not standard 22
User me # name of your user on remote server

And rsync from inside of Weewx works in my case.

czwartek, 8 lutego 2024 o 09:33:14 UTC+1 Kalju napisał(a):

> Hi all,
>
> Facing same issue with *ERROR weeutil.rsyncupload:  Host key 
> verification failed *error. 
> However, it's really strange...
> I can ssh to remote site as both *root* as well as *pi* user
> I can do manual rsync with no problems but weewx builtin rsync returns 
> above error
> At the moment my weewx installation is syncing using cron with no problems 
> but I want to understand why builtin rsync fails
> Problem started after upgrade from weewx 5.0.0 to 5.0.1
>
> Any ideas?
> Thank you forward :-)
> On Friday, July 21, 2023 at 1:14:24 PM UTC+3 Tomasz Lewicki wrote:
>
>> Thank you for replies.
>>
>> @Warren Gill: yes, I was thinking about crontab but wanted to use 
>> built-in solution. Of course crontab is good as backup solution.
>>
>> @vince: you're right, I didn't think about it from this side. Just for 
>> record for future seekers:
>>
>> 1. I logged as root ('sudo -i' from 'pi' account)
>> 2. generated SSH keys ('ssh-keygen')
>> 3. copied them to external server ('ssh-copy-id 
>> ace...@external.domain.com -p 222')
>> 4. copied /home/pi/.ssh/config to /root/.ssh/config
>> 5. changed owner of 'config' ('chown root:root /root/.ssh/config')
>> 6. waited for next synchronization
>> 7. smiled because everything worked as expected :)
>>
>> czwartek, 20 lipca 2023 o 23:24:20 UTC+2 vince napisał(a):
>>
>>> Unless you did something custom, weewx runs as root, not as user 'pi'.
>>>
>>> You need 'root' to be able to ssh into the remote system with the 
>>> user+key you specified.  Same procedure you did to get 'pi' to work, just 
>>> do it after sudo(ing) to root so you set the 'root' account up similiarly. 
>>>   Two minute thing to do.
>>>
>>> On Thursday, July 20, 2023 at 1:06:54 PM UTC-7 Tomasz Lewicki wrote:
>>>
 rsync: host key verification failed

 Dear Weewx users.

 I'm trying to send files generated by Weewx to external webserver (paid 
 hosting) with rsync. I'm familiar with rsync, ssh and Linux. Weewx is 
 running on Raspberry Pi as 'pi' user. Here are my configs:

 /home/pi/.ssh/config

 Host CF
 #HostName external.domain.com <- here of course is real web address
 HostName 10.20.30.40 <- here of course is real IP
 Port 222
 User acetone <- this is my username on remote webserver (hosting)
 
 /etc/weewx/weewx.conf

 (...)

 [[RSYNC]]
 # rsync'ing to a webserver is treated as just another report
 skin = Rsync
 
 # If you wish to use rsync, you must configure passwordless ssh 
 using
 # public/private key authentication from the user account that 
 weewx
 # runs to the user account on the remote machine where the files
 # will be copied.
 #
 # If you wish to use rsync, set "enable" to "true", then
 # fill out server, user, and path.
 # The server should appear in your .ssh/config file.
 # The user is the username used in the identity file.
 # The path is the destination directory, such as 
 /var/www/html/weather.
 # Be sure that the user has write permissions on the 
 destination!
 enable = true
 server = external.domain.com
 port = 222
 user = acetone
 path = domains/external.domain.com/private_html/meteo/
 
 # To upload files from something other than what HTML_ROOT is 
 set
 # to above, specify a different HTML_ROOT here.
 #HTML_ROOT = /var/www/html/weewx
 
 # Rsync can be configured to remove files from the remote 
 server if
 # they don't exist under HTML_ROOT locally. USE WITH CAUTION: 
 if you
 # make a mistake in the remote path, you could could 
 unintentionally
 # cause unrelated files to be deleted. Set to 1 to enable 
 remote file
 # deletion, zero to allow files to accumulate remotely.
 delete = 0

 (...)

 I can log in to external server with ssh (passwordless) with command:

 $ ssh -p 222 ace...@external.domain.com

 or just

 $ ssh CF <- this is host from .ssh/config

 I got error message from weewx:

 Jul 

[weewx-user] Re: Driver permission error when starting Weewx

2024-02-01 Thread 'Tomasz Lewicki' via weewx-user
That's strange message. When you manualy decompress ZIP (I suppose 
downloaded from GitHub) and look into install.py, last line says:

*files=[('bin/user', ['bin/user/interceptor.py'])]*

I don't know why in your case there is / (slash) in error message:

*FileNotFoundError: [Errno 2] No such file or directory: 
'/bin/user/interceptor.py'*

But I think you can manually copy just one file - *interceptor.py*  - to 
*/etc/weewx/bin/user* directory and make changes in *weewx.conf,* then 
restart weewx, it should work. There are additiional files in *util* 
directory but install.py omits them so they are not necessary. 
czwartek, 1 lutego 2024 o 08:35:01 UTC+1 Chris McLeod napisał(a):

> @Tomasz, you stated above that ' I installed both interceptor and HP1000 
> drivers by weectl. " Can you provide some insight into how you did this? I 
> have a fresh install of 5.0.1 and when I run 'weectl extension install 
> weewx-interceptor.zip (fresh download) I get an error stack below. I am 
> posting here just in case I am missing something obvious, if not I will 
> start a new thread. 
>
> Thanks, 
> Chris 
>
> :~$ weectl extension install weewx-interceptor.zip
> Using configuration file /etc/weewx/weewx.conf
> Install extension 'weewx-interceptor.zip' (y/n)? y
> Extracting from zip archive weewx-interceptor.zip
>
> Traceback (most recent call last):
>   File "/usr/share/weewx/weectl.py", line 74, in 
> main()
>   File "/usr/share/weewx/weectl.py", line 66, in main
> namespace.func(namespace)
>   File "/usr/share/weewx/weectllib/__init__.py", line 121, in dispatch
> namespace.action_func(config_dict, namespace)
>   File "/usr/share/weewx/weectllib/extension_cmd.py", line 116, in 
> install_extension
> ext.install_extension(namespace.source, no_confirm=namespace.yes)
>   File "/usr/share/weewx/weecfg/extension.py", line 138, in 
> install_extension
> extension_name = self._install_from_file(extension_path, filetype)
>   File "/usr/share/weewx/weecfg/extension.py", line 168, in 
> _install_from_file
> extension_name = self.install_from_dir(extension_dir)
>   File "/usr/share/weewx/weecfg/extension.py", line 185, in 
> install_from_dir
> self._install_files(installer['files'], extension_dir)
>   File "/usr/share/weewx/weecfg/extension.py", line 269, in _install_files
> shutil.copy(source_path, destination_path)
>   File "/usr/lib/python3.8/shutil.py", line 418, in copy
> copyfile(src, dst, follow_symlinks=follow_symlinks)
>   File "/usr/lib/python3.8/shutil.py", line 264, in copyfile
> with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
> FileNotFoundError: [Errno 2] No such file or directory: 
> '/bin/user/interceptor.py'
>
> On Thursday, January 25, 2024 at 1:27:34 AM UTC-7 Tomasz Lewicki wrote:
>
>> Mystery solved. 
>>
>> But answering to vince question, my system is rather typical - Raspbian 
>> on Raspberry Pi, only WLAN interface is active. Weewx was unwillingly 
>> updated from 4.10.2 to 5.0.0. I checked all point of failure: Python 
>> version, permissions (thank you Gary!), network traffic. As I wrote before, 
>> rtupdate.wunderground.com was hijacked - local DNS redirected it to 
>> Weewx. So I deleted this bypass, allowing console to send data to real WU 
>> server. But still I couldn't see any traffic on my router. Total silence. 
>> It was abnormal (and it explains why PCAP file captured by Tshark was empty 
>> on port 80). But I didn't check WU settings in WiFi console. Station ID was 
>> empty, password was obfuscated by asterisks. I don't use WU website at all, 
>> I just needed credentials for conversation between console and Weewx. I 
>> entered ID and password - and then console started send data to real WU. So 
>> I redirected  network traffic on my DNS again, and Weewx started to receive 
>> data from WiFi console via interceptor driver :)
>>
>> Thank you to everyone who patiently read my writings and tried to help.
>>
>> środa, 24 stycznia 2024 o 22:54:46 UTC+1 vince napisał(a):
>>
>>> Difficult to answer with no info from you on exactly 'what' command you 
>>> ran for wireshark and whether your listening computer is wifi, ethernet, or 
>>> both.  What kind of computer are you running on ?  What os ?  What version 
>>> ?  Which interfaces ?  What was your 'exact' wireshark command ?
>>>
>>> But I see nothing basically in that 6-second pcap.  If running a sniffer 
>>> on your computer sees no traffic being redirected from the station, then 
>>> there is nothing for interceptor to intercept on the weewx computer.
>>>
>>> Again, when you say "*But I hijacked DNS on my router*" that (to me) 
>>> does not cause any traffic from your station to wunderground to be 
>>> redirected to your weewx system unless I'm not understanding what you're 
>>> saying.  Perhaps you should tell everybody what your system config is so 
>>> those who do interceptor can try to help more. 
>>>
>>> On Wednesday, January 24, 2024 at 1:38:25 PM UTC-8 Tomasz Lewicki wrote:
>>>
 I 

[weewx-user] Re: Driver permission error when starting Weewx

2024-01-25 Thread 'Tomasz Lewicki' via weewx-user
Mystery solved. 

But answering to vince question, my system is rather typical - Raspbian on 
Raspberry Pi, only WLAN interface is active. Weewx was unwillingly updated 
from 4.10.2 to 5.0.0. I checked all point of failure: Python version, 
permissions (thank you Gary!), network traffic. As I wrote before, 
rtupdate.wunderground.com was hijacked - local DNS redirected it to Weewx. 
So I deleted this bypass, allowing console to send data to real WU server. 
But still I couldn't see any traffic on my router. Total silence. It was 
abnormal (and it explains why PCAP file captured by Tshark was empty on 
port 80). But I didn't check WU settings in WiFi console. Station ID was 
empty, password was obfuscated by asterisks. I don't use WU website at all, 
I just needed credentials for conversation between console and Weewx. I 
entered ID and password - and then console started send data to real WU. So 
I redirected  network traffic on my DNS again, and Weewx started to receive 
data from WiFi console via interceptor driver :)

Thank you to everyone who patiently read my writings and tried to help.

środa, 24 stycznia 2024 o 22:54:46 UTC+1 vince napisał(a):

> Difficult to answer with no info from you on exactly 'what' command you 
> ran for wireshark and whether your listening computer is wifi, ethernet, or 
> both.  What kind of computer are you running on ?  What os ?  What version 
> ?  Which interfaces ?  What was your 'exact' wireshark command ?
>
> But I see nothing basically in that 6-second pcap.  If running a sniffer 
> on your computer sees no traffic being redirected from the station, then 
> there is nothing for interceptor to intercept on the weewx computer.
>
> Again, when you say "*But I hijacked DNS on my router*" that (to me) does 
> not cause any traffic from your station to wunderground to be redirected to 
> your weewx system unless I'm not understanding what you're saying.  Perhaps 
> you should tell everybody what your system config is so those who do 
> interceptor can try to help more. 
>
> On Wednesday, January 24, 2024 at 1:38:25 PM UTC-8 Tomasz Lewicki wrote:
>
>> I attach PCAP file with packets captured for 120 seconds. TCP/80 only. 
>> Weewx was shut down. No traffic on this port until I manually have done the 
>> operation described in one of me previous posts (browser query): 
>> https://groups.google.com/g/weewx-user/c/O8DTjzeeQcg/m/psrDaMHoAAAJ 
>>
>> środa, 24 stycznia 2024 o 22:22:37 UTC+1 vince napisał(a):
>>
>>> Stop weewx.  Just run the packet capture and post the .pcap file so 
>>> others can take a look please.  Be sure to capture only tcp/80.   Compress 
>>> the pcap file if it's large or post it someplace online where others can 
>>> download it.
>>>
>>> The gui version of wireshark is much easier to understand.
>>>
>>> On Wednesday, January 24, 2024 at 1:16:50 PM UTC-8 Tomasz Lewicki wrote:
>>>
 My mistake. These packets were captured when Weewx was running with 
 HP1000 driver. When I changed the driver to interceptor, I didn't captured 
 *any* packets from WiFi console. I don't understand it...
 środa, 24 stycznia 2024 o 21:06:53 UTC+1 vince napisał(a):

> You need something to send traffic to intercept.  Run wireshark on 
> your weewx computer and listen on port 80 and see if your computer is 
> hearing anything (and what).  If it's http the payload should be 
> decipherable.
>
>
>
> On Wednesday, January 24, 2024 at 12:01:31 PM UTC-8 Tomasz Lewicki 
> wrote:
>
>> By hardware do you mean WiFi console from my weather station? If yes, 
>> it has very simple (almost none) configuration. It sends weather data to 
>> WU 
>> only. But I hijacked DNS on my router:
>>
>> pi@meteo:~ $ rtupdate.wunderground.com
>> PING rtupdate.wunderground.com (192.168.0.106) 56(84) bytes of data.
>> 64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=1 
>> ttl=64 time=0.130 ms
>> 64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=2 
>> ttl=64 time=0.128 ms
>>
>> pi@meteo:~ $ dig rtupdate.wunderground.com
>>
>> ; <<>> DiG 9.11.5-P4-5.1+deb10u9-Raspbian <<>> 
>> rtupdate.wunderground.com
>> ;; global options: +cmd
>> ;; Got answer:
>> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48940
>> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 
>> 1
>>
>> ;; OPT PSEUDOSECTION:
>> ; EDNS: version: 0, flags:; udp: 1232
>> ;; QUESTION SECTION:
>> ;rtupdate.wunderground.com. IN A
>>
>> ;; ANSWER SECTION:
>> rtupdate.wunderground.com. 0 IN A 192.168.0.106
>>
>> ;; Query time: 170 msec
>> ;; SERVER: 192.168.0.10#53(192.168.0.10)
>> ;; WHEN: śro sty 24 20:59:32 CET 2024
>> ;; MSG SIZE  rcvd: 70
>>
>> I even updated console's firmware to the latest available version 
>> from Ambient Weather website. In server.ini file I see only this:
>>
>> 

[weewx-user] Re: Driver permission error when starting Weewx

2024-01-24 Thread 'Tomasz Lewicki' via weewx-user
Just one more thought. Maybe interceptor driver is "too new" for my WiFi 
console? Maybe I should try some older version? But unfortunately I don't 
see any releases on driver's GitHub page 
(https://github.com/matthewwall/weewx-interceptor).

środa, 24 stycznia 2024 o 22:22:37 UTC+1 vince napisał(a):

> Stop weewx.  Just run the packet capture and post the .pcap file so others 
> can take a look please.  Be sure to capture only tcp/80.   Compress the 
> pcap file if it's large or post it someplace online where others can 
> download it.
>
> The gui version of wireshark is much easier to understand.
>
> On Wednesday, January 24, 2024 at 1:16:50 PM UTC-8 Tomasz Lewicki wrote:
>
>> My mistake. These packets were captured when Weewx was running with 
>> HP1000 driver. When I changed the driver to interceptor, I didn't captured 
>> *any* packets from WiFi console. I don't understand it...
>> środa, 24 stycznia 2024 o 21:06:53 UTC+1 vince napisał(a):
>>
>>> You need something to send traffic to intercept.  Run wireshark on your 
>>> weewx computer and listen on port 80 and see if your computer is hearing 
>>> anything (and what).  If it's http the payload should be decipherable.
>>>
>>>
>>>
>>> On Wednesday, January 24, 2024 at 12:01:31 PM UTC-8 Tomasz Lewicki wrote:
>>>
 By hardware do you mean WiFi console from my weather station? If yes, 
 it has very simple (almost none) configuration. It sends weather data to 
 WU 
 only. But I hijacked DNS on my router:

 pi@meteo:~ $ rtupdate.wunderground.com
 PING rtupdate.wunderground.com (192.168.0.106) 56(84) bytes of data.
 64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=1 
 ttl=64 time=0.130 ms
 64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=2 
 ttl=64 time=0.128 ms

 pi@meteo:~ $ dig rtupdate.wunderground.com

 ; <<>> DiG 9.11.5-P4-5.1+deb10u9-Raspbian <<>> 
 rtupdate.wunderground.com
 ;; global options: +cmd
 ;; Got answer:
 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48940
 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

 ;; OPT PSEUDOSECTION:
 ; EDNS: version: 0, flags:; udp: 1232
 ;; QUESTION SECTION:
 ;rtupdate.wunderground.com. IN A

 ;; ANSWER SECTION:
 rtupdate.wunderground.com. 0 IN A 192.168.0.106

 ;; Query time: 170 msec
 ;; SERVER: 192.168.0.10#53(192.168.0.10)
 ;; WHEN: śro sty 24 20:59:32 CET 2024
 ;; MSG SIZE  rcvd: 70

 I even updated console's firmware to the latest available version from 
 Ambient Weather website. In server.ini file I see only this:

 [Menu]
 default=www.wunderground.com
 web=1
 web1=www.wunderground.com

 [www.wunderground.com]
 Server=rtupdate.wunderground.com
 ServerType=php
 ServerPort=80
 UploadType=Customize
 ReadOnly=true
 środa, 24 stycznia 2024 o 20:48:31 UTC+1 vince napisał(a):

> Just a thought, but interceptor is 'listening' on port 80.  Don't you 
> need to configure your hardware to 'send' to port 80 on your weewx 
> computer 
> ?
>
> On Wednesday, January 24, 2024 at 11:39:31 AM UTC-8 Tomasz Lewicki 
> wrote:
>
>> Previously I had strange problems with Python but finally I realized 
>> that I have Python2 and Python3 installed. When I called commands 
>> begining 
>> with 'python', v2 was started. But 'sudo update-alternatives --install 
>> /usr/bin/python python /usr/bin/python3 10' has made the trick:
>>
>> pi@meteo:~ $ python --version
>> Python 3.7.3
>>
>>
>> środa, 24 stycznia 2024 o 20:36:46 UTC+1 Tomasz Lewicki napisał(a):
>>
>>> Here it comes:
>>>
>>> # systemd service configuration file for WeeWX
>>>
>>> [Unit]
>>> Description=WeeWX
>>> Documentation=https://weewx.com/docs
>>> Requires=time-sync.target
>>> After=time-sync.target
>>>
>>> [Service]
>>> ExecStart=weewxd /etc/weewx/weewx.conf
>>> StandardOutput=null
>>> StandardError=journal+console
>>> RuntimeDirectory=weewx
>>> RuntimeDirectoryMode=775
>>> User=root
>>> Group=root
>>>
>>> [Install]
>>> WantedBy=multi-user.target
>>>
>>> środa, 24 stycznia 2024 o 20:33:17 UTC+1 vince napisał(a):
>>>
 Lets see your systemd service file.

 On Wednesday, January 24, 2024 at 9:46:50 AM UTC-8 Tomasz Lewicki 
 wrote:

> OK, I changed user and group to root 
> in /etc/weewx/systemd/weewx.service, weewx now starts with port 80 
> and 
> interceptor driver. But nevermind which  option I use - observer or 
> wu-client - I always get:
>
> weewxd[27966]: DEBUG user.interceptor: empty queue
>
> But I found this wiki article -> 
> https://github.com/weewx/weewx/wiki/gw1000-recipe and started 
> 

[weewx-user] Re: Driver permission error when starting Weewx

2024-01-24 Thread 'Tomasz Lewicki' via weewx-user
I attach PCAP file with packets captured for 120 seconds. TCP/80 only. 
Weewx was shut down. No traffic on this port until I manually have done the 
operation described in one of me previous posts (browser 
query): https://groups.google.com/g/weewx-user/c/O8DTjzeeQcg/m/psrDaMHoAAAJ 

środa, 24 stycznia 2024 o 22:22:37 UTC+1 vince napisał(a):

> Stop weewx.  Just run the packet capture and post the .pcap file so others 
> can take a look please.  Be sure to capture only tcp/80.   Compress the 
> pcap file if it's large or post it someplace online where others can 
> download it.
>
> The gui version of wireshark is much easier to understand.
>
> On Wednesday, January 24, 2024 at 1:16:50 PM UTC-8 Tomasz Lewicki wrote:
>
>> My mistake. These packets were captured when Weewx was running with 
>> HP1000 driver. When I changed the driver to interceptor, I didn't captured 
>> *any* packets from WiFi console. I don't understand it...
>> środa, 24 stycznia 2024 o 21:06:53 UTC+1 vince napisał(a):
>>
>>> You need something to send traffic to intercept.  Run wireshark on your 
>>> weewx computer and listen on port 80 and see if your computer is hearing 
>>> anything (and what).  If it's http the payload should be decipherable.
>>>
>>>
>>>
>>> On Wednesday, January 24, 2024 at 12:01:31 PM UTC-8 Tomasz Lewicki wrote:
>>>
 By hardware do you mean WiFi console from my weather station? If yes, 
 it has very simple (almost none) configuration. It sends weather data to 
 WU 
 only. But I hijacked DNS on my router:

 pi@meteo:~ $ rtupdate.wunderground.com
 PING rtupdate.wunderground.com (192.168.0.106) 56(84) bytes of data.
 64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=1 
 ttl=64 time=0.130 ms
 64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=2 
 ttl=64 time=0.128 ms

 pi@meteo:~ $ dig rtupdate.wunderground.com

 ; <<>> DiG 9.11.5-P4-5.1+deb10u9-Raspbian <<>> 
 rtupdate.wunderground.com
 ;; global options: +cmd
 ;; Got answer:
 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48940
 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

 ;; OPT PSEUDOSECTION:
 ; EDNS: version: 0, flags:; udp: 1232
 ;; QUESTION SECTION:
 ;rtupdate.wunderground.com. IN A

 ;; ANSWER SECTION:
 rtupdate.wunderground.com. 0 IN A 192.168.0.106

 ;; Query time: 170 msec
 ;; SERVER: 192.168.0.10#53(192.168.0.10)
 ;; WHEN: śro sty 24 20:59:32 CET 2024
 ;; MSG SIZE  rcvd: 70

 I even updated console's firmware to the latest available version from 
 Ambient Weather website. In server.ini file I see only this:

 [Menu]
 default=www.wunderground.com
 web=1
 web1=www.wunderground.com

 [www.wunderground.com]
 Server=rtupdate.wunderground.com
 ServerType=php
 ServerPort=80
 UploadType=Customize
 ReadOnly=true
 środa, 24 stycznia 2024 o 20:48:31 UTC+1 vince napisał(a):

> Just a thought, but interceptor is 'listening' on port 80.  Don't you 
> need to configure your hardware to 'send' to port 80 on your weewx 
> computer 
> ?
>
> On Wednesday, January 24, 2024 at 11:39:31 AM UTC-8 Tomasz Lewicki 
> wrote:
>
>> Previously I had strange problems with Python but finally I realized 
>> that I have Python2 and Python3 installed. When I called commands 
>> begining 
>> with 'python', v2 was started. But 'sudo update-alternatives --install 
>> /usr/bin/python python /usr/bin/python3 10' has made the trick:
>>
>> pi@meteo:~ $ python --version
>> Python 3.7.3
>>
>>
>> środa, 24 stycznia 2024 o 20:36:46 UTC+1 Tomasz Lewicki napisał(a):
>>
>>> Here it comes:
>>>
>>> # systemd service configuration file for WeeWX
>>>
>>> [Unit]
>>> Description=WeeWX
>>> Documentation=https://weewx.com/docs
>>> Requires=time-sync.target
>>> After=time-sync.target
>>>
>>> [Service]
>>> ExecStart=weewxd /etc/weewx/weewx.conf
>>> StandardOutput=null
>>> StandardError=journal+console
>>> RuntimeDirectory=weewx
>>> RuntimeDirectoryMode=775
>>> User=root
>>> Group=root
>>>
>>> [Install]
>>> WantedBy=multi-user.target
>>>
>>> środa, 24 stycznia 2024 o 20:33:17 UTC+1 vince napisał(a):
>>>
 Lets see your systemd service file.

 On Wednesday, January 24, 2024 at 9:46:50 AM UTC-8 Tomasz Lewicki 
 wrote:

> OK, I changed user and group to root 
> in /etc/weewx/systemd/weewx.service, weewx now starts with port 80 
> and 
> interceptor driver. But nevermind which  option I use - observer or 
> wu-client - I always get:
>
> weewxd[27966]: DEBUG user.interceptor: empty queue
>
> But I found this wiki article -> 
> 

[weewx-user] Re: Driver permission error when starting Weewx

2024-01-24 Thread 'Tomasz Lewicki' via weewx-user
My mistake. These packets were captured when Weewx was running with HP1000 
driver. When I changed the driver to interceptor, I didn't captured *any* 
packets from WiFi console. I don't understand it...
środa, 24 stycznia 2024 o 21:06:53 UTC+1 vince napisał(a):

> You need something to send traffic to intercept.  Run wireshark on your 
> weewx computer and listen on port 80 and see if your computer is hearing 
> anything (and what).  If it's http the payload should be decipherable.
>
>
>
> On Wednesday, January 24, 2024 at 12:01:31 PM UTC-8 Tomasz Lewicki wrote:
>
>> By hardware do you mean WiFi console from my weather station? If yes, it 
>> has very simple (almost none) configuration. It sends weather data to WU 
>> only. But I hijacked DNS on my router:
>>
>> pi@meteo:~ $ rtupdate.wunderground.com
>> PING rtupdate.wunderground.com (192.168.0.106) 56(84) bytes of data.
>> 64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=1 
>> ttl=64 time=0.130 ms
>> 64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=2 
>> ttl=64 time=0.128 ms
>>
>> pi@meteo:~ $ dig rtupdate.wunderground.com
>>
>> ; <<>> DiG 9.11.5-P4-5.1+deb10u9-Raspbian <<>> rtupdate.wunderground.com
>> ;; global options: +cmd
>> ;; Got answer:
>> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48940
>> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
>>
>> ;; OPT PSEUDOSECTION:
>> ; EDNS: version: 0, flags:; udp: 1232
>> ;; QUESTION SECTION:
>> ;rtupdate.wunderground.com. IN A
>>
>> ;; ANSWER SECTION:
>> rtupdate.wunderground.com. 0 IN A 192.168.0.106
>>
>> ;; Query time: 170 msec
>> ;; SERVER: 192.168.0.10#53(192.168.0.10)
>> ;; WHEN: śro sty 24 20:59:32 CET 2024
>> ;; MSG SIZE  rcvd: 70
>>
>> I even updated console's firmware to the latest available version from 
>> Ambient Weather website. In server.ini file I see only this:
>>
>> [Menu]
>> default=www.wunderground.com
>> web=1
>> web1=www.wunderground.com
>>
>> [www.wunderground.com]
>> Server=rtupdate.wunderground.com
>> ServerType=php
>> ServerPort=80
>> UploadType=Customize
>> ReadOnly=true
>> środa, 24 stycznia 2024 o 20:48:31 UTC+1 vince napisał(a):
>>
>>> Just a thought, but interceptor is 'listening' on port 80.  Don't you 
>>> need to configure your hardware to 'send' to port 80 on your weewx computer 
>>> ?
>>>
>>> On Wednesday, January 24, 2024 at 11:39:31 AM UTC-8 Tomasz Lewicki wrote:
>>>
 Previously I had strange problems with Python but finally I realized 
 that I have Python2 and Python3 installed. When I called commands begining 
 with 'python', v2 was started. But 'sudo update-alternatives --install 
 /usr/bin/python python /usr/bin/python3 10' has made the trick:

 pi@meteo:~ $ python --version
 Python 3.7.3


 środa, 24 stycznia 2024 o 20:36:46 UTC+1 Tomasz Lewicki napisał(a):

> Here it comes:
>
> # systemd service configuration file for WeeWX
>
> [Unit]
> Description=WeeWX
> Documentation=https://weewx.com/docs
> Requires=time-sync.target
> After=time-sync.target
>
> [Service]
> ExecStart=weewxd /etc/weewx/weewx.conf
> StandardOutput=null
> StandardError=journal+console
> RuntimeDirectory=weewx
> RuntimeDirectoryMode=775
> User=root
> Group=root
>
> [Install]
> WantedBy=multi-user.target
>
> środa, 24 stycznia 2024 o 20:33:17 UTC+1 vince napisał(a):
>
>> Lets see your systemd service file.
>>
>> On Wednesday, January 24, 2024 at 9:46:50 AM UTC-8 Tomasz Lewicki 
>> wrote:
>>
>>> OK, I changed user and group to root 
>>> in /etc/weewx/systemd/weewx.service, weewx now starts with port 80 and 
>>> interceptor driver. But nevermind which  option I use - observer or 
>>> wu-client - I always get:
>>>
>>> weewxd[27966]: DEBUG user.interceptor: empty queue
>>>
>>> But I found this wiki article -> 
>>> https://github.com/weewx/weewx/wiki/gw1000-recipe and started 
>>> interceptor driver from command line:
>>>
>>> sudo PYTHONPATH=/usr/share/weewx python 
>>> /etc/weewx/bin/user/interceptor.py --port=80 --debug --device=observer 
>>> --mode=listen
>>>
>>> Then - exactly  as this part of article says -> 
>>> https://github.com/weewx/weewx/wiki/gw1000-recipe#verify-that-the-interceptor-can-receive-data
>>>  
>>> I pasted to browser such query:
>>>
>>>
>>> http://192.168.0.106/data/report?PASSKEY=XXX=GW1000B_V1.5.5=2019-12-29+16:27:27=67.1=39=30.138=30.138=915M=GW1000
>>>
>>> And I got an answer in terminal:
>>>
>>> raw data: 
>>> PASSKEY==GW1000B_V1.5.5=2019-12-29+16:27:27=67.1=39=30.138=30.138=915M=GW1000
>>> raw packet: {'dateTime': 1577636847, 'usUnits': 1}
>>> mapped packet: {'dateTime': 1577636847, 'usUnits': 1}
>>> raw data: 
>>> raw packet: {'dateTime': 1706118216, 'usUnits': 1}
>>> mapped packet: {'dateTime': 1706118216, 

[weewx-user] Re: Driver permission error when starting Weewx

2024-01-24 Thread 'Tomasz Lewicki' via weewx-user
I used command line version of Wireshark - Tshark - and collected packets 
for 15 minutes. Then loaded the PCAP file into Wireshark and filtered by 
source IP of weather station  console. Every 2 seconds I see:

   b8 27 eb dd 86 34 08 d8 33 53 93 a9 08 00 45 00   .'...4..3SE.
0010   00 90 1b 12 00 00 80 06 9d 2a c0 a8 00 71 c0 a8   .*...q..
0020   00 6a c0 08 19 64 e3 81 0c 05 7e 63 ac 14 50 18   .j...d~c..P.
0030   00 44 fc 9d 00 00 48 50 32 30 30 30 00 00 57 52   .DHP2000..WR
0040   49 54 45 00 00 00 4e 4f 57 52 45 43 4f 52 44 00   ITE...NOWRECORD.
0050   00 00 00 00 00 00 68 00 00 00 8a 00 00 00 c5 00   ..h.
0060   2f 3d 33 33 b3 41 33 d3 73 44 00 c0 7d 44 9a 99   /=33.A3.sD..}D..
0070   e9 40 9a 99 99 3e 9a 99 e9 40 00 00 00 00 00 00   .@...>...@..
0080   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   
0090   00 00 00 00 00 00 00 00 00 00 00 ff 00 00 ..

But I don't know if it makes any sense :)   

środa, 24 stycznia 2024 o 21:06:53 UTC+1 vince napisał(a):

> You need something to send traffic to intercept.  Run wireshark on your 
> weewx computer and listen on port 80 and see if your computer is hearing 
> anything (and what).  If it's http the payload should be decipherable.
>
>
>
> On Wednesday, January 24, 2024 at 12:01:31 PM UTC-8 Tomasz Lewicki wrote:
>
>> By hardware do you mean WiFi console from my weather station? If yes, it 
>> has very simple (almost none) configuration. It sends weather data to WU 
>> only. But I hijacked DNS on my router:
>>
>> pi@meteo:~ $ rtupdate.wunderground.com
>> PING rtupdate.wunderground.com (192.168.0.106) 56(84) bytes of data.
>> 64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=1 
>> ttl=64 time=0.130 ms
>> 64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=2 
>> ttl=64 time=0.128 ms
>>
>> pi@meteo:~ $ dig rtupdate.wunderground.com
>>
>> ; <<>> DiG 9.11.5-P4-5.1+deb10u9-Raspbian <<>> rtupdate.wunderground.com
>> ;; global options: +cmd
>> ;; Got answer:
>> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48940
>> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
>>
>> ;; OPT PSEUDOSECTION:
>> ; EDNS: version: 0, flags:; udp: 1232
>> ;; QUESTION SECTION:
>> ;rtupdate.wunderground.com. IN A
>>
>> ;; ANSWER SECTION:
>> rtupdate.wunderground.com. 0 IN A 192.168.0.106
>>
>> ;; Query time: 170 msec
>> ;; SERVER: 192.168.0.10#53(192.168.0.10)
>> ;; WHEN: śro sty 24 20:59:32 CET 2024
>> ;; MSG SIZE  rcvd: 70
>>
>> I even updated console's firmware to the latest available version from 
>> Ambient Weather website. In server.ini file I see only this:
>>
>> [Menu]
>> default=www.wunderground.com
>> web=1
>> web1=www.wunderground.com
>>
>> [www.wunderground.com]
>> Server=rtupdate.wunderground.com
>> ServerType=php
>> ServerPort=80
>> UploadType=Customize
>> ReadOnly=true
>> środa, 24 stycznia 2024 o 20:48:31 UTC+1 vince napisał(a):
>>
>>> Just a thought, but interceptor is 'listening' on port 80.  Don't you 
>>> need to configure your hardware to 'send' to port 80 on your weewx computer 
>>> ?
>>>
>>> On Wednesday, January 24, 2024 at 11:39:31 AM UTC-8 Tomasz Lewicki wrote:
>>>
 Previously I had strange problems with Python but finally I realized 
 that I have Python2 and Python3 installed. When I called commands begining 
 with 'python', v2 was started. But 'sudo update-alternatives --install 
 /usr/bin/python python /usr/bin/python3 10' has made the trick:

 pi@meteo:~ $ python --version
 Python 3.7.3


 środa, 24 stycznia 2024 o 20:36:46 UTC+1 Tomasz Lewicki napisał(a):

> Here it comes:
>
> # systemd service configuration file for WeeWX
>
> [Unit]
> Description=WeeWX
> Documentation=https://weewx.com/docs
> Requires=time-sync.target
> After=time-sync.target
>
> [Service]
> ExecStart=weewxd /etc/weewx/weewx.conf
> StandardOutput=null
> StandardError=journal+console
> RuntimeDirectory=weewx
> RuntimeDirectoryMode=775
> User=root
> Group=root
>
> [Install]
> WantedBy=multi-user.target
>
> środa, 24 stycznia 2024 o 20:33:17 UTC+1 vince napisał(a):
>
>> Lets see your systemd service file.
>>
>> On Wednesday, January 24, 2024 at 9:46:50 AM UTC-8 Tomasz Lewicki 
>> wrote:
>>
>>> OK, I changed user and group to root 
>>> in /etc/weewx/systemd/weewx.service, weewx now starts with port 80 and 
>>> interceptor driver. But nevermind which  option I use - observer or 
>>> wu-client - I always get:
>>>
>>> weewxd[27966]: DEBUG user.interceptor: empty queue
>>>
>>> But I found this wiki article -> 
>>> https://github.com/weewx/weewx/wiki/gw1000-recipe and started 
>>> interceptor driver from command line:
>>>
>>> sudo PYTHONPATH=/usr/share/weewx python 
>>> /etc/weewx/bin/user/interceptor.py --port=80 --debug --device=observer 

[weewx-user] Re: Driver permission error when starting Weewx

2024-01-24 Thread 'Tomasz Lewicki' via weewx-user
By hardware do you mean WiFi console from my weather station? If yes, it 
has very simple (almost none) configuration. It sends weather data to WU 
only. But I hijacked DNS on my router:

pi@meteo:~ $ rtupdate.wunderground.com
PING rtupdate.wunderground.com (192.168.0.106) 56(84) bytes of data.
64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=1 ttl=64 
time=0.130 ms
64 bytes from rtupdate.wunderground.com (192.168.0.106): icmp_seq=2 ttl=64 
time=0.128 ms

pi@meteo:~ $ dig rtupdate.wunderground.com

; <<>> DiG 9.11.5-P4-5.1+deb10u9-Raspbian <<>> rtupdate.wunderground.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48940
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;rtupdate.wunderground.com. IN A

;; ANSWER SECTION:
rtupdate.wunderground.com. 0 IN A 192.168.0.106

;; Query time: 170 msec
;; SERVER: 192.168.0.10#53(192.168.0.10)
;; WHEN: śro sty 24 20:59:32 CET 2024
;; MSG SIZE  rcvd: 70

I even updated console's firmware to the latest available version from 
Ambient Weather website. In server.ini file I see only this:

[Menu]
default=www.wunderground.com
web=1
web1=www.wunderground.com

[www.wunderground.com]
Server=rtupdate.wunderground.com
ServerType=php
ServerPort=80
UploadType=Customize
ReadOnly=true
środa, 24 stycznia 2024 o 20:48:31 UTC+1 vince napisał(a):

> Just a thought, but interceptor is 'listening' on port 80.  Don't you need 
> to configure your hardware to 'send' to port 80 on your weewx computer ?
>
> On Wednesday, January 24, 2024 at 11:39:31 AM UTC-8 Tomasz Lewicki wrote:
>
>> Previously I had strange problems with Python but finally I realized that 
>> I have Python2 and Python3 installed. When I called commands begining with 
>> 'python', v2 was started. But 'sudo update-alternatives --install 
>> /usr/bin/python python /usr/bin/python3 10' has made the trick:
>>
>> pi@meteo:~ $ python --version
>> Python 3.7.3
>>
>>
>> środa, 24 stycznia 2024 o 20:36:46 UTC+1 Tomasz Lewicki napisał(a):
>>
>>> Here it comes:
>>>
>>> # systemd service configuration file for WeeWX
>>>
>>> [Unit]
>>> Description=WeeWX
>>> Documentation=https://weewx.com/docs
>>> Requires=time-sync.target
>>> After=time-sync.target
>>>
>>> [Service]
>>> ExecStart=weewxd /etc/weewx/weewx.conf
>>> StandardOutput=null
>>> StandardError=journal+console
>>> RuntimeDirectory=weewx
>>> RuntimeDirectoryMode=775
>>> User=root
>>> Group=root
>>>
>>> [Install]
>>> WantedBy=multi-user.target
>>>
>>> środa, 24 stycznia 2024 o 20:33:17 UTC+1 vince napisał(a):
>>>
 Lets see your systemd service file.

 On Wednesday, January 24, 2024 at 9:46:50 AM UTC-8 Tomasz Lewicki wrote:

> OK, I changed user and group to root 
> in /etc/weewx/systemd/weewx.service, weewx now starts with port 80 and 
> interceptor driver. But nevermind which  option I use - observer or 
> wu-client - I always get:
>
> weewxd[27966]: DEBUG user.interceptor: empty queue
>
> But I found this wiki article -> 
> https://github.com/weewx/weewx/wiki/gw1000-recipe and started 
> interceptor driver from command line:
>
> sudo PYTHONPATH=/usr/share/weewx python 
> /etc/weewx/bin/user/interceptor.py --port=80 --debug --device=observer 
> --mode=listen
>
> Then - exactly  as this part of article says -> 
> https://github.com/weewx/weewx/wiki/gw1000-recipe#verify-that-the-interceptor-can-receive-data
>  
> I pasted to browser such query:
>
>
> http://192.168.0.106/data/report?PASSKEY=XXX=GW1000B_V1.5.5=2019-12-29+16:27:27=67.1=39=30.138=30.138=915M=GW1000
>
> And I got an answer in terminal:
>
> raw data: 
> PASSKEY==GW1000B_V1.5.5=2019-12-29+16:27:27=67.1=39=30.138=30.138=915M=GW1000
> raw packet: {'dateTime': 1577636847, 'usUnits': 1}
> mapped packet: {'dateTime': 1577636847, 'usUnits': 1}
> raw data: 
> raw packet: {'dateTime': 1706118216, 'usUnits': 1}
> mapped packet: {'dateTime': 1706118216, 'usUnits': 1}
>
> So it seems that driver is working when called explicitly from command 
> line. So why I got "empty queue" when started by 'sudo systemctl start 
> weewx'?
> wtorek, 23 stycznia 2024 o 15:46:08 UTC+1 gary@gmail.com 
> napisał(a):
>
>> sudo only issues the command as root.
>> What is in the service file for user and group?
>> That is who weewx is running as.
>>
>> On Monday, January 22, 2024 at 11:43:48 AM UTC-5 Tomasz Lewicki wrote:
>>
>>> I run weewx as root:
>>>
>>> sudo systemctl start weewx
>>>
>>> If I set higher port (8080), weewx starts but I have empty queue for 
>>> interceptor.
>>>
>>> niedziela, 21 stycznia 2024 o 18:49:48 UTC+1 matthew wall napisał(a):
>>>
 On Sunday, January 21, 2024 at 12:23:34 PM UTC-5 Tomasz Lewicki 
 wrote:

[weewx-user] Re: Driver permission error when starting Weewx

2024-01-24 Thread 'Tomasz Lewicki' via weewx-user
Previously I had strange problems with Python but finally I realized that I 
have Python2 and Python3 installed. When I called commands begining with 
'python', v2 was started. But 'sudo update-alternatives --install 
/usr/bin/python python /usr/bin/python3 10' has made the trick:

pi@meteo:~ $ python --version
Python 3.7.3
   

środa, 24 stycznia 2024 o 20:36:46 UTC+1 Tomasz Lewicki napisał(a):

> Here it comes:
>
> # systemd service configuration file for WeeWX
>
> [Unit]
> Description=WeeWX
> Documentation=https://weewx.com/docs
> Requires=time-sync.target
> After=time-sync.target
>
> [Service]
> ExecStart=weewxd /etc/weewx/weewx.conf
> StandardOutput=null
> StandardError=journal+console
> RuntimeDirectory=weewx
> RuntimeDirectoryMode=775
> User=root
> Group=root
>
> [Install]
> WantedBy=multi-user.target
>
> środa, 24 stycznia 2024 o 20:33:17 UTC+1 vince napisał(a):
>
>> Lets see your systemd service file.
>>
>> On Wednesday, January 24, 2024 at 9:46:50 AM UTC-8 Tomasz Lewicki wrote:
>>
>>> OK, I changed user and group to root 
>>> in /etc/weewx/systemd/weewx.service, weewx now starts with port 80 and 
>>> interceptor driver. But nevermind which  option I use - observer or 
>>> wu-client - I always get:
>>>
>>> weewxd[27966]: DEBUG user.interceptor: empty queue
>>>
>>> But I found this wiki article -> 
>>> https://github.com/weewx/weewx/wiki/gw1000-recipe and started 
>>> interceptor driver from command line:
>>>
>>> sudo PYTHONPATH=/usr/share/weewx python 
>>> /etc/weewx/bin/user/interceptor.py --port=80 --debug --device=observer 
>>> --mode=listen
>>>
>>> Then - exactly  as this part of article says -> 
>>> https://github.com/weewx/weewx/wiki/gw1000-recipe#verify-that-the-interceptor-can-receive-data
>>>  
>>> I pasted to browser such query:
>>>
>>>
>>> http://192.168.0.106/data/report?PASSKEY=XXX=GW1000B_V1.5.5=2019-12-29+16:27:27=67.1=39=30.138=30.138=915M=GW1000
>>>
>>> And I got an answer in terminal:
>>>
>>> raw data: 
>>> PASSKEY==GW1000B_V1.5.5=2019-12-29+16:27:27=67.1=39=30.138=30.138=915M=GW1000
>>> raw packet: {'dateTime': 1577636847, 'usUnits': 1}
>>> mapped packet: {'dateTime': 1577636847, 'usUnits': 1}
>>> raw data: 
>>> raw packet: {'dateTime': 1706118216, 'usUnits': 1}
>>> mapped packet: {'dateTime': 1706118216, 'usUnits': 1}
>>>
>>> So it seems that driver is working when called explicitly from command 
>>> line. So why I got "empty queue" when started by 'sudo systemctl start 
>>> weewx'?
>>> wtorek, 23 stycznia 2024 o 15:46:08 UTC+1 gary@gmail.com napisał(a):
>>>
 sudo only issues the command as root.
 What is in the service file for user and group?
 That is who weewx is running as.

 On Monday, January 22, 2024 at 11:43:48 AM UTC-5 Tomasz Lewicki wrote:

> I run weewx as root:
>
> sudo systemctl start weewx
>
> If I set higher port (8080), weewx starts but I have empty queue for 
> interceptor.
>
> niedziela, 21 stycznia 2024 o 18:49:48 UTC+1 matthew wall napisał(a):
>
>> On Sunday, January 21, 2024 at 12:23:34 PM UTC-5 Tomasz Lewicki wrote:
>>
>>
>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO weewx.engine: Loading 
>> station type Interceptor (user.interceptor)
>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: driver 
>> version is 0.60
>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: device 
>> type: observer
>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: hardware 
>> name: weatherstation via interceptor
>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: mode is 
>> listen
>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: listen on 
>> :80
>>
>>
>> if you listen on port 80, then the process must run as root (only 
>> root can listen on lower ports).
>>
>> so either run weewxd as root, or configure interceptor (and the 
>> station) to communicate on a higher port.
>>  
>>
>

-- 
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/8a9bb3ef-45d4-47e1-a675-dc129e1bd2aan%40googlegroups.com.


[weewx-user] Re: Driver permission error when starting Weewx

2024-01-24 Thread 'Tomasz Lewicki' via weewx-user
Here it comes:

# systemd service configuration file for WeeWX

[Unit]
Description=WeeWX
Documentation=https://weewx.com/docs
Requires=time-sync.target
After=time-sync.target

[Service]
ExecStart=weewxd /etc/weewx/weewx.conf
StandardOutput=null
StandardError=journal+console
RuntimeDirectory=weewx
RuntimeDirectoryMode=775
User=root
Group=root

[Install]
WantedBy=multi-user.target

środa, 24 stycznia 2024 o 20:33:17 UTC+1 vince napisał(a):

> Lets see your systemd service file.
>
> On Wednesday, January 24, 2024 at 9:46:50 AM UTC-8 Tomasz Lewicki wrote:
>
>> OK, I changed user and group to root in /etc/weewx/systemd/weewx.service, 
>> weewx now starts with port 80 and interceptor driver. But nevermind which  
>> option I use - observer or wu-client - I always get:
>>
>> weewxd[27966]: DEBUG user.interceptor: empty queue
>>
>> But I found this wiki article -> 
>> https://github.com/weewx/weewx/wiki/gw1000-recipe and started 
>> interceptor driver from command line:
>>
>> sudo PYTHONPATH=/usr/share/weewx python 
>> /etc/weewx/bin/user/interceptor.py --port=80 --debug --device=observer 
>> --mode=listen
>>
>> Then - exactly  as this part of article says -> 
>> https://github.com/weewx/weewx/wiki/gw1000-recipe#verify-that-the-interceptor-can-receive-data
>>  
>> I pasted to browser such query:
>>
>>
>> http://192.168.0.106/data/report?PASSKEY=XXX=GW1000B_V1.5.5=2019-12-29+16:27:27=67.1=39=30.138=30.138=915M=GW1000
>>
>> And I got an answer in terminal:
>>
>> raw data: 
>> PASSKEY==GW1000B_V1.5.5=2019-12-29+16:27:27=67.1=39=30.138=30.138=915M=GW1000
>> raw packet: {'dateTime': 1577636847, 'usUnits': 1}
>> mapped packet: {'dateTime': 1577636847, 'usUnits': 1}
>> raw data: 
>> raw packet: {'dateTime': 1706118216, 'usUnits': 1}
>> mapped packet: {'dateTime': 1706118216, 'usUnits': 1}
>>
>> So it seems that driver is working when called explicitly from command 
>> line. So why I got "empty queue" when started by 'sudo systemctl start 
>> weewx'?
>> wtorek, 23 stycznia 2024 o 15:46:08 UTC+1 gary@gmail.com napisał(a):
>>
>>> sudo only issues the command as root.
>>> What is in the service file for user and group?
>>> That is who weewx is running as.
>>>
>>> On Monday, January 22, 2024 at 11:43:48 AM UTC-5 Tomasz Lewicki wrote:
>>>
 I run weewx as root:

 sudo systemctl start weewx

 If I set higher port (8080), weewx starts but I have empty queue for 
 interceptor.

 niedziela, 21 stycznia 2024 o 18:49:48 UTC+1 matthew wall napisał(a):

> On Sunday, January 21, 2024 at 12:23:34 PM UTC-5 Tomasz Lewicki wrote:
>
>
> Jan 21 18:14:17 FR24 weewxd[14285]: INFO weewx.engine: Loading station 
> type Interceptor (user.interceptor)
> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: driver 
> version is 0.60
> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: device 
> type: observer
> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: hardware 
> name: weatherstation via interceptor
> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: mode is 
> listen
> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: listen on 
> :80
>
>
> if you listen on port 80, then the process must run as root (only root 
> can listen on lower ports).
>
> so either run weewxd as root, or configure interceptor (and the 
> station) to communicate on a higher port.
>  
>


-- 
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/e88efabd-37d8-4bc1-9ca3-8e657a68ba8fn%40googlegroups.com.


[weewx-user] Re: Driver permission error when starting Weewx

2024-01-24 Thread 'Tomasz Lewicki' via weewx-user
OK, I changed user and group to root in /etc/weewx/systemd/weewx.service, 
weewx now starts with port 80 and interceptor driver. But nevermind which  
option I use - observer or wu-client - I always get:

weewxd[27966]: DEBUG user.interceptor: empty queue

But I found this wiki article 
-> https://github.com/weewx/weewx/wiki/gw1000-recipe and started 
interceptor driver from command line:

sudo PYTHONPATH=/usr/share/weewx python /etc/weewx/bin/user/interceptor.py 
--port=80 --debug --device=observer --mode=listen

Then - exactly  as this part of article says -> 
https://github.com/weewx/weewx/wiki/gw1000-recipe#verify-that-the-interceptor-can-receive-data
 
I pasted to browser such query:

http://192.168.0.106/data/report?PASSKEY=XXX=GW1000B_V1.5.5=2019-12-29+16:27:27=67.1=39=30.138=30.138=915M=GW1000

And I got an answer in terminal:

raw data: 
PASSKEY==GW1000B_V1.5.5=2019-12-29+16:27:27=67.1=39=30.138=30.138=915M=GW1000
raw packet: {'dateTime': 1577636847, 'usUnits': 1}
mapped packet: {'dateTime': 1577636847, 'usUnits': 1}
raw data: 
raw packet: {'dateTime': 1706118216, 'usUnits': 1}
mapped packet: {'dateTime': 1706118216, 'usUnits': 1}

So it seems that driver is working when called explicitly from command 
line. So why I got "empty queue" when started by 'sudo systemctl start 
weewx'?
wtorek, 23 stycznia 2024 o 15:46:08 UTC+1 gary@gmail.com napisał(a):

> sudo only issues the command as root.
> What is in the service file for user and group?
> That is who weewx is running as.
>
> On Monday, January 22, 2024 at 11:43:48 AM UTC-5 Tomasz Lewicki wrote:
>
>> I run weewx as root:
>>
>> sudo systemctl start weewx
>>
>> If I set higher port (8080), weewx starts but I have empty queue for 
>> interceptor.
>>
>> niedziela, 21 stycznia 2024 o 18:49:48 UTC+1 matthew wall napisał(a):
>>
>>> On Sunday, January 21, 2024 at 12:23:34 PM UTC-5 Tomasz Lewicki wrote:
>>>
>>>
>>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO weewx.engine: Loading station 
>>> type Interceptor (user.interceptor)
>>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: driver 
>>> version is 0.60
>>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: device type: 
>>> observer
>>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: hardware 
>>> name: weatherstation via interceptor
>>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: mode is listen
>>> Jan 21 18:14:17 FR24 weewxd[14285]: INFO user.interceptor: listen on :80
>>>
>>>
>>> if you listen on port 80, then the process must run as root (only root 
>>> can listen on lower ports).
>>>
>>> so either run weewxd as root, or configure interceptor (and the station) 
>>> to communicate on a higher port.
>>>  
>>>
>>

-- 
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/9ab3f1c3-8096-4066-8544-dae133762d8cn%40googlegroups.com.