Page 1 of 2

Logitech Harmony switching on kaku module

Posted: Tuesday 15 December 2015 18:31
by rednas
Hello,

I am planning to turn off my tv, receiver etc. when I am not at home. This will be done via GPS.
However, I don't want to turn on the kaku module when I am at home, but just when I need it. So when switching on a certain Harmony activity I would like to switch on the kaku module FIRST, because the tv etc. are off, and then switch on the activity.
Would this be possible?

Thanks in advance!

Re: Logitech Harmony switching on kaku module

Posted: Tuesday 15 December 2015 19:16
by heggink
Not sure I entirely understand but I'll try to answer anyway. My setup is that I have my TV set (amp, TV, UPC media box) behind a plugwise switch that switches everything off when on stand-by (on stand-by, most of these media boxes still draw 30W which is a waste IMO). I have a separate dummy switch that triggers a script that controls the plugwise plug. I have my harmony in domoticz. In my harmony, I have created a dummy device that I have attached to a long press of one of the remote's buttons (in the harmony hub, i created a device I don't have that domoticz sees and uses to switch the plugwise plug). That powers everything up. Then a second button on my remote switches all the devices on.

Since my plugwise modules are attached to a different rpi that from domoticz, it takes some time before the power switches on (usually 1-2 seconds also because the media box needs time to wake up). I believe I can het the harmony to wait for a little until everything switches on but I haven't gotten around to that yet. That said, you can easily run an event in domoticz such that the switch triggers first and your harmony event triggers next after a second or 2.

The net, not sure exactly what you need but there are so many ways that you will probably be able to make it work with a little effort.

H

Re: Logitech Harmony switching on kaku module

Posted: Tuesday 15 December 2015 19:59
by rednas
heggink wrote:Not sure I entirely understand but I'll try to answer anyway.
Thanks! You understood it well, my missing link is a device I can add to harmony which will trigger the kaku module on.
How did you do this?

Re: Logitech Harmony switching on kaku module

Posted: Tuesday 15 December 2015 22:36
by heggink
I added a device to the harmony hub that isn't there. I think I used an xbox or so. You can tell domoticz to add the new device so it's there. Then add a script in domoticz once it gets triggered.

Re: Logitech Harmony switching on kaku module

Posted: Tuesday 15 December 2015 22:55
by rednas
Thanks for your reply, but I really don't know how to do this. I know how to add an xbox in the Harmony.
But how do I add this device to Domoticz AND how does Domoticz know to do something when I press a button on my remote?

Re: Logitech Harmony switching on kaku module

Posted: Thursday 24 December 2015 9:41
by heggink
To add the device to domoticz, I don't recall how I did that but I believe I told domoticz to scan for new services (there is this option somewhere) after which I found it in the devices menu. Just google and you will find it (that's hours I found it). After that, you can trigger anything in domoticz whether lua or blocky.

Re: Logitech Harmony switching on kaku module

Posted: Thursday 07 January 2016 22:41
by rednas
Domoticz only knows whether a certain activity is active or not. But I want to add a device in my startup sequence of an activity.
I can not find out how to do this. Can you maybe show a trigger you made using lua or blocky?

Thanks!

Re: Logitech Harmony switching on kaku module

Posted: Tuesday 19 January 2016 12:07
by heggink
I have not tried that as I added a dummy device in the harmony hub (does nothing but domoticz sees it and acts on it). That said, I can start the harmony hub devices from domoticz so would expect that you could trigger them from a script as well. After all, they are 'just' devices in domoticz...

Re: Logitech Harmony switching on kaku module

Posted: Wednesday 20 January 2016 21:07
by rednas
As far as I know it is not possible to figure out whether a device is on or off in Domoticz. I can only see whether an activity is started or not.
Is that what you mean?

Re: Logitech Harmony switching on kaku module

Posted: Wednesday 20 January 2016 23:17
by heggink
yes

Re: Logitech Harmony switching on kaku module

Posted: Tuesday 01 March 2016 21:24
by rednas
So I am currently investigating again in how to solve this problem.

Is it possible to do something when Harmony Hub logs the first action shown below? So at the "Changing activity"?

2016-03-01 21:19:23.202 Harmony Hub: Changing activity
.....
2016-03-01 21:19:35.755 Harmony Hub: Finished changing activity
2016-03-01 21:19:35.755 (Logitech Harmony Hub) Lighting 2 (PowerOff) [Device of activity in Harmony Hub]
2016-03-01 21:19:35.762 (Logitech Harmony Hub) Lighting 2 (Watch TV) [Device of activity in Harmony Hub]

You can see that it takes more than 12 seconds from the actual button press to the actual change in activity. However, I would like to do something on the press of te button. In this way I would be able to turn on a kaku switch at the button press, add a delay in the Harmony Hub and then switch on all the devices with the Harmony Hub.

Does someone know if this is possible?

Thanks in advance!

Re: Logitech Harmony switching on kaku module

Posted: Wednesday 08 March 2017 19:05
by Freemann
Here also very curious if its possible to hook on the "Harmony Hub: Changing activity" event.
I want to switch my receiver just after pushing the button on my remote OR switching activity in Domoticz.

Would be really cool if this is possible :)

Re: Logitech Harmony switching on kaku module

Posted: Thursday 09 March 2017 7:21
by jannl
When you switch an activity with your remote, this should also be visible in Domoticz. Just check the harmony hardware in Domoticz, every activity should have a switch in Domoticz.

Re: Logitech Harmony switching on kaku module

Posted: Thursday 09 March 2017 7:32
by Freemann
The switch is there, but the "problem" is that the switch get switch when the activity change is done. So on activity PowerOff I switch my devices off and want to turn them on when activating "Watch TV". But in the current way the harmony support is working, the device Het switch on by domoticz when the harmony returns its done with turning on all devices.

So when hitting the "watch tv" ony harmony, the following happens:
0. Harmony informs domoticz it's going to switch activity
1. Harmony turns on receiver
2. Harmony turns on decoder
3. Harmony turns on tv
4. Harmony informs domoticz it's done switching activity
5. Now domoticz turns the switches.

Because 0. doesn't trigger domoticz, it's impossible to trigger a event and only when it's in 5.

Re: Logitech Harmony switching on kaku module

Posted: Thursday 09 March 2017 9:06
by Nautilus
Freemann wrote:The switch is there, but the "problem" is that the switch get switch when the activity change is done. So on activity PowerOff I switch my devices off and want to turn them on when activating "Watch TV". But in the current way the harmony support is working, the device Het switch on by domoticz when the harmony returns its done with turning on all devices.

So when hitting the "watch tv" ony harmony, the following happens:
0. Harmony informs domoticz it's going to switch activity
1. Harmony turns on receiver
2. Harmony turns on decoder
3. Harmony turns on tv
4. Harmony informs domoticz it's done switching activity
5. Now domoticz turns the switches.

Because 0. doesn't trigger domoticz, it's impossible to trigger a event and only when it's in 5.
Freemann wrote:I want to switch my receiver just after pushing the button on my remote OR switching activity in Domoticz.
Is this then something you cannot add to the Harmony activity? I don't think there is any easy way to tap into the "changing activity" unless some major forking is done for the Harmony hardware plugin.

Again, I don't know what it is that you exactly want to achieve. but in case I was in a similar situation I would probably try this (requires that you can receive IR commands and trigger Domoticz actions from those).
1. Add a manual IR command to the "when activity starts" section in Harmony.
2. Learn the command to IR receiver and then link it to trigger a json command to turn on a dummy switch in Domoticz.
3. Create blockly/lua script that is based on the change of this dummy switch.

I have a Flirc IR receiver (Flirc is recognized as keyboard and you can link any IR command to any key press or combination of key presses) hooked up to my RPi which receives the IR commands and then I use triggerhappy (comes with Raspbian) to link the certain key press pattern to a json call to Domoticz. I'm sure similar approach is possible with other IR receivers as well.

Re: Logitech Harmony switching on kaku module

Posted: Thursday 09 March 2017 9:16
by Freemann
What I try to accomplish is that my receiver/TV is only on when the activity needs it.
Becasue my receiver has a standby usage of >20W, I want to kill it with a NEO smartplug.

So on powerOff the devices go off (here no problems) and on PowerOn activity, the plugs/devices should be turned on automagicly.

Re: Logitech Harmony switching on kaku module

Posted: Thursday 09 March 2017 9:30
by Nautilus
Freemann wrote:What I try to accomplish is that my receiver/TV is only on when the activity needs it.
Becasue my receiver has a standby usage of >20W, I want to kill it with a NEO smartplug.

So on powerOff the devices go off (here no problems) and on PowerOn activity, the plugs/devices should be turned on automagicly.
Ok, I see the logic now :) Then you probably also need to add some delay for the receiver commands so that it will accept them after powering on. In any case, in my situation I'd do as described in the previous reply, but as it requires specific hardware it of course isn't a universal solution. Maybe something could be built via IFTTT service (which can be linked to Harmony), but I suspect there is some delay as well. Procedure would be something like "IF Hamony activity changes to X, THEN user maker channel to call url to turn on dummy switch in Domoticz."

Btw, seen the comments in the "cheap chinese z-wave device" topic concerning NEO plugs? I'd be very careful with what kind of hardware / situation I'd use those (I have two as well).

Re: Logitech Harmony switching on kaku module

Posted: Thursday 09 March 2017 14:02
by Freemann
I'm already using 12 NEO smartplugs. The work very well and also inside the look almost the same as the fibaro's. The main-part: the relay, is the same as the fibaro.

I'm very pleased with them :)

Will look into ifttt :)

Edit:
Looks like there are no harmony triggers like "if activity X is activated".

Will look at the usb IR receiver.

Re: Logitech Harmony switching on kaku module

Posted: Thursday 09 March 2017 18:11
by jannl
You could switch via Domoticz, then you know.

Re: Logitech Harmony switching on kaku module

Posted: Thursday 09 March 2017 18:13
by Freemann
I could, but my wife wouldn't. Switching through domoticz has a very low WAF.