Re: [weewx-user] Re: sftp on 3.9.2, RPI3B -- **still** not working with several methods

2022-02-20 Thread Rob Cranfill
Funny you should bring this up now. I recently upgraded to WeeWX 2.6, and
my modified code no longer works. I was always able to adapt to each new
version, but the new codebase is quite different than the previous ones. I
have kind of given up on trying to adapt it to 2.6. Sorry.

Instead, I use a cron job to “rsynch” my local files to the remote. It
sounds like maybe you are doing something similar.

If you are using some version of WeeWX less than 2.6 I could still send you
my code. Although even that code requires the pysftp library, so maybe none
of this will help you. :-/

Let me know if you’d like to try it.


On Fri, Feb 18, 2022 at 23:03 'Dr. Thomas Tuch' via weewx-user <
weewx-user@googlegroups.com> wrote:

> Dear Rob
> After moving to a different server i have been trying to get sftp to work
> with weewx and never managed to get pysftp compiled, probably because my pi
> is running Ubuntu 16. This I cannot change because my home automation is
> running on the same pi3b - I would not like to mess with heating etc in
> German winter :-) I would therefore be happy to get a copy of your hack.
> Thank you in advance. Thomas
>
>
> robcr...@gmail.com schrieb am Mittwoch, 27. Mai 2020 um 18:09:56 UTC+2:
>
>> Dear Mr or Ms Potamia, ;-)
>>
>> I have code that I hacked into the standard Weewx base that implements
>> proper sftp. If you would like a copy I can send it to you. (And anyone
>> else who’d like a copy.) Just one modified file.
>>
>> /rob
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/weewx-user/GdlSK3vTvYE/unsubscribe.
> To unsubscribe from this group and all its topics, 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/f0444643-d438-47ab-b11c-5a9bf624222en%40googlegroups.com
> 
> .
>
-- 


-- 
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/CAOVFAvoDwnxjLgRh6ctWRz%2BaGvLT-bwMtZ7%2BvmMUZ57BiEnGHQ%40mail.gmail.com.


Re: [weewx-user] Re: sftp on 3.9.2, RPI3B -- **still** not working with several methods

2022-02-19 Thread Messy Potamia
Please be advised I have been using scp in conjunction with ssh in my
scripts to move things around every five minutes (weather station
stuff & wx photos).

On Sat, Feb 19, 2022 at 8:03 AM 'Dr. Thomas Tuch' via weewx-user
 wrote:
>
> Dear Rob
> After moving to a different server i have been trying to get sftp to work 
> with weewx and never managed to get pysftp compiled, probably because my pi 
> is running Ubuntu 16. This I cannot change because my home automation is 
> running on the same pi3b - I would not like to mess with heating etc in 
> German winter :-) I would therefore be happy to get a copy of your hack. 
> Thank you in advance. Thomas
>
>
> robcr...@gmail.com schrieb am Mittwoch, 27. Mai 2020 um 18:09:56 UTC+2:
>>
>> Dear Mr or Ms Potamia, ;-)
>>
>> I have code that I hacked into the standard Weewx base that implements 
>> proper sftp. If you would like a copy I can send it to you. (And anyone else 
>> who’d like a copy.) Just one modified file.
>>
>> /rob
>
> --
> You received this message because you are subscribed to a topic in the Google 
> Groups "weewx-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/weewx-user/GdlSK3vTvYE/unsubscribe.
> To unsubscribe from this group and all its topics, 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/f0444643-d438-47ab-b11c-5a9bf624222en%40googlegroups.com.

-- 
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/CAB7-S77hMJi8nwrnGP2XmrTP0VRqqEtczn7EY0c8rA4C67%2B0YA%40mail.gmail.com.


[weewx-user] Re: sftp on 3.9.2, RPI3B -- **still** not working with several methods

2022-02-18 Thread 'Dr. Thomas Tuch' via weewx-user
Dear Rob
After moving to a different server i have been trying to get sftp to work 
with weewx and never managed to get pysftp compiled, probably because my pi 
is running Ubuntu 16. This I cannot change because my home automation is 
running on the same pi3b - I would not like to mess with heating etc in 
German winter :-) I would therefore be happy to get a copy of your hack. 
Thank you in advance. Thomas


robcr...@gmail.com schrieb am Mittwoch, 27. Mai 2020 um 18:09:56 UTC+2:

> Dear Mr or Ms Potamia, ;-)
>
> I have code that I hacked into the standard Weewx base that implements 
> proper sftp. If you would like a copy I can send it to you. (And anyone 
> else who’d like a copy.) Just one modified file. 
>
> /rob 

-- 
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/f0444643-d438-47ab-b11c-5a9bf624222en%40googlegroups.com.


[weewx-user] Re: sftp on 3.9.2, RPI3B -- **still** not working with several methods

2020-05-27 Thread Rob Cranfill
Dear Mr or Ms Potamia, ;-)

I have code that I hacked into the standard Weewx base that implements proper 
sftp. If you would like a copy I can send it to you. (And anyone else who’d 
like a copy.) Just one modified file. 

/rob 

-- 
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/c5343073-bb74-4002-a42c-f8da9b76bfed%40googlegroups.com.


Re: [weewx-user] Re: sftp on 3.9.2, RPI3B -- **still** not working with several methods

2020-05-26 Thread Tom Keffer
One pip quirk that consistently bites me over and over again, is trying to
use pip from the WeeWX home directory, /home/weewx. It appears that is what
you're trying to do.

The problem is the presence of the file setup.cfg. Pip sees it, and tries
to install in the directories it specifies, in this case /home/weewx. Take
a look in /home/weewx/bin and see if your missing pysftp is in there.

The solution is to clean up /home/weewx/bin, then cd to some other
directory, then use pip.

-tk



On Tue, May 26, 2020 at 4:26 AM mwall  wrote:

>
>
> On Tuesday, May 26, 2020 at 4:35:50 AM UTC-4, Messy Potamia wrote:
>>
>> Well I knew that was too good to be true.
>>
>
> the first error you posted, regarding 'platform_system' NameError, is
> probably due to an old version of setuptools.  to fix that, update the
> setuptools for the python installation associated with the 'pip' version
> that you are invoking.
>
>
>
>> May 26 10:30:21 RPI3 weewx[21915]: sftpgenerator: upload not possible: No
>> module named pysftp
>>
>>>
>>>
> that indicates the python with which you are invoking weewx does not have
> pysftp installed.  perhaps you installed pysftp for python3 but you are
> using python2 to invoke weewx?
>
> dog's breakfast indeed.  welcome to the world of python dependencies!
> (this is why we try really hard to keep weewx dependencies to a minimum)
>
> one way to avoid this is to install your own python, completely
> independent of the system's python.  then use the 'pip' from that python
> installation to install all of the python packages you need.  you may still
> have to install the build environment and the occasional dev package for
> your operating system.
>
> the you can use that python by setting it in /etc/default/weewx (if you
> have a deb/apt or rpm/yum/dnf install) or by invoking it when you do
> 'setup.py install' (if you have a setup.py install of weewx).
>
> m
>
> --
> 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/82433072-10b1-400c-bf00-3cd94191cc5e%40googlegroups.com
> 
> .
>

-- 
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/CAPq0zEC4YGNiOgWzgqh_pEiOzMWTUwE1s9%2BPJbvz0yVaeBYBFA%40mail.gmail.com.


[weewx-user] Re: sftp on 3.9.2, RPI3B -- **still** not working with several methods

2020-05-26 Thread mwall


On Tuesday, May 26, 2020 at 4:35:50 AM UTC-4, Messy Potamia wrote:
>
> Well I knew that was too good to be true.
>

the first error you posted, regarding 'platform_system' NameError, is 
probably due to an old version of setuptools.  to fix that, update the 
setuptools for the python installation associated with the 'pip' version 
that you are invoking.

 

> May 26 10:30:21 RPI3 weewx[21915]: sftpgenerator: upload not possible: No 
> module named pysftp
>
>>
>>
that indicates the python with which you are invoking weewx does not have 
pysftp installed.  perhaps you installed pysftp for python3 but you are 
using python2 to invoke weewx?

dog's breakfast indeed.  welcome to the world of python dependencies!  
(this is why we try really hard to keep weewx dependencies to a minimum)

one way to avoid this is to install your own python, completely independent 
of the system's python.  then use the 'pip' from that python installation 
to install all of the python packages you need.  you may still have to 
install the build environment and the occasional dev package for your 
operating system.

the you can use that python by setting it in /etc/default/weewx (if you 
have a deb/apt or rpm/yum/dnf install) or by invoking it when you do 
'setup.py install' (if you have a setup.py install of weewx).

m

-- 
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/82433072-10b1-400c-bf00-3cd94191cc5e%40googlegroups.com.


[weewx-user] Re: sftp on 3.9.2, RPI3B -- **still** not working with several methods

2020-05-26 Thread Messy Potamia
Well I knew that was too good to be true.

May 26 10:30:21 RPI3 weewx[21915]: sftpgenerator: upload not possible: No 
module named pysftp

although the problematic pip install of pysftp "suggested" that module was 
installed, to wit:

> Successfully built pysftp pynacl bcrypt
> Failed to build cryptography
> ERROR: Could not build wheels for cryptography which use PEP 517 and 
> cannot be installed directly
>
so I thought since it built the pysftp it would be available for this. 
Definitely a #DOG'sBREAKFAST.
Thanks for your help so far. 
Anyone else gone / going through this?
Thx/MP
On Monday, May 25, 2020 at 11:33:06 AM UTC+2, Messy Potamia wrote:
>
> -- 
>
> In summary, the Secure FTP capability is indicated in weewx.conf (& the 
> caveat comment seems satisfied with testing of Filezilla's success), 
> however in weewx's native install it does not work.
> --
> First I tried the method suggested in weewx.conf and the weewx guide: I 
> enabled ssh/sftp with my provider (one.com), followed their instructions, 
> tested it with filezilla, and I connect and upload/dnload just fine. Here's 
> one.com's instructions on the matter:
> SSH & SFTP Administration 
>
> *SSH* increases the security on your web space by encrypting your web 
> space connections. With SSH enabled, you can transfer files securely via 
> *SFTP* or connect to your web space directly from a terminal. 
>
> Allow SSH & SFTP access Off On 
>
> To log in with SSH & SFTP, use this info:
>
> Host: ssh..net 
>
> Username: .net 
>
> Port: 22
>
> Then their faq on the subject has this:
>
>
> Open your SFTP client, and enter the following details, replacing 
> *yourdomain.com 
> * with your own domain:
>
>- *Host:* sftp.yourdomain.com
>- *Username:* yourdomain.com
>- *Password:* the password you have chosen for SFTP
>- *Port:* 22
>
> Click the connect button in your client to log in. If it is the first time 
> you login using SFTP on this computer, you need to approve the connection.
>
> Note: I have verified that with filezilla, both sftp.mydomain.net and 
> ssh.mydomain.net, using my ssh/sftp password, connect fine.
>
>
> When I make the appropriate changes to weewx.conf, it is unable to 
> connect. I tried a couple variations just to cross-validate disparities in 
> their guide. No connect.
>
>
> SO THEN I google "weewx 3.9.2 sftp" and come up with, among other things, 
> MWall's 
> https://github.com/matthewwall/weewx-sftp/blob/master/bin/user/sftp.py
>
> to wit:
>
> sudo pip install pysftp
>
> which results in:
>
> pi@RPI3:/home/weewx $ sudo pip install pysftp
> Downloading/unpacking pysftp
>   Downloading pysftp-0.2.9.tar.gz
>   Running setup.py (path:/tmp/pip-build-6MvFgx/pysftp/setup.py) egg_info 
> for package pysftp
>
> no previously-included directories found matching 'docs/_build'
> Downloading/unpacking paramiko>=1.17 (from pysftp)
>   Downloading paramiko-2.7.1-py2.py3-none-any.whl (206kB): 206kB 
> downloaded
> Cleaning up...
> Exception:
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in 
> main
> status = self.run(options, args)
>   File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 
> 290, in run
> requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, 
> bundle=self.bundle)
>   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1266, in 
> prepare_files
> req_to_install.extras):
>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2401, in 
> requires
> dm = self._dep_map
>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2597, in 
> _dep_map
> self.__dep_map = self._compute_dependencies()
>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2630, in 
> _compute_dependencies
> common = frozenset(reqs_for_extra(None))
>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2627, in 
> reqs_for_extra
> if req.marker_fn(override={'extra':extra}):
>   File "/usr/lib/python2.7/dist-packages/_markerlib/markers.py", line 113, 
> in marker_fn
> return eval(compiled_marker, environment)
>   File "", line 1, in 
> NameError: name 'platform_system' is not defined
>
> Storing debug log for failure in /root/.pip/pip.log
> I tried a sudo apt-get install but that failed also.
> pi@RPI3:/home/weewx $ sudo apt-get install pysftp
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Unable to locate package pysftp
> So couldn't get to 1st base this inning.
>
>
> In summary, the Secure FTP capability as indicated in weewx.conf (& the 
> caveat comment seems satisfied with testing of Filezilla's success), in 
> weewx's native install does not work. Not for me. And I believe I've double 
> checked everything.
>
>
> If it requires a hack to package(s) (.py) in weewx I'm comfortable doing 
> that if the instructions are clear, concise, well written. Note, I'm not 
> comfortable w