Page 27 of 28
Re: TellStick Duo
Posted: Thu Oct 27, 2016 11:33 am
by eirik226
bongolf wrote:Hi!
Is it possible to set the dimming level in a script or command?
I┬┤m building a wake up light, that I what to gradually dim from 0 to 100% in 30 minutes.
I can of course make a lot of actions and events, but I think it would be nicer and more adaptable if I could control the dimming level in a script.
Is that possible?
Telldus dimmer (
http://telldus.se/produkt/fjarrstyrt-ut ... er-433mhz/) registered as proove in Telldus Center
A good tips Walter gave me was to right click an action, you can then copy it as python and past it in a script, you'll then see how it's built up!
Re: TellStick Duo
Posted: Thu Oct 27, 2016 3:40 pm
by bongolf
eirik226 wrote:bongolf wrote:Hi!
Is it possible to set the dimming level in a script or command?
I┬┤m building a wake up light, that I what to gradually dim from 0 to 100% in 30 minutes.
I can of course make a lot of actions and events, but I think it would be nicer and more adaptable if I could control the dimming level in a script.
Is that possible?
Telldus dimmer (
http://telldus.se/produkt/fjarrstyrt-ut ... er-433mhz/) registered as proove in Telldus Center
A good tips Walter gave me was to right click an action, you can then copy it as python and past it in a script, you'll then see how it's built up!
Ah, thanks!
Re: TellStick Duo
Posted: Thu Oct 27, 2016 4:18 pm
by bongolf
krambriw wrote:Well, there is already two actions made for such purposes, but if you would like to control the dim level from a script you can use
Code: Select all
eg.plugins.TellStickDuo.Dim(u'Dimmer', 50)
Thanks, but which two actions are you referring to?
Re: TellStick Duo
Posted: Thu Oct 27, 2016 8:08 pm
by krambriw
You should really...what actions are available....anyway the name of those are...."GoodMorning" and "GoodNight"
Re: TellStick Duo
Posted: Thu Oct 27, 2016 8:56 pm
by bongolf
krambriw wrote:You should really...what actions are available....anyway the name of those are...."GoodMorning" and "GoodNight"
Oh, sorry! I┬┤m obviously not using the latest version of the plugin..
I will upgrade and give it a try.
Thanks!
Re: TellStick Duo
Posted: Mon Nov 28, 2016 9:53 pm
by JoachimBr
Hello,
I have been using the DUO plugin for a while and it really adds a lot of value to the tellstick. However, I haven't been able to figure out how to use it without adding a delay after each send command.
That is, if I send two consecutive commands, only the first one comes through (Unless a insert a 1 second delay between them)
Any suggestion what I would need to do to fix it (If possible)
Kind regards
Joachim
Re: TellStick Duo
Posted: Tue Nov 29, 2016 6:24 am
by krambriw
Hi,
Yes, this is a "feature" of both the TellStickDuo and the Telldus service running in the computer, neither has a buffering of multiple commands. Many years ago I actually suggested this to be added but my suggestion was never implemented. If you look at another product instead, the RFXtrx, it has this type of buffering capabilities. That is one of many reasons why the RFXtrx is superior.
When I wrote the TellStickDuo plugin I was still expecting the buffering to be implemented at some time. Therefore I didn't want to add this into the plugin because it would "slow down" the performance (introducing a delay between commands). After so many years I think we must accept that buffering will never happen on the Telldus side so it might make sense to see if it could be implemented in the plugin instead.
The only technical solution I can imagine is that we introduce a buffer that is capturing commands from EventGhost and "slowly" feeding the Telldus service with a delay in between each. Have you figured out what is the minimum necessary delay between commands?
BR Walter
Re: TellStick Duo
Posted: Tue Nov 29, 2016 7:08 pm
by JoachimBr
Ok, that figures. Yes I have done some brief measurements and I find that I need somewhere between 0.9 and 0.95 seconds delay. at 0.9 it works one out of two times.
To have the delay in the plugin, I guess it could be useful to have it selectable in the action. (An option to specify the delay could also be useful for those who would like to maximize.)
I guess you are right, there does not seem to be much development on the stick firmware or the driver. And I agree that the plugin should not be the first choice to implement the delay in. But right now, it is likely the best option.
Br
Joachim
Re: TellStick Duo
Posted: Wed Nov 30, 2016 9:56 pm
by krambriw
So I have now implemented a buffering of commands. A new version is available. You should be able to trigger actions in EG without delays in between. Commands sent will be handled and pushed to the TellStickDuo by the plugin. This solution is using a 1,5 sec delay between commands since this showed a good reliability and stability in my tests. If you wanna change this and experiment yourself, please find line nbr 1519. The code you should see looks like this:
You can just change the value to a more suitable if you find that it works better. So as example, if you prefer a 0.95 sec delay in between commands, the code should look like this:
Re: TellStick Duo
Posted: Fri Dec 02, 2016 9:15 pm
by JoachimBr
Wow, that's really quick!
I tried it and so far it works like a charm. I'll experiment with the delays but so far 1.5 second is great.
Now I'll go ahead and disable all my delays
Thanks a lot!
Re: TellStick Duo
Posted: Sun Dec 04, 2016 5:27 pm
by tjabas
Hi!
i have installed the new version of tellstickduo but how do i get the buffer commands to work? i have tried the new version but i cant really tell if it handles the commands quicker.
Re: TellStick Duo
Posted: Sun Dec 04, 2016 7:33 pm
by krambriw
No, it will not make the TellStickDuo handle commands quicker, only more reliable.
To explain the background: the TellStick cannot send commands so quickly, you would normally need a pause of about 1 - 1,5 seconds between each command, otherwise it will not be transmitted at all (the driver or the device is busy...). What was needed was therefore to introduce a 'wait' in between each action. It was however not so nice with this additional admin work for each action/macro in the tree. At the same time it was still possible to make mistakes, for instance, you would have to carefully check all your macros so that they had a different delay setting in relation to each other, otherwise if some of them accidentally got triggered in the same moment, the conflict was there. So now this is handled by the plugin instead, an internal FIFO queue is there for this purpose and hopefully things will behave well-mannered.
But the TellStickDuo is still the same, a bird without feathers will likely never fly...
Re: TellStick Duo
Posted: Thu Jan 05, 2017 6:44 pm
by bongolf
Hi!
I'm trying to keep track of the status for my devices and I just started testing the "dimDeviceData".
It's working really well!
But I have one question, I have a few Nexa-buttons that control some lamps directly (I control these lamps witch EG as well). But when I push a button the "levels" obviously don't get updated.
But I revive an event for the button-push in the log, so I could use that to update the level manually.
Is possible to update the levels with a python command?
Re: TellStick Duo
Posted: Fri Jan 06, 2017 7:28 am
by krambriw
Is possible to update the levels with a python command?
Well, yes but it would be a rather complex script needed. The python code that updates the dim level of a device to '255' looks like this
Code: Select all
self.plugin.dimDeviceData[str(id)] = (
'255'+
'|'+
deviceName
)
As you can see, we need the device id and the device name. The device id can be fetched from the telldus service and to do that, you would have to load the Telldus dll also into the script. So in all, it gets a bit complex, but of course, possible. Since all telldus dll functions are already loaded & available in the plugin, I think an action just to update the level would be better.
I suppose the levels we are talking about are 0 (off) and 255 (on)?
Can you provide some samples of your events from the push buttons and I will look into how to add such an action?
Re: TellStick Duo
Posted: Fri Jan 06, 2017 8:44 am
by bongolf
Great!
The events looks like this:
09:37:53 TellStickDuo.knapp_vardagsrum_en.ON u"codeswitch:nexa.25.0"
09:37:57 TellStickDuo.knapp_vardagsrum_en.OFF u"codeswitch:nexa.25.0"