pypck 0.8.6__tar.gz → 0.8.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {pypck-0.8.6/pypck.egg-info → pypck-0.8.8}/PKG-INFO +1 -1
  2. pypck-0.8.8/VERSION +1 -0
  3. {pypck-0.8.6 → pypck-0.8.8}/pypck/inputs.py +1 -1
  4. {pypck-0.8.6 → pypck-0.8.8}/pypck/pck_commands.py +11 -9
  5. {pypck-0.8.6 → pypck-0.8.8/pypck.egg-info}/PKG-INFO +1 -1
  6. {pypck-0.8.6 → pypck-0.8.8}/tests/test_commands.py +20 -2
  7. {pypck-0.8.6 → pypck-0.8.8}/tests/test_messages.py +2 -2
  8. pypck-0.8.6/VERSION +0 -1
  9. {pypck-0.8.6 → pypck-0.8.8}/LICENSE +0 -0
  10. {pypck-0.8.6 → pypck-0.8.8}/README.md +0 -0
  11. {pypck-0.8.6 → pypck-0.8.8}/pypck/__init__.py +0 -0
  12. {pypck-0.8.6 → pypck-0.8.8}/pypck/connection.py +0 -0
  13. {pypck-0.8.6 → pypck-0.8.8}/pypck/helpers.py +0 -0
  14. {pypck-0.8.6 → pypck-0.8.8}/pypck/lcn_addr.py +0 -0
  15. {pypck-0.8.6 → pypck-0.8.8}/pypck/lcn_defs.py +0 -0
  16. {pypck-0.8.6 → pypck-0.8.8}/pypck/module.py +0 -0
  17. {pypck-0.8.6 → pypck-0.8.8}/pypck/request_handlers.py +0 -0
  18. {pypck-0.8.6 → pypck-0.8.8}/pypck/timeout_retry.py +0 -0
  19. {pypck-0.8.6 → pypck-0.8.8}/pypck.egg-info/SOURCES.txt +0 -0
  20. {pypck-0.8.6 → pypck-0.8.8}/pypck.egg-info/dependency_links.txt +0 -0
  21. {pypck-0.8.6 → pypck-0.8.8}/pypck.egg-info/not-zip-safe +0 -0
  22. {pypck-0.8.6 → pypck-0.8.8}/pypck.egg-info/top_level.txt +0 -0
  23. {pypck-0.8.6 → pypck-0.8.8}/pyproject.toml +0 -0
  24. {pypck-0.8.6 → pypck-0.8.8}/setup.cfg +0 -0
  25. {pypck-0.8.6 → pypck-0.8.8}/tests/test_connection.py +0 -0
  26. {pypck-0.8.6 → pypck-0.8.8}/tests/test_dyn_text.py +0 -0
  27. {pypck-0.8.6 → pypck-0.8.8}/tests/test_vars.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypck
3
- Version: 0.8.6
3
+ Version: 0.8.8
4
4
  Summary: LCN-PCK library
5
5
  Home-page: https://github.com/alengwenus/pypck
6
6
  Author-email: Andre Lengwenus <alengwenus@gmail.com>
pypck-0.8.8/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.8.8
@@ -1173,7 +1173,7 @@ class ModStatusMotorPositionModule(ModInput):
1173
1173
  ModStatusMotorPositionModule(
1174
1174
  addr,
1175
1175
  int(motor) - 1,
1176
- float(position),
1176
+ 100 - float(position),
1177
1177
  )
1178
1178
  ]
1179
1179
 
@@ -571,16 +571,18 @@ class PckGenerator:
571
571
  raise ValueError("Wrong motor position mode")
572
572
 
573
573
  if mode == lcn_defs.MotorPositioningMode.BS4:
574
- if state not in [
575
- lcn_defs.MotorStateModifier.UP,
576
- lcn_defs.MotorStateModifier.DOWN,
577
- ]:
574
+ new_motor_id = [1, 2, 5, 6][motor_id]
575
+ if state == lcn_defs.MotorStateModifier.DOWN:
576
+ # AU=window open / cover down
577
+ action = "AU"
578
+ elif state == lcn_defs.MotorStateModifier.UP:
579
+ # ZU=window close / cover up
580
+ action = "ZU"
581
+ elif state == lcn_defs.MotorStateModifier.STOP:
582
+ action = "ST"
583
+ else:
578
584
  raise ValueError("Invalid motor state for BS4 mode")
579
585
 
580
- new_motor_id = [1, 2, 5, 6][motor_id]
581
- # AU=window open / cover down
582
- # ZU=window close / cover up
583
- action = "AU" if state == lcn_defs.MotorStateModifier.DOWN else "ZU"
584
586
  return f"R8M{new_motor_id}{action}"
585
587
 
586
588
  # lcn_defs.MotorPositioningMode.NONE
@@ -643,7 +645,7 @@ class PckGenerator:
643
645
  return f"R8M{new_motor_id}{action}"
644
646
  elif mode == lcn_defs.MotorPositioningMode.MODULE:
645
647
  new_motor_id = 1 << motor_id
646
- return f"JH{position:03d}{new_motor_id:03d}"
648
+ return f"JH{100 - position:03d}{new_motor_id:03d}"
647
649
 
648
650
  return ""
649
651
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypck
3
- Version: 0.8.6
3
+ Version: 0.8.8
4
4
  Summary: LCN-PCK library
5
5
  Home-page: https://github.com/alengwenus/pypck
6
6
  Author-email: Andre Lengwenus <alengwenus@gmail.com>
@@ -210,6 +210,24 @@ COMMANDS = {
210
210
  0,
211
211
  MotorStateModifier.CYCLE,
212
212
  ),
213
+ "R8M1ZU": (
214
+ PckGenerator.control_motor_relays,
215
+ 0,
216
+ MotorStateModifier.UP,
217
+ MotorPositioningMode.BS4,
218
+ ),
219
+ "R8M2AU": (
220
+ PckGenerator.control_motor_relays,
221
+ 1,
222
+ MotorStateModifier.DOWN,
223
+ MotorPositioningMode.BS4,
224
+ ),
225
+ "R8M5ST": (
226
+ PckGenerator.control_motor_relays,
227
+ 2,
228
+ MotorStateModifier.STOP,
229
+ MotorPositioningMode.BS4,
230
+ ),
213
231
  "R8M1GP200": (
214
232
  PckGenerator.control_motor_relays_position,
215
233
  0,
@@ -236,10 +254,10 @@ COMMANDS = {
236
254
  50,
237
255
  MotorPositioningMode.MODULE,
238
256
  ),
239
- "JH100004": (
257
+ "JH030004": (
240
258
  PckGenerator.control_motor_relays_position,
241
259
  2,
242
- 100,
260
+ 70,
243
261
  MotorPositioningMode.MODULE,
244
262
  ),
245
263
  "X2001228000": (
@@ -261,11 +261,11 @@ MESSAGES = {
261
261
  ),
262
262
  ],
263
263
  # Status motor position via module
264
- ":M000010P1050": [
264
+ ":M000010P1070": [
265
265
  (
266
266
  ModStatusMotorPositionModule,
267
267
  0,
268
- 50,
268
+ 30,
269
269
  )
270
270
  ],
271
271
  # SKH
pypck-0.8.6/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.8.6
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes