<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.mios.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.mios.com/index.php?action=history&amp;feed=atom&amp;title=ModifyUserData</id>
		<title>ModifyUserData - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.mios.com/index.php?action=history&amp;feed=atom&amp;title=ModifyUserData"/>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=ModifyUserData&amp;action=history"/>
		<updated>2026-04-28T11:54:55Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.8</generator>

	<entry>
		<id>http://wiki.mios.com/index.php?title=ModifyUserData&amp;diff=8359&amp;oldid=prev</id>
		<title>Mcvflorin at 11:56, 28 November 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=ModifyUserData&amp;diff=8359&amp;oldid=prev"/>
				<updated>2017-11-28T11:56:17Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 11:56, 28 November 2017&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ModifyUserData is the action used to change information like adding rooms, renaming devices, scenes and so on.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ModifyUserData is the action used to change information like adding rooms, renaming devices, scenes and so on.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;It works as a UPNP POST request to http://IP&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;/port_49451&lt;/del&gt;/upnp/control/hag which contains an XML envelope:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;It works as a UPNP POST request to http://IP&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;:3480&lt;/ins&gt;/upnp/control/hag which contains an XML envelope:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key micasaverde_wiki:diff:version:1.11a:oldid:8146:newid:8359 --&gt;
&lt;/table&gt;</summary>
		<author><name>Mcvflorin</name></author>	</entry>

	<entry>
		<id>http://wiki.mios.com/index.php?title=ModifyUserData&amp;diff=8146&amp;oldid=prev</id>
		<title>Mcvdaniel at 13:28, 11 June 2015</title>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=ModifyUserData&amp;diff=8146&amp;oldid=prev"/>
				<updated>2015-06-11T13:28:20Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:28, 11 June 2015&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ModifyUserData is the action used to change information like adding rooms, renaming devices, scenes and so on.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ModifyUserData is the action used to change information like adding rooms, renaming devices, scenes and so on.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;It works as a UPNP POST request to http://IP/port_49451/upnp/control/hag &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;who contain &lt;/del&gt;an XML envelope:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;It works as a UPNP POST request to http://IP/port_49451/upnp/control/hag &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;which contains &lt;/ins&gt;an XML envelope:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key micasaverde_wiki:diff:version:1.11a:oldid:3015:newid:8146 --&gt;
&lt;/table&gt;</summary>
		<author><name>Mcvdaniel</name></author>	</entry>

	<entry>
		<id>http://wiki.mios.com/index.php?title=ModifyUserData&amp;diff=3015&amp;oldid=prev</id>
		<title>Henk at 20:47, 19 May 2011</title>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=ModifyUserData&amp;diff=3015&amp;oldid=prev"/>
				<updated>2011-05-19T20:47:28Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:47, 19 May 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:User Instructions]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ModifyUserData is the action used to change information like adding rooms, renaming devices, scenes and so on.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ModifyUserData is the action used to change information like adding rooms, renaming devices, scenes and so on.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key micasaverde_wiki:diff:version:1.11a:oldid:2658:newid:3015 --&gt;
&lt;/table&gt;</summary>
		<author><name>Henk</name></author>	</entry>

	<entry>
		<id>http://wiki.mios.com/index.php?title=ModifyUserData&amp;diff=2658&amp;oldid=prev</id>
		<title>Micasaverde: New page: ModifyUserData is the action used to change information like adding rooms, renaming devices, scenes and so on.  It works as a UPNP POST request to http://IP/port_49451/upnp/control/hag who...</title>
		<link rel="alternate" type="text/html" href="http://wiki.mios.com/index.php?title=ModifyUserData&amp;diff=2658&amp;oldid=prev"/>
				<updated>2011-01-21T14:11:22Z</updated>
		
		<summary type="html">&lt;p&gt;New page: ModifyUserData is the action used to change information like adding rooms, renaming devices, scenes and so on.  It works as a UPNP POST request to http://IP/port_49451/upnp/control/hag who...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;ModifyUserData is the action used to change information like adding rooms, renaming devices, scenes and so on.&lt;br /&gt;
&lt;br /&gt;
It works as a UPNP POST request to http://IP/port_49451/upnp/control/hag who contain an XML envelope:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;s:envelope s:encodingStyle=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot; xmlns:s=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;s:body&amp;gt;	&lt;br /&gt;
	&amp;lt;u:modifyuserdata xmlns:u=&amp;quot;urn:schemas-micasaverde-org:service:HomeAutomationGateway:1&amp;quot;&amp;gt;		&lt;br /&gt;
	&amp;lt;inuserdata&amp;gt;{&amp;quot;devices&amp;quot;: {    &lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;scenes&amp;quot;: {&lt;br /&gt;
    &amp;quot;scenes_1000001&amp;quot;: {&lt;br /&gt;
      &amp;quot;id&amp;quot;: 1000001,&lt;br /&gt;
      &amp;quot;name&amp;quot;: &amp;quot;New scene&amp;quot;,&lt;br /&gt;
      &amp;quot;posx&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;posy&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;room&amp;quot;: 0&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;sections&amp;quot;: {    &lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;rooms&amp;quot;: [    &lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;users&amp;quot;: {    &lt;br /&gt;
  }&lt;br /&gt;
  }&amp;lt;/inuserdata&amp;gt;		&lt;br /&gt;
  		&amp;lt;dataformat&amp;gt;json&amp;lt;/dataformat&amp;gt;  &lt;br /&gt;
	&amp;lt;/u:modifyuserdata&amp;gt;&lt;br /&gt;
	&amp;lt;/s:body&amp;gt;&lt;br /&gt;
  &amp;lt;/s:envelope&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The objects from the JSON object are added if they contain the tag &amp;quot;json_action&amp;quot;: &amp;quot;add&amp;quot;, deleted if they contain &amp;quot;json_action&amp;quot;: &amp;quot;del&amp;quot; or merged if neither one of those is contained (default action).&lt;br /&gt;
&lt;br /&gt;
For example, assume that the data is currently like this: &lt;br /&gt;
&lt;br /&gt;
  &amp;quot;Room&amp;quot;: {&lt;br /&gt;
        &amp;quot;PK_Room_1&amp;quot;: {&lt;br /&gt;
            &amp;quot;Description&amp;quot;: &amp;quot;Living Room&amp;quot;,&lt;br /&gt;
            &amp;quot;FK_Section&amp;quot;: &amp;quot;1&amp;quot; &lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;PK_Room_2&amp;quot;: {&lt;br /&gt;
            &amp;quot;Description&amp;quot;: &amp;quot;Bedroom&amp;quot;,&lt;br /&gt;
            &amp;quot;FK_Section&amp;quot;: &amp;quot;1&amp;quot; &lt;br /&gt;
        } &lt;br /&gt;
&lt;br /&gt;
You want to remove the bedroom and add a new room called &amp;quot;Den&amp;quot; and change the Living Room to be called Kitchen. You put the following in the parm post: &lt;br /&gt;
&lt;br /&gt;
{ &lt;br /&gt;
&lt;br /&gt;
    &amp;quot;Room&amp;quot;: {&lt;br /&gt;
        &amp;quot;PK_Room_2&amp;quot;: {&lt;br /&gt;
            &amp;quot;json_action&amp;quot;: &amp;quot;del&amp;quot; &lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;PK_Room_1&amp;quot;: {&lt;br /&gt;
            &amp;quot;Description&amp;quot;: &amp;quot;Kitchen&amp;quot;,&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;PK_Room_1000002&amp;quot;: {&lt;br /&gt;
            &amp;quot;Description&amp;quot;: &amp;quot;Den&amp;quot;,&lt;br /&gt;
            &amp;quot;FK_Section&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
            &amp;quot;json_action&amp;quot;: &amp;quot;add&amp;quot; &lt;br /&gt;
        } &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
Note that Sections, Rooms, Devices, and Scenes are all numbered: PK_Room_1, scene_2, etc. When are adding new Sections, Rooms, Devices, and Scenes, use a number that is very high (&amp;amp;gt; 1,000,000) to prevent conflicts. Note that Room uses a really large ID. You don't want to use the next available ID, like 3, because that might already have been created by another user, and, since the ID # is the key to merging, your new room would be preserved and there would be 2 room 3's if json_action=add, or your changes would be merged and overwrite room 3 otherwise. When you use large id's &amp;amp;gt; 1m, then on save, the system automatically re-numbers them and re-outputs the renumbered result. This includes relationships as well. So if you are submitting a new scene, device, room, etc., the device may be id 1m, and reference room 2, so it goes into room 2, and a new device id 1m + 1 may reference room 1m. In this case both device id's would be renumbered, and the room 1m would be renumbered, and the reference in the device id 1m + 1 would be changed to reflect this.&lt;br /&gt;
&lt;br /&gt;
If ModifyUserData fails, it return an UPNP error.&lt;/div&gt;</summary>
		<author><name>Micasaverde</name></author>	</entry>

	</feed>