MadPatrick / somfy

Tahoma/Conexoon plugin for IO blinds, this plugin require internet connexion and a Somfy account
GNU General Public License v3.0
14 stars 3 forks source link

Connexoon blinds do not update themselves #29

Closed Tatroxitum closed 1 year ago

Tatroxitum commented 1 year ago

I've got several blinds connected to the connexoon (so web API) in version 4.1.8

(i've updated from version 2.0.8 to 4.1.8 today by removing all devices, deleting somfy device, git pull, restarted domoticz and creating new devices as written in README)

When controlled by Domoticz, all commands works (open, close, set percentage). But there is no return of the states.

When waiting for the update i've got (for example) : 2022-11-20 10:38:14,090 - DEBUG - plugin.py - Polling unit in 3 heartbeats. 2022-11-20 10:38:15,093 - DEBUG - plugin.py - Polling unit in 2 heartbeats. 2022-11-20 10:38:16,096 - DEBUG - plugin.py - Polling unit in 1 heartbeats. 2022-11-20 10:38:17,051 - DEBUG - plugin.py - Poll unit 2022-11-20 10:38:17,052 - DEBUG - tahoma.py - checking logged in status: self.logged_in = True and self.__expiry_date >= datetime.datetime.now() = True 2022-11-20 10:38:17,053 - DEBUG - tahoma.py - checking logged in status: self.logged_in = True and self.expiry_date >= datetime.datetime.now() = True 2022-11-20 10:38:17,053 - DEBUG - tahoma.py - start get events 2022-11-20 10:38:17,054 - DEBUG - listener.py - listener vald: self.__listener_expiry = 2022-11-20 11:06:10 self.valid = True 2022-11-20 10:38:17,065 - DEBUG - connectionpool.py - Starting new HTTPS connection (1): tahomalink.com:443 2022-11-20 10:38:17,227 - DEBUG - connectionpool.py - https://tahomalink.com:443 "POST /enduser-mobile-web/enduserAPI/events/94653029-ac10-3e01-11e7-b11abef1efdb/fetch HTTP/1.1" 401 66 2022-11-20 10:38:17,235 - DEBUG - tahoma.py - get events response: status '401' response body: '<Response [401]>' 2022-11-20 10:38:17,240 - ERROR - tahoma.py - error during get events, status: 401, {"errorCode":"RESOURCE_ACCESS_DENIED","error":"Not authenticated"} 2022-11-20 10:38:18,093 - DEBUG - plugin.py - Polling unit in 299 heartbeats. And so on. Polling is done by default every 5 minutes.

Domoticz Version: 2022.2 Build Hash: eea9db734 Compile Date: 2022-11-05 13:05:35 dzVents Version: 3.1.8 Python Version: 3.7.3 (default, Oct 31 2022, 14:04:00) [GCC 8.3.0]

Tatroxitum commented 1 year ago

after some time i've got now : 2022-11-20 11:13:18.079 Status: Connexoon: Too many connections waiting before authenticating again Despite i've not sent commands since 10:30, there's only the polling running.

JanJaapKo commented 1 year ago

OK, I would need the full log from start of the plugin to the error starting to appear. In the mean time: I realised I left the timeout to refresh the listener on 30 minutes (which is too long) from a test from some time ago, so I updated that. However, when polling every 5 minutes, this should not have been an issue.

So can you pull new version, and post the logging from the beginning? Can be as attachment or paste here (mind to replace your pin with zero's).

Tatroxitum commented 1 year ago

Thanks, new version pulled. somfy.log Same issue : no update (as you wondered) One more thing : on startup the current status of the stores is not gotten : the status shown in domoticz is not the current state of the stores.

JanJaapKo commented 1 year ago

Hey,

I quickly checked the log. Interesting to see is that at startup the get_events call works ok, but it fails at the first attempt from onHeartbeat (the polling).

One more request: can you actually control your shutters? So it would be interesting if you can restart the plugin, wait a bit then send a command to open or close a shutter and see what happens? And again please submit the log file like you did yesterday.

I'll have a further look tonight.

JanJaapKo commented 1 year ago

So I pushed version 4.1.10 with an update to the authentication check. I made something to check if you're still logged in based on behavior of the local connection to the Tahoma box. Which may not work for Connexxoon. Could you give it a try? With also the previous requests in mind?

Tatroxitum commented 1 year ago

Pulled and restarted at 20:00:05 Command open at 20:00:24 first polling at : 20:05:06 somfy.log

In domoticz logs this error appears : 2022-11-22 20:05:06.304 Error: Connexoon: Traceback (most recent call last): 2022-11-22 20:05:06.304 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 295, in onHeartbeat 2022-11-22 20:05:06.304 Error: Connexoon: event_list = self.tahoma.get_events() 2022-11-22 20:05:06.305 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/tahoma.py", line 130, in get_events 2022-11-22 20:05:06.305 Error: Connexoon: raise exceptions.NoListenerFailure() 2022-11-22 20:05:06.305 Error: Connexoon: exceptions.NoListenerFailure: Trying to fetch events without listener registered 2022-11-22 20:05:06.305 Error: Connexoon: 2022-11-22 20:05:06.305 Error: Connexoon: During handling of the above exception, another exception occurred: 2022-11-22 20:05:06.305 Error: Connexoon: 2022-11-22 20:05:06.305 Error: Connexoon: Traceback (most recent call last): 2022-11-22 20:05:06.305 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 579, in onHeartbeat 2022-11-22 20:05:06.305 Error: Connexoon: _plugin.onHeartbeat() 2022-11-22 20:05:06.305 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 301, in onHeartbeat 2022-11-22 20:05:06.305 Error: Connexoon: self.tahoma.register_listener() #register a new listener 2022-11-22 20:05:06.305 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/tahoma.py", line 165, in register_listener 2022-11-22 20:05:06.305 Error: Connexoon: raise exceptions.TahomaException("Not logged in") 2022-11-22 20:05:06.305 Error: Connexoon: exceptions.TahomaException: Not logged in

Tatroxitum commented 1 year ago

Nevermind, I didn't restarted domoticz. (version 4.1.8 in logs). I'll redo that

Le mar. 22 nov. 2022, 18:29, Jan-Jaap Kostelijk @.***> a écrit :

So I pushed version 4.1.10 with an update to the authentication check. I made something to check if you're still logged in based on behavior of the local connection to the Tahoma box. Which may not work for Connexxoon. Could you give it a try? With also the previous requests in mind?

— Reply to this email directly, view it on GitHub https://github.com/MadPatrick/somfy/issues/29#issuecomment-1324019435, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGVKL772BM3OJV75WK6JWWDWJT7GNANCNFSM6AAAAAASFYLJF4 . You are receiving this because you authored the thread.Message ID: @.***>

JanJaapKo commented 1 year ago

Well did that help? Normally it will only update the plugin version registration, not the code itself. So just a pull and restart of the plugin (by update on the HW page of Domoticz) would already start the new code. Anyhow, that exception above was meant to be caught by the plugin and not escalate like that.... I'll check that out. -> so I see what happened. Just pushed next version, please give it a try?

Btw: did your shutter actually move on the command?

Tatroxitum commented 1 year ago

without restarting domoticz, the command was received by the device. But after restarting domoticz, command are not received. 2022-11-22 20:54:37.066 Error: Connexoon: Call to function 'onCommand' failed, exception details: 2022-11-22 20:54:37.069 Error: Connexoon: Traceback (most recent call last): 2022-11-22 20:54:37.069 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 571, in onCommand 2022-11-22 20:54:37.069 Error: Connexoon: _plugin.onCommand(DeviceId, Unit, Command, Level, Color) 2022-11-22 20:54:37.069 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 266, in onCommand 2022-11-22 20:54:37.070 Error: Connexoon: self.tahoma.send_command(self.command_data) 2022-11-22 20:54:37.070 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/tahoma.py", line 204, in send_command 2022-11-22 20:54:37.070 Error: Connexoon: self.handle_response(response, "send command") 2022-11-22 20:54:37.070 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/tahoma.py", line 218, in handle_response 2022-11-22 20:54:37.070 Error: Connexoon: raise exceptions.TahomaException("failed request during "+ action + ", check credentials: " + str(response.status_code)) 2022-11-22 20:54:37.070 Error: Connexoon: exceptions.TahomaException: failed request during send command, check credentials: 401 somfy.log

I'll now try next version

Tatroxitum commented 1 year ago

Thanks for the support by the way :) same behavior : somfy.log with error on command 2022-11-22 22:15:07.214 Error: Connexoon: Call to function 'onCommand' failed, exception details: 2022-11-22 22:15:07.218 Error: Connexoon: Traceback (most recent call last): 2022-11-22 22:15:07.218 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 572, in onCommand 2022-11-22 22:15:07.218 Error: Connexoon: _plugin.onCommand(DeviceId, Unit, Command, Level, Color) 2022-11-22 22:15:07.218 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 266, in onCommand 2022-11-22 22:15:07.218 Error: Connexoon: self.tahoma.send_command(self.command_data) 2022-11-22 22:15:07.218 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/tahoma.py", line 204, in send_command 2022-11-22 22:15:07.218 Error: Connexoon: self.handle_response(response, "send command") 2022-11-22 22:15:07.218 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/tahoma.py", line 218, in handle_response 2022-11-22 22:15:07.218 Error: Connexoon: raise exceptions.TahomaException("failed request during "+ action + ", check credentials: " + str(response.status_code)) 2022-11-22 22:15:07.218 Error: Connexoon: exceptions.TahomaException: failed request during send command, check credentials: 401

and now on each heartbeat : (every 1 second) : 2022-11-22 22:35:47.082 Error: Connexoon: Call to function 'onHeartbeat' failed, exception details: 2022-11-22 22:35:47.084 Error: Connexoon: Traceback (most recent call last): 2022-11-22 22:35:47.084 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 580, in onHeartbeat 2022-11-22 22:35:47.084 Error: Connexoon: _plugin.onHeartbeat() 2022-11-22 22:35:47.084 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 295, in onHeartbeat 2022-11-22 22:35:47.084 Error: Connexoon: event_list = self.tahoma.get_events() 2022-11-22 22:35:47.084 Error: Connexoon: File "/home/pi/domoticz/plugins/somfy/tahoma.py", line 114, in get_events 2022-11-22 22:35:47.084 Error: Connexoon: raise exceptions.TahomaException("No listenerId has been provided")

Chaussette23 commented 1 year ago

I'm checking this problem as I have it too (Connexoon).

First thing, there is a commented line which shouldn't be commenter un plugin.py near line 367 :

                    if ((state["name"] == "core:ClosureState") or (state["name"] == "core:DeploymentState")):
                        **level = int(state["value"])**
                        level = 100 - level #invert open/clsoe percentage
                        status_num = 1

However, this is not enough, as it seems there is two additional problems :

Chaussette23 commented 1 year ago

I add a general question for @MadPatrick and @JanJaapKo : I don't know if this plugin works perfectly with Tahoma in Web version, as I only have a Connexoon. If this plugins works well with Tahoma in Web version and regarding needed changes to make it work with Connexoon, maybe a distinct project should be made ?

JanJaapKo commented 1 year ago
Tatroxitum commented 1 year ago
  • he current state of shutters is not grabbed at the plugin start. I checked quickly and the state of all devices is provided during the first connection but it's quite far in the data

I confirm, with the last version (4.1.19) and by setting "refresh intervall" to "1m" I do not have anymore errors on pooling : But no update as you :

022-11-30 22:12:01,077 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = True and self.__expiry_date (2022-12-06 22:08:02.331189) >= datetime.datetime.now() = True
2022-11-30 22:12:01,077 - DEBUG    - listener.py        - listener vald: self.__listener_expiry = 2022-11-30 22:11:01 self.__valid = False
2022-11-30 22:12:01,078 - DEBUG    - tahoma.py          - start register
2022-11-30 22:12:01,079 - DEBUG    - listener.py        - start register listener
2022-11-30 22:12:01,080 - DEBUG    - listener.py        - register request: self.headers_with_token: '{"Host": "tahomalink.com", "Connection": "keep-alive", "Accept-Encoding": "gzip, deflate", "Accept": "*/*", "Content-Type": "application/json", "Cookie": "JSESSIONID=XxxxX"}'
2022-11-30 22:12:01,090 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): tahomalink.com:443
2022-11-30 22:12:01,231 - DEBUG    - connectionpool.py  - https://tahomalink.com:443 "POST /enduser-mobile-web/enduserAPI/events/register HTTP/1.1" 200 None
2022-11-30 22:12:01,240 - DEBUG    - listener.py        - register response: status '200' response body: '<Response [200]>'
2022-11-30 22:12:01,245 - DEBUG    - listener.py        - succeeded to get listener ID: {'id': 'XxxxX'}
2022-11-30 22:12:01,247 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = True and self.__expiry_date (2022-12-06 22:08:02.331189) >= datetime.datetime.now() = True
2022-11-30 22:12:01,248 - DEBUG    - tahoma.py          - start get events
2022-11-30 22:12:01,249 - DEBUG    - listener.py        - listener vald: self.__listener_expiry = 2022-11-30 22:13:01 self.__valid = True
2022-11-30 22:12:01,255 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): tahomalink.com:443
2022-11-30 22:12:01,362 - DEBUG    - connectionpool.py  - https://tahomalink.com:443 "POST /enduser-mobile-web/enduserAPI/events/XxxxX/fetch HTTP/1.1" 200 None
2022-11-30 22:12:01,370 - DEBUG    - tahoma.py          - get events response: status '200' response body: '<Response [200]>'
2022-11-30 22:12:01,373 - DEBUG    - tahoma.py          - get_events: no DeviceStateChangedEvent found in response: []

the log "no DeviceStateChangedEvent found in response" is the same at startup of the plugin, so it seems the plugin tries to check for the changes but the somfy server do not send anything in return (response empty : []) ...

Tatroxitum commented 1 year ago

I found something interesting at start of the plugin : in fact the state of blinds is well retrieved :

2022-11-30 22:39:41,650 - DEBUG    - utils.py           - filter_devices: Device name: XxxxX Device class: RollerShutter
2022-11-30 22:39:41,651 - INFO     - utils.py           - supported device found: {'creationTime': 1617190742000, 'lastUpdateTime': 1617190742000, 'label': 'XxxxX', 'deviceURL': 'io://XxxxX/XxxxX', 'shortcut': False, 'controllableName': 'io:RollerShutterVeluxIOComponent', 'definition': {'commands': [{'commandName': 'advancedRefresh', 'nparams': 2}, {'commandName': 'close', 'nparams': 0}, {'commandName': 'delayedStopIdentify', 'nparams': 1}, {'commandName': 'down', 'nparams': 0}, {'commandName': 'getName', 'nparams': 0}, {'commandName': 'identify', 'nparams': 0}, {'commandName': 'my', 'nparams': 0}, {'commandName': 'open', 'nparams': 0}, {'commandName': 'refreshMemorized1Position', 'nparams': 0}, {'commandName': 'setClosure', 'nparams': 1}, {'commandName': 'setDeployment', 'nparams': 1}, {'commandName': 'setMemorized1Position', 'nparams': 1}, {'commandName': 'setName', 'nparams': 1}, {'commandName': 'setPosition', 'nparams': 1}, {'commandName': 'setSecuredPosition', 'nparams': 1}, {'commandName': 'startIdentify', 'nparams': 0}, {'commandName': 'stop', 'nparams': 0}, {'commandName': 'stopIdentify', 'nparams': 0}, {'commandName': 'up', 'nparams': 0}, {'commandName': 'wink', 'nparams': 1}, {'commandName': 'pairOneWayController', 'nparams': 2}, {'commandName': 'setConfigState', 'nparams': 1}, {'commandName': 'unpairAllOneWayControllers', 'nparams': 0}, {'commandName': 'unpairOneWayController', 'nparams': 2}], 'states': [{'type': 'ContinuousState', 'qualifiedName': 'core:ClosureState'}, {'type': 'DiscreteState', 'values': ['good', 'low', 'normal', 'verylow'], 'qualifiedName': 'core:DiscreteRSSILevelState'}, {'type': 'ContinuousState', 'qualifiedName': 'core:Memorized1PositionState'}, {'type': 'DataState', 'qualifiedName': 'core:NameState'}, {'type': 'DiscreteState', 'values': ['closed', 'open'], 'qualifiedName': 'core:OpenClosedState'}, {'type': 'ContinuousState', 'qualifiedName': 'core:PriorityLockTimerState'}, {'type': 'ContinuousState', 'qualifiedName': 'core:RSSILevelState'}, {'type': 'ContinuousState', 'qualifiedName': 'core:SecuredPositionState'}, {'type': 'DiscreteState', 'values': ['available', 'unavailable'], 'qualifiedName': 'core:StatusState'}, {'type': 'DiscreteState', 'values': ['comfortLevel1', 'comfortLevel2', 'comfortLevel3', 'comfortLevel4', 'environmentProtection', 'humanProtection', 'userLevel1', 'userLevel2'], 'qualifiedName': 'io:PriorityLockLevelState'}, {'type': 'DiscreteState', 'values': ['LSC', 'SAAC', 'SFC', 'UPS', 'externalGateway', 'localUser', 'myself', 'rain', 'security', 'temperature', 'timer', 'user', 'wind'], 'qualifiedName': 'io:PriorityLockOriginatorState'}], 'dataProperties': [{'value': '500', 'qualifiedName': 'core:identifyInterval'}], 'widgetName': 'PositionableTiltedRollerShutter', 'uiProfiles': ['StatefulCloseableShutter', 'StatefulCloseable', 'Closeable', 'StatefulOpenClose', 'OpenClose'], 'uiClass': 'RollerShutter', 'qualifiedName': 'io:RollerShutterVeluxIOComponent', 'type': 'ACTUATOR'}, 'states': [{'name': 'core:NameState', 'type': 3, 'value': 'XxxxX'}, {'name': 'core:PriorityLockTimerState', 'type': 1, 'value': 0}, {'name': 'core:StatusState', 'type': 3, 'value': 'available'}, {'name': 'core:DiscreteRSSILevelState', 'type': 3, 'value': 'good'}, {'name': 'core:RSSILevelState', 'type': 2, 'value': 88.0}, {'name': 'core:ClosureState', 'type': 1, 'value': 100}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'closed'}, {'name': 'core:Memorized1PositionState', 'type': 1, 'value': 0}], 'attributes': [{'name': 'core:FirmwareRevision', 'type': 3, 'value': '00000000000000000007'}, {'name': 'core:Manufacturer', 'type': 3, 'value': 'VELUX'}], 'available': True, 'enabled': True, 'placeOID': 'XxxxX', 'widget': 'PositionableTiltedRollerShutter', 'type': 1, 'oid': 'XxxxX', 'uiClass': 'RollerShutter'}

We can see here the 'core:ClosureState',...,'value': 100 => 100% closed, confirmed by the 'core:OpenClosedState',...,'value': 'closed' On startup the request URL is '/enduser-mobile-web/enduserAPI/setup/devices'

We can see here the 'core:ClosureState',...,'value': 100 => 100% closed, confirmed by the 'core:OpenClosedState',...,'value': 'closed' On startup the request URL is '/enduser-mobile-web/enduserAPI/setup/devices' On heartbeat the request url is '/enduser-mobile-web/enduserAPI/events/'

Maybe for the connexoon a solution is to request the "setup" status on heartbeat ? (and update domoticz accordingly) On heartbeat the request url is '/enduser-mobile-web/enduserAPI/events/'

Maybe for the connexoon a solution is to request the "setup" status on heartbeat ? (and update domoticz accordingly)

Chaussette23 commented 1 year ago

I will check that in few days, I won't be available until then. And yes, asking for the status (so refresh or status endpoints) each ~ 100 seconds would be perfect : that will keep the connection up and maintain a correct status of devices with a reasonnable delay.

JanJaapKo commented 1 year ago

Hi all,

Sorry for the delay, had other things to spend time on.....

I just pushed version 4.2.0 where I take the device list at startup to set the initial state. Can you test that it 1) doesn't cause errors 2) actually gets the new state?

If this works correctly we can use it also for regular updates. I read in the Somfy developers git that some people worried about the overload on the server, which would be a thing on the web server version (local shouldn't be an issue). As said, if this works out we can give it a try.

MadPatrick commented 1 year ago

Hi JanJaap,

No problem. Glad your could make time

When starting the plugin v4.20.0 I see this error

2022-12-31 14:04:33.029 Error: Somfy: Call to function 'onStart' failed, exception details:
2022-12-31 14:04:33.030 Error: Somfy: Traceback (most recent call last):
2022-12-31 14:04:33.030 Error: Somfy: File "/var/domoticz/plugins/somfy/plugin.py", line 559, in onStart
2022-12-31 14:04:33.030 Error: Somfy: _plugin.onStart()
2022-12-31 14:04:33.030 Error: Somfy: File "/var/domoticz/plugins/somfy/plugin.py", line 176, in onStart
2022-12-31 14:04:33.030 Error: Somfy: self.update_devices_status(filter_states(filtered_devices))
2022-12-31 14:04:33.030 Error: Somfy: NameError: name 'filter_states' is not defined
JanJaapKo commented 1 year ago

OK, small error. Should be fixed now. Can you retry?

MadPatrick commented 1 year ago

2022-12-31 17:20:27.223 Status: Somfy: Started. 2022-12-31 17:20:27.224 Status: Somfy: Entering work loop. 2022-12-31 17:20:27.473 Status: Somfy: Initialized version 4.2.1, author 'MadPatrick' 2022-12-31 17:20:27.475 Status: Somfy: Starting Tahoma blind plugin, logging to file /var/log/somfy/somfy.log 2022-12-31 17:20:28.461 Status: Somfy: Updating device:Kamer_Groot 2022-12-31 17:20:28.465 Status: Somfy: Updating device:Thomas_1 2022-12-31 17:20:28.468 Status: Somfy: Updating device:Erker_Deur 2022-12-31 17:20:28.470 Status: Somfy: Updating device:Erker_3 2022-12-31 17:20:28.473 Status: Somfy: Updating device:Erker_1 2022-12-31 17:20:28.475 Status: Somfy: Updating device:Thomas_2 2022-12-31 17:20:28.478 Status: Somfy: Updating device:Erker_2 2022-12-31 17:20:28.484 Status: Somfy: Updating device:Erker_5 2022-12-31 17:20:28.486 Status: Somfy: Updating device:Kamer_Klein 2022-12-31 17:20:28.489 Status: Somfy: Updating device:Slaapkamer 2022-12-31 17:20:28.541 Status: dzVents: Info: Handling events for: "Slaapkamer", value: "nil" 2022-12-31 17:20:28.541 Error: EventSystem: in /usr/share/domoticz/dzVents/runtime/dzVents.lua: /usr/share/domoticz/dzVents/runtime/EventHelpers.lua:454: attempt to concatenate a nil value (field 'hardwareName')

JanJaapKo commented 1 year ago

well that looks like it is not related to this change, is it? Looks like your dzVents script tries to do something it shouldn't? or did it work before this change?

MadPatrick commented 1 year ago

I agree. The blind worked. Bit intested it on a VM so it could be that the main server interfered. At least the error is disappeared. Will do some more tested the coming days.

ab10002 commented 1 year ago

From the scratch; latest domoticz beta and v4.2.1, smooth 👍

JanJaapKo commented 1 year ago

Closing this one as completed will use #33 to solve the update issue

Tatroxitum commented 1 year ago

Hello, Sorry for the delay, I just have tested the version 4.2.2 with conexoon box on official release of domoticz

At startup, I have in the logs :

2023-01-02 13:49:56,402 - DEBUG    - utils.py           - start filter states
2023-01-02 13:49:56,402 - DEBUG    - plugin.py          - updating device status self.tahoma.startup = False on num datasets: 3
2023-01-02 13:49:56,403 - DEBUG    - plugin.py          - updating device status on data: [{'deviceURL': 'io://xxx/xxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 0}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'open'}], 'name': 'DeviceState'}, {'deviceURL': 'io://xxx/xxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 52}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'open'}], 'name': 'DeviceState'}, {'deviceURL': 'io:///xxx/xxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 100}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'closed'}], 'name': 'DeviceState'}]
2023-01-02 13:49:56,403 - DEBUG    - plugin.py          - checking device updates for 3 filtered events
2023-01-02 13:49:56,403 - DEBUG    - plugin.py          - checking dataset: {'deviceURL': 'io://xxxx/xxxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 0}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'open'}], 'name': 'DeviceState'}
2023-01-02 13:49:56,404 - DEBUG    - plugin.py          - checking dataset: {'deviceURL': 'io://xxxx/xxxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 52}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'open'}], 'name': 'DeviceState'}
2023-01-02 13:49:56,404 - DEBUG    - plugin.py          - checking dataset: {'deviceURL': 'io://xxxx/xxxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 100}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'closed'}], 'name': 'DeviceState'}
2023-01-02 13:49:56,505 - DEBUG    - plugin.py          - Polling unit in 59 heartbeats.

So the plugin sees the rigth status (one open, one closed, one open at 48%). But the widgets in domoticz do not update themselves, they all stays in their current status (all full open)

Moreover, if i make a change on one blind and wait for an update, nothing is seen in the logs nor on the widgets :

2023-01-02 13:58:18,310 - DEBUG    - connectionpool.py  - https://tahomalink.com:443 "POST /enduser-mobile-web/enduserAPI/events/728fb2d7-98e4-e192-5738-df83b9a898ba/fetch HTTP/1.1" 200 None
2023-01-02 13:58:18,318 - DEBUG    - tahoma.py          - get events response: status '200' response body: '<Response [200]>'
2023-01-02 13:58:18,320 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = True and self.__expiry_date (2023-01-02 14:01:19.588073) >= datetime.datetime.now() = True
2023-01-02 13:58:18,321 - DEBUG    - tahoma.py          - get_events: no DeviceStateChangedEvent found in response: []
2023-01-02 13:58:19,073 - DEBUG    - plugin.py          - Polling unit in 59 heartbeats.

I can make more tests if needed. (By the way all commands works)

JanJaapKo commented 1 year ago

OK, I just pushed v 4.2.3 hopefully this fixes it. And some additional logging.

Tatroxitum commented 1 year ago

same behavior

At startup states are ok in the logs but the domoticz devices doesn't update themselves (all blinds are physically closed but the domoticz devices remaines full open)

2023-01-02 22:40:40,958 - DEBUG    - plugin.py          - create_devices: devices found, domoticz: 4 API: 4
2023-01-02 22:40:40,959 - DEBUG    - plugin.py          - New device(s) detected
2023-01-02 22:40:40,959 - DEBUG    - plugin.py          - create_devices: check if need to create device: Box
2023-01-02 22:40:40,960 - DEBUG    - plugin.py          - create_devices: step 2, do not create new device: Box, device already exists
2023-01-02 22:40:40,961 - DEBUG    - plugin.py          - create_devices: check if need to create device: IO xxxxx
2023-01-02 22:40:40,961 - DEBUG    - plugin.py          - create_devices: step 2, do not create new device: IO xxxxx, device already exists
2023-01-02 22:40:40,962 - DEBUG    - plugin.py          - create_devices: check if need to create device: IO xxxxx
2023-01-02 22:40:40,962 - DEBUG    - plugin.py          - create_devices: step 2, do not create new device: IO xxxxx, device already exists
2023-01-02 22:40:40,963 - DEBUG    - plugin.py          - create_devices: check if need to create device: IO xxxxx
2023-01-02 22:40:40,964 - DEBUG    - plugin.py          - create_devices: step 2, do not create new device: IO xxxxx, device already exists
2023-01-02 22:40:40,965 - DEBUG    - plugin.py          - create_devices: finished create devices
2023-01-02 22:40:40,965 - DEBUG    - utils.py           - start filter states
2023-01-02 22:40:40,966 - DEBUG    - plugin.py          - updating device status self.tahoma.startup = False on num datasets: 3
2023-01-02 22:40:40,966 - DEBUG    - plugin.py          - updating device status on data: [{'deviceURL': 'io://xxxxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 100}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'closed'}], 'name': 'DeviceState'}, {'deviceURL': 'io://xxxxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 100}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'closed'}], 'name': 'DeviceState'}, {'deviceURL': 'io://xxxxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 100}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'closed'}], 'name': 'DeviceState'}]
2023-01-02 22:40:40,967 - DEBUG    - plugin.py          - checking device updates for 3 filtered events
2023-01-02 22:40:40,968 - DEBUG    - plugin.py          - checking dataset: {'deviceURL': 'io://xxxxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 100}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'closed'}], 'name': 'DeviceState'}
2023-01-02 22:40:40,969 - DEBUG    - plugin.py          - checking for update on state[name]: 'core:ClosureState' with status_num = '1' for device: 'io://xxxxx'
2023-01-02 22:40:40,970 - DEBUG    - plugin.py          - checking for update on state[name]: 'core:OpenClosedState' with status_num = '0' for device: 'io://xxxxx'
2023-01-02 22:40:40,971 - DEBUG    - plugin.py          - checking dataset: {'deviceURL': 'io://xxxxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 100}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'closed'}], 'name': 'DeviceState'}
2023-01-02 22:40:40,972 - DEBUG    - plugin.py          - checking for update on state[name]: 'core:ClosureState' with status_num = '1' for device: 'io://xxxxx'
2023-01-02 22:40:40,972 - DEBUG    - plugin.py          - checking for update on state[name]: 'core:OpenClosedState' with status_num = '0' for device: 'io://xxxxx'
2023-01-02 22:40:40,973 - DEBUG    - plugin.py          - checking dataset: {'deviceURL': 'io://xxxxx', 'deviceStates': [{'name': 'core:ClosureState', 'type': 1, 'value': 100}, {'name': 'core:OpenClosedState', 'type': 3, 'value': 'closed'}], 'name': 'DeviceState'}
2023-01-02 22:40:40,973 - DEBUG    - plugin.py          - checking for update on state[name]: 'core:ClosureState' with status_num = '1' for device: 'io://xxxxx'
2023-01-02 22:40:40,974 - DEBUG    - plugin.py          - checking for update on state[name]: 'core:OpenClosedState' with status_num = '0' for device: 'io://xxxxx'
2023-01-02 22:40:41,075 - DEBUG    - plugin.py          - Polling unit in 299 heartbeats.
2023-01-02 22:40:42,078 - DEBUG    - plugin.py          - Polling unit in 298 heartbeats.

I'll try tomorrow to delete all of these and recreate the plugin from scratch to see if it helps

JanJaapKo commented 1 year ago

I think ab nailed it in #39 can you pull version 4.2.4 and check if it is ok now?

Abidos14 commented 1 year ago

Hello,

I pulled version 4.2.4. On plugin start up, blinds' status is correctly updated in Domoticz. However, when a command is set from Domoticz, there is still no update. Tested with a refresh set at 5 and 10 mn.

Note that when Debug logging is set to "True" in the plugin, the error "Too many requests, try again later" appears quite frequently.

Tatroxitum commented 1 year ago

I confirm, on startup this works perfectly.

But after the update (refresh 5min in my configuration) the blinds are not updated :

2023-01-03 18:35:03,096 - DEBUG    - plugin.py          - Polling unit in 1 heartbeats.
2023-01-03 18:35:04,099 - DEBUG    - plugin.py          - Poll unit
2023-01-03 18:35:04,100 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = False and self.__expiry_date (2023-01-03 18:26:34.899425) >= datetime.datetime.now() = False
2023-01-03 18:35:04,101 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = False and self.__expiry_date (2023-01-03 18:26:34.899425) >= datetime.datetime.now() = False
2023-01-03 18:35:04,102 - DEBUG    - plugin.py          - attempting to poll web version but not logged in
2023-01-03 18:35:04,113 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): tahomalink.com:443
2023-01-03 18:35:06,261 - DEBUG    - connectionpool.py  - https://tahomalink.com:443 "POST /enduser-mobile-web/enduserAPI/login HTTP/1.1" 200 None
2023-01-03 18:35:06,276 - DEBUG    - tahoma.py          - Login respone: status_code: '200' reponse body: '{'success': True, 'roles': [{'name': 'ENDUSER'}]}'
2023-01-03 18:35:06,279 - INFO     - tahoma.py          - Tahoma authentication succeeded, login valid until 2023-01-03 18:36:36
2023-01-03 18:35:06,282 - DEBUG    - tahoma.py          - login: cookies: '<RequestsCookieJar[<Cookie JSESSIONID=F6C84955AD3F384AE6FFB9AFD6D03FF4 for tahomalink.com/enduser-mobile-web>]>', headers: '{'Date': 'Tue, 03 Jan 2023 17:35:05 GMT', 'Server': 'overkiz', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains, max-age=31536000 ; includeSubDomains', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'X-XSS-Protection': '1; mode=block', 'X-Frame-Options': 'DENY', 'X-Content-Type-Options': 'nosniff', 'Content-Type': 'application/json;charset=UTF-8', 'Set-Cookie': 'JSESSIONID=F6C84955AD3F384AE6FFB9AFD6D03FF4; Path=/enduser-mobile-web; Secure; HttpOnly; SameSite=None', 'Keep-Alive': 'timeout=5, max=50', 'Connection': 'Keep-Alive', 'Transfer-Encoding': 'chunked'}'
2023-01-03 18:35:06,283 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = True and self.__expiry_date (2023-01-03 18:36:36.277601) >= datetime.datetime.now() = True
2023-01-03 18:35:06,285 - DEBUG    - tahoma.py          - start register
2023-01-03 18:35:06,286 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = True and self.__expiry_date (2023-01-03 18:36:36.277601) >= datetime.datetime.now() = True
2023-01-03 18:35:06,288 - DEBUG    - listener.py        - start register listener
2023-01-03 18:35:06,289 - DEBUG    - listener.py        - register request: self.headers_with_token: '{"Host": "tahomalink.com", "Connection": "keep-alive", "Accept-Encoding": "gzip, deflate", "Accept": "*/*", "Content-Type": "application/json", "Cookie": "JSESSIONID=F6C84955AD3F384AE6FFB9AFD6D03FF4"}'
2023-01-03 18:35:06,298 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): tahomalink.com:443
2023-01-03 18:35:06,478 - DEBUG    - connectionpool.py  - https://tahomalink.com:443 "POST /enduser-mobile-web/enduserAPI/events/register HTTP/1.1" 200 None
2023-01-03 18:35:06,500 - DEBUG    - listener.py        - register response: status '200' response body: '<Response [200]>'
2023-01-03 18:35:06,501 - DEBUG    - listener.py        - succeeded to get listener ID: {'id': '78b37ae8-98e4-e192-5738-df831169f062'}
2023-01-03 18:35:06,502 - DEBUG    - tahoma.py          - succeeded to get listener ID: {'id': '78b37ae8-98e4-e192-5738-df831169f062'}
2023-01-03 18:35:06,607 - DEBUG    - plugin.py          - Poll unit
2023-01-03 18:35:06,608 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = True and self.__expiry_date (2023-01-03 18:36:36.277601) >= datetime.datetime.now() = True
2023-01-03 18:35:06,610 - DEBUG    - listener.py        - listener vald: self.__listener_expiry = 2023-01-03 18:36:06 self.__valid = True
2023-01-03 18:35:06,611 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = True and self.__expiry_date (2023-01-03 18:36:36.277601) >= datetime.datetime.now() = True
2023-01-03 18:35:06,612 - DEBUG    - tahoma.py          - start get events
2023-01-03 18:35:06,614 - DEBUG    - listener.py        - listener vald: self.__listener_expiry = 2023-01-03 18:36:06 self.__valid = True
2023-01-03 18:35:06,629 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): tahomalink.com:443
2023-01-03 18:35:06,775 - DEBUG    - connectionpool.py  - https://tahomalink.com:443 "POST /enduser-mobile-web/enduserAPI/events/78b37ae8-98e4-e192-5738-df831169f062/fetch HTTP/1.1" 200 None
2023-01-03 18:35:06,789 - DEBUG    - tahoma.py          - get events response: status '200' response body: '<Response [200]>'
2023-01-03 18:35:06,794 - DEBUG    - tahoma.py          - checking logged in status: self.__logged_in = True and self.__expiry_date (2023-01-03 18:36:36.277601) >= datetime.datetime.now() = True
2023-01-03 18:35:06,795 - DEBUG    - tahoma.py          - get_events: no DeviceStateChangedEvent found in response: []
2023-01-03 18:35:07,097 - DEBUG    - plugin.py          - Polling unit in 299 heartbeats.
2023-01-03 18:35:08,100 - DEBUG    - plugin.py          - Polling unit in 298 heartbeats.
2023-01-03 18:35:09,053 - DEBUG    - plugin.py          - Polling unit in 297 heartbeats.
MadPatrick commented 1 year ago

Confirmed. Nu device update

jcbraem commented 1 year ago

Hello, Same issue with Connexoon avec 5minutes web refresh. I have run plugin : 67% ok in widget : image

Change % manually to ~25% Wait 11 minutes, no change in widget

Restart plugin : widget OK image

Info from scratch for this issue in test mode. Note one error with 'too many connexion' (issue 33 is made but in 10 minutes we have normaly 2 call of web refresh.

Have you many informations ?

Thanks,

Jean-Charles

Log file : somfy.log

Log Domoticz :

2023-01-04 17:46:00.731 Connexoon Somfy Vélux: Worker thread started.
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Debug logging mask set to: PYTHON
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameters count: 25
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'HardwareID':'58'
2023-01-)04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'HomeFolder':'/home/jcb/domoticz/plugins/somfy/'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'StartupFolder':'/home/jcb/domoticz/'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'UserDataFolder':'/home/jcb/domoticz/'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Database':'/home/jcb/domoticz/domoticz.db'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Language':'fr'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Version':'4.2.4'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Author':'MadPatrick'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Name':'Connexoon Somfy Vélux'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Port':'8443'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Username':'j*****.*****@*****.***'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Password':'******'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Key':'tahomaIO'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Mode1':'False'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Mode2':'300'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Mode4':'Web'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'Mode6':'Debug'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'DomoticzVersion':'2022.2'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'DomoticzHash':'eea9db734'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Parameter: 'DomoticzBuildTime':'2022-11-05 13:05:35'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Configuration count: 4
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Configuration 'MajorVersion':'4'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Configuration 'MinorVersion':'2'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Configuration 'patchVersion':'4'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Configuration 'plugin version':'4.2.4'
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Device count: 6
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Device: internal://0828-8553-9093/pod/0 - DeviceID: 'internal://0828-8553-9093/pod/0', Units: 1
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Device: io://0828-8553-9093/13219150 - DeviceID: 'io://0828-8553-9093/13219150', Units: 1
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Device: io://0828-8553-9093/15363054 - DeviceID: 'io://0828-8553-9093/15363054', Units: 1
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Device: io://0828-8553-9093/6070825 - DeviceID: 'io://0828-8553-9093/6070825', Units: 1
2023-01-04 17:46:00.947 Connexoon Somfy Vélux: Device: io://0828-8553-9093/7444963 - DeviceID: 'io://0828-8553-9093/7444963', Units: 1
2023-01-04 17:46:00.948 Connexoon Somfy Vélux: Device: io://0828-8553-9093/8877583 - DeviceID: 'io://0828-8553-9093/8877583', Units: 1
2023-01-04 17:46:00.948 Connexoon Somfy Vélux: os.path.exists(Parameters['Mode5']) = False
2023-01-04 17:46:00.948 Connexoon Somfy Vélux: Starting version: 4.2.4
2023-01-04 17:46:00.731 Status: Connexoon Somfy Vélux: Started.
2023-01-04 17:46:00.731 Status: Connexoon Somfy Vélux: Entering work loop.
2023-01-04 17:46:00.945 Status: Connexoon Somfy Vélux: Initialized version 4.2.4, author 'MadPatrick'
2023-01-04 17:46:00.947 Status: Connexoon Somfy Vélux: Location does not exist, logging to default location
2023-01-04 17:46:00.947 Status: Connexoon Somfy Vélux: Starting Tahoma blind plugin, logging to file somfy.log
2023-01-04 17:46:02.191 Status: Connexoon Somfy Vélux: Updating device:Store rivière
2023-01-04 17:51:01.305 Error: Connexoon Somfy Vélux: Call to function 'onHeartbeat' failed, exception details:
2023-01-04 17:51:01.305 Error: Connexoon Somfy Vélux: Traceback (most recent call last):
2023-01-04 17:51:01.305 Error: Connexoon Somfy Vélux: File "/home/jcb/domoticz/plugins/somfy/plugin.py", line 596, in onHeartbeat
2023-01-04 17:51:01.305 Error: Connexoon Somfy Vélux: _plugin.onHeartbeat()
2023-01-04 17:51:01.305 Error: Connexoon Somfy Vélux: File "/home/jcb/domoticz/plugins/somfy/plugin.py", line 328, in onHeartbeat
2023-01-04 17:51:01.305 Error: Connexoon Somfy Vélux: self.tahoma.tahoma_login(str(Parameters["Username"]), str(Parameters["Password"]))
2023-01-04 17:51:01.305 Error: Connexoon Somfy Vélux: File "/home/jcb/domoticz/plugins/somfy/tahoma.py", line 81, in tahoma_login
2023-01-04 17:51:01.305 Error: Connexoon Somfy Vélux: raise exceptions.LoginFailure("Too many connections, must wait")
2023-01-04 17:51:01.305 Error: Connexoon Somfy Vélux: exceptions.LoginFailure: Too many connections, must wait
2023-01-04 17:55:00.395 Status: Incoming connection from: ::1
2023-01-04 17:57:46.351 SONOFF_mini_08: Light/Switch (Lampe cuisine évier)
2023-01-04 17:57:46.349 Status: User: Alexa_ALHAU (IP: 44.200.176.42) initiated a switch command (56/Lampe cuisine évier/On)
2023-01-04 17:57:46.353 Status: Incoming connection from: 44.200.176.42
2023-01-04 17:57:47.083 Status: Incoming connection from: 44.200.176.42
2023-01-04 17:58:27.290 Status: Connexoon Somfy Vélux: Stop directive received.
2023-01-04 17:58:27.304 Status: Connexoon Somfy Vélux: Exiting work loop.
2023-01-04 17:58:27.391 Status: Connexoon Somfy Vélux: Stopping threads.
2023-01-04 17:58:27.391 Status: Connexoon Somfy Vélux: Stopped.
2023-01-04 17:58:39.785 Connexoon Somfy Vélux: Worker thread started.
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Debug logging mask set to: PYTHON
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameters count: 25
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'HardwareID':'58'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'HomeFolder':'/home/jcb/domoticz/plugins/somfy/'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'StartupFolder':'/home/jcb/domoticz/'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'UserDataFolder':'/home/jcb/domoticz/'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Database':'/home/jcb/domoticz/domoticz.db'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Language':'fr'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Version':'4.2.4'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Author':'MadPatrick'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Name':'Connexoon Somfy Vélux'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Port':'8443'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Username':'j******.*****@****.***'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Password':'*******'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Key':'tahomaIO'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Mode1':'False'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Mode2':'300'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Mode4':'Web'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'Mode6':'Debug'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'DomoticzVersion':'2022.2'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'DomoticzHash':'eea9db734'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Parameter: 'DomoticzBuildTime':'2022-11-05 13:05:35'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Configuration count: 4
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Configuration 'MajorVersion':'4'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Configuration 'MinorVersion':'2'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Configuration 'patchVersion':'4'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Configuration 'plugin version':'4.2.4'
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Device count: 6
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Device: internal://0828-8553-9093/pod/0 - DeviceID: 'internal://0828-8553-9093/pod/0', Units: 1
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Device: io://0828-8553-9093/13219150 - DeviceID: 'io://0828-8553-9093/13219150', Units: 1
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Device: io://0828-8553-9093/15363054 - DeviceID: 'io://0828-8553-9093/15363054', Units: 1
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Device: io://0828-8553-9093/6070825 - DeviceID: 'io://0828-8553-9093/6070825', Units: 1
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Device: io://0828-8553-9093/7444963 - DeviceID: 'io://0828-8553-9093/7444963', Units: 1
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Device: io://0828-8553-9093/8877583 - DeviceID: 'io://0828-8553-9093/8877583', Units: 1
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: os.path.exists(Parameters['Mode5']) = False
2023-01-04 17:58:39.982 Connexoon Somfy Vélux: Starting version: 4.2.4
2023-01-04 17:58:39.785 Status: Connexoon Somfy Vélux: Started.
2023-01-04 17:58:39.785 Status: Connexoon Somfy Vélux: Entering work loop.
2023-01-04 17:58:39.980 Status: Connexoon Somfy Vélux: Initialized version 4.2.4, author 'MadPatrick'
2023-01-04 17:58:39.982 Status: Connexoon Somfy Vélux: Location does not exist, logging to default location
2023-01-04 17:58:39.982 Status: Connexoon Somfy Vélux: Starting Tahoma blind plugin, logging to file somfy.log
2023-01-04 17:58:41.439 Status: Connexoon Somfy Vélux: Updating device:Store rivière
MadPatrick commented 1 year ago

Could it be an issue that you are using Velux instead of Somfy devices ?

JanJaapKo commented 1 year ago

The original nonolk plugin used the device states at startup and the deviceStateChangeEvent afterwards to see what was changed. For some odd reason, when you hit a command, the listener does not give a list of deviceStateChangeEvent anymore ......

I will rework the refresh to also use absolute states.......

edit and you can find it in v4.2.5, please let me know how it works. Please let it run for some time, so we can also check that #33 is solved (or at least improved ;) )

jcbraem commented 1 year ago

Could it be an issue that you are using Velux instead of Somfy devices ?

I am user of Velux for roof windows and also Somfy for sun screen but never issue before. And now all tests are made with Somfy equipment. Not sure but for me it's the same ...

jcbraem commented 1 year ago

edit and you can find it in v4.2.5, please let me know how it works. Please let it run for some time, so we can also check that #33 is solved (or at least improved ;) )

YESSSSSSS !!!

First test and first case where it is updated in delay of plugin refresh !!! See you tomorrow for issue 33 ...

Tatroxitum commented 1 year ago

I confirm, update on refresh works too now 👍 Good job @JanJaapKo and all