Skip to content

Commit

Permalink
v0.1.0b3
Browse files Browse the repository at this point in the history
- fix wh65 sensor data decode error
- fix incorrect message when only one GW1000 is detected on the network
- change console message displayed when reporting GW1000 ip address and port
  • Loading branch information
gjr80 committed Jul 22, 2020
1 parent ecd345e commit 724e6bf
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
Empty file modified LICENSE
100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ The GW1000 driver requires WeeWX v3.7.0 or greater.

- download the GW1000 driver extension package:

$ wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.1.0b2/weewx-gw1000-0.1.0b2.tar.gz
$ wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.1.0b3/weewx-gw1000-0.1.0b3.tar.gz

- install the GW1000 driver extension:

$ wee_extension --install=/var/tmp/weewx-gw1000.0.1.0b2.tar.gz
$ wee_extension --install=/var/tmp/weewx-gw1000.0.1.0b3.tar.gz

- skip to step 4

3. If installing manually:

- download the GW1000 driver extension package:

$ wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.1.0b2/weewx-gw1000-0.1.0b2.tar.gz
$ wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.1.0b3/weewx-gw1000-0.1.0b3.tar.gz

- extract *gw1000.py* from the GW1000 driver extension package:

$ tar -xzf /var/tmp/weewx-gw1000.0.1.0b2.tar.gz
$ tar -xzf /var/tmp/weewx-gw1000.0.1.0b3.tar.gz

- copy the file *gw1000.py* to the *$BIN_ROOT/user* directory:

Expand Down
14 changes: 9 additions & 5 deletions bin/user/gw1000.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
You should have received a copy of the GNU General Public License along with
this program. If not, see http://www.gnu.org/licenses/.
Version: 0.1.0b2 Date: 22 July 2020
Version: 0.1.0b3 Date: 22 July 2020
Revision History
?? ????? 2020 v0.1.0
Expand Down Expand Up @@ -321,7 +321,7 @@ def log_traceback_debug(prefix=''):
log_traceback(prefix=prefix, loglevel=syslog.LOG_DEBUG)

DRIVER_NAME = 'GW1000'
DRIVER_VERSION = '0.1.0b2'
DRIVER_VERSION = '0.1.0b3'

# various defaults used throughout
# default port used by GW1000
Expand Down Expand Up @@ -1346,7 +1346,11 @@ def __init__(self, ip_address=None, port=None,
disc_port = ip_port_list[0][1]
# log the fact as well as what we found
gw1000_str = ', '.join([':'.join(['%s:%d' % b]) for b in ip_port_list])
loginf("Multiple GW1000 were found at %s" % (gw1000_str,))
if len(ip_port_list) == 1:
stem = "GW1000 was"
else:
stem = "Multiple GW1000 were"
loginf("%s found at %s" % (stem, gw1000_str))
ip_address = disc_ip.encode() if ip_address is None else ip_address.encode()
port = disc_port if port is None else port
self.ip_address = ip_address
Expand Down Expand Up @@ -1633,7 +1637,7 @@ class Parser(object):
b'\x16': ('decode_uv', 2, 'uv'), # UV (uW/m2), size in bytes:2
b'\x17': ('decode_uvi', 1, 'uvi'), # UVI (0-15 index), size in bytes:1
b'\x18': ('decode_datetime', 6, 'datetime'), # Date and time, size in bytes:6
b'\x19': ('decode_speed', 1, 'daymaxwind'), # Day max_wind (m/s), size in bytes:2
b'\x19': ('decode_speed', 2, 'daymaxwind'), # Day max_wind (m/s), size in bytes:2
b'\x1A': ('decode_temp', 2, 'temp1'),
b'\x1B': ('decode_temp', 2, 'temp2'),
b'\x1C': ('decode_temp', 2, 'temp3'),
Expand Down Expand Up @@ -2186,7 +2190,7 @@ def discover():
gw1000_found = 0
for (ip, port) in sorted_list:
if ip is not None and port is not None:
print("GW1000 discovered at IP address %s and port %d" % (ip, port))
print("GW1000 discovered at IP address %s on port %d" % (ip, port))
found = True
gw1000_found += 1
else:
Expand Down
4 changes: 2 additions & 2 deletions install.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Installer for GW1000 Driver
Version: 0.1.0b2 Date: 22 July 2020
Version: 0.1.0b3 Date: 22 July 2020
Revision History
?? ????? 2020 v0.1.0
Expand All @@ -23,7 +23,7 @@
from setup import ExtensionInstaller

REQUIRED_VERSION = "3.7.0"
GW1000_VERSION = "0.1.0b2"
GW1000_VERSION = "0.1.0b3"


def loader():
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ method):

- download the GW1000 driver extension package:

$ wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.1.0b2/weewx-gw1000-0.1.0b2.tar.gz
$ wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.1.0b3/weewx-gw1000-0.1.0b3.tar.gz

- install the GW1000 driver extension:

$ wee_extension --install=/var/tmp/weewx-gw1000.0.1.0b2.tar.gz
$ wee_extension --install=/var/tmp/weewx-gw1000.0.1.0b3.tar.gz

- skip to step 4

Expand Down

0 comments on commit 724e6bf

Please sign in to comment.