Hub child Device status

Hey Rene,

One more question if you could. Is it possible to get the device status of a given harmony hub child device. For example, I turn on my AV receiver that is connected to a zwave power outlet. My harmony hub is always on and controls the AV receiver. It takes several seconds for the receiver to boot from power-up, and several more seconds for each HDMI device connected to the receiver to become fully operational. These boot times are somewhat arbitrary. So I’m looking for a way in which the harmony hub can poll devices to know exactly when they come on line–so that I can then send the individual devices commands.

Thx again.

For this, you would have to have openLuup connect to the device directly and get the status from the device. The Harmony hub actually does not know the status of the device. It is a one way remote. The device does not feedback to the hub. I have something similar where I have my openLuup connect to the receiver through a plugin and I get status from the receiver directly.

OK, I thought as much. Was hoping there was some way to verify if a call was made successfully to the hub. Then I could test for that. Looks like I will have to go with arbitrary timings.

Hi Buxton,

I do something similar and I took the approach that once the activity is fully started, all devices are ready to send the commands to. With the 3.0 release there is a new variable activityStatus. This is zero(0) what the hub is off (after PowerOff command), 1 when an activity is starting (other than -1, PowerOff), 2 when an activity is fully started, and 3 when the hub is powering off, i.e. running the PowerOff activity.

Maybe this can help.

I could take this one level further if you need. Each activity is build of a number of steps (devices to turn on, commands to send). The hub reports the total number of steps and each step completion, but right now those messages are ignored. I could put those in a variable as well and you can then monitor that whilst an activity is starting, i.e. activityStatus == 1.

Let me know.

Cheers Rene

hub reports the total number of steps and each step completion

That would be cool. I’m thinking of a return lua table with a field for step number and the step completion as a field with a Boolean value. That way, I could watch/test for activityStatus as 2, and then I could iterate through the return table, and if the total count of true values did not match the total number of steps, I’d know to reset the hub to a start state, and then retry the sequence.

It might seem like a lot of extra work to go through to just turn on your TV, but in my case, the important activity event sequence occurs when my alarm panel enters an alarm state. When in alarm, via the Harmony hub, I’m able to bring up my surveillance cameras on my TV via a sequence of steps saved in the Harmony activity, — and of course this scenario could happen in the middle of the night when one is not thinking too clearly so the more robust the response, the better …

Hi Buxton,

Ok, I’ll add it to the next release.

BTW, You should be able to figure out the steps by studying the configuration for the activity. If you run the get_config http request (see manual) that you get a json with all those details.

Cheers Rene

Awesome Rene,
I’ll take a look at the http json call this weekend. Thx for looking into this.

Hi Buxton,

I put V3.2 in my github development branch https://github.com/reneboer/vera-Harmony-Hub/tree/development. You can get the L_Harmony.lua and S_Harmony.xml files from there.

Added is a variable StartingActivityStep that reports the step details. It holds three numbers: d,n,m. D is the device number of device being started, n is the step number and m is the total number of steps. E.g. “12345678,2,6”

Let me know if it works for you.

Cheers Rene

OK great, will let you know when I get things running. Thx a bunch.

My StartingActivityStep variable =50702784,3,3. I don’t express my devices at the moment as I only need to activate activities via reactor triggers. So it’s difficult to tell if the first number refers to a device, and if so, which device. Is there a way to determine the device correlation to number without actually creating devices?

Hi,

I added a four new actions FindActivityByID, FindActivityByName, FindDeviceByID and FindDeviceByName. Easiest use is with ALTUI. Just select the actions tab, Put in the device ID next to the FindDeviceByID and click. It will tell you the device name.

Other way is to use the http handler. You can find the details in the manual. Last there are new variables in the Plugin; Activities, and Devices. They hold the details of what is found on your Hub whether you created devices on you Vera for it or not.

Cheers Rene

OK got it Thx