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&stationtype=GW1000B_V1.5.5&dateutc=2019-12-29+16:27:27&tempinf=67.1&humidityin=39&baromrelin=30.138&baromabsin=30.138&freq=915M&model=GW1000
>>>>
>>>> And I got an answer in terminal:
>>>>
>>>> raw data: 
>>>> PASSKEY=XXXX&stationtype=GW1000B_V1.5.5&dateutc=2019-12-29+16:27:27&tempinf=67.1&humidityin=39&baromrelin=30.138&baromabsin=30.138&freq=915M&model=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/16908ceb-29f6-41f8-8659-512f89398df7n%40googlegroups.com.

Reply via email to