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

Dual R3 in engine mode #421

Open
JacekKac opened this issue Aug 11, 2022 · 0 comments
Open

Dual R3 in engine mode #421

JacekKac opened this issue Aug 11, 2022 · 0 comments

Comments

@JacekKac
Copy link

  • pySonoffLAN version:
  • Python version:
  • Operating System:

Description

Please add the possibility to control Dual R3 in engine mode.

3 parameters: "currLocation":0,"motorTurn":2}.
motorTurn 0 is for STOP command, 1 is for OPEN, 2 is for CLOSE. location 0-100

What I Did

logs:

 pysonofflanr3 --device_id 1001556e33 -l DEBUG --api_key  _hidden_ listen
2022-08-11 15:02:20,009 - info: Initialising SonoffSwitch with host None
2022-08-11 15:02:20,010 - debug: Initializing SonoffLANModeClient class in SonoffDevice
2022-08-11 15:02:20,012 - debug: enter send_availability_loop()
2022-08-11 15:02:20,012 - debug: waiting for connection
2022-08-11 15:02:20,013 - debug: send_updated_params_loop is active on the event loop
2022-08-11 15:02:20,014 - debug: Starting loop waiting for device params to change
2022-08-11 15:02:20,014 - debug: send_updated_params_loop now awaiting event
2022-08-11 15:02:20,214 - info: Service type _ewelink._tcp.local. of name eWeLink_1001556e33._ewelink._tcp.local. added
2022-08-11 15:02:20,215 - debug: service is at http://192.168.0.59:8081
2022-08-11 15:02:20,216 - debug: properties: {b'data1': b'vTgW4DX3CHbF59qv/UR07eu33XPC4GRJVaILp/jzGhY=', b'seq': b'16', b'iv': b'Mzc4MTg4MDkyNzUwNjgzNw==', b'encrypt': b'true', b'apivers': b'1', b'type': b'multifun_switch', b'id': b'1001556e33', b'txtvers': b'1'}
2022-08-11 15:02:20,216 - debug: type: b'multifun_switch'
2022-08-11 15:02:20,217 - debug: decrypted data: b'{"currLocation":0,"location":0}'
2022-08-11 15:02:20,218 - debug: enter handle_message() b'{"currLocation":0,"location":0}'
2022-08-11 15:02:20,218 - error: Unknown message received from device:
2022-08-11 15:02:20,219 - error: Unexpected error in handle_message() for device 1001556e33: Unknown message received from device Traceback (most recent call last):
2022-08-11 15:02:20,219 - error:   File "/home/pi/.local/lib/python3.7/site-packages/pysonofflanr3/sonoffdevice.py", line 330, in handle_message
2022-08-11 15:02:20,219 - error:     raise Exception("Unknown message received from device")
2022-08-11 15:02:20,219 - error: Exception: Unknown message received from device
2022-08-11 15:03:06,603 - debug: service is at http://192.168.0.59:8081
2022-08-11 15:03:06,603 - debug: properties: {b'data1': b'I1JU/NXANco+HHL6kk4dkQnQiZcTl1mtoZOvHNyy/MPAOdtSemGS7/qX5DB1Qvu7', b'seq': b'20', b'iv': b'NjE4MDU5NDcxNjI1NTIxMw==', b'encrypt': b'true', b'apivers': b'1', b'type': b'multifun_switch', b'id': b'1001556e33', b'txtvers': b'1'}
2022-08-11 15:03:06,604 - debug: type: b'multifun_switch'
2022-08-11 15:03:06,605 - debug: decrypted data: b'{"currLocation":0,"location":0,"motorTurn":0}'
2022-08-11 15:03:06,606 - debug: enter handle_message() b'{"currLocation":0,"location":0,"motorTurn":0}'
2022-08-11 15:03:06,607 - error: Unknown message received from device:
2022-08-11 15:03:06,608 - error: Unexpected error in handle_message() for device 1001556e33: Unknown message received from device Traceback (most recent call last):
2022-08-11 15:03:06,608 - error:   File "/home/pi/.local/lib/python3.7/site-packages/pysonofflanr3/sonoffdevice.py", line 330, in handle_message
2022-08-11 15:03:06,608 - error:     raise Exception("Unknown message received from device")
2022-08-11 15:03:06,608 - error: Exception: Unknown message received from device
2022-08-11 15:03:11,109 - debug: service is at http://192.168.0.59:8081
2022-08-11 15:03:11,109 - debug: properties: {b'data1': b'cqvHsbybnzGed6KmXsj0A+XRq467u0vG5lpm0vZkxFqX9dSHBsAHV9FNRbvEb5ky', b'seq': b'21', b'iv': b'Mzg0OTUyODAwNTQ3NjM1NA==', b'encrypt': b'true', b'apivers': b'1', b'type': b'multifun_switch', b'id': b'1001556e33', b'txtvers': b'1'}
2022-08-11 15:03:11,110 - debug: type: b'multifun_switch'
2022-08-11 15:03:11,111 - debug: decrypted data: b'{"currLocation":0,"location":0,"motorTurn":0}'
2022-08-11 15:03:11,112 - debug: enter handle_message() b'{"currLocation":0,"location":0,"motorTurn":0}'
2022-08-11 15:03:11,113 - error: Unknown message received from device:
2022-08-11 15:03:11,113 - error: Unexpected error in handle_message() for device 1001556e33: Unknown message received from device Traceback (most recent call last):
2022-08-11 15:03:11,113 - error:   File "/home/pi/.local/lib/python3.7/site-packages/pysonofflanr3/sonoffdevice.py", line 330, in handle_message
2022-08-11 15:03:11,113 - error:     raise Exception("Unknown message received from device")
2022-08-11 15:03:11,113 - error: Exception: Unknown message received from device
2022-08-11 15:03:14,489 - debug: service is at http://192.168.0.59:8081
2022-08-11 15:03:14,489 - debug: properties: {b'data1': b'kPqLTz7LhwH0Fr17o+wQWtP2RIhQOM8gCLR8+THDWfThg4FRIS9Meo1fkk0xXc2P', b'seq': b'22', b'iv': b'MjYyNDAyMTYyMTk1ODkxNA==', b'encrypt': b'true', b'apivers': b'1', b'type': b'multifun_switch', b'id': b'1001556e33', b'txtvers': b'1'}
2022-08-11 15:03:14,490 - debug: type: b'multifun_switch'
2022-08-11 15:03:14,491 - debug: decrypted data: b'{"currLocation":0,"motorTurn":2}'
2022-08-11 15:03:14,493 - debug: enter handle_message() b'{"currLocation":0,"motorTurn":2}'
2022-08-11 15:03:14,493 - error: Unknown message received from device:
2022-08-11 15:03:14,494 - error: Unexpected error in handle_message() for device 1001556e33: Unknown message received from device Traceback (most recent call last):
2022-08-11 15:03:14,494 - error:   File "/home/pi/.local/lib/python3.7/site-packages/pysonofflanr3/sonoffdevice.py", line 330, in handle_message
2022-08-11 15:03:14,494 - error:     raise Exception("Unknown message received from device")
2022-08-11 15:03:14,494 - error: Exception: Unknown message received from device
2022-08-11 15:03:17,663 - debug: service is at http://192.168.0.59:8081
2022-08-11 15:03:17,664 - debug: properties: {b'data1': b'V/OdqY02oNdkHW1j1pg4x4nGkIpPGM/ZoqOAPjR+16jnUgiAEO3iT2ZzLriiRuU+', b'seq': b'23', b'iv': b'NDIxNDk0NDM3ODYwODExOA==', b'encrypt': b'true', b'apivers': b'1', b'type': b'multifun_switch', b'id': b'1001556e33', b'txtvers': b'1'}
2022-08-11 15:03:17,665 - debug: type: b'multifun_switch'
2022-08-11 15:03:17,666 - debug: decrypted data: b'{"currLocation":0,"motorTurn":1}'
2022-08-11 15:03:17,667 - debug: enter handle_message() b'{"currLocation":0,"motorTurn":1}'
2022-08-11 15:03:17,667 - error: Unknown message received from device:
2022-08-11 15:03:17,668 - error: Unexpected error in handle_message() for device 1001556e33: Unknown message received from device Traceback (most recent call last):
2022-08-11 15:03:17,668 - error:   File "/home/pi/.local/lib/python3.7/site-packages/pysonofflanr3/sonoffdevice.py", line 330, in handle_message
2022-08-11 15:03:17,668 - error:     raise Exception("Unknown message received from device")
2022-08-11 15:03:17,668 - error: Exception: Unknown message received from device
2022-08-11 15:03:19,916 - debug: service is at http://192.168.0.59:8081
2022-08-11 15:03:19,916 - debug: properties: {b'data1': b'gB3VnB06FpZMAKQxvASzfJXjCkMxxUcTPvkafdkS/RAC80QfbhGyRUxTI60COhJV', b'seq': b'25', b'iv': b'NjQwNzU1MTE4MjY0NzE2NQ==', b'encrypt': b'true', b'apivers': b'1', b'type': b'multifun_switch', b'id': b'1001556e33', b'txtvers': b'1'}
2022-08-11 15:03:19,917 - debug: type: b'multifun_switch'
2022-08-11 15:03:19,919 - debug: decrypted data: b'{"currLocation":0,"location":0,"motorTurn":0}'
2022-08-11 15:03:19,921 - debug: enter handle_message() b'{"currLocation":0,"location":0,"motorTurn":0}'
2022-08-11 15:03:19,922 - error: Unknown message received from device:
2022-08-11 15:03:19,923 - error: Unexpected error in handle_message() for device 1001556e33: Unknown message received from device Traceback (most recent call last):
2022-08-11 15:03:19,923 - error:   File "/home/pi/.local/lib/python3.7/site-packages/pysonofflanr3/sonoffdevice.py", line 330, in handle_message
2022-08-11 15:03:19,923 - error:     raise Exception("Unknown message received from device")
2022-08-11 15:03:19,923 - error: Exception: Unknown message received from device
2022-08-11 15:03:25,754 - debug: service is at http://192.168.0.59:8081
2022-08-11 15:03:25,754 - debug: properties: {b'data1': b'B3vXNbXGNbI6nVyQCbvJUr9fzUtR2M/TLYWjZ32Ih09sHJ9WDy/uolYJcGI8dImB', b'seq': b'26', b'iv': b'NjAwNzgwODQ4MjAxMTMyOQ==', b'encrypt': b'true', b'apivers': b'1', b'type': b'multifun_switch', b'id': b'1001556e33', b'txtvers': b'1'}
2022-08-11 15:03:25,755 - debug: type: b'multifun_switch'
2022-08-11 15:03:25,756 - debug: decrypted data: b'{"currLocation":0,"motorTurn":1}'
2022-08-11 15:03:25,758 - debug: enter handle_message() b'{"currLocation":0,"motorTurn":1}'
2022-08-11 15:03:25,758 - error: Unknown message received from device:
2022-08-11 15:03:25,759 - error: Unexpected error in handle_message() for device 1001556e33: Unknown message received from device Traceback (most recent call last):
2022-08-11 15:03:25,759 - error:   File "/home/pi/.local/lib/python3.7/site-packages/pysonofflanr3/sonoffdevice.py", line 330, in handle_message
2022-08-11 15:03:25,759 - error:     raise Exception("Unknown message received from device")
2022-08-11 15:03:25,759 - error: Exception: Unknown message received from device
2022-08-11 15:03:40,907 - debug: service is at http://192.168.0.59:8081
2022-08-11 15:03:40,908 - debug: properties: {b'data1': b'9bo1tiTXR567mAyTD1eyAmVYETYQ943Qesy7LdyE4GvBgm7xLSsP8d19Z4vYAcq0', b'seq': b'27', b'iv': b'MzU3MTM4NjY1NjAxNzk3MQ==', b'encrypt': b'true', b'apivers': b'1', b'type': b'multifun_switch', b'id': b'1001556e33', b'txtvers': b'1'}
2022-08-11 15:03:40,909 - debug: type: b'multifun_switch'
2022-08-11 15:03:40,910 - debug: decrypted data: b'{"currLocation":0,"location":0,"motorTurn":0}'
2022-08-11 15:03:40,911 - debug: enter handle_message() b'{"currLocation":0,"location":0,"motorTurn":0}'
2022-08-11 15:03:40,912 - error: Unknown message received from device:
2022-08-11 15:03:40,913 - error: Unexpected error in handle_message() for device 1001556e33: Unknown message received from device Traceback (most recent call last):
2022-08-11 15:03:40,913 - error:   File "/home/pi/.local/lib/python3.7/site-packages/pysonofflanr3/sonoffdevice.py", line 330, in handle_message
2022-08-11 15:03:40,913 - error:     raise Exception("Unknown message received from device")
2022-08-11 15:03:40,913 - error: Exception: Unknown message received from device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant