Re: [weewx-user] Re: RSYNC port not working in weewx.conf ?

2022-01-03 Thread Chris Alemany
Thanks for this comment Gary. You forced me to reevaluate.. and I realized 
I was looking at an old install of weewx on my Pi, not the one that was 
active.  Not used to the Pi's software being installed more spread out. 
 The two patches are now properly applied and SSH is working well.

Thank you all for your quick work.

On Sunday, January 2, 2022 at 11:07:37 PM UTC-8 gjr80 wrote:

> It would help if you provided a longer log extract, four lines are better 
> than one but it it is still a bit like looking down a straw :). So that we 
> all have a complete picture could your restart WeeWX (keeping debug=1) and 
> let it run for a couple of archive periods. Then post a log extract showing 
> the complete WeeWX startup and the couple of report cycles.
>
> The concern I have from the log extract provided is that I don't see a 
> line similar to:
>
> Jan  2 13:32:37 weewx-pi weewx[4572] DEBUG user.weather34: do_file_transfer: 
> Port = xx
>
> This line should appear if you are running the weather34.py that you 
> linked above (refer weather34.py line 351 
> ).
>  
> It could be that the log entry is missing because you did not include it in 
> the log extract or it could be that you are not running the weather34.py 
> version you think you are. We can't tell without seeing a more complete log 
> extract.
>
> Gary
>
> On Monday, 3 January 2022 at 13:08:31 UTC+10 chri...@gmail.com wrote:
>
>>
>> Still the same error essentially. Using the new code for both 
>> rsyncupload 
>> https://github.com/weewx/weewx/blob/68bf6c40332d37bdb7b2e81803edb4141fb9/bin/weeutil/rsyncupload.py
>> and 
>> weather34 
>> https://github.com/steepleian/weewx-Weather34/blob/development/user/weather34.py
>> ).
>>
>> DEBUG log relevant entry:
>>
>> Jan  2 13:32:36 weewx-pi weewx[4572] DEBUG weeutil.rsyncupload: 
>> rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', 
>> '/tmp/weather34/serverdata/', 
>> 'us...@100.10.10.10:/home/user/public_html/weather34/serverdata']]
>>
>> Jan  2 13:32:37 weewx-pi weewx[4572] ERROR weeutil.rsyncupload: 
>> [['rsync', '--archive', '--stats', '-e ssh', '/tmp/weather34/serverdata/', 
>> 'us...@100.10.10.10:/home/user/public_html/weather34/serverdata']] reported 
>> errors: ssh: connect to host 100.10.10.10 port 22: Connection refused. 
>> rsync: connection unexpectedly closed (0 bytes received so far) [sender]. 
>> rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
>>
>> Jan  2 13:32:37 weewx-pi weewx[4572] INFO weeutil.rsyncupload: rsync 
>> executed in 0.12 seconds
>>
>> Jan  2 13:32:37 weewx-pi weewx[4572] DEBUG user.weather34: 
>> do_file_transfer: Rsync complete
>>
>> On Sunday, January 2, 2022 at 11:03:12 AM UTC-8 tke...@gmail.com wrote:
>>
>>> The debug code will show you the parameters to the Popen() call that 
>>> invokes rsync. Unfortunately, that's all you get. Still, it should be 
>>> enough. What does it show now?
>>>
>>> -tk
>>>
>>> On Sun, Jan 2, 2022 at 9:02 AM Chris Alemany  wrote:
>>>
 I've updated the code in my rsyncupload.py file as well as a fix 
 provided by weather34.py and it is still defaulting to port 22.

 https://github.com/steepleian/weewx-Weather34/blob/development/user/weather34.py
 Is there a way that I could temporarily have rsyncupload output the 
 actual command it is sending? At this point we only have the error message.

 I'm going to go through and make sure I have uploaded the fixed files 
 for both.
 Thanks Tom and Gary!

 Cheers
 Chris

 On Sunday, January 2, 2022 at 7:38:12 AM UTC-8 tke...@gmail.com wrote:

> Fixed in commit 68bf6c4 
> ,
>  
> to appear in V4.6.
>
>
> On Sun, Jan 2, 2022 at 4:52 AM Tom Keffer  wrote:
>
>> So, it sounds like there are two problems: the weewx code does not 
>> include quotes around the -e argument, and the weather34 code doesn't 
>> honor 
>> the port spec at all.
>>
>> I'll create a patch for the weewx code later today.
>>
>> Looked through the weather34 code. It could use a big refactor to 
>> leverage some of the services weewx offers. There's a lot of unnecessary 
>> code in there. End results are nice, though.
>>
>>
>>
>> On Sat, Jan 1, 2022 at 10:46 PM Chris Alemany  
>> wrote:
>>
>>>
>>> I will pass that along, it occurred to me as well that the Standard 
>>> skin had been updating fine through all of this, so it was definitely 
>>> weather34 specific. Thanks Gary! 
>>> On Saturday, January 1, 2022 at 10:34:23 PM UTC-8 gjr80 wrote:
>>>
 I just browsed through the WeeWX Weather 34 code and saw calls to 
 the WeeWX rsync upload code with the port forced to None. That will 
 cause 
 the rsy

Re: [weewx-user] Re: lightning sensor made at home cheaply - WORKS!

2022-01-03 Thread Silvio Schömann
*Sorry guys, I'm stupid too. I forgot to specify the correct host from the 
broker. Now it's going as it should.*
thank you
Danke!


Jan  3 17:33:38 raspberrypi weewx[7118] INFO __main__: Initializing weewx 
version 4.5.1 
Jan  3 17:33:38 raspberrypi weewx[7118] INFO __main__: Using Python 3.7.3 
(default, Jan 22 2021, 20:04:44) #012[GCC 8.3.0] 
Jan  3 17:33:38 raspberrypi weewx[7118] INFO __main__: Platform 
Linux-5.10.60-v7l+-armv7l-with-debian-10.11 
Jan  3 17:33:38 raspberrypi weewx[7118] INFO __main__: Locale is 
'de_DE.UTF-8' 
Jan  3 17:33:38 raspberrypi weewx[7118] INFO __main__: PID file is 
/var/run/weewx.pid 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO __main__: Using configuration 
file /home/weewx/weewx.conf 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO __main__: Debug is 0 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO weewx.engine: Loading station 
type Vantage (weewx.drivers.vantage) 
Jan  3 17:33:39 raspberrypi weewx[7107]: Starting weewx weather system: 
weewx. 
Jan  3 17:33:39 raspberrypi systemd[1]: Started LSB: weewx weather system. 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Version is 2.1.0-rc02 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Log level: 0 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Log debug setting: 0 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Log console: False 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Log file: None 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
message_callback_provider_name is 
user.MQTTSubscribe.MessageCallbackProvider 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
clientid is MQTTSubscribe-4456 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
client_session is True 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
host is localhost 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
port is 1883 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
keepalive is 60 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
username is None 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
min_delay is 1 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
max_delay is 120 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
password is not set 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Archive topic is None 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
binding is loop 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Waiting for MQTT connection. 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Connected with result code 0 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Connected flags {'session present': 0} 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Subscribing to tele/thunder01/SENSOR has a mid 1 and rc 0 
Jan  3 17:33:39 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
Subscribed to mid: 1 is size 1 has a QOS of 0 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO user.MQTTSubscribe: (Service) 
MQTT initialization complete. 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO weewx.engine: StdConvert 
target unit is 0x10 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO weewx.engine: Archive will use 
data binding wx_binding 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO weewx.engine: Record 
generation will be attempted in 'hardware' 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO weewx.engine: Using archive 
interval of 300 seconds (specified by hardware) 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO weewx.restx: StationRegistry: 
Registration not requested. 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO weewx.restx: Wunderground-PWS: 
Data for station IKASTL14 will be posted 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO weewx.restx: PWSWeather: Data 
for station IDKAST01 will be posted 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO weewx.restx: CWOP: Posting not 
enabled. 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO weewx.restx: WOW: Posting not 
enabled. 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO weewx.restx: AWEKAS: Data will 
be uploaded for user Silvio12 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO user.mqtt: service version is 
0.23 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO user.mqtt: binding to 
['archive', 'loop'] 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO user.mqtt: topic is weather/ 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO user.mqtt: desired unit system 
is METRIC 
Jan  3 17:33:40 raspberrypi weewx[7122] INFO user.mqtt: data will be 
uploaded to mqtt://mqttuser:x...@v2202104146888151254.happysrv.de:1883 
Jan  3 17:33:40 raspberrypi w

Re: [weewx-user] Re: lightning sensor made at home cheaply - WORKS!

2022-01-03 Thread Silvio Schömann
*Even after a new installation the same error, here the log:*

Jan  3 14:30:23 raspberrypi weewx[2427] INFO __main__: Initializing weewx 
version 4.5.1
Jan  3 14:30:23 raspberrypi weewx[2427] INFO __main__: Using Python 3.7.3 
(default, Jan 22 2021, 20:04:44) #012[GCC 8.3.0] 
Jan  3 14:30:23 raspberrypi weewx[2427] INFO __main__: Platform 
Linux-5.10.63-v7l+-armv7l-with-debian-10.11 
Jan  3 14:30:23 raspberrypi weewx[2427] INFO __main__: Locale is 
'de_DE.UTF-8' 
Jan  3 14:30:23 raspberrypi weewx[2427] INFO __main__: PID file is 
/var/run/weewx.pid 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO __main__: Using configuration 
file /home/weewx/weewx.conf 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO __main__: Debug is 0 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO weewx.engine: Loading station 
type Simulator (weewx.drivers.simulator) 
Jan  3 14:30:23 raspberrypi weewx[2416]: Starting weewx weather system: 
weewx. 
Jan  3 14:30:23 raspberrypi systemd[1]: Started LSB: weewx weather system. 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
Version is 2.1.0-rc02 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
Log level: 0 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
Log debug setting: 0 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
Log console: False 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
Log file: None 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
message_callback_provider_name is user.MQTTSubscribe.MessageCallbackProvi
der 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
clientid is MQTTSubscribe-4131 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
client_session is True 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
host is localhost 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
port is 1883 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
keepalive is 60 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
username is None 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
min_delay is 1 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
max_delay is 120 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
password is set 
Jan  3 14:30:23 raspberrypi weewx[2431] INFO user.MQTTSubscribe: (Service) 
Archive topic is None 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__: Caught 
unrecoverable exception: 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__:  * Invalid 
type configured: REPLACE_ME *
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__:  
 Traceback (most recent call last): 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__: File 
"/home/weewx/bin/weewxd", line 151, in main 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__:  
 engine = weewx.engine.StdEngine(config_dict) 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__: File 
"/home/weewx/bin/weewx/engine.py", line 93, in __init__ 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__:  
 self.loadServices(config_dict) 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__: File 
"/home/weewx/bin/weewx/engine.py", line 161, in loadServices 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__:  
 obj = weeutil.weeutil.get_object(svc)(self, config_dict) 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__: File 
"/home/weewx/bin/user/MQTTSubscribe.py", line 1812, in __init__ 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__:  
 self.subscriber = MQTTSubscriber(service_dict, self.logger) 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__: File 
"/home/weewx/bin/user/MQTTSubscribe.py", line 1567, in __init__ 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__:  
 self.manager) 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__: File 
"/home/weewx/bin/user/MQTTSubscribe.py", line 1294, in __init__ 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__:  
 raise ValueError("Invalid type configured: %s" % message_type) 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__:  
 ValueError: Invalid type configured: REPLACE_ME 
Jan  3 14:30:23 raspberrypi weewx[2431] CRITICAL __main__:  
 Exiting.

*Extract from the conf:*

# Options for 'MQTTSubscribeService'
[MQTTSubscribeService]

enable = true
host = localhost
port = 1883
keepalive = 60
binding = loop
#username = None
#password = None

# The message handler to use
[[message_callback]]
type = json

# The topics to subscribe to.
[[topics]]
u