Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major updates and fixes #67

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ sudo systemctl start wyzesense2mqtt
sudo systemctl status wyzesense2mqtt
sudo systemctl enable wyzesense2mqtt # Enable start on reboot
```
9. Pair sensors following [instructions below](#pairing-a-sensor). You do NOT need to re-pair sensors that were already paired, they should be found automatically on start and added to the config file with default values, but the sensor version will be unknown.
9. Pair sensors following [instructions below](#pairing-a-sensor). You do NOT need to re-pair sensors that were already paired, they should be found automatically on start and added to the config file with default values, but the sensor version will be unknown and the
class will default to opening, I.E. a contact sensor.


## Config Files
Expand Down Expand Up @@ -179,16 +180,22 @@ root:
```

### sensors.yaml
This file will store basic information about each sensor paired to the Wyse Sense Bridge. The entries can be modified to set the class type and sensor name as it will show in Home Assistant. Class types can be automatically filled for `opening`, `motion`, and `moisture`, depending on the type of sensor. Since this file can be automatically generated, Python may automatically quote the MACs or not depending on if they are fully numeric.
This file will store basic information about each sensor paired to the Wyse Sense Bridge. The entries can be modified to set the class type and sensor name as it will show in Home Assistant. Class types can be automatically filled for `opening`, `motion`, and `moisture`,
depending on the type of sensor. Since this file can be automatically generated, Python may automatically quote the MACs or not depending on if they are fully numeric. Sensors that were previously linked and automatically added will default to class `opening` and will not
have a "sw_version" set. For the original version 1 devices, the sw_version should be 19. For the newer version 2 devices, the sw_version should be 23. This will be automatically have the correct settings for devices added via a scan. A custom timeout for device
availability can also be added per device by setting the "timeout" setting, in seconds. For version 1 devices, the default timeout is 8 hours and for version 2 device, the default timeout is 4 hours.
```yaml
'AAAAAAAA':
class: door
name: Entry Door
invert_state: false
sw_version: 19
'BBBBBBBB':
class: window
name: Office Window
invert_state: false
sw_version: 23
timeout: 7200
'CCCCCCCC':
class: opening
name: Kitchen Fridge
Expand Down
4 changes: 2 additions & 2 deletions wyzesense2mqtt/bridge_tool_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def main(args):
logging.getLogger().setLevel(loglevel)

device = args['--device']
print(f"Openning wyzesense gateway [{device}]")
print(f"Opening wyzesense gateway [{device}]")
try:
ws = wyzesense.Open(device, on_event)
ws = wyzesense.Open(device, on_event, logging.getLogger())
if not ws:
print("Open wyzesense gateway failed")
return 1
Expand Down
4 changes: 2 additions & 2 deletions wyzesense2mqtt/samples/logging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ handlers:
console:
class: logging.StreamHandler
formatter: simple
level: DEBUG
level: INFO
file:
backupCount: 7
class: logging.handlers.TimedRotatingFileHandler
Expand All @@ -22,4 +22,4 @@ root:
handlers:
- file
- console
level: DEBUG
level: INFO
Loading