Skip to content

Commit

Permalink
Merge pull request #32 from hostcc/feature/more-sensor-defs
Browse files Browse the repository at this point in the history
More sensor definitions
  • Loading branch information
hostcc authored Jun 22, 2024
2 parents 6b037a3 + 6a73e2c commit 366b1bb
Show file tree
Hide file tree
Showing 2 changed files with 242 additions and 2 deletions.
242 changes: 241 additions & 1 deletion src/pyg90alarm/definitions/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,16 @@ def reserved_data(self):
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ONLY20BITS
),
# Door Sensor WRDS01
SensorDefinition(
type=1,
subtype=3,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Door Sensor
SensorDefinition(
type=1,
Expand All @@ -485,6 +495,96 @@ def reserved_data(self):
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ONLY16BITS
),
# Glass Break Sensor BLPS
SensorDefinition(
type=2,
subtype=0,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Gas Detector WGD01
SensorDefinition(
type=3,
subtype=0,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Smoke Detector WSD02
SensorDefinition(
type=4,
subtype=0,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Smoke Detector WSD04
SensorDefinition(
type=4,
subtype=1,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Panic Button WEB01
SensorDefinition(
type=5,
subtype=1,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Panic Button WEB03
SensorDefinition(
type=5,
subtype=0,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Shock Sensor WSS01
SensorDefinition(
type=6,
subtype=0,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Water Detector LSTC02
SensorDefinition(
type=7,
subtype=1,
rx=0,
tx=0,
private_data='',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Water Detector LSTC01
SensorDefinition(
type=7,
subtype=0,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# PIR motion sensor WMS08
SensorDefinition(
type=8,
Expand All @@ -505,6 +605,66 @@ def reserved_data(self):
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ONLY20BITS
),
# PIR motion sensor ODPIR
SensorDefinition(
type=8,
subtype=0,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# PIR motion sensor N650
SensorDefinition(
type=8,
subtype=5,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# PIR motion sensor WPD02
SensorDefinition(
type=8,
subtype=6,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# PIR motion sensor WCMS02
SensorDefinition(
type=8,
subtype=8,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# PIR motion sensor CWMS01
SensorDefinition(
type=8,
subtype=9,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# PIR motion sensor WMS04
SensorDefinition(
type=8,
subtype=11,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# PIR motion sensor WMS07
SensorDefinition(
type=8,
Expand All @@ -515,6 +675,66 @@ def reserved_data(self):
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ONLY20BITS
),
# PIR motion sensor ODPIR03
SensorDefinition(
type=8,
subtype=4,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# PIR motion sensor WPD01
SensorDefinition(
type=8,
subtype=7,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# PIR motion sensor PIR Ceiling
SensorDefinition(
type=8,
subtype=1,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Beams ABT
SensorDefinition(
type=9,
subtype=0,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Beams ABE
SensorDefinition(
type=9,
subtype=1,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Beams ABH
SensorDefinition(
type=9,
subtype=2,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Remote RMC08
SensorDefinition(
type=10,
Expand Down Expand Up @@ -565,6 +785,16 @@ def reserved_data(self):
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ONLY20BITS
),
# Door Bell WDB
SensorDefinition(
type=12,
subtype=1,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# TouchID Detector
SensorDefinition(
type=13,
Expand Down Expand Up @@ -595,7 +825,17 @@ def reserved_data(self):
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ONLY16BITS
),
# Gas Detector WGD02
# Sub Host SS08S
SensorDefinition(
type=16,
subtype=0,
rx=0,
tx=0,
private_data='00',
rwMode=SensorRwMode.READ,
matchMode=SensorMatchMode.ALL
),
# Gas Valve Detector WGD02
SensorDefinition(
type=18,
subtype=0,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_alarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ async def test_sensor_disable_externally_modified(mock_device):

@pytest.mark.g90device(sent_data=[
b'ISTART[102,'
b'[[1,1,1],["Water",10,0,7,0,0,33,0,0,17,1,0,""]'
b'[[1,1,1],["Unsupported",10,0,255,0,0,33,0,0,17,1,0,""]'
b']]IEND\0',
b"ISTARTIEND\0",
])
Expand Down

0 comments on commit 366b1bb

Please sign in to comment.