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.
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
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: TellStick Duo
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
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: TellStick Duo
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
Is that by design or a 'bug'?
/Bjarne
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: TellStick Duo
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...
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...
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: TellStick Duo
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
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
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: TellStick Duo
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
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
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: TellStick Duo
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
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
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: TellStick Duo
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
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
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: TellStick Duo
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
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
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: TellStick Duo
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
Please check if you think it works ok
BR
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: TellStick Duo
the event: "lights.LampLivingroom1 u"70" "
followed by python command action:
"eg.plugins.TellStickDuo.Dim(4, int(eg.event.payload))"
gives me the error:
anyone know why? or is this the wrong way? i want to dim device to value of payload...
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'-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: TellStick Duo
If you simply create a standard macro with an action to dim and then 'Copy As Python' you would get something like this
So you should use the name of the device, not the id
Code: Select all
eg.plugins.TellStickDuo.Dim(u'Front row', 50)My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: TellStick Duo
It seems like it works as intended!
We still need to 'use' a new device once, for it to populate the dictionary, right?
/Bjarne
We still need to 'use' a new device once, for it to populate the dictionary, right?
/Bjarne
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: TellStick Duo
Yes, correct, just adding a new device does not necessarily set a dim level....We still need to 'use' a new device once, for it to populate the dictionary, right?
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: TellStick Duo
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!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
So you should use the name of the device, not the idCode: Select all
eg.plugins.TellStickDuo.Dim(u'Front row', 50)
Many thanks to you good sir
Re: TellStick Duo
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.