Hi guys,
I’ve been reading through the wiki and grinding the search-function, but I can’t figure this one out myself. I want to modify some properties of a scene. Consider a simple example:
I have a scene that turns on the heat, whenever the temperature drops to say 15C.
The property of the scene looks like this:
http://img402.imageshack.us/img402/9703/screenshotevent.jpg
(Can I embed images in my post? Usually [img] works, but not here)
… and the JSON data for this event looks like this:
...
"scenes": [
{
"name": "Heat ON",
"posx": 0,
"posy": 0,
"Device_Num_56": {
"event_2_1": {
"name": "Heat on",
"Enabled": "1",
"argument_1": "15",
"LastEval": 0
}
},
"id": 1,
"Timestamp": 1299829983,
"room": 0
}
],
...
I wanna modify those 15 degrees, but I can’t get my head around it >:(
Now this is what I know:
Assuming my scene has the number 1
If I want to run a scene I do it like this:
http://ip:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=1
If I want to rename a scene, I can do it like this:
http://ip:3480/data_request?id=scene&action=rename&scene=1&name=NEW_SCENE_NAME
According to the wiki, I’m supposed to use an action called ModifyUserData, to modify the variable argument_1.
I got this from a colleague, but I can’t modify it to work:
http://ip:3480/data_request?id=lu_action&DeviceNum=0&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=ModifyUserData&inUserData= { "devices": { "devices_19": { "states": { "states_25": { "value": "2,1d,5,3,1d,40" } } } }, "scenes": {}, "sections": { }, "rooms": { }, "users": { }
}
(I’ve inserted a newline and indented the JSON for readability)
Can any of you guys point me in the right direction - I think I’m close! ;D
Regards
/Mikkel