TellStick Duo

Questions and comments specific to a particular plugin should go here.
Telorast
Posts: 46
Joined: Wed Feb 27, 2013 2:44 pm

Re: TellStick Duo

Post by Telorast » Thu Feb 28, 2013 8:19 pm

I figured out how to hack it, I added this script to every command:

Code: Select all

eg.plugins.TellStickDuo.plugin.device_state_memory = {'':''}
Looks ugly but at least it works.

Scope
Posts: 28
Joined: Tue Feb 22, 2011 5:19 pm

Re: TellStick Duo

Post by Scope » Fri Mar 08, 2013 6:42 pm

Telorast wrote:I figured out how to hack it, I added this script to every command:

Code: Select all

eg.plugins.TellStickDuo.plugin.device_state_memory = {'':''}
Looks ugly but at least it works.
First of all I have to thank Walter again for this excellent feature!

I agree that there are some limitations to the device-state-memory.
It is very good for all sensors, but only for certain devices (motion detectors, magnetic breakers).

So maybe it would be good with a filter for the devices where you specify the names of the devices which you want to have a memory-state for?

All other devices remain the same with the delay-filter instead.
What do you think about that?

Kind regards,
Torbjörn Westerlund.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw » Mon Mar 11, 2013 1:27 pm

You can try the attached version. Please replace and also put the new file in the TellStickDuo plugin folder. Give a feedback asap if it works ok and I will make a public release.

# 2013-03-11 You can now specify the devices you like to remember states for.
# Just put in the Telldus Center name of the device in the list in
# the separate python file 'devices_in_state_memory.py' and the
# state will be captured to avoid multiple duplicated events.
# State changes will be captured only for devices listed in this
# file.
# This is useful especially with devices that sends many events
# for each state change (like magnetic contacts, infra red
# detectors, pushbuttons and others).

All other devices remain the same with the delay-filter instead.


__init__.py
(62.99 KiB) Downloaded 244 times
devices_in_state_memory.py
(523 Bytes) Downloaded 223 times

Scope
Posts: 28
Joined: Tue Feb 22, 2011 5:19 pm

Re: TellStick Duo

Post by Scope » Tue Mar 12, 2013 7:59 pm

krambriw wrote:You can try the attached version. Please replace and also put the new file in the TellStickDuo plugin folder. Give a feedback asap if it works ok and I will make a public release.

# 2013-03-11 You can now specify the devices you like to remember states for.
# Just put in the Telldus Center name of the device in the list in
# the separate python file 'devices_in_state_memory.py' and the
# state will be captured to avoid multiple duplicated events.
# State changes will be captured only for devices listed in this
# file.
# This is useful especially with devices that sends many events
# for each state change (like magnetic contacts, infra red
# detectors, pushbuttons and others).

All other devices remain the same with the delay-filter instead.


__init__.py
devices_in_state_memory.py
Thanks for the quick response!

I have tested your modification and it seems to work as expected. Great work!
Maybe Telorast can try it as well to see if he can get rid of his scripts? :)

Kind regards,
Torbjörn Westerlund.

Telorast
Posts: 46
Joined: Wed Feb 27, 2013 2:44 pm

Re: TellStick Duo

Post by Telorast » Wed Mar 13, 2013 6:17 pm

Tested it, works perfect.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw » Fri Mar 15, 2013 5:08 pm

Thanks, official version with the above features now posted in first post

zetat
Posts: 8
Joined: Thu Aug 29, 2013 5:29 pm

Re: TellStick Duo

Post by zetat » Thu Aug 29, 2013 5:33 pm

Hi,
Is it any built-in event or command to see if the light is on or off at the moment?

Samme
Posts: 33
Joined: Tue Nov 22, 2011 9:07 am

Re: TellStick Duo

Post by Samme » Wed Nov 06, 2013 12:01 pm

Hi again Walter!

Today I updated TelldusCenter and while at it, I also updated the plugin, I guess I had a very old version. When I restarted EG I got the following.

12:34:18 ---> Welcome to EventGhost <---
12:34:18 Error compiling script.
12:34:18 Traceback (most recent call last) (1640):
12:34:18 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 121, in SetArguments
12:34:18 self.compiled = self.executable.Compile(*args)
12:34:18 File "C:\Program Files (x86)\EventGhost\plugins\EventGhost\PythonScript.py", line 71, in __init__
12:34:18 self.PrintTraceback()
12:34:18 File "C:\Program Files (x86)\EventGhost\plugins\EventGhost\PythonScript.py", line 97, in PrintTraceback
12:34:18 treeItem.PrintError("Traceback (most recent call last):")
12:34:18 AttributeError: 'NoneType' object has no attribute 'PrintError'
12:34:18 Autostart
12:34:18 Plugin: Android
12:34:18 Plugin: Broadcaster
12:34:18 Plugin: E-mail
12:34:18 Plugin: iTunes
12:34:18 iTunes is not running
12:34:18 Plugin: Keyboard
12:34:18 Plugin: MediaPortal
12:34:18 Plugin: Multitap
12:34:18 Plugin: Process Watcher
12:34:21 Plugin: Screamer Radio
12:34:21 Plugin: Snarl
12:34:21 Plugin: Spotify
12:34:21 Plugin: SunTracker
12:34:21 Plugin started
12:34:21 Plugin: TellStickDuo
12:34:21 Error starting plugin: TellStickDuo
12:34:21 Traceback (most recent call last) (1640):
12:34:21 File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 177, in Start
12:34:21 self.instance.__start__(*self.args)
12:34:21 TypeError: __start__() takes exactly 8 arguments (7 given)

Are these two errors somehow related to each other?

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw » Wed Nov 06, 2013 2:48 pm

Hi, just a question, have you tried the advice in the first post ?
Upgrade from earlier versions...

leothlon
Experienced User
Posts: 59
Joined: Tue Dec 17, 2013 6:29 pm

Re: TellStick Duo

Post by leothlon » Wed Dec 18, 2013 7:25 am

Hi.
i just got a nexa movement sensor and now i want to set it up so that during nighttime the movementsensor turns on the light with 20% dim but during daytime it does nothing.
this is so that if for example you need to go to the bathroom at night the lights turn on slightly so you can navigate yet not so much that you get blinded and make you wake up to much.
During daytime i will want to controll the light myself and not have the sensor interfere.

What would be the best way to do this?

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw » Wed Dec 18, 2013 4:06 pm

Hello,

This is a typical good example of a scenario most of us are facing from time to time, the need to visit the toilet in the middle of the dark night.

And it shows the fantastic flexibility of EventGhost !

The functions you are asking for can *easily* be created just by playing around with existing plugins and their features.

Below I will show you a view of the typical tree structure of a configuration that will crack the nut. In the next posts we will go into the details and I will explain how this will work

BestR Walter
Image2.jpg
Image2.jpg (22.73 KiB) Viewed 6663 times
Last edited by krambriw on Wed Dec 18, 2013 5:05 pm, edited 1 time in total.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw » Wed Dec 18, 2013 4:39 pm

As you can see from the previous picture, you need to add the following plugins:

- TellStickDuo
- SchedulGhost
- Scheduler

From the TellStickDuo you need to catch the event from your ir detector and drag & drop it in the corresponding macro as visualized.
You also have to create two TellStickDuo macros to dim and to turn off your Nightlights (the macros could of course host several TellStickDuo commands/actions if you have a number of lamps to control):
Image4.jpg
Then you create two more macros to make it possible to enable and disable the TellStickDuo Dim macro. The enable and disable functions are standard actions that EG provides itself.

The SchedulGhost is used to create an 'Egg Timer'. It will be started on the first event from your ir detector and run for the defined period (your average nightly toilet visiting time period) and then fire and enable the Dim macro again. This is a typical configuration for a 10 minute egg timer:
Image6.jpg
The Scheduler is used to overall control when the Nightlight function shall be enabled/disabled. If you use the Scheduler you can have different settings for different days of the week. This is an example configuration of a Scheduler action that might be fine for your needs:
Image2.jpg
To be continued in next post...
Last edited by krambriw on Wed Dec 18, 2013 8:09 pm, edited 1 time in total.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw » Wed Dec 18, 2013 4:52 pm

The previous post covered the configuration part.

Here is a description how it all will work (I hope):

1) The Scheduler will enable/disable the Nightlight function based on your configuration

2) When Nightlight function is enabled, it is ready to receive an event from your ir detector

- ir event is captured
- the macro gets disabled by itself, we do not want to re-trigger again every time the detector recognizes movement
- the Dim command is sent out and your lights should now be 20% on
- the egg timer is started

3) You go to the toilet, then you go to bed or to kitchen for another beer

4) The egg timer fires after the defined time period

- the OFF command is sent out and your (night) lights should now be off
- the Dim macro now gets enabled again

5) We are now ready for the next visit/movement and the above will be repeated

This is how I hope it will work, I might have missed something that we need to add or alter.

To further enhance it, you could imagine also using the SunTracker plugin to check if the sun is up or down. This would create a rather sophisticated solution combining time and actual sun state. At least here in the nordics, there is no need for lights during bright summer nights.

BestR Walter

...continued in the next post
Last edited by krambriw on Thu Dec 19, 2013 6:48 am, edited 1 time in total.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw » Thu Dec 19, 2013 6:48 am

Actually, you could skip the Scheduler plugin and stick with the SchedulGhost only. The following picture shows you how to set up a schedule. If you need different ones for various days of the week, just define as many schedules as you like.
Image4.jpg

leothlon
Experienced User
Posts: 59
Joined: Tue Dec 17, 2013 6:29 pm

Re: TellStick Duo

Post by leothlon » Thu Dec 19, 2013 8:42 am

Thank you verry much for the most instructive and informative help i have ever recieved on a forum. +1 to you sir.
i will start working on it as soon as i get home today.

Post Reply