Run scene with lu_action over simple HTTP?

I cannot seem to find how to run a scene with lu_action over simple HTTP…

I used to use messagesend with id=360&28=<scene#> - what’s the corresponding way with Luup?

Thanks.

http://Vera_IP_adress:49451/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=

Thanks! That did it.

I’m trying to have a scene on #1 Vera run a scene on #2 Vera that are on the same LAN network.

Is it possible?
How would that get written?

http://192.170.1.4:49451/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=76

This returns “Error in Lua for scenes and events”

I do not want to bridge networks or add the other Vera as a UPnP devivce.

JOD.

Are you sure running the scene you are calling directly doesn’t have a problem with it’s lua code?

Scene 76 is on Vera #2. There is no code in that scene.

Running this code from a browser triggers scene 76. No problem there.
Adding this code in the Luup tab of a scene on Vera #1 returns the error.

http://192.170.1.4:49451/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=76

Other than that code in a scene on Vera#1, that’s the setup.

JOD.

[tt]luup.inet.wget( , )[/tt]?

luup.inet.wget( http://192.170.1.4:49451, 5 )?/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=76

“Error in Lua for scenes and events”

luup.inet.wget( “http://192.170.1.4:49451, 5 )?/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=76”

“Error in Lua for scenes and events”

with & without http://
with & without 49451

“Error in Lua for scenes and events”

JOD

[quote=“JOD, post:8, topic:164906”]luup.inet.wget( http://192.170.1.4:49451, 5 )?/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=76

“Error in Lua for scenes and events”

luup.inet.wget( “http://192.170.1.4:49451, 5 )?/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=76”

“Error in Lua for scenes and events”

with & without http://
with & without 49451

“Error in Lua for scenes and events”

JOD[/quote]

luup.inet.wget( "http:/192.170.1.4:49451/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=24", 5 )

No more “Error in Lua for scenes and events” But it still does not execute the scene.

I’ve tried with both ports 3480 & 49451.

JOD.

[quote=“JOD, post:10, topic:164906”]No more “Error in Lua for scenes and events” But it still does not execute the scene.

I’ve tried with both ports 3480 & 49451.

JOD.[/quote]

Did you notice I changed the scene number to 24 in the above. Worked for me, at least running from the lua panel in mios developers.

Did you notice I changed the scene number to 24 in the above. Worked for me, at least running from the lua panel in mios developers.
Yes I did, and that you left the quotes in, I changed the scene number back to 76, but no go. It does get a "Message Sent Successful" when used in the sandbox, but does not run the scene.

This is what I’m using as a PC desktop shortcut for the same scene (which works)

C:\Users\Administrator\Downloads\wget.exe -q -O NUL "http://192.170.1.4:3480/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=76"

JOD.

Does

luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{ SceneNum="0"}, 0 )

(adjust scene number and device id) work?

luup.inet.wget( "http:/192.170.1.4:49451/data_request?id=luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”,{ SceneNum=“76”}, 0 )

“Error in Lua for scenes and events”

C:\Users\Administrator\Downloads\wget.exe -q -O NUL http://192.170.1.4:3480/data_request?id=luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”,{ SceneNum=“76”}, 0 )

Does not run.

JOD.

@JOD,
@Ap15e’s example should be paste as is into the Luup window. No additional wrappers are needed, and it wouldn’t include any [tt]luup.inet.wget[/tt] in that case either.

Similarly for @Automator.app’s recommendation:

ie. use this as is:

[tt]luup.inet.wget( “http:/192.170.1.4:49451/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=24”, 5 )[/tt]

No removal of quote characters, and the only thing that would change is the [tt]SceneNum[/tt] value (24) to whatever scene number you’re using.

One “style” uses wget, the other style uses call_action

I’ll start again as I think there’s some confusion.

I’m trying to run scene #76 located on my Vera 2 at address 192.170.1.4
from a scene located on my Vera 1 at address 192.170.1.8

How would that get written?

luup.inet.wget( "http:/192.170.1.4:49451/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=76", 5 )Does not work.

JOD.

there’s a slash missing in the URL being requested.

It should be:
http://…

instead of:
http:/…

It’ll probably display the error in detail in the [tt]LuaUPnP.log[/tt] file, but would also “return” the status as a result of the [tt]luup.inet.wget[/tt] call, probably as a “[tt]400[/tt]” error.

;D That did it. Sigh…
Thanks guys. Big Time…

JOD.

*Edit. The working example.

luup.inet.wget( "http://192.170.1.4:49451/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=76", 5 )

[quote=“guessed, post:17, topic:164906”]there’s a slash missing in the URL being requested.

It should be:
http://…

instead of:
http:/…

It’ll probably display the error in detail in the [tt]LuaUPnP.log[/tt] file, but would also “return” the status as a result of the [tt]luup.inet.wget[/tt] call, probably as a “[tt]400[/tt]” error.[/quote]

[quote=“JOD, post:18, topic:164906”]*Edit. The working example.

luup.inet.wget( "http://192.170.1.4:49451/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=76", 5 )

Thanks for this. It’s handy for running scenes on a bridged vera. The devices come through to the primary Vera, but not the scenes, so cheers. :slight_smile:

Hello somebody!

I have a Door open plugin (Everespring) working with battery.

I’d like to writing this plugin battery level’s number in to the Virtual Thermostat (VST plugin) Cool_temperature setpoint

I make this scene, but not working

local battery_lul = luup.inet.wget (" http://192.168.1.101:3480/data_request?id=variableget&DeviceNum=79&serviceId=urn:micasaverde-com:serviceId:HaDevice1&Variable=BatteryLevel" )

luup.inet.wget (“http://192.168.1.101:3480/data_request?id=lu_action&DeviceNum=83&serviceId=urn:upnp-org:serviceId:TemperatureSetpoint1_Cool&action=SetCurrentSetpoint&NewCurrentSetpoint=battery_lul”)

Please HELP me!

slajgaj@gmail.com