<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to CreateDeviceModel</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateDeviceModel/</link><description>Recent changes to CreateDeviceModel</description><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/CreateDeviceModel/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 25 Sep 2018 08:32:31 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/CreateDeviceModel/feed" rel="self" type="application/rss+xml"/><item><title>CreateDeviceModel modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateDeviceModel/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Tue, 25 Sep 2018 08:32:31 -0000</pubDate><guid>https://sourceforge.nete19dd07640a46bce7d6847f0cb342abdb0135a86</guid></item><item><title>CreateDeviceModel modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateDeviceModel/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -2,7 +2,7 @@

 Creates a new device model in the domain of the owner identified by the apikey

-Path: cs-ws/resources/admin/devicemode        Method: POST
+Path: cs-ws/resources/admin/devicemodel        Method: POST

 Parameters

@@ -44,7 +44,7 @@
 Example

 ~~~~~~
-POST http://localhost/cs-ws/resources/admin/sensormodel?apikey=1234 HTTP/1.1
+POST http://localhost/cs-ws/resources/admin/devicemodel?apikey=1234 HTTP/1.1
 &amp;lt;devicemodel&amp;gt;
    &amp;lt;name&amp;gt;MyTemperatureDeviceModel&amp;lt;/name&amp;gt;
    &amp;lt;sensor&amp;gt;
&amp;lt;/sensor&amp;gt;&amp;lt;/devicemodel&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Tue, 25 Sep 2018 08:32:27 -0000</pubDate><guid>https://sourceforge.net7b7f305290ea9ef2e1f75491e6d42645035a8a41</guid></item><item><title>WikiPage CreateDeviceModel modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateDeviceModel/</link><description>&lt;pre&gt;--- v2
+++ v3
@@ -28,6 +28,11 @@
       &lt;name&gt;...&lt;/name&gt;               internal name of config parameter
    &lt;/config&gt;
    ...
+   &lt;script&gt;                 optional, name and version of attached script
+      &lt;name&gt;...&lt;/name&gt;
+      &lt;version&gt;...&lt;/version&gt;   
+   &lt;/script&gt;
+   ...
 &lt;/devicemodel&gt;
 ~~~~~~
 
@@ -54,6 +59,10 @@
       &lt;displayname&gt;Maximum Position&lt;/displayname&gt;
       &lt;name&gt;maxpos&lt;/name&gt;
    &lt;/config&gt;
+   &lt;script&gt;
+      &lt;name&gt;TestScript3&lt;/name&gt;
+      &lt;version&gt;1&lt;/version&gt;   
+   &lt;/script&gt;
 &lt;/devicemodel&gt;
 
 HTTP/1.1 200 OK
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sun, 23 Sep 2012 10:46:25 -0000</pubDate><guid>https://sourceforge.netc01d71276122e3eeadd953f12a78814df3a628cb</guid></item><item><title>WikiPage CreateDeviceModel modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateDeviceModel/</link><description>&lt;pre&gt;--- v1
+++ v2
@@ -34,7 +34,7 @@
 Errors:
 
 * 401 UNAUTHORIZED if key is invalid or not admin key
-* 409 CONFLICT if sensor model already exists
+* 409 CONFLICT if device model already exists
 
 Example
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sat, 22 Sep 2012 20:32:39 -0000</pubDate><guid>https://sourceforge.netcbcda63f0d5bf765abf45a95284f3e2d72328ae5</guid></item><item><title>WikiPage CreateDeviceModel modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateDeviceModel/</link><description>### Create new Device Model ###

Creates a new device model in the domain of the owner identified by the apikey

Path: cs-ws/resources/admin/devicemode        Method: POST

Parameters

* apikey

Data

~~~~~~
&lt;devicemodel&gt;
   &lt;name&gt;...&lt;/name&gt;
   &lt;sensor&gt;
      &lt;name&gt;...&lt;/name&gt;      name of sensor within device model
      &lt;model&gt;...&lt;/model&gt;    model of the sensor
   &lt;/sensor&gt;
   ...
   &lt;actor&gt;
      &lt;name&gt;...&lt;/name&gt;      name of actor within device model
      &lt;model&gt;...&lt;/model&gt;    model of the actor
   &lt;/actor&gt;
   ...
   &lt;config&gt;
      &lt;displayname&gt;...&lt;/displayname&gt; gui name of config parameter
      &lt;name&gt;...&lt;/name&gt;               internal name of config parameter
   &lt;/config&gt;
   ...
&lt;/devicemodel&gt;
~~~~~~

Errors:

* 401 UNAUTHORIZED if key is invalid or not admin key
* 409 CONFLICT if sensor model already exists

Example

~~~~~~
POST http://localhost/cs-ws/resources/admin/sensormodel?apikey=1234 HTTP/1.1
&lt;devicemodel&gt;
   &lt;name&gt;MyTemperatureDeviceModel&lt;/name&gt;
   &lt;sensor&gt;
      &lt;name&gt;TemperatureSensor&lt;/name&gt;
      &lt;model&gt;SimpleTemperatureSensorModel&lt;/model&gt;
   &lt;/sensor&gt;
   &lt;actor&gt;
      &lt;name&gt;position&lt;/name&gt;
      &lt;model&gt;WaterValve&lt;/model&gt;
   &lt;/actor&gt;
   &lt;config&gt;
      &lt;displayname&gt;Maximum Position&lt;/displayname&gt;
      &lt;name&gt;maxpos&lt;/name&gt;
   &lt;/config&gt;
&lt;/devicemodel&gt;

HTTP/1.1 200 OK
~~~~~~
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sat, 22 Sep 2012 18:46:36 -0000</pubDate><guid>https://sourceforge.netf1d5c7ecc89b6e36f291cbcd7bd7257b6409ef7c</guid></item></channel></rss>