Page 13 of 28
Re: TellStick Duo
Posted: Sat Feb 22, 2014 6:03 am
by krambriw
Don't worry, no such feelings in this community, we all started from scratch at a certain time and there are many skilled users here that have helped out during the years
Re: TellStick Duo
Posted: Fri Mar 07, 2014 12:32 pm
by Fumes
The eg.plugins.TellStickDuo.plugin.dimDeviceData doesn't seem to remove devices from the list if they are removed from the TelldusCenter.
Is that by design or a 'bug'?
/Bjarne
Re: TellStick Duo
Posted: Fri Mar 07, 2014 6:02 pm
by krambriw
Where do you mean?
When I test and delete a dim device in Telldus Center, it is no more available in the drop list in the config for the device, without restart of EG.
The configuration as such stays however in EG but you have to select another dim device from the drop down to update the configuration when you delete a device...
Re: TellStick Duo
Posted: Fri Mar 07, 2014 10:13 pm
by Fumes
Hmm...
You're right about the droplist, but my eg.plugins.TellStickDuo.plugin.dimDeviceData still contains the removed devices. Even after i selected a new device in the droplist and then 'dimmed' once with that.
However,If i enumerate a devicelist by opening the library, as in your code example above, the deleted devices are gone. But not when printing eg.plugins.TellStickDuo.plugin.dimDeviceData.
/Bjarne
Re: TellStick Duo
Posted: Sat Mar 08, 2014 6:15 am
by krambriw
Now I got your point...
Yes, the dimDeviceData is a persistent dictionary that just keeps track of latest known dim levels. And yes, it is not synchronized if you delete a device in Telldus Center.
Maybe one solution could be to align the dictionary when the plugin starts and only keep the data for existing devices?
Tell me why and how you need it to be in sync like that?
BR
Re: TellStick Duo
Posted: Sat Mar 08, 2014 8:14 am
by Fumes
Aha!
It is for keeping track of the l dim levels. When I use your plugin it is mostly togheter with a mediacenter such as XBMC or Mediaportal.
The lights dim up a little bit when we press pause and back to previous levels when continuing the movie and so forth.
The dictionary is used when switching between the different states, stoped - playing - paused and so on.
I guess i have to work out a way to use the enumrated list that could be created on startup of the plugin/EG and then just use the values from the dictionary when needed.
/Bjarne
Re: TellStick Duo
Posted: Sat Mar 08, 2014 9:50 am
by krambriw
Well, it is not so difficult for me to add this to the plugin if it would help (there is nothing else that could break).
So if it helps, I can make so
1) When the plugin starts, it is synchronizing the dimDeviceData with existing devices in Telldus Center (TC)
2) If the device is not existing in TC anymore, the dimDevice data for that device, if any, will be deleted
I think I have also found out how to handle the following situations:
- If you delete or add devices while you have the plugin running, the sync will also happen
- for new devices added while the plugin is running, dimDevice data for those will be captured without restart of the plugin
Re: TellStick Duo
Posted: Sat Mar 08, 2014 10:21 am
by Fumes
That would be great!
The latter functions with discovery of devices being added/removed while EG is running isn't that important, for me at least, but a nice feature indeed!
/Bjarne
Re: TellStick Duo
Posted: Sat Mar 08, 2014 11:37 am
by krambriw
This version should work the expected way (including the feature that you can delete/add devices from TC as you prefer , also during the plugin run time, no need to restart the plugin)
Please check if you think it works ok
BR
Re: TellStick Duo
Posted: Sat Mar 08, 2014 1:17 pm
by leothlon
the event: "lights.LampLivingroom1 u"70" "
followed by python command action:
"eg.plugins.TellStickDuo.Dim(4, int(eg.event.payload))"
gives me the error:
Code: Select all
Error in Action: "eg.plugins.TellStickDuo.Dim(4, int(eg.event.payload))"
Traceback (most recent call last) (1640):
File "<string>", line 1, in <module>
File "C:\Program Files\EventGhost\plugins\TellStickDuo\__init__.py", line 1276, in __call__
id = self.plugin.getId(deviceName.encode('utf-8'), self.method)
AttributeError: 'int' object has no attribute 'encode'
anyone know why? or is this the wrong way? i want to dim device to value of payload...
Re: TellStick Duo
Posted: Sat Mar 08, 2014 4:11 pm
by krambriw
If you simply create a standard macro with an action to dim and then 'Copy As Python' you would get something like this
Code: Select all
eg.plugins.TellStickDuo.Dim(u'Front row', 50)
So you should use the name of the device, not the id
Re: TellStick Duo
Posted: Sat Mar 08, 2014 5:13 pm
by Fumes
It seems like it works as intended!
We still need to 'use' a new device once, for it to populate the dictionary, right?
/Bjarne
Re: TellStick Duo
Posted: Sat Mar 08, 2014 6:34 pm
by krambriw
We still need to 'use' a new device once, for it to populate the dictionary, right?
Yes, correct, just adding a new device does not necessarily set a dim level....
Re: TellStick Duo
Posted: Mon Mar 10, 2014 7:00 am
by leothlon
krambriw wrote:If you simply create a standard macro with an action to dim and then 'Copy As Python' you would get something like this
Code: Select all
eg.plugins.TellStickDuo.Dim(u'Front row', 50)
So you should use the name of the device, not the id
Awsome, i didn't know about copy as python :O! that made things ALOT easier, not just for using the tellstick but other plugins and making custom scripts!
Many thanks to you good sir
Re: TellStick Duo
Posted: Mon Apr 07, 2014 5:28 am
by Telorast
Anyone else have problems with the new Telldus Center 2.1.2? My Tellstick stops working after resuming from Sleep. It doesn't seem to be a problem with the plugin since not even TelldusCenter works.