Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

TellStick Duo

Questions and comments specific to a particular plugin should go here.
Post Reply
User1306
Experienced User
Posts: 53
Joined: Sat Oct 13, 2012 4:37 pm

Re: Plugin: TellStick Duo

Post by User1306 »

Thank you very much for the feedback, the issue for me is new, I have noticed 4 or 5 times since i recently upgraded to tellstick duo, but not sure when exactly it's occurring.
My PC does go to sleep mode after 3 hours then an hour later into hibernate. I will update my drivers to the ones mention above and report back.

About stopping all_good_morning and _good_night task that works perfect for me, as I only have one running at time.

Thanks and pleas let me know If i can help you track this down.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin: TellStick Duo

Post by krambriw »

I have now tried both the hibernate and the standby modes on a laptop and during this test, the Telldus service crashed every time when resuming. My conclusion is that it doesn't work properly to let the PC go into those states and then recover back to a working system with the TellStickDuo plugin. At least not for the moment or if someone has a different setup that might work.

My assumption is that you are running the computer 24/7 and not entering those modes (or other energy saving schema's) that might affect the functionality.
About stopping all_good_morning and _good_night task that works perfect for me, as I only have one running at time.
I have now a working prototype version but some final questions:

In what state should I set the lamp when I stop the things?
- GoodMorning lamps should be fully turned on/turned off or left at the current dim level?
- GoodNight lamps should be fully turned on/turned off or left at the current dim level?

BestR Walter
User1306
Experienced User
Posts: 53
Joined: Sat Oct 13, 2012 4:37 pm

Re: Plugin: TellStick Duo

Post by User1306 »

It's not necessary that the error happens right after the computer resumes from sleep or hirbernate mode. Today all of the sudden my eventghost was not responding, computer was on all day it did not go into sleep mode. Then I realized that message had appeared and caused EG to freeze.

Regarding the GM and GN I would suggest, for Good_morning: once stopped it pauses on dim level. For good_night: once stopped its turned off. Or if easier then make both tasks dim on the current level if the process stops, then if needed you can send another trigger to turn it off.

Thanks for th help :D
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin: TellStick Duo

Post by krambriw »

This is a bit tricky because I am not able to reproduce the problems reported. As you see from below in my log file, it works just perfectly well to create "New" all the time; the duo is gets disabled, then started again and events are coming in...I tested to create "New" three times without closing EG or saving in between...

I have published a new version with improvements that might help as well as with some other new features.

Lets see how this works out,

Best regards, Walter

Code: Select all

11:05:30   ---> Welcome to EventGhost <---
11:05:30   Loading library
11:05:30   Initiating TellStick Duo...
11:05:30   Starting TellStick Duo...
11:05:30   Main.OnInit
11:05:35   TellStickDuo.mandolyn.temperaturehumidity.81.Temperature: '-1.7'
11:05:35   TellStickDuo.mandolyn.temperaturehumidity.81.Humidity: '93'
11:05:43   Closing library
11:05:43   Disables TellStick Duo...
11:05:45   Closing TellStick Duo...
11:05:45   Main.OnInit
11:06:13   Loading library
11:06:13   Initiating TellStick Duo...
11:06:13   Starting TellStick Duo...
11:06:26   TellStickDuo.mandolyn.temperaturehumidity.11.Temperature: '-1.7'
11:06:26   TellStickDuo.mandolyn.temperaturehumidity.11.Humidity: '91'
11:06:29   TellStickDuo.oregon.1A2D.32.Temperature: '-0.9'
11:06:33   TellStickDuo.oregon.1A2D.21.Temperature: '22.3'
11:07:03   Closing library
11:07:03   Disables TellStick Duo...
11:07:05   Closing TellStick Duo...
11:07:05   Main.OnInit
11:07:32   Loading library
11:07:32   Initiating TellStick Duo...
11:07:32   Starting TellStick Duo...
11:07:43   TellStickDuo.oregon.1A2D.166.Temperature: '23.2'
11:08:32   TellStickDuo.oregon.1A2D.32.Temperature: '-0.8'
11:12:26   TellStickDuo.mandolyn.temperaturehumidity.11.Temperature: '-1.6'
11:14:17   System.Idle
11:14:35   TellStickDuo.mandolyn.temperaturehumidity.81.Temperature: '-1.6'
11:14:48   System.UnIdle
11:22:26   TellStickDuo.mandolyn.temperaturehumidity.11.Temperature: '-1.5'
11:22:35   TellStickDuo.mandolyn.temperaturehumidity.81.Temperature: '-1.5'
11:23:26   TellStickDuo.mandolyn.temperaturehumidity.11.Temperature: '-1.6'
11:23:35   TellStickDuo.mandolyn.temperaturehumidity.81.Temperature: '-1.6'
11:24:24   Closing library
11:24:24   Disables TellStick Duo...
11:24:26   Closing TellStick Duo...
11:24:26   Main.OnInit
11:24:38   Loading library
11:24:38   Initiating TellStick Duo...
11:24:38   Starting TellStick Duo...
11:26:05   TellStickDuo.Garage.OFF 'codeswitch:nexa.41'
11:26:06   TellStickDuo.Garage.ON 'codeswitch:nexa.41'
11:26:26   TellStickDuo.mandolyn.temperaturehumidity.11.Temperature: '-1.5'
11:27:35   TellStickDuo.mandolyn.temperaturehumidity.81.Temperature: '-1.5'
vuego
Experienced User
Posts: 69
Joined: Wed Jan 17, 2007 9:22 pm
Location: Sweden

Re: Plugin: TellStick Duo

Post by vuego »

Excellent! I think you fixed it, Walter :)

I can now exit EventGhost normally after seeing the restart message.

I see a difference in the log when stopping the plugin now.
5 jan 2013 version works:
11:43:53 Closing library
11:43:53 Disables TellStick Duo...
11:43:55 Closing TellStick Duo...
2 dec 2012 version that hanged EG:
11:44:46 Disables TellStick Duo...
11:44:46 Disables TellStick Duo...
11:44:46 Closing library
11:44:46 Closing TellStick Duo...
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin: TellStick Duo

Post by krambriw »

On request, I will here describe how the new sensor checking feature can be used to restart Telldus Service in case events from sensors has stopped coming in to EG (and maybe other clients as well).

The sensor checking works in the way as described in the first post, just repeating here for convenience:

The solution is based on an dynamic and adaptive method, counting sensor events and measuring the time between. Based on this, calculating an estimated forecast for next expected event to happen.

When the checking detects the error, an event will be generated:
"Expected TellStick Duo sensor callbacks ended, restart Telldus service..."

This event can be used (drag it or define it) into a macro that also includes some more commands to first stop and then start the Telldus Service. Example as below:
Image2.png
Image2.png (5.02 KiB) Viewed 8620 times
The content of the action to stop the service
Image3.png
Image3.png (8.89 KiB) Viewed 8620 times
The content of the action to start the service
Image5.png
Image5.png (8.88 KiB) Viewed 8620 times
Freddan101
Posts: 4
Joined: Mon Jan 07, 2013 3:48 pm

Re: Plugin: TellStick Duo

Post by Freddan101 »

Thank you for this nice plugin. Works great! Though I got one question and this might be a general question for EG.

When I have ├à, ├ä or ├û in the device name, e.g. F├Ânster, Motorv├ñrmare etc. EG seems not to be able to process. Is this a general issue in EG and is there any way around? I'm working on the WAF with the new automation project at home and not being able to use Swedish characters would danger the, this far very promising, WAF trend... ;)

Code: Select all

Watch gCal
   Traceback (most recent call last):
     Python script "0", line 316, in <module>
       WatchGCal()
     Python script "0", line 274, in WatchGCal
       gCalEvents.update(GetGCalEvents(gCalXML,now_Struct_UTC))
     Python script "0", line 183, in GetGCalEvents
       evt=GetGCalEvent(GetGCalNthEntry(gCalXML,x),now_Struct_UTC)
     Python script "0", line 200, in GetGCalEvent
       entryTitle = GetEntryTitle(gCalEntryXML)
     Python script "0", line 131, in GetEntryTitle
       result=GetEltData(entryXML,"title")
     Python script "0", line 46, in GetEltData
       logThis("Exiting GetEltData and returning " + str(result),4)
   UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 4: ordinal not in range(128)
Traceback (most recent call last) (1600):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\Scheduler.py", line 137, in MainLoop
    func(*args, **kwargs)
  File "0", line 274, in WatchGCal
  File "0", line 183, in GetGCalEvents
  File "0", line 200, in GetGCalEvent
  File "0", line 131, in GetEntryTitle
  File "0", line 46, in GetEltData
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 4: ordinal not in range(128)
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin: TellStick Duo

Post by krambriw »

Thats completely on my side, I do not handle unicode chars correctly when triggering events (and logging to file). I have found the reason and solution, just allow some more time for my internal testing....
Freddan101
Posts: 4
Joined: Mon Jan 07, 2013 3:48 pm

Re: Plugin: TellStick Duo

Post by Freddan101 »

krambriw wrote:Thats completely on my side, I do not handle unicode chars correctly when triggering events (and logging to file). I have found the reason and solution, just allow some more time for my internal testing....
Sounds very promising! Thank you for looking into this.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin: TellStick Duo

Post by krambriw »

This is a test version that should handle unicode chars correctly (it looks ok with ├Â,├ñ,├Ñ).

Just for your info, it is up to every component (script, plugin) to handle this properly so there is no general thing in EG for this.

Could you try it before I publish it?

BestR Walter
__init__.py
(53.69 KiB) Downloaded 307 times
Freddan101
Posts: 4
Joined: Mon Jan 07, 2013 3:48 pm

Re: Plugin: TellStick Duo

Post by Freddan101 »

krambriw wrote:This is a test version that should handle unicode chars correctly (it looks ok with ├Â,├ñ,├Ñ).

Just for your info, it is up to every component (script, plugin) to handle this properly so there is no general thing in EG for this.

Could you try it before I publish it?

BestR Walter
__init__.py
Just tried it and I'm still getting an error when I try to add an action to turn on a device with unicode chars. Also when choosing the device in the dropdown list the unicode chars are not displayed correctly.

I just replaced the .py file and restarted EG. Is there anything else I need to do?

Code: Select all

09:27:07   Traceback (most recent call last) (1600):
09:27:07     File "wx\_core.pyc", line 14660, in <lambda>
09:27:07     File "C:\Program Files (x86)\EventGhost\eg\Core.py", line 197, in Notify
09:27:07       listener(value)
09:27:07     File "C:\Program Files (x86)\EventGhost\eg\Classes\MainFrame\TreeCtrl.py", line 828, in OnNodeChanged
09:27:07       self.SetItemText(itemId, node.GetLabel())
09:27:07     File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 179, in GetLabel
09:27:07       name = pluginInfo.label + ": " + name
09:27:07   UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 18: ordinal not in range(128)
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin: TellStick Duo

Post by krambriw »

Sorry, found the problem also in several other places in the code :mrgreen:

BestR
__init__.py
(54.02 KiB) Downloaded 314 times
Freddan101
Posts: 4
Joined: Mon Jan 07, 2013 3:48 pm

Re: Plugin: TellStick Duo

Post by Freddan101 »

krambriw wrote:Sorry, found the problem also in several other places in the code :mrgreen:

BestR
__init__.py
Works like a dream! :mrgreen: Many thanks for helping out so quickly.
User1306
Experienced User
Posts: 53
Joined: Sat Oct 13, 2012 4:37 pm

Re: Plugin: TellStick Duo

Post by User1306 »

@krambriw
i'm afraid to say i still have the issue with Restarting of EG after a suspend and now it happens more than often.
However; one of the times i got this error in the Log maybe it'll help.
i tired to use the EG app plugin to do an automatic restart once "Restart of EG needed" appears in the log but EG freezes until you click OK on the message window.

Code: Select all

00:11:52   System.Suspend
00:11:52   Suspending... None
00:11:52   Traceback (most recent call last) (1600):
00:11:52     File "C:\Program Files\EventGhost\eg\Classes\ActionThread.py", line 101, in OnComputerSuspend
00:11:52       plugin.OnComputerSuspend(None)
00:11:52     File "C:\Program Files\EventGhost\plugins\TellStickDuo\__init__.py", line 339, in OnComputerSuspend
00:11:52       self.__stop__()
00:11:52     File "C:\Program Files\EventGhost\plugins\TellStickDuo\__init__.py", line 323, in __stop__
00:11:52       self.unregisterCallbacks()
00:11:52     File "C:\Program Files\EventGhost\plugins\TellStickDuo\__init__.py", line 504, in unregisterCallbacks
00:11:52       self.dll.tdUnregisterCallback( self.callbackId_0 )
00:11:52   WindowsError: exception: access violation reading 0x00000004
00:12:07   Resuming... None
00:12:07   Loading library
00:12:07   Restart of EG needed
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin: TellStick Duo

Post by krambriw »

Interesting, I think about two things I would like to try,
- I will remove the message box stuff to allow EG to continue
- I will add a wait time (30 sec for testing) on resume to allow the Telldus driver and service etc to start properly before I try to reconnect to Tellstick callbacks

I have no idea if this will work but please try it and do a suspend/resume testing

Attached is a version with the above changes

BestR
__init__.py
(53.29 KiB) Downloaded 316 times
Post Reply