Problem running Hue scenes using Vera scenes

I’m new on here and to HA in general, I’ve tried searching for this issue and couldn’t find anything that matches so hopefully someone can help.

When I use the advance editor in a Vera scene and Service: urn:upnp-org:serviceId:althue1
RunHueScene to set an ID from the ALTHUE Scenes tab nothing happens. The logs show this-

08 06/28/20 14:56:47.386 JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: RunScene <0x73eeb520>
08 06/28/20 14:56:47.386 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1 <0x73eeb520>
08 06/28/20 14:56:47.386 JobHandler_LuaUPnP::HandleActionRequest argument action=RunScene <0x73eeb520>
08 06/28/20 14:56:47.386 JobHandler_LuaUPnP::HandleActionRequest argument SceneNum=10 <0x73eeb520>
08 06/28/20 14:56:47.386 JobHandler_LuaUPnP::HandleActionRequest argument rand=0.1438247386178233 <0x73eeb520>
08 06/28/20 14:56:47.387 Scene::RunScene running 10 Huescenetest <0x73eeb520>
08 06/28/20 14:56:47.387 JobHandler_LuaUPnP::HandleActionRequest device: 16 service: urn:upnp-org:serviceId:althue1 action: RunHueScene <0x73eeb520>
08 06/28/20 14:56:47.387 JobHandler_LuaUPnP::HandleActionRequest argument hueSceneID=4Tn-V5wt2Ks-6jR <0x73eeb520>
01 06/28/20 14:56:47.399 luup_log:12: ALTHUE: error: failed to connect to http:///api//groups/0/action, http.request returned nil <0x73eeb520>

If I run the Hue scene on the Device Scens tab it works-

08 06/28/20 14:56:17.595 JobHandler_LuaUPnP::HandleActionRequest device: 12 service: urn:upnp-org:serviceId:althue1 action: RunHueScene <0x74ab9520>
08 06/28/20 14:56:17.595 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=12 <0x74ab9520>
08 06/28/20 14:56:17.596 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:althue1 <0x74ab9520>
08 06/28/20 14:56:17.596 JobHandler_LuaUPnP::HandleActionRequest argument action=RunHueScene <0x74ab9520>
08 06/28/20 14:56:17.596 JobHandler_LuaUPnP::HandleActionRequest argument hueSceneID=4Tn-V5wt2Ks-6jR <0x74ab9520>

To me it looks like there is a missing destination in the address http:///api//groups/0/action, however that could just mean the default.

Any ideas?

This works OK for me I’ve just tested it.

This is what I see in the Vera Log after running my Vera scene that starts a Hue scene.

JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: RunScene <0x6c47c520> 08 06/28/20 16:34:08.851 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1 <0x6c47c520> 08 06/28/20 16:34:08.851 JobHandler_LuaUPnP::HandleActionRequest argument action=RunScene <0x6c47c520> 08 06/28/20 16:34:08.852 JobHandler_LuaUPnP::HandleActionRequest argument SceneNum=120 <0x6c47c520> 08 06/28/20 16:34:08.852 JobHandler_LuaUPnP::HandleActionRequest argument rand=0.6047269521326943 <0x6c47c520> 08 06/28/20 16:34:08.852 Scene::RunScene running 120 Hue Scene Arctic Aurora <0x6c47c520> 08 06/28/20 16:34:08.877 JobHandler_LuaUPnP::HandleActionRequest device: 420 service: urn:upnp-org:serviceId:althue1 action: RunHueScene <0x6c47c520> 08 06/28/20 16:34:08.878 JobHandler_LuaUPnP::HandleActionRequest argument hueSceneID=xuow8ItGj0MpkD3 <0x6c47c520>

Is your Hue Scene ID correct ?

hueSceneID=4Tn-V5wt2Ks-6jR

Try taking out the dashes.

Thank you for the replyThe scene ID is correct, I’ve tried a few different ones for different scene names on different lamps.

I created a new Hue scene just to see if they were showing incorrectly and not being recognised, also did another turn it off an on again.

There was an extra error on the first attempt-

08 06/28/20 17:53:23.246 Scene::RunScene running 10 Huescenetest <0x7441b520>
08 06/28/20 17:53:23.247 JobHandler_LuaUPnP::HandleActionRequest device: 14 service: urn:upnp-org:serviceId:althue1 action: RunHueScene <0x7441b520>
08 06/28/20 17:53:23.247 JobHandler_LuaUPnP::HandleActionRequest argument hueSceneID=0PdyK-2LsNR-hXF <0x7441b520>
06 06/28/20 17:53:23.258 Device_Variable::m_szValue_set device: 14 service: urn:upnp-org:serviceId:althue1 variable: Credentials was: EMPTY now: #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x7441b520>
01 06/28/20 17:53:23.259 luup_log:12: ALTHUE: error: failed to connect to http:///api//groups/0/action, http.request returned nil <0x7441b520>

I’m wondering if there is just an issue with the Hue bridge has been added, might try removing it and adding back in.

I turned DEBUG on for the Hue to see what extra logging I could get-

08 06/28/20 18:04:09.769 JobHandler_LuaUPnP::HandleActionRequest device: 14 service: urn:upnp-org:serviceId:althue1 action: RunHueScene <0x7441b520>
08 06/28/20 18:04:09.769 JobHandler_LuaUPnP::HandleActionRequest argument hueSceneID=0PdyK-2LsNR-hXF <0x7441b520>
50 06/28/20 18:04:09.780 luup_log:12: ALTHUE: debug: RunHueScene(0PdyK-2LsNR-hXF) <0x7441b520>
50 06/28/20 18:04:09.780 luup_log:12: ALTHUE: debug: ALTHueHttpCall(14,PUT,groups/0/action,{“scene”: “0PdyK-2LsNR-hXF”}) <0x7441b520>
50 06/28/20 18:04:09.781 luup_log:12: ALTHUE: debug: Calling Hue with PUT http:///api//groups/0/action , body:{“scene”: “0PdyK-2LsNR-hXF”} <0x7441b520>
01 06/28/20 18:04:09.782 luup_log:12: ALTHUE: error: failed to connect to http:///api//groups/0/action, http.request returned nil <0x7441b520>

It definitelylooks like it is the call to http:///api//groups/0/action that is failing, would you mind seeing what you get with debug on please?

I can but I am not at home right now. I will have a look for you when I get back.

I just logged in remotely to take a quick look. In the Alt Hue device on my Vera none of my Hue scenes have dashes in their names.

Perhaps this is normal or not?

I would try repairing the Hue Bridge again to the Alt Hue plugin.

With debug enabled I see in the logs it connects to my Hue Bridge 192.168.1.11

ALTHUE: debug: RunHueScene(xuow8ItGj0MpkD3) <0x6b07c520>
50 06/28/20 19:04:56.895 luup_log:420: ALTHUE: debug: ALTHueHttpCall(420,PUT,groups/0/action,{“scene”: “xuow8ItGj0MpkD3”}) <0x6b07c520>
50 06/28/20 19:04:56.896 luup_log:420: ALTHUE: debug: Calling Hue with PUT http://192.168.1.11/api/NGsxyfBGgVqwnEdOSa4yZjlvRxied-JDn4hFeg0vn/groups/0/action , body:{“scene”: “xuow8ItGj0MpkD3”} <0x6b07c520>
50 06/28/20 19:04:57.018 luup_log:420: ALTHUE: debug: request:1 <0x6b07c520>
50 06/28/20 19:04:57.019 luup_log:420: ALTHUE: debug: code:200 <0x6b07c520>
50 06/28/20 19:04:57.019 luup_log:420: ALTHUE: debug: data:[{“success”:{"/groups/0/action/scene":“xuow8ItGj0MpkD3”}}] <0x6b07c520>

I unpaired, deleted the bridge, then uninstalled Althue and reinstalled. No joy.

Thank you for checking your debug logging, definitely looks like there is an issue with the PUT command on mine not having the right information/content. I’ll have a read upon Luup and see what happens if I try coding it in.

Only other thing I can suggest is that when you uninstall a plugin from Vera it does not actually remove the plugin files off the system.

I would try manually deleting the AltHue plugin files after uninstalling the plugin and try again.

All plugin files can be found in the /etc/cmh-ludl folder. You will need to know the root password of your Vera unit. You can either use WinSCP or Putty to access Vera and delete the files.

D_ALTHUE.json.lzo
D_ALTHUE.xml.lzo
D_ALTHUE_UI7.json.lzo
I_ALTHUE.xml.lzo
J_ALTHUE.js.lzo
L_ALTHUE.lua.lzo
S_ALTHUE.xml.lzo

Completely deleted and reloaded, still not working.

08 06/28/20 22:26:08.619 JobHandler_LuaUPnP::HandleActionRequest argument hueSceneID=4Tn-V5wt2Ks-6jR <0x740bb520>
06 06/28/20 22:26:08.630 Device_Variable::m_szValue_set device: 104 service: urn:upnp-org:serviceId:althue1 variable: Credentials was: EMPTY now: #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x740bb520>
01 06/28/20 22:26:08.631 luup_log:97: ALTHUE: error: failed to connect to http:///api//groups/0/action, http.request returned nil <0x740bb520>

Running the scene under the device shows this

Calling Hue with PUT http://192.168.0.12/api/SIG496ljt0VAP3tXruGKnhSpXnxu4ptAbmANilwo/groups/0/action , body:{“scene”: “4Tn-V5wt2Ks-6jR”} <0x748bb520>

So definitely looking like the whole command is not being sent for some reason. Trying to work out the LUA now.

Only other thing I can suggest is to go to your Philips Hue account - Apps find Alt Hue in the list and press the Deactivate button and then try pairing the Alt Hue plugin to the Hue Bridge again.

https://account.meethue.com/login-country

Your errors says:

variable: Credentials was: EMPTY now:

Seems to be some problem with the connection.

Can you operate the Hue lights OK from Vera turning them on and off?

I assume your scene is just the same as mine in the Advanced Editor.

This is what mine looks like.

And in the Philips Hue device this is what my Hue scenes IDs look like.

1 Like

Yes, mine does not have room names in the scene names, but otherwise the same.

I’ve found the section of code in L_ALTHUE.lua which looks like it generates the request in the ALTHueHttpCall function. It has been a long time since I’ve done any serious coding, however I’m thinking that the correct ‘lul_device’ parameter is not getting passed in the function call so the string does not get built properly. Getting a bit late now so will look at this another time.

Ran a full reset of the Veraplus, installed ALTHue and tried again. The command is still not being built properly when run in a scene, though running the Hue scene within the Hue device works.

Uninstalled ALTHue and tried Hue2 - that couldn’t even see any lamps.

Installed ALTHue again and noticed something, you were running the scene on the Philips Hue device not the lamp…

DOH!

Yeah that works.

LOL. In the Vera scene yes, you have to select the AltHue plugin device not the individual Hue bulbs.

That’s why I posted screen shots so you could see what I was doing.

Glad you got it sorted.

I think it was because the action was available under a lamp I assumed it was valid.

At least I have had a good dig under the surface.

Thanks for your help.

1 Like

I never noticed for lamps. I knew the Hue scenes are all stored on the Hue Bridge, so when I setup my Vera scene I just instinctively picked the “Philips Hue” device aka the AltHue plugin device.

1 Like

I don’t remember even noticing ‘Philips Hue’ as a device until I reset and rebuilt the setup. I might have messed the system up as I did have the Hue2 plugin installed at the same time as ALTHue at one point.

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules