td api problem with python

Moderator: Telldus

Post Reply
krambriw
Posts: 654
Joined: Fri Mar 17, 2023 9:45 am

td api problem with python

Post by krambriw »

Recent discussions are ongoing regarding client connections to Telldus Service being lost. One thread where this is discussed is here:
http://www.switchking.se/forum/viewtopic.php?f=10&t=913

With the latest TelldusCore driver, I have also noticed that client connections has been lost (one time it was EventGhost (EG) and one time it was Switch King (SK)). Without repeating the details already explained (folllow the link above), I'll keep it a bit shorter.

In essence, I try to monitor the status of my own (EG) client connection and if it is lost, my idea is to reconnect. But my initial tests below shows that it does not work because I get a crash in tdClose(). It seems that tdInit() can be called many times without problems.

We need with highest priority a solution to fix this instability problem so that client connections not are lost.

Best regards

Code: Select all

from ctypes import windll
dll = windll.LoadLibrary("TelldusCore.dll")
dll.tdInit()
79962352
dll.tdInit()
79962352
dll.tdInit()
79962352
dll.tdInit()
79962352
dll.tdInit()
79962352
dll.tdInit()
79962352
dll.tdClose()
79962352
dll.tdClose()
Traceback (most recent call last):
  File "<input>", line 1, in <module>
WindowsError: exception: access violation reading 0x00000004
dll.tdInit()
79962352
dll.tdClose()
Traceback (most recent call last):
  File "<input>", line 1, in <module>
WindowsError: exception: access violation reading 0x00000004

Below is the part from the Telldus logfile that shows when my EG client lost it's connection to Telldus Service. From telldus_service_debug:

Code: Select all

Sun Sep 23 22:38:03 2012 [38144] 0 - Sent message to 3 clients

Sun Sep 23 22:38:04 2012 [38144] 0 - Sent message to 3 clients

Sun Sep 23 22:38:04 2012 [38144] 0 - Lost connection, removing it
Sun Sep 23 22:38:04 2012 [38144] 0 - Sent message to 2 clients

Sun Sep 23 22:38:04 2012 [38144] 0 - Sent message to 2 clients

Sun Sep 23 22:38:06 2012 [38144] 0 - Sent message to 2 clients
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: td api problem with python

Post by micke.prag »

Micke Prag
Software
Telldus Technologies
krambriw
Posts: 654
Joined: Fri Mar 17, 2023 9:45 am

Re: td api problem with python

Post by krambriw »

It looks like it is closed!?
With the latest version, the problem is anyhow there.

Best regards, Walter
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: td api problem with python

Post by micke.prag »

Milestone: 2.1.2
Latest released version is 2.1.1
Micke Prag
Software
Telldus Technologies
krambriw
Posts: 654
Joined: Fri Mar 17, 2023 9:45 am

Re: td api problem with python

Post by krambriw »

ok, thanks :oops:
MartinV
Posts: 277
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: td api problem with python

Post by MartinV »

I'm running a beta version of 2.1.2 where the tdClose() has been fixed, but the fix causes side effects in subsequent calls to - for example tdSetName (after a new tdInit).

Filed a ticket for this to get it fixed before release of 2.1.2.
Martin | http://www.switchking.se
Testa Switch King Pro i din Android/iPhone/iPod: http://www.switchking.se/sv/demo
Post Reply