Skip to content

Commit

Permalink
More schema updates, CI update (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
jziolkowski authored Sep 28, 2024
1 parent a2b070c commit 8b47273
Show file tree
Hide file tree
Showing 16 changed files with 487 additions and 50 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
paths-ignore:
- '.github/**'
- '**.md'
- 'tests/**'
- 'assets/**'

jobs:
Binaries:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
paths-ignore:
- '.github/**'
- '**.md'
- 'tests/**'
- 'assets/**'

jobs:
build_wheel_and_release:
Expand Down
5 changes: 3 additions & 2 deletions tdmgr/schemas/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ class StatusPTHSchema(StatusBaseModel):

class StatusSTKSchema(StatusBaseModel):
CallChain: List[str]
DEPC: str
EPC: List[str]
DEPC: Optional[str] = None
EPC: Union[str, List[str]]
EXCVADDR: str
Exception: int
Reason: str
Expand Down Expand Up @@ -210,6 +210,7 @@ class StateSTSBaseSchema(StatusBaseModel):
UptimeSec: Optional[int] = None
Vcc: Optional[float] = None
White: Optional[int] = None
Width: Optional[int] = None
Wifi: WifiSchema


Expand Down
96 changes: 48 additions & 48 deletions tests/status_parsing/jsonfiles/13.0.0.1/STATUS13.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"StatusSHT": {
"SHT0": {
"Relay1": 1,
"Relay2": 2,
"Open": 100,
"Close": 100,
"50perc": 50,
"Delay": 0,
"Opt": "0001",
"Calib": [
300,
500,
700,
900,
1000
],
"Close": 100,
"Delay": 0,
"Mode": "1",
"Open": 100,
"Opt": "0001",
"Relay1": 1,
"Relay2": 2,
"TiltConfig": [
0,
0,
Expand All @@ -25,21 +25,21 @@
]
},
"SHT1": {
"Relay1": 3,
"Relay2": 4,
"Open": 100,
"Close": 100,
"50perc": 50,
"Delay": 0,
"Opt": "0001",
"Calib": [
300,
500,
700,
900,
1000
],
"Close": 100,
"Delay": 0,
"Mode": "1",
"Open": 100,
"Opt": "0001",
"Relay1": 3,
"Relay2": 4,
"TiltConfig": [
0,
0,
Expand All @@ -49,21 +49,21 @@
]
},
"SHT2": {
"Relay1": 5,
"Relay2": 6,
"Open": 100,
"Close": 100,
"50perc": 50,
"Delay": 0,
"Opt": "0001",
"Calib": [
300,
500,
700,
900,
1000
],
"Close": 100,
"Delay": 0,
"Mode": "1",
"Open": 100,
"Opt": "0001",
"Relay1": 5,
"Relay2": 6,
"TiltConfig": [
0,
0,
Expand All @@ -73,21 +73,21 @@
]
},
"SHT3": {
"Relay1": 7,
"Relay2": 8,
"Open": 100,
"Close": 100,
"50perc": 50,
"Delay": 0,
"Opt": "0001",
"Calib": [
300,
500,
700,
900,
1000
],
"Close": 100,
"Delay": 0,
"Mode": "1",
"Open": 100,
"Opt": "0001",
"Relay1": 7,
"Relay2": 8,
"TiltConfig": [
0,
0,
Expand All @@ -97,21 +97,21 @@
]
},
"SHT4": {
"Relay1": 9,
"Relay2": 10,
"Open": 100,
"Close": 100,
"50perc": 50,
"Delay": 0,
"Opt": "0001",
"Calib": [
300,
500,
700,
900,
1000
],
"Close": 100,
"Delay": 0,
"Mode": "1",
"Open": 100,
"Opt": "0001",
"Relay1": 9,
"Relay2": 10,
"TiltConfig": [
0,
0,
Expand All @@ -121,21 +121,21 @@
]
},
"SHT5": {
"Relay1": 11,
"Relay2": 12,
"Open": 100,
"Close": 100,
"50perc": 50,
"Delay": 0,
"Opt": "0001",
"Calib": [
300,
500,
700,
900,
1000
],
"Close": 100,
"Delay": 0,
"Mode": "1",
"Open": 100,
"Opt": "0001",
"Relay1": 11,
"Relay2": 12,
"TiltConfig": [
0,
0,
Expand All @@ -145,21 +145,21 @@
]
},
"SHT6": {
"Relay1": 13,
"Relay2": 14,
"Open": 100,
"Close": 100,
"50perc": 50,
"Delay": 0,
"Opt": "0001",
"Calib": [
300,
500,
700,
900,
1000
],
"Close": 100,
"Delay": 0,
"Mode": "1",
"Open": 100,
"Opt": "0001",
"Relay1": 13,
"Relay2": 14,
"TiltConfig": [
0,
0,
Expand All @@ -169,21 +169,21 @@
]
},
"SHT7": {
"Relay1": 15,
"Relay2": 16,
"Open": 100,
"Close": 100,
"50perc": 50,
"Delay": 0,
"Opt": "0001",
"Calib": [
300,
500,
700,
900,
1000
],
"Close": 100,
"Delay": 0,
"Mode": "1",
"Open": 100,
"Opt": "0001",
"Relay1": 15,
"Relay2": 16,
"TiltConfig": [
0,
0,
Expand Down
27 changes: 27 additions & 0 deletions tests/status_parsing/jsonfiles/14.1.0.1/STATUS12.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"StatusSTK": {
"CallChain": [
"420c07e6",
"42096a7e",
"42038380",
"4208fd0a",
"40387976",
"4038718c",
"40387108",
"40387f00",
"42052608",
"4201328a",
"42125084",
"4204eea4",
"4204ef1e",
"420131f0",
"4204eeb4",
"4209e6f0",
"42113ac6"
],
"EPC": "400587d2",
"EXCVADDR": "00000003",
"Exception": 5,
"Reason": "Load access fault"
}
}
56 changes: 56 additions & 0 deletions tests/status_parsing/jsonfiles/14.2.0.6/STATUS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"Status": {
"ButtonRetain": 0,
"ButtonTopic": "0",
"DeviceName": "AthomEM6",
"FriendlyName": [
"AthomEM6"
],
"InfoRetain": 0,
"LedMask": "FFFF",
"LedState": 1,
"Module": 0,
"Power": "0",
"PowerLock": "0",
"PowerOnState": 3,
"PowerRetain": 0,
"SaveData": 1,
"SaveState": 1,
"SensorRetain": 0,
"StateRetain": 0,
"StatusRetain": 0,
"SwitchMode": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"SwitchRetain": 0,
"SwitchTopic": "0",
"Topic": "athomem6"
}
}
16 changes: 16 additions & 0 deletions tests/status_parsing/jsonfiles/14.2.0.6/STATUS1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"StatusPRM": {
"BCResetTime": "2024-09-26T16:17:46",
"Baudrate": 115200,
"BootCount": 36,
"CfgHolder": 4617,
"GroupTopic": "tasmotas",
"OtaUrl": "http://otaserver/ota/tasmota/tasmota32c3-theo.bin",
"RestartReason": "Software reset digital core",
"SaveCount": 81,
"SerialConfig": "8N1",
"Sleep": 50,
"StartupUTC": "2024-09-27T15:55:58",
"Uptime": "0T20:37:07"
}
}
Loading

0 comments on commit 8b47273

Please sign in to comment.