idokep.hu

204 views
Skip to first unread message

Lorant Kurthy

unread,
May 17, 2014, 6:40:04 AM5/17/14
to weewx-de...@googlegroups.com
Hi,

Attached is the restx.py file I have modified to upload my weather station's data to www.idokep.hu. The original file is from the .deb package.

Lorant

restx.py

Thomas Keffer

unread,
May 17, 2014, 11:31:21 AM5/17/14
to Lorant Kurthy, weewx-de...@googlegroups.com
Hello, Lorant

Nice looking site.

I am reluctant to include your extension in the standard version of restx.py. I just do not see a lot of demand for it. It would be better to package it as a weewx extension, which could be downloaded from your website. We can include instructions and a link to it in the weewx Wiki.

-tk

Lorant Kurthy

unread,
May 17, 2014, 12:37:37 PM5/17/14
to weewx-de...@googlegroups.com, Lorant Kurthy
Hello Thomas,

That is not my site, I just have a weather station and there was no program for linux to upload my data to idokep.hu, so I modified weewx, because this was the least difficult option for me :) I started to use weewx only yesterday, really nice program, I love it already. I agree there is not a lot of demand for my modification, to be honest I just uploaded it to publish and archive my work, but if I will have enough time, I will figure out how to package it as an extension. Thank you.

Lorant Kurthy

unread,
May 18, 2014, 3:18:24 AM5/18/14
to weewx-de...@googlegroups.com, Lorant Kurthy
Hello Thomas,

The extension is ready on github at https://github.com/lorantkurthy/weewx-idokep/, there is a 0.1 release to simplify install, please take a look on it. Thank you!

Thomas Keffer

unread,
May 18, 2014, 8:12:21 AM5/18/14
to Lorant Kurthy, weewx-de...@googlegroups.com
​​
Looks reasonable. My only comment is that the install instructions have the user expand the tarball in ~/Downloads, but copy from /var/tmp/weewx-idokep-0.1/bin/user.
​ Best keep them consistent.​


-tk

Lorant Kurthy

unread,
May 18, 2014, 11:55:53 AM5/18/14
to weewx-de...@googlegroups.com
I think this is consistent, because in the first step there is a cd /var/tmp line, tar will extract the archive to the current working directory, which will be /var/tmp (if I see correctly).

1) expand the tarball:

cd /var/tmp
tar xvfz ~/Downloads/weewx-idokep-0.1.tar.gz

 However I can modify this and add a -C /var/tmp parameter to the tar command if you think that's clearer:

1) expand the tarball:

tar -C /var/tmp -xvfz ~/Downloads/weewx-idokep-0.1.tar.gz

Thomas Keffer

unread,
May 18, 2014, 11:59:25 AM5/18/14
to Lorant Kurthy, weewx-de...@googlegroups.com
Oops. I missed that! Right you are.

Alternatively, just leave the download directory unspecified.

tar xvf weewx-idokep-0.1.tar.gz

-tk

Lorant Kurthy

unread,
May 18, 2014, 1:30:40 PM5/18/14
to weewx-de...@googlegroups.com
Documentation is the hardest thing to me due to my poor English as I'm not a native speaker. I will rework the README as soon as I will have enough time, I admit I am very happy now that the uploader works, and is published :) I want to modify it in the near future to support the pro.idokep.hu site too, so in the 0.2 release I will write a new README. Thank you anyway.

Lorant

On Saturday, May 17, 2014 12:40:04 PM UTC+2, Lorant Kurthy wrote:

Thomas Keffer

unread,
May 18, 2014, 1:39:37 PM5/18/14
to Lorant Kurthy, weewx-de...@googlegroups.com
I think the README file is just fine. Easy to understand.

-tk

Sándor Makány

unread,
Dec 27, 2016, 6:41:52 PM12/27/16
to weewx-development, kur...@gmail.com
Kedves Lóránt!

Próbálom beüzemelni a modulod, azonban az alábbi hibába futok bele: 
File "/usr/share/weewx/user/idokep.py", line 63, in __init__
Dec 27 23:37:45 raspberrypi weewx[4830]:     ****      site_dict = weewx.restx.get_dict(config_dict, 'IDOKEP')
Dec 27 23:37:45 raspberrypi weewx[4830]:     ****  AttributeError: 'module' object has no attribute 'get_dict'

Elképzelhető hogy a pro.idokep.hu funkció még nem megy. Ha megoldható lenne és megírnád mit is kell módosítani akkor nagyon megköszönném.

Üdv
Makány Sándor

mwall

unread,
Dec 27, 2016, 7:07:19 PM12/27/16
to weewx-development
On Tuesday, December 27, 2016 at 6:41:52 PM UTC-5, Sándor Makány wrote:
Kedves Lóránt!

Próbálom beüzemelni a modulod, azonban az alábbi hibába futok bele: 
File "/usr/share/weewx/user/idokep.py", line 63, in __init__
Dec 27 23:37:45 raspberrypi weewx[4830]:     ****      site_dict = weewx.restx.get_dict(config_dict, 'IDOKEP')
Dec 27 23:37:45 raspberrypi weewx[4830]:     ****  AttributeError: 'module' object has no attribute 'get_dict'

Elképzelhető hogy a pro.idokep.hu funkció még nem megy. Ha megoldható lenne és megírnád mit is kell módosítani akkor nagyon megköszönném.


line 63 should be get_site_dict instead of get_dict

m

Sándor Makány

unread,
Dec 28, 2016, 2:11:01 AM12/28/16
to weewx-development
Dear m,

The next problem:
Dec 28 07:10:09 raspberrypi weewx[6917]:     ****    File "/usr/share/weewx/user/idokep.py", line 71, in __init__
Dec 28 07:10:09 raspberrypi weewx[6917]:     ****      site_dict.setdefault('database_dict', config_dict['Databases'][config_dict['StdArchive']['archive_database']])
Dec 28 07:10:09 raspberrypi weewx[6917]:     ****    File "/usr/lib/python2.7/dist-packages/configobj.py", line 554, in __getitem__
Dec 28 07:10:09 raspberrypi weewx[6917]:     ****      val = dict.__getitem__(self, key)
Dec 28 07:10:09 raspberrypi weewx[6917]:     ****  KeyError: 'archive_database'


Thank you for your help.

Best Regards
Sandor

mwall

unread,
Dec 28, 2016, 10:50:14 PM12/28/16
to weewx-development
sandor,

around line 70 of idokep.py, change this:

         site_dict.setdefault('station_type', 'WS23XX')
         site_dict.setdefault('database_dict', config_dict['Databases'][config_dict['StdArchive']['archive_database']])

to this:

        site_dict.setdefault('station_type', engine.stn_info.hardware)
        site_dict['manager_dict'] = weewx.manager.get_manager_dict(
            config_dict['DataBindings'], config_dict['Databases'], 'wx_binding')


also, at lines 90 and 145, change 'database_dict' to 'manager_dict' (3 places)

m

Sándor Makány

unread,
Dec 29, 2016, 2:17:10 PM12/29/16
to weewx-development
Dear m,

Thanks for your help, works :)

Best Regards
Sandor
Reply all
Reply to author
Forward
0 new messages