Skip to content

Commit

Permalink
Merge pull request #117 from Nexarian/cpitstick/update-scan-function
Browse files Browse the repository at this point in the history
Large-scale refactor of scan function
  • Loading branch information
jasonacox authored Dec 10, 2024
2 parents 5e5bf05 + ef0e628 commit ac3c12e
Show file tree
Hide file tree
Showing 4 changed files with 262 additions and 150 deletions.
16 changes: 16 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# RELEASE NOTES


## v0.12.1 - Scanner Update

* Large-scale refactor of scan function by @Nexarian in https://github.com/jasonacox/pypowerwall/pull/117
- Function `scan()` returns a list of the discovered devices for use as a utility function.
- Ability to silence output for use as a utility.
- Improve performance of multi-threaded scan by using a Queue.
- General code flow improvements and encapsulation.
- Add ability to work with standalone inverters.

```python
from pypowerwall.scan import scan
found_devices = scan(interactive = False)
```


## v0.12.0 - Add Controller Data

* TEDAPI: Add `get_device_controller()` to get device data which includes Powerwall THC_AmbientTemp data. Credit to @ygelfand for discovery and reported in https://github.com/jasonacox/Powerwall-Dashboard/discussions/392#discussioncomment-11360474
Expand Down
2 changes: 1 addition & 1 deletion pypowerwall/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
from typing import Union, Optional
import time

version_tuple = (0, 12, 0)
version_tuple = (0, 12, 1)
version = __version__ = '%d.%d.%d' % version_tuple
__author__ = 'jasonacox'

Expand Down
12 changes: 7 additions & 5 deletions pypowerwall/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,13 @@
from pypowerwall import scan

print("pyPowerwall [%s] - Scanner\n" % version)
color = not args.nocolor
ip = args.ip
hosts = args.hosts
timeout = args.timeout
scan.scan(color, timeout, hosts, ip)
scan.scan(
ip=args.ip,
max_threads=args.hosts,
timeout=args.timeout,
color=not args.nocolor,
interactive=True
)

# Set Powerwall Mode
elif command == 'set':
Expand Down
Loading

0 comments on commit ac3c12e

Please sign in to comment.