SFTP on WeeWX

133 views
Skip to first unread message

Chema S.

unread,
Jul 18, 2019, 7:21:54 PM7/18/19
to weewx-user
Hi

I have tried to  configure https://github.com/matthewwall/weewx-sftp on WeeWX 3.9.1 but I am not able to make it work as it is supposed to. Nothing happens. Does anyone with similar problem? 

If someone have had success with this configuration I would like to know how achieved it with a step-by-step guide. 

thank you. 

Pat

unread,
Jul 18, 2019, 8:28:08 PM7/18/19
to weewx-user
Anything in the logs?

Greg from Oz

unread,
Jul 19, 2019, 12:02:33 AM7/19/19
to weewx-user
Did you put your password in quotes eg "qyeu$#,<LKKf"

Chema S.

unread,
Jul 19, 2019, 4:41:19 AM7/19/19
to weewx-user
Jul 19 10:35:32 raspberrypi weewx[19541]: reportengine: Caught unrecoverable exception in generator 'user.sftp.SFTPGenerator'
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****  [Errno 2] No such file
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****  Traceback (most recent call last):
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 204, in run
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****      obj.start()
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 300, in start
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****      self.run()
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****    File "/usr/share/weewx/user/sftp.py", line 233, in run
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****      n = uploader.run()
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****    File "/usr/share/weewx/user/sftp.py", line 98, in run
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****      self._make_remote_dir(con, remote_dir_path)
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****    File "/usr/share/weewx/user/sftp.py", line 161, in _make_remote_dir
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****      con.mkdir(remote_dir_path)
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****    File "/usr/local/lib/python2.7/dist-packages/pysftp/__init__.py", line 626, in mkdir
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****      self._sftp.mkdir(remotepath, mode=int(str(mode), 8))
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****    File "/usr/local/lib/python2.7/dist-packages/paramiko/sftp_client.py", line 460, in mkdir
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****      self._request(CMD_MKDIR, path, attr)
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****    File "/usr/local/lib/python2.7/dist-packages/paramiko/sftp_client.py", line 813, in _request
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****      return self._read_response(num)
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****    File "/usr/local/lib/python2.7/dist-packages/paramiko/sftp_client.py", line 865, in _read_response
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****      self._convert_status(msg)
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****    File "/usr/local/lib/python2.7/dist-packages/paramiko/sftp_client.py", line 894, in _convert_status
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****      raise IOError(errno.ENOENT, text)
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****  IOError: [Errno 2] No such file
Jul 19 10:35:32 raspberrypi weewx[19541]:         ****  Generator terminated

This is what I found in log


El viernes, 19 de julio de 2019, 2:28:08 (UTC+2), Pat escribió:
Anything in the logs?


gjr80

unread,
Jul 19, 2019, 5:00:22 AM7/19/19
to weewx-user
Hi,

Looks like an invalid path may have been specified. A bit more log will help. Can you edit weewx.conf, set debug = 1, save weewx.conf and then restart WeeWX. Let WeeWX run for at least 10 minutes and then post the log from when you restarted WeeWX covering the full 10 minutes; don’t truncate the start of the log, this shows a lot of config info. Would also help to see your [[SFTP]] stanza under [StdReport] in weewx.conf. Just make sure you remove any passwords or other sensitive info before posting.

Gary
Message has been deleted
Message has been deleted

Chema S.

unread,
Jul 20, 2019, 8:12:59 AM7/20/19
to weewx-user
Hi

thanks for your help.I was finally able to communicate two nodes with SFTP. I was trying many solutions, but finally I found what suit my needs. I decided to start from scratch. After a trial and error process I found the solution that really suit my needs:


sudo apt-get install python-pip
pip install
--user -U setuptools
sudo pip install
--upgrade pip
sudo apt
-get install libffi-dev #this package did not appears when first installation was made.
sudo pip install pysftp


Reply all
Reply to author
Forward
0 new messages