document extension development process
/cc @msourzac
quick and dirty packages and installing extension
package extension:
tar cvfz hukselfux.tar.gz weewx-hukseflux/
Install via weectl
weectl extension install hukselfux.tar.gz -y --verbosity=4
Output:
Using configuration file /etc/weewx/weewx.conf
root dictionary: {'WEEWX_ROOT': '/etc/weewx', 'USER_DIR': '/etc/weewx/bin/user', 'BIN_DIR': '/usr/local/src/weewx/venv/lib/python3.11/site-packages', 'EXT_DIR': '/etc/weewx/bin/user/installer', 'SKIN_DIR': '/etc/weewx/skins'}
Extracting from tar archive /home/acastro/hukselfux.tar.gz
Request to install extension found in directory /tmp/tmpsif6vj4i/weewx-hukseflux
Found extension with name 'hukseflux'
Copying new files...
Copying from '/tmp/tmpsif6vj4i/weewx-hukseflux/bin/user/hukseflux.py' to '/etc/weewx/bin/user/hukseflux.py'
Copied 1 files.
Adding services to service lists.
Saving installer file to /etc/weewx/bin/user/installer/hukseflux
Finished installing extension hukseflux from /home/acastro/hukselfux.tar.gz
hukseflux.py
Run python /etc/weewx/bin/user/hukseflux.py
Traceback (most recent call last):
File "/etc/weewx/bin/user/hukseflux.py", line 310, in <module>
driver = HuksefluxDriver()
^^^^^^^^^^^^^^^^^
File "/etc/weewx/bin/user/hukseflux.py", line 114, in __init__
self.sample_rate = int(stn_dict.get('sample_rate')) # TODO: int needed here??
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'