Closed ab10002 closed 1 year ago
Like the open and close cmd's, i miss the my/stop in the plugin Op 23-7-2022 14:23:36, Jan-Jaap Kostelijk @.> schreef: Hi @ab10002 [https://github.com/ab10002] , This is too little to work with, please describe what it is that you want to have changes or is not working as expected. — Reply to this email directly, view it on GitHub [https://github.com/MadPatrick/somfy/issues/8#issuecomment-1193117061], or unsubscribe [https://github.com/notifications/unsubscribe-auth/ATHORREZKNUWFJQUT254GRTVVPP4PANCNFSM54N4RCQQ]. You are receiving this because you were mentioned.Message ID: @.> [8818a21f-4ab2-42b0-9e2c-c8dc29b33938]
OK, I do not have a Somfy thing so I need a very extensive description of what you expect as behavior then I'll see if it can be built.
I'll try.. Like the Somfy remote control, the Domoticz light/switch "blinds +stop" has a stop icon. I'v tried but the plugin/tahoma don't recognized sending "stopped". So m.o. the pluging need a command sending stopped..
Log: 2022-07-26 11:47:25,257 - INFO - tahoma.py - Sending command to tahoma api 2022-07-26 11:47:25,298 - ERROR - tahoma.py - error during command, status: 400, possible cause:{'errorCode': 'FIELD_NOT_SET', 'error': 'Command name not set'}
Add'd these "BOLD" lines; if (str(Command) == "Off"): commands["name"] = "close" elif (str(Command) == "On"): commands["name"] = "open" elif (str(Command) == "Stop"): commands["name"] = "my" elif ("Set Level" in str(Command)): commands["name"] = "setClosure" tmp = 100 - int(Level) params.append(tmp) commands["parameters"] = params
And that works. Only for stop, need to change my in stop..
I've tried the proposed change, but i'm getting an error
2022-07-26 16:19:50.291 Error: Somfy: (tahomaIO) failed to load 'plugin.py', Python Path used was '/var/domoticz/plugins/somfy/:/usr/lib64/python36.zip:/usr/lib64/python3.6:/usr/lib64/python3.6:/usr/lib64/python3.6/lib-dynload:/usr/local/lib64/python3.6/site-packages:/usr/local/lib/python3.6/site-packages:/usr/lib64/python3.6/site-packages:/usr/lib/python3.6/site-packages'. 2022-07-26 16:19:50.291 Error: Somfy: Module Import failed, exception: 'SyntaxError' 2022-07-26 16:19:50.291 Error: Somfy: Import detail: File: , Line: 138, offset: 4 2022-07-26 16:19:50.291 Error: Somfy: Error Line 'elif (str(Command) == "Stop"):
Which version of the plugin are you using?
How? But maybe a timeout must set longer Op 26-7-2022 16:21:11, MadPatrick @.> schreef: I've tried the proposed change, but i'm getting an error 2022-07-26 16:19:50.291 Error: Somfy: (tahomaIO) failed to load 'plugin.py', Python Path used was '/var/domoticz/plugins/somfy/:/usr/lib64/python36.zip:/usr/lib64/python3.6:/usr/lib64/python3.6:/usr/lib64/python3.6/lib-dynload:/usr/local/lib64/python3.6/site-packages:/usr/local/lib/python3.6/site-packages:/usr/lib64/python3.6/site-packages:/usr/lib/python3.6/site-packages'. 2022-07-26 16:19:50.291 Error: Somfy: Module Import failed, exception: 'SyntaxError' 2022-07-26 16:19:50.291 Error: Somfy: Import detail: File: , Line: 138, offset: 4 2022-07-26 16:19:50.291 Error: Somfy: Error Line 'elif (str(Command) == "Stop"): — Reply to this email directly, view it on GitHub [https://github.com/MadPatrick/somfy/issues/8#issuecomment-1195549225], or unsubscribe [https://github.com/notifications/unsubscribe-auth/ATHORRGURJ46YSXLMF6H7RDVV7X5NANCNFSM54N4RCQQ]. You are receiving this because you were mentioned.Message ID: @.> [16a96541-c0ea-43be-8835-ce23d4be4ec5]
The plugin is not loading because of this change. the error comes directly at start up of the script
Which line (how) can i test that?
I've added line as you have proposed in previous comment
elif (str(Command) == "Stop"):
commands["name"] = "my"
This change is made in plugin.py
@MadPatrick it should look like this:
Mind that in Python the whitespace in front of the line is important. Needs to be nicely aligned. Although that does not seem to be this issue as the interpreter would have complained about indent error.
@MadPatrick it should look like this:
Mind that in Python the whitespace in front of the line is important. Needs to be nicely aligned. Although that does not seem to be this issue as the interpreter would have complained about indent error.
yep
I've tried it and aligned everything, but no luck I'm still getting the error on both my testserver and production server
Hi, So for my velux io system, i try this and it s work perfect:
Hi All,
I've found the error. I used TAB for spacing instead of SPACES.
Script with the STOP addition is working. Be aware that as default the switch is made "Blinds Percentage Inverted" This switch is kind of dimmer without STOP function
I'v reversed close/open cmd's in plugin.py. Now it's acting normal.
I'm changed one more line, sending level command''s is now working okay. Not displaying in Domoticz, that's seemed to be a bug in Domoticz..
elif ("Set Level" in str(Command)):
commands["name"] = "setClosure"
-# tmp = 100 - int(Level) tmp = int(Level)
Hi I see the same problem, what is your version of domoticz (stable or beta).
Latest beta 14438
OK, i have testing bêta version Last week. And the buttons are inversed, and the picture open close doesnt work correctly at home.
Finaly i return to the version stable...
I think, that à good idea for adapt whith different button
Hi @ab10002 ,
This is too little to work with, please describe what it is that you want to have changes or is not working as expected.