<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hi, in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999210#M29463</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I would like share solution from another post [ h&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;ttps://software.intel.com/en-us/forums/topic/558499 ] I've got from Intel support :)&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;My app send/receive data from cloud during first setup until reboot...After reboot/power on not...unitl executing &lt;STRONG&gt;systemctl restart iotkit-agent&lt;/STRONG&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Summary from post:&lt;/SPAN&gt;&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;iotkit-admin BYPASS iotkit-agent to connect to cloud.You could have situation that &lt;STRONG&gt;iotkit-admin test&lt;/STRONG&gt;&amp;nbsp;work perfect, but not iotkit-agent&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;iotkit-agent is Linux service, and it could be active&amp;nbsp;BUT DISABLED !!!!&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;systemctl start / restart iotkit-agent work only for current session BUT after reboot iotkit-agent go to disabled status&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Look at Jakub comment&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 12px; line-height: 18px;"&gt;&lt;EM&gt;systemctl status iotkit-agent&lt;BR /&gt;
	● iotkit-agent.service - iotkit-agent&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; Loaded: loaded (/lib/systemd/system/iotkit-agent.service; disabled)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; Active: active (running) since Fri 2015-02-06 20:18:27 UTC; 1h 10min ago&lt;BR /&gt;
	&amp;nbsp;Main PID: 309 (node)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; CGroup: /system.slice/iotkit-agent.service&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; └─309 node /usr/bin/iotkit-agent&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 12px; line-height: 18px;"&gt;&lt;EM&gt;You could see what I mean : disabled !!!!!&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Don't use hammer :), just type : &lt;STRONG&gt;systemctl enable iotkit-agent&amp;nbsp;&lt;/STRONG&gt;and everything goes to work.!&lt;/P&gt;</description>
    <pubDate>Tue, 19 May 2015 12:50:00 GMT</pubDate>
    <dc:creator>Zoran_R_1</dc:creator>
    <dc:date>2015-05-19T12:50:00Z</dc:date>
    <item>
      <title>IoT dashboard Control/Actuator working code or tutorial?</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999180#M29433</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I am new to all of this, but fairly technical, UNIX guy, some coding background but I am not a developer full time and am trying to learn Intel's Edison IoT. &amp;nbsp;I have a new&amp;nbsp;Edison and an&amp;nbsp;Arduino and am using the Arduino IDE and SSH to the device. When I started I re-flashed the Edison with the latest and set up an&amp;nbsp;IoT Analytics account. I have the&amp;nbsp;device&amp;nbsp;registered with and and&amp;nbsp;able to send to the analytics dashboard (https://dashboard.us.enableiot.com) and it works fine. I have sent a number of observations temp, humidity and a "seismograph" sensor I created. It all worked fine. I am also able to connect to the Arduino/Edison and read and activate a number of Grove sensors, etc. and it all works fine. I can turn lights on, flash them, read the sound, temp sensors, turn on the relay, etc. all fine.&lt;/P&gt;&lt;P&gt;What I am REALLY trying to do is control an LED from the Cloud. After reading all of the tutorials and getting this far I tried to run the Actuator example program and it didn't work. First it was syntax errors by I managed to correct those (conflicting libraries between the iotkit and arduino libraries. The code compiles fine and I am able to successfully send a command (LED On, value 1, component "powerswitch", command "LED.v1.0", value 1 and did this 5 times successfully tonight.&lt;/P&gt;&lt;P&gt;The problem is nothing happens on the board! No light, no message in the serial window, no message to the user, no error, nothing.&lt;/P&gt;&lt;P&gt;I read that you have to enable mgtt mode not REST so I did that but I'm at a loss. the sample code is complicated to me and I don;t udnerstand all parts of what it is doing. My specific questions are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;how can I view/see a log to even know if the Edison received the call from the cloud?&lt;/LI&gt;&lt;LI&gt;I know the agent is running on the device and can send commands directly from the terminal on my Mac and they work.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;In looking at the code it is unclear to me where the payload is coming in from the cloud server - I see some aJsonObject lines and assume that's them but have no idea what's supposed to be happening there and if it is&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here's the sample code that comes with the iotkit dist (I haven't edited it at all but would change "component" and command to match mine (powerswitch and LED.v1.0). (I am particularly curious about the iotkit.send("power", 1) - why would it be sending when the objective is to receive a 1 or 0 from the cloud??)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//This example reacts for default actuator component if registered on device&lt;BR /&gt;//LED.v1.0 command is used&lt;BR /&gt;//When executed from Control section on dashboard with value 0, LED light is turned off&lt;BR /&gt;//When executed from Control section on dashboard with value 1, LED light is turned on&lt;BR /&gt;//iotkit-agent must use MQTT connection (not REST) for actuation to work.&lt;BR /&gt;//It also sends 1 as power when agent is started.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#include &amp;lt;IoTkit.h&amp;gt; &amp;nbsp; &amp;nbsp;// include IoTkit.h to use the Intel IoT Kit&lt;BR /&gt;#include &amp;lt;Ethernet.h&amp;gt; &amp;nbsp;// must be included to use IoTkit&lt;BR /&gt;#include &amp;lt;aJSON.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// create an object of the IoTkit class&lt;BR /&gt;IoTkit iotkit; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;int temp;&lt;BR /&gt;char buf[112];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void setup() {&lt;BR /&gt;&amp;nbsp; Serial.begin(115200);&lt;BR /&gt;&amp;nbsp; // call begin on the IoTkit object before calling any other methods&lt;BR /&gt;&amp;nbsp; iotkit.begin();&lt;BR /&gt;&amp;nbsp; delay(10500);&lt;BR /&gt;&amp;nbsp; iotkit.send("power", 1);&lt;BR /&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void loop() {&lt;BR /&gt;&amp;nbsp; iotkit.receive(callback);&lt;BR /&gt;&amp;nbsp; delay(5000);&lt;BR /&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void callback(char* json) {&lt;BR /&gt;&amp;nbsp; Serial.println(json);&lt;BR /&gt;&amp;nbsp; aJsonObject* parsed = aJson.parse(json);&lt;BR /&gt;&amp;nbsp; if (&amp;amp;parsed == NULL) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; // invalid or empty JSON&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Serial.println("recieved invalid JSON");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return;&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp; aJsonObject* component = aJson.getObjectItem(parsed, "component");&lt;BR /&gt;&amp;nbsp; aJsonObject* command = aJson.getObjectItem(parsed, "command");&amp;nbsp;&lt;BR /&gt;&amp;nbsp; aJsonObject* argv = aJson.getObjectItem(parsed, "argv");&lt;BR /&gt;&amp;nbsp; aJsonObject* argvArray = argv-&amp;gt;child;&lt;BR /&gt;&amp;nbsp; aJsonObject* name = argvArray-&amp;gt;child; // name : on&lt;BR /&gt;&amp;nbsp; aJsonObject* value = name-&amp;gt;next; // value: 1/0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; if ((component != NULL)) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if (strcmp(component-&amp;gt;valuestring, "actuator") == 0) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if ((command != NULL)) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (strcmp(command-&amp;gt;valuestring, "light") == 0 &amp;amp;&amp;amp; strcmp(value-&amp;gt;valuestring, "0") == 0) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println("Light Off!");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pinMode(13, OUTPUT);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(13, false);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (strcmp(command-&amp;gt;valuestring, "light") == 0 &amp;amp;&amp;amp; strcmp(value-&amp;gt;valuestring, "1") == 0) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println("Light on!");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pinMode(13, OUTPUT);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(13, true);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks to anyone who can help - I am at a standstill at this point and appreciate any feedback that could get me sorted.&lt;/P&gt;&lt;P&gt;D.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2015 07:05:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999180#M29433</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-03T07:05:47Z</dc:date>
    </item>
    <item>
      <title>Hi David.</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999181#M29434</link>
      <description>&lt;P&gt;Hi David.&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;You're almost there. The agent log is in /tmp/agent.log. I would tail this log as you run your actuation example sketch so you can see incoming/outgoing messages processed by the agent:&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;# tail -f /tmp/agent.log&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;One thing to note: if you register a new component on your device, you will need to restart the agent:&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;# systemctl restart iotkit-agent&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;You should see the following in the log as the actuation message comes in from the Cloud:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;"type": "command",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;"transport": "mqtt",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;"content": {&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;"domainId": "c349d0ef-a076-413a-a447-xxxxxxxxx",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;"deviceId": "&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;jasper&lt;/SPAN&gt;-edison",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;"gatewayId": "&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;jasper&lt;/SPAN&gt;-edison",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;"componentId": "805110c5-8f82-4494-a0aa-xxxxxxxxx",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;"command": "LED.v1.0",&lt;BR /&gt;
	&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;"params": [{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;"name": "LED",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;"value": "1"&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}]&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;},&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;"level": "info",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;"message": "STATUS: device/jasper-edison/control",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;"timestamp": "2015-02-03T21:59:38.611Z"&lt;BR /&gt;
	}&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;"level": "info",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;"message": "Fired STATUS: %sdevice/&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;jasper&lt;/SPAN&gt;-edison/control{\"type\":\"command\",\"transport\":\"mqtt\",\"content\":{\"domainId\":\"c349d0ef-a076-413a-a447-xxxxxxx\",\"deviceId\":\"&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;jasper&lt;/SPAN&gt;-edison\",\"gatewayId\":\"&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;jasper&lt;/SPAN&gt;-edison\",\"componentId\":\"805110c5-8f82-4494-a0aa-xxxxxxxx\",\"command\":\"LED.v1.0\",\"params\":[{\"name\":\"LED\",\"value\":\"1\"}]}}",&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;"timestamp": "2015-02-03T21:59:38.614Z"&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;The "callback" function in the sketch is called every 5 seconds (by iotkit.receive) and will handle the actuation message being relayed by the client. The function then parses the message to look for the "LED" parameter value. It will set board pin 13 to that value (0 or 1)..&lt;/P&gt;

&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2015 22:06:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999181#M29434</guid>
      <dc:creator>Brian_B_Intel</dc:creator>
      <dc:date>2015-02-03T22:06:52Z</dc:date>
    </item>
    <item>
      <title>Aside from the other</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999182#M29435</link>
      <description>&lt;P&gt;Aside from the other actuation samples for Python and Node.js, there is some further information in the &lt;A href="https://github.com/enableiot/iotkit-agent/blob/master/README.md#8-actuator-request-processing"&gt;agent wiki&lt;/A&gt;&amp;nbsp;in GitHub.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Samples repo:&lt;/STRONG&gt;&lt;BR /&gt;
	&lt;A href="https://github.com/enableiot/iotkit-samples/tree/master/python"&gt;Python&lt;/A&gt;&lt;BR /&gt;
	&lt;A href="https://github.com/enableiot/iotkit-samples/tree/master/node"&gt;Node.js&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Good luck and let me know how it goes.&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Brian&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2015 22:24:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999182#M29435</guid>
      <dc:creator>Brian_B_Intel</dc:creator>
      <dc:date>2015-02-03T22:24:11Z</dc:date>
    </item>
    <item>
      <title>Thanks very much for replying</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999183#M29436</link>
      <description>&lt;P&gt;Thanks very much for replying Brian - very much appreciated. I'm completely stuck.&lt;/P&gt;

&lt;P&gt;I assume when you say the log is /tmp/agent.log you mean /tmp on the Edison/Arduino, not on my Mac, correct? I logged in to the Edison via Serial as root. I went cd /tmp and ls and I see no agent.log. I looked at what was there and this is what I see. the files in /tmp are bolded below:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Poky (Yocto Project Reference Distro) 1.6 Interactio_Hub ttyMFD2&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Interactio_Hub login: root&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Password:&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[ &amp;nbsp; 30.987805] systemd-fsck[262]: /dev/mmcblk0p10: recovering journal&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[ &amp;nbsp; 31.048046] systemd-fsck[262]: /dev/mmcblk0p10 contains a file system with errors, check forced.&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[ &amp;nbsp; 31.174725] systemd-fsck[262]: /dev/mmcblk0p10: 17/152608 files (0.0% non-contiguous), 26872/610299 blocks&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;root@Interactio_Hub:~# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; root@Interactio_Hub:~#&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; root@Interactio_Hub:~# cd /tmp&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; root@Interactio_Hub:/tmp# ls&lt;BR /&gt;
	&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.txt&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_er.txt&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; systemd-private-1639e800f5cc41d69c807e406f8ffd21-systemd-timesyncd.service-GEit4F&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; watchdog-sample.tmp&lt;/STRONG&gt;&lt;BR /&gt;
	&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wpa_ctrl_235-1&lt;/STRONG&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	&amp;nbsp;&lt;/EM&gt;Perhaps I have to turn logging on? I don't even know how nor have I been able to find any complete documentation for iotkit...&lt;/P&gt;

&lt;P&gt;Also, I tried "tailing" agent.log as you suggested:&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;what is "tailing"&lt;/LI&gt;
	&lt;LI&gt;when I did it I sent a package from the dashboard which it said was sent but nothing happened or changed on my end and it took over my serial screen and I had to reboot the Arduino to get it back.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Last question - I am not sure that i have the syntax correct in the sketch. I have a component (the default actually) called "powerswitch" (all lower case). It is registered and seems OK both in the dashboard and by iotkit on the device. As I say I am able to send to it. It says it's Command String is "LED.v1.0". I have edited this is the sketch to change thew word component to powerswitch and command to LED.v1.0. Do I need to change any of the others? For instance, I also see:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;power (in iotkit.send("power", 1);&lt;/LI&gt;
	&lt;LI&gt;an integer variable called "temp" which doesn;t appear to be referenced anywhere - is it leftover or ??&lt;/LI&gt;
	&lt;LI&gt;argv - not sure what this is&lt;/LI&gt;
	&lt;LI&gt;then in the IF statements there are "actuator" and "light"&lt;/LI&gt;
	&lt;LI&gt;last, in the IF statements there are pinmode commands to send the high or low bit, but they both say pinmode(13, OUTPUT); - do I need to change OUTPUT to 1 and 0 respectively??&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Since it's supposed to be a beginner example I was hoping there would be some clear documentation describing line by line what it's doing and what the variables are...&lt;/P&gt;

&lt;P&gt;I'm sorry, I'm not a developer and am just trying to turn a light on/off from the Cloud for a prototype I am building. Very frustrating!&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks again,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2015 23:06:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999183#M29436</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-03T23:06:30Z</dc:date>
    </item>
    <item>
      <title>Quick update - I was able to</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999184#M29437</link>
      <description>&lt;P&gt;Quick update - I was able to vi agent.log. Is it hidden?? Here is what I see:&lt;/P&gt;

&lt;P&gt;{"level":"info","message":"Trying to connect to host ...","timestamp":"2015-02-0&lt;BR /&gt;
	{"level":"info","message":"Starting Health testing ","timestamp":"2015-02-03T23:&lt;BR /&gt;
	{"level":"info","message":"Trying with Secure Connection tobroker.us.enableiot.c&lt;BR /&gt;
	{"level":"info","message":"Waiting for MQTTConnector to connect # 1","timestamp"&lt;BR /&gt;
	{"level":"info","message":"MQTTConnector: Connection successful to broker.us.ena&lt;BR /&gt;
	{"kind":"healthcheck","isHealthy":true,"currentSetting":"PROD","name":"iotkit-ga&lt;BR /&gt;
	{"level":"info","message":"Connected to broker.us.enableiot.com","timestamp":"20&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	~&lt;BR /&gt;
	- /tmp/agent.log 1/7 14%&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2015 23:11:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999184#M29437</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-03T23:11:11Z</dc:date>
    </item>
    <item>
      <title>Update later tonight.</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999185#M29438</link>
      <description>&lt;P&gt;Update later tonight.&lt;/P&gt;

&lt;P&gt;I have spent hours going through the actuator code and here is what I have now. Note: I am just trying to see the json payload in the serial terminal at this point, so all I am doing is running the code, printing "online" in the serial window and turning the LED on. My intent here is to try to understand the sequence of the code. Ideally I would step through the code or even better, echo each line as it executes so i could see where it is failing. No printlns appear other than online when i execute the code below.&lt;/P&gt;

&lt;P&gt;So, I have narrowed my question/confusion down somewhat - I don't think the callback procedure is running at all, as I am getting no "SerialPrintln"s at all even though I added some to "echo" the code execution. M&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;y question at this point is where should the callback procedure be in the code (in the loop or not? I suspect not because it is defining the procedure). &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;This brings me to my next question - what calls the callback procedure and also the &lt;/SPAN&gt;&lt;EM style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;aJsonObject*&lt;/EM&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt; calls?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;#include &amp;lt;IoTkit.h&amp;gt; &amp;nbsp; &amp;nbsp;// include IoTkit.h to use the Intel IoT Kit&lt;BR /&gt;
	#include &amp;lt;Ethernet.h&amp;gt; &amp;nbsp;// must be included to use IoTkit&lt;BR /&gt;
	#include &amp;lt;aJSON.h&amp;gt;&lt;BR /&gt;
	#include &amp;lt;stdio.h&amp;gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;// create an object of the IoTkit class&lt;BR /&gt;
	IoTkit iotkit; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	//int temp;&lt;BR /&gt;
	int led = 8;&lt;BR /&gt;
	char buf[112];&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;void setup() {&lt;BR /&gt;
	&amp;nbsp; Serial.begin(115200);&lt;BR /&gt;
	&amp;nbsp; // call begin on the IoTkit object before calling any other methods&lt;BR /&gt;
	&amp;nbsp; iotkit.begin();&lt;BR /&gt;
	&amp;nbsp; delay(3000);&lt;BR /&gt;
	&amp;nbsp; Serial.println("online");&lt;BR /&gt;
	&amp;nbsp; iotkit.send("power", 1);&lt;BR /&gt;
	&amp;nbsp; pinMode(led, OUTPUT);&lt;BR /&gt;
	&amp;nbsp; digitalWrite(led, 1); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// turn the LED on (HIGH is the voltage level)&lt;BR /&gt;
	}&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;void loop() {&lt;BR /&gt;
	&amp;nbsp; iotkit.receive(callback); &amp;nbsp; &amp;nbsp;// wait for payload from Cloud via JSon&lt;BR /&gt;
	&amp;nbsp; delay(2000); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // the loop routine runs over and over again forever:&lt;BR /&gt;
	}&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;void callback(char* json) {&lt;BR /&gt;
	&amp;nbsp; Serial.println(json);&lt;BR /&gt;
	&amp;nbsp; aJsonObject* parsed = aJson.parse(json);&lt;BR /&gt;
	&amp;nbsp; Serial.println("test callback is running?");&lt;BR /&gt;
	&amp;nbsp; if (&amp;amp;parsed == NULL) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; // invalid or empty JSON&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; Serial.println("recieved invalid JSON");&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; return;&lt;BR /&gt;
	&amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; aJsonObject* component = aJson.getObjectItem(parsed, "powerswitch");&lt;BR /&gt;
	&amp;nbsp; Serial.println("powerswitch");&lt;BR /&gt;
	&amp;nbsp; aJsonObject* command = aJson.getObjectItem(parsed, "LED.v1.0");&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; Serial.println("LED.v1.0");&lt;BR /&gt;
	&amp;nbsp; aJsonObject* argv = aJson.getObjectItem(parsed, "argv");&lt;BR /&gt;
	&amp;nbsp; Serial.println("argv");&lt;BR /&gt;
	&amp;nbsp; aJsonObject* argvArray = argv-&amp;gt;child;&lt;BR /&gt;
	&amp;nbsp; aJsonObject* name = argvArray-&amp;gt;child; // name : on&lt;BR /&gt;
	&amp;nbsp; aJsonObject* value = name-&amp;gt;next; // value: 1/0&lt;/EM&gt;&lt;EM style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;// &amp;nbsp;if ((component != NULL)) {&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp;if (strcmp(component-&amp;gt;valuestring, "actuator") == 0) {&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp;if ((command != NULL)) {&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (strcmp(command-&amp;gt;valuestring, "light") == 0 &amp;amp;&amp;amp; strcmp(value-&amp;gt;valuestring, "0") == 0) {&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Serial.println("Light Off!");&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pinMode(led, OUTPUT);&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;digitalWrite(led, 0);&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (strcmp(command-&amp;gt;valuestring, "light") == 0 &amp;amp;&amp;amp; strcmp(value-&amp;gt;valuestring, "1") == 0) {&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Serial.println("Light on!");&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pinMode(led, OUTPUT);&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;digitalWrite(led, 1);&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	// }&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Last, I checked to make sure iotkit-agent is running. It is, but I noticed an intermittent issue where when executing some agent commands I get a bad username/password error:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;root@Interactio_Hub:~# iotkit-agent catalog&lt;BR /&gt;
	2015-02-04T05:52:01.063Z - info: Trying to disconnect&amp;nbsp;&lt;BR /&gt;
	2015-02-04T05:52:01.092Z - info: Sending attributes...&lt;BR /&gt;
	2015-02-04T05:52:01.101Z - info: Trying with Secure Connection tobroker.us.enableiot.com:8883&lt;BR /&gt;
	2015-02-04T05:52:01.143Z - info: Waiting for MQTTConnector to connect # 1&lt;BR /&gt;
	&lt;STRONG&gt;2015-02-04T05:52:02.018Z - error: UncaughtException: Connection refused: Bad username or password&lt;BR /&gt;
	2015-02-04T05:52:02.044Z - error: Error: Connection refused: Bad username or password&lt;/STRONG&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at MqttClient._handleConnack (/usr/lib/node_modules/iotkit-agent/node_modules/mqtt/lib/client.js:508:9)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at Connection.&amp;lt;anonymous&amp;gt; (/usr/lib/node_modules/iotkit-agent/node_modules/mqtt/lib/client.js:191:10)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at Connection.EventEmitter.emit (events.js:95:17)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at Connection._write (/usr/lib/node_modules/iotkit-agent/node_modules/mqtt/lib/connection.js:187:12)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at doWrite (_stream_writable.js:226:10)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at writeOrBuffer (_stream_writable.js:216:5)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at Connection.Writable.write (_stream_writable.js:183:11)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at write (_stream_readable.js:582:24)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at flow (_stream_readable.js:591:7)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at CleartextStream.pipeOnReadable (_stream_readable.js:623:5)&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;I Googled this but can't find anything useful. Does uname and pwd get defined anywhere?? I am assuming this is username and pwd for&amp;nbsp;&lt;EM&gt;dashboard.us.enableiot.com&lt;/EM&gt;?&lt;/P&gt;

&lt;P&gt;Thanks again in advance - any help is appreciated.&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 06:10:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999185#M29438</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-04T06:10:37Z</dc:date>
    </item>
    <item>
      <title>Thanks for your patience. You</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999186#M29439</link>
      <description>&lt;P&gt;Thanks for your patience. You're doing all the right things from a debugging perspective. From the log, it looks like your agent is running fine. Can you check which version of the agent you have? In the Edison console window run:&lt;BR /&gt;
	&lt;STRONG&gt;# iotkit-admin -V&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;If it's older than 1.5.1 then actuation is broken and you will need to update the agent. The agent isn't able to understand actuation messages before that version.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Also, there was a server upgrade yesterday so I need to check on the errors you are seeing in the log. You shouldn't need to worry about any usernames or passwords.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Regarding your questions on the sketch. The sketch uses a component named "power". Here's a summary of what happens during the sketch:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Runs once at start:&lt;BR /&gt;
	&lt;STRONG&gt;void setup() {&lt;BR /&gt;
	&amp;nbsp; Serial.begin(115200);&lt;/STRONG&gt; &amp;nbsp;// this initializes the serial console&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; // call begin on the IoTkit object before calling any other methods&lt;BR /&gt;
	&amp;nbsp; &lt;STRONG&gt;iotkit.begin();&lt;/STRONG&gt; &amp;nbsp;// this opens UDP ports 41234 for sending and 41235 for listening&lt;BR /&gt;
	&amp;nbsp; &lt;STRONG&gt;delay(10500); &lt;/STRONG&gt;&amp;nbsp;// wait 10.5sec&lt;BR /&gt;
	&amp;nbsp;&lt;STRONG&gt; iotkit.send("power", 1); &lt;/STRONG&gt;&amp;nbsp;// send a test observation to the Cloud for component "power" (value=1). You should see this in the agent log&lt;BR /&gt;
	&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Runs continuously:&lt;BR /&gt;
	&lt;STRONG&gt;void loop() {&lt;BR /&gt;
	&amp;nbsp; iotkit.receive(callback);&lt;/STRONG&gt; // listens to UDP port 41235 for actuation messages and calls "callback" if one is received&lt;BR /&gt;
	&lt;STRONG&gt;&amp;nbsp; delay(5000); &lt;/STRONG&gt;&amp;nbsp;// wait 5sec&lt;BR /&gt;
	&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;For the logic in "callback" that toggles the LED,&amp;nbsp;&lt;BR /&gt;
	&lt;STRONG&gt;pinMode(13, OUTPUT);&lt;/STRONG&gt; &amp;nbsp;// sets pin-13 for writing (output)&lt;BR /&gt;
	&lt;STRONG&gt;digitalWrite(13, false/true); &lt;/STRONG&gt;&amp;nbsp;// sets pin-13 to on/off (1 or 0)&lt;/P&gt;

&lt;P&gt;The rest of the "callback" sketch is mainly parsing the JSON data structure that the agent is sending. It's pretty messy in C so the code looks ugly. The message format from the agent looks like:&lt;/P&gt;

&lt;P&gt;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;"component": "power",&lt;/STRONG&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; "command": "LED.v1.0",&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; "argv": [{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt; "name": "LED",&lt;/STRONG&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt; &amp;nbsp; "value": "1"&lt;/STRONG&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; }]&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;The important parts of the message are "component", "name" and "value". "Power" should be the name of your component. It should only have one parameter - "LED". These are the parameters you set on the web page when you submitted the actuation request.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Also, "tail" is a Linux command that lists the last few lines of a file. It's useful (with the '-f' option) to continuously display the end of a log file. I'll run the command on my Edison in my console terminal and i'll see the agent activity as my sketches run. (hit control-C to exit tail)&lt;BR /&gt;
	&lt;STRONG&gt;# tail -f /tmp/agent.log&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 22:21:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999186#M29439</guid>
      <dc:creator>Brian_B_Intel</dc:creator>
      <dc:date>2015-02-04T22:21:38Z</dc:date>
    </item>
    <item>
      <title>Awesome information - thanks</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999187#M29440</link>
      <description>&lt;P&gt;Awesome information - thanks a million.&lt;/P&gt;

&lt;P&gt;I checked the version and I have 1.5.0. Oddly, I downloaded this Feb 2nd and re-flashed the Edison so one would assume it was up to date, but apparently not. I'm thinking it would be a good idea for Intel to update the dist. that links from the iot downloads page.&lt;/P&gt;

&lt;P&gt;I'll start by doing the update with npm as outlined on the wiki - hopefully it works. it says it's installing version 1.6.4. I'm really surprised that the default I had was 1.5.0 given I installed in Monday...&lt;/P&gt;

&lt;P&gt;Once (if) I get that done I'll try to re-register the device as "power" not "powerswitch" and go from there. When you say the one parameter is LED does that mean i can drop the v1.0 off LED.v1.0?&lt;/P&gt;

&lt;P&gt;Thanks Brian - you're a life saver.&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 22:36:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999187#M29440</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-04T22:36:18Z</dc:date>
    </item>
    <item>
      <title>I really don;t know what to</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999188#M29441</link>
      <description>&lt;P&gt;I really don;t know what to do with this thing at this point (let's just say a hammer is looking pretty good at this point!)&lt;/P&gt;

&lt;P&gt;I try to update iotkit-agent. I can't find any clear instructions, so I follow this:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;2.3.2. Agent is not pre-installed &lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;If you are working on a device other than a Galileo or Edison, or the agent is not pre-installed:  &lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;You may need to install Node.js and npm first. Please see the Node.js web site for instructions.  &lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;You will need to install the agent and it’s dependencies. To do that, “cd” to the directory where you want the agent installed and type: &lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; npm install iotkit-agent &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; mv node_modules/iotkit-agent/ . &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; rm –rf node_modules&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;First command - success!&lt;/P&gt;

&lt;P&gt;Second command (mv command) - fails. Says I cannot modify it since it is not a directory. This is Intel documentation about Intel code on an Intel board - this should just work; someone needs to check this stuff for errors and edit it, geez.&lt;/P&gt;

&lt;P&gt;I decided to skip it and restart the Edison. I do so (twice) and get this:&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;root@Interactio_Hub:/usr/bin# iotkit-admin test&lt;/STRONG&gt;&lt;BR /&gt;
	2015-02-04T22:49:34.887Z - info: Trying to connect to host ...&lt;BR /&gt;
	2015-02-04T22:49:34.915Z - info: Starting Health testing&amp;nbsp;&lt;BR /&gt;
	2015-02-04T22:49:34.923Z - info: Trying with Secure Connection tobroker.us.enableiot.com:8883&lt;BR /&gt;
	2015-02-04T22:49:34.974Z - info: Waiting for MQTTConnector to connect # 1&lt;BR /&gt;
	2015-02-04T22:49:36.479Z - info: MQTTConnector: Connection successful to broker.us.enableiot.com:8883&lt;BR /&gt;
	2015-02-04T22:49:36.677Z - info: STATUS: device/e6-2b-c2-c2-86-7e/health kind=healthcheck, isHealthy=true, currentSetting=PROD, name=iotkit-gateway, build=0.12.&lt;BR /&gt;
	0, date=2015-01-26T13:46:41.332Z, items=[connected=true]&lt;BR /&gt;
	2015-02-04T22:49:36.685Z - info: Fired STATUS: %sdevice/e6-2b-c2-c2-86-7e/health{"kind":"healthcheck","isHealthy":true,"currentSetting":"PROD","name":"iotkit-ga&lt;BR /&gt;
	teway","build":"0.12.0","date":"2015-01-26T13:46:41.332Z","items":[{"broker":{"connected":true}}]}&lt;BR /&gt;
	2015-02-04T22:49:36.692Z - info: Connected to broker.us.enableiot.com&lt;BR /&gt;
	2015-02-04T22:49:36.694Z - info: Environment: PROD&lt;BR /&gt;
	2015-02-04T22:49:36.695Z - info: Build: 0.12.0&lt;BR /&gt;
	&lt;STRONG&gt;root@Interactio_Hub:/usr/bin# iotkit-agent -V&lt;/STRONG&gt;&lt;BR /&gt;
	2015-02-04T22:49:50.596Z - info: Trying to disconnect&amp;nbsp;&lt;BR /&gt;
	2015-02-04T22:49:50.631Z - info: Sending attributes...&lt;BR /&gt;
	2015-02-04T22:49:50.640Z - info: Trying with Secure Connection tobroker.us.enableiot.com:8883&lt;BR /&gt;
	2015-02-04T22:49:50.692Z - info: Waiting for MQTTConnector to connect # 1&lt;BR /&gt;
	&lt;STRONG&gt;2015-02-04T22:49:50.915Z - error: UncaughtException: Connection refused: Bad username or password&lt;BR /&gt;
	2015-02-04T22:49:50.945Z - error: Error: Connection refused: Bad username or password&lt;/STRONG&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at MqttClient._handleConnack (/usr/lib/node_modules/iotkit-agent/node_modules/mqtt/lib/client.js:508:9)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at Connection.&amp;lt;anonymous&amp;gt; (/usr/lib/node_modules/iotkit-agent/node_modules/mqtt/lib/client.js:191:10)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at Connection.EventEmitter.emit (events.js:95:17)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at Connection._write (/usr/lib/node_modules/iotkit-agent/node_modules/mqtt/lib/connection.js:187:12)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at doWrite (_stream_writable.js:226:10)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at writeOrBuffer (_stream_writable.js:216:5)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at Connection.Writable.write (_stream_writable.js:183:11)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at write (_stream_readable.js:582:24)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at flow (_stream_readable.js:591:7)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; at CleartextStream.pipeOnReadable (_stream_readable.js:623:5)&lt;BR /&gt;
	root@Interactio_Hub:/usr/bin#&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;The agent will not start, athough the iotkit-admin test worlks successfully.,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Now I can't even run iotkit-agent -V to see what version it is.&lt;/P&gt;

&lt;P&gt;Is it just me or ???&lt;/P&gt;

&lt;P&gt;Thanks...&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 22:56:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999188#M29441</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-04T22:56:55Z</dc:date>
    </item>
    <item>
      <title>OK, thanks to several</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999189#M29442</link>
      <description>&lt;P&gt;OK, thanks to several messages and help from Brian I managed to get it working but it was a host of problems:&lt;/P&gt;

&lt;P&gt;First - the iotkit version on the Edison was too old. I downloaded and flashed the latest Edison image (Rel-1-Maint-WW42 from &lt;A href="https://communities.intel.com/docs/DOC-23242)" target="_blank"&gt;https://communities.intel.com/docs/DOC-23242)&lt;/A&gt; on Monday but evidently they include a very old iotkit in that dist (1.5.0). Actuation will not work with anything below 1.5.1. &amp;nbsp;you can see what version you have by typing:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;iotkit.admin - V&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;To upgrade it, once you have the Edison flashed and connected to the internet, run the following command (from Brian):&lt;/P&gt;

&lt;P class="p1"&gt;&lt;EM&gt;&lt;SPAN class="s1"&gt;npm update -g iotkit-agent&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;The latest I installed today was 1.6.4&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p1"&gt;Second - the example code included in the iotkit dist is horribly wrong. Here are the details as I sent them to Brian tonight &lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;at 11:46pm Pacific time &lt;/SPAN&gt;(I hope this helps someone else):&lt;/P&gt;

&lt;P class="p1"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Here is what I see in my serial monitor. this is the JSON payload from the IoT Analytics Dashboard (plus some printlns I echoed to see what was happening):&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p2"&gt;&lt;EM&gt;Good JSON Command from Server: {"component":"power","command":"LED.v1.0","argv":[{"name":"LED","value":"1"}]}&lt;BR /&gt;
	{"component":"power","command":"LED.v1.0","argv":[{"name":"LED","value":"1"}]}&lt;BR /&gt;
	OK just finished aJsonObject lines&lt;BR /&gt;
	begin loop after comp null line&lt;BR /&gt;
	continue, now after strcmp power in loop&lt;BR /&gt;
	continue, now after command null in loop&lt;BR /&gt;
	Light on!&lt;BR /&gt;
	Good JSON Command from Server: {"component":"power","command":"LED.v1.0","argv":[{"name":"LED","value":"0"}]}&lt;BR /&gt;
	{"component":"power","command":"LED.v1.0","argv":[{"name":"LED","value":"0"}]}&lt;BR /&gt;
	OK just finished aJsonObject lines&lt;BR /&gt;
	begin loop after comp null line&lt;BR /&gt;
	continue, now after strcmp power in loop&lt;BR /&gt;
	continue, now after command null in loop&lt;BR /&gt;
	continue, now after strcmp command LED line in loop&lt;BR /&gt;
	Light Off!&lt;/EM&gt;&lt;/P&gt;

&lt;P class="p2"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;and here is the code I am running:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;#include &amp;lt;IoTkit.h&amp;gt; &amp;nbsp; &amp;nbsp;// include IoTkit.h to use the Intel IoT Kit&lt;BR /&gt;
	#include &amp;lt;Ethernet.h&amp;gt; &amp;nbsp;// must be included to use IoTkit&lt;BR /&gt;
	#include &amp;lt;aJSON.h&amp;gt;&lt;BR /&gt;
	#include &amp;lt;stdio.h&amp;gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;// create an object of the IoTkit class&lt;BR /&gt;
	IoTkit iotkit; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	int temp;&lt;BR /&gt;
	//int LED;&lt;BR /&gt;
	char buf[112];&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;void setup() {&lt;BR /&gt;
	&amp;nbsp; Serial.begin(115200);&lt;BR /&gt;
	&amp;nbsp; // call begin on the IoTkit object before calling any other methods&lt;BR /&gt;
	&amp;nbsp; iotkit.begin();&lt;BR /&gt;
	&amp;nbsp; delay(10500);&lt;BR /&gt;
	&amp;nbsp; iotkit.send("power", 1);&lt;BR /&gt;
	}&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;void loop() {&lt;BR /&gt;
	&amp;nbsp; iotkit.receive(callback);&lt;BR /&gt;
	&amp;nbsp; delay(5000);&lt;BR /&gt;
	}&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;void callback(char* json) {&lt;BR /&gt;
	&amp;nbsp; Serial.println(json);&lt;BR /&gt;
	&amp;nbsp; aJsonObject* parsed = aJson.parse(json);&lt;BR /&gt;
	&amp;nbsp; if (&amp;amp;parsed == NULL) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; // invalid or empty JSON&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; Serial.println("recieved invalid JSON");&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; return;&lt;BR /&gt;
	&amp;nbsp; }&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;aJsonObject* component = aJson.getObjectItem(parsed, "power");&lt;BR /&gt;
	&amp;nbsp; aJsonObject* command = aJson.getObjectItem(parsed, "LED.v1.0");&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; aJsonObject* argv = aJson.getObjectItem(parsed, "argv");&lt;BR /&gt;
	&amp;nbsp; aJsonObject* argvArray = argv-&amp;gt;child;&lt;BR /&gt;
	&amp;nbsp; aJsonObject* name = argvArray-&amp;gt;child; // name : on&lt;BR /&gt;
	&amp;nbsp; aJsonObject* value = name-&amp;gt;next; // value: 1/0&lt;BR /&gt;
	&amp;nbsp; Serial.println("OK just finished aJsonObject lines");&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	// &amp;nbsp;if ((component != NULL)) { &amp;nbsp; &amp;nbsp; &amp;nbsp; // was stopping here&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; Serial.println("begin loop after comp null line");&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp;if (strcmp(component-&amp;gt;valuestring, "power") == 0) { &amp;nbsp; &amp;nbsp;//changed to power from actuator&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp;strcmp(component-&amp;gt;valuestring, "power"); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//changed to power from actuator&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println("continue, now after strcmp power in loop");&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp;if ((command != NULL)) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println("continue, now after command null in loop");&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp;if (strcmp(command-&amp;gt;valuestring, "LED.v1.0") == 0 &amp;amp;&amp;amp; strcmp(value-&amp;gt;valuestring, "0") == 0) { //changed to LED.v1.0 from light&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (strcmp(value-&amp;gt;valuestring, "1")) { //changed to LED.v1.0 from light&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println("continue, now after strcmp command LED line in loop");&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println("Light Off!");&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pinMode(13, OUTPUT);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(13, 0); //should false be changed to 0?&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp;if (strcmp(command-&amp;gt;valuestring, "LED") == 0 &amp;amp;&amp;amp; strcmp(value-&amp;gt;valuestring, "1") == 0) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (strcmp(value-&amp;gt;valuestring, "0")) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println("Light on!");&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pinMode(13, OUTPUT);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(13, 1);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	// &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	// &amp;nbsp;}&lt;BR /&gt;
	}&lt;/EM&gt;&lt;/P&gt;

&lt;P class="p1"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I learned a few things and still have some questions. I will post this in the forum so it may help others.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;1. Some of the syntax in the example code is wrong, especially for the default dashboard component powerswitch.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The following need to be changed:&lt;/SPAN&gt;&lt;/P&gt;

&lt;UL class="ul1"&gt;
	&lt;LI class="li1"&gt;&lt;EM&gt;&lt;SPAN class="s3"&gt;component&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class="s1"&gt; needs to be changed to &lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class="s4"&gt;power&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;
	&lt;LI class="li1"&gt;&lt;EM&gt;&lt;SPAN class="s3"&gt;command&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class="s1"&gt; needs to be changed to &lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class="s4"&gt;LED.v1.0&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;
	&lt;LI class="li1"&gt;&lt;EM&gt;&lt;SPAN class="s3"&gt;actuator&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class="s1"&gt; needs to be changed to &lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class="s4"&gt;power&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;
	&lt;LI class="li1"&gt;&lt;EM&gt;&lt;SPAN class="s3"&gt;light&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class="s1"&gt; needs to be changed to &lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class="s4"&gt;LED.v1.0&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;This means the component on the Edison needs to be registered as “&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class="s4"&gt;power&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class="s1"&gt;” also, like this:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p1"&gt;&lt;EM&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;iotkit-admin register power powerswitch.v1.0&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;2. The 4 nested IF statements are what was stopping the program from running past the aJsonObject parsing. In reviewing the code I added a series of printlns to debug where it was getting stuck. I determined that there are essentially 4 IFs: 2 are checking to see that the values received for control and command are not null and the other 2 are trying to be generic to scan &lt;/SPAN&gt;&lt;SPAN class="s5"&gt;any&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; payload and match the conditions for component, command and arguments in the IF statement. It is &lt;/SPAN&gt;&lt;SPAN class="s5"&gt;trying&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; to say:&lt;/SPAN&gt;&lt;/P&gt;

&lt;UL class="ul1"&gt;
	&lt;LI class="li1"&gt;&lt;SPAN class="s1"&gt;IF the payload component is not NULL and&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI class="li1"&gt;&lt;SPAN class="s1"&gt;IF the payload component value is “power” then&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;UL class="ul1"&gt;
	&lt;LI class="li1"&gt;&lt;SPAN class="s1"&gt;IF the payload command value is “LED.V1.0” and&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI class="li1"&gt;&lt;SPAN class="s1"&gt;IF the payload command value is not null and&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI class="li1"&gt;&lt;SPAN class="s1"&gt;IF the payload argv value is “0”…&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI class="li1"&gt;&lt;SPAN class="s1"&gt;THEN turn the LED off&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;or&lt;/SPAN&gt;&lt;/P&gt;

&lt;UL class="ul1"&gt;
	&lt;LI class="li1"&gt;&lt;SPAN class="s1"&gt;IF the payload command value is “LED.V1.0” and&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI class="li1"&gt;&lt;SPAN class="s1"&gt;IF the payload command value is not null and&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI class="li1"&gt;&lt;SPAN class="s1"&gt;IF the payload argv value is “0”…&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI class="li1"&gt;&lt;SPAN class="s1"&gt;THEN turn the LED on&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;The problem is this is a large combination of conditions in a series of nested IF statements and for whatever reason(s) the conditions don’t get met by the default dashboard payload so it does not execute.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p4"&gt;&lt;SPAN class="s1"&gt;In short, the logic just doesn’t work!&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;3. I did get it working, however the LED switches the wrong way! Note that in my code I had to change the bolded 0 in the code below to reverse it:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p1"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (strcmp(value-&amp;gt;valuestring, "&amp;nbsp;&lt;STRONG&gt;0&amp;nbsp;&lt;/STRONG&gt;")) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println("Light on!");&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pinMode(13, OUTPUT);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(13, 1);&lt;/EM&gt;&lt;/P&gt;

&lt;P class="p2"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Now, I did make a lot of changes in the IF statements and perhaps something is amiss.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;So! My question is:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Can anyone post some sample code (actually ideally working code, not just sample code…) to replace the conditions in the example’s nested IF statements? The conditions &lt;/SPAN&gt;&lt;SPAN class="s5"&gt;are&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; needed for a production application; the way it is I can only control one component at a time.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p2"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;David&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 08:27:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999189#M29442</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-05T08:27:00Z</dc:date>
    </item>
    <item>
      <title>Quote:David B. wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999190#M29443</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;David B. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;[...]&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;First - the iotkit version on the Edison was too old. I downloaded and flashed the latest Edison image (ww36-14) on Monday but evidently they include a very old iotkit in that dist (1.5.0).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;[...]&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The latest Edison image should be ww42 I'd say. Nevertheless, the iotkit-agent there would still be fairly old - on my image it tells 0.8.7. Looks like I should upgrade iotkit-agent some time ...&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 08:42:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999190#M29443</guid>
      <dc:creator>Matthias_H_Intel</dc:creator>
      <dc:date>2015-02-05T08:42:08Z</dc:date>
    </item>
    <item>
      <title>Hi Mathias - yes, you are</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999191#M29444</link>
      <description>&lt;P&gt;Hi Mathias - yes, you are correct. Sorry, I made a typo. The version I downloaded was:&lt;/P&gt;

&lt;P&gt;&lt;STRONG style="margin: 0px; padding: 0px; border: 0px; font-size: 13px; font-family: intel-clear, arial, helvetica, 'helvetica neue', verdana, sans-serif; vertical-align: baseline; color: rgb(61, 61, 61); line-height: 19.5px;"&gt;Rel-1-Maint-WW42&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;From here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://communities.intel.com/docs/DOC-23242" target="_blank"&gt;https://communities.intel.com/docs/DOC-23242&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks, and yes, it looks like you should update it!&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 08:46:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999191#M29444</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-05T08:46:56Z</dc:date>
    </item>
    <item>
      <title>Great to hear. Yes, I think</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999192#M29445</link>
      <description>&lt;P&gt;Great to hear. Yes, I think the main issue was the parameter name, “light”. I should have had you verify you had the latest sample code:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://github.com/enableiot/iotkit-samples/blob/master/arduino/IoTkit/examples/IoTKitActuationExample/IotKitActuationExample.ino"&gt;https://github.com/enableiot/iotkit-samples/blob/master/arduino/IoTkit/examples/IoTKitActuationExample/IotKitActuationExample.ino&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This latest version has cleaner logic but could still be improved. The if/then logic is to verify that a received actuation message is actually for the component you are about to turn on/off. After parsing this message, the only things you really care about are:&lt;/P&gt;

&lt;P&gt;component&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;argv: name&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;argv: value&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Command really isn’t important. It’s an arbitrary string that is a property of the component’s type (i.e., powerswitch.v1.0).&lt;/P&gt;

&lt;P&gt;The reason argv is an array is that a component-type can have several parameters. For example, you could have a motor which has multiple parameters:&lt;/P&gt;

&lt;P&gt;onOff: 0/1&amp;nbsp;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;(or speed=0 could be 'off')&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;speed: 0-100 &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;direction: 0/1&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Then, the sketch would extract all of these parameters from the message and if all values were present, set the appropriate pins.&lt;/P&gt;

&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 18:36:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999192#M29445</guid>
      <dc:creator>Brian_B_Intel</dc:creator>
      <dc:date>2015-02-05T18:36:42Z</dc:date>
    </item>
    <item>
      <title>Guys,</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999193#M29446</link>
      <description>&lt;P&gt;Guys,&lt;/P&gt;

&lt;P&gt;I also can't get this thing running, I flashed clean my edison and updated iotkit to 1.6.4&lt;/P&gt;

&lt;P&gt;I cannot switch it to mqtt:&lt;/P&gt;

&lt;P&gt;iotkit-admin protocol mqtt&lt;/P&gt;

&lt;P&gt;fs.js:427&lt;BR /&gt;
	&amp;nbsp; return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;BR /&gt;
	Error: ENOENT, no such file or directory '/home/root/data/user.js'&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; at Object.fs.openSync (fs.js:427:18)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; at Object.fs.readFileSync (fs.js:284:15)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; at Object.module.exports.saveToUserConfig (/usr/lib/node_modules/iotkit-agent/lib/common.js:236:23)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; at Command.&amp;lt;anonymous&amp;gt; (/usr/lib/node_modules/iotkit-agent/admin/configurator.js:225:28)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; at Command.&amp;lt;anonymous&amp;gt; (/usr/lib/node_modules/iotkit-agent/lib/commander/index.js:253:8)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; at Command.EventEmitter.emit (events.js:98:17)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; at Command.parseArgs (/usr/lib/node_modules/iotkit-agent/lib/commander/index.js:482:12)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; at Command.parse (/usr/lib/node_modules/iotkit-agent/lib/commander/index.js:374:21)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; at Object.&amp;lt;anonymous&amp;gt; (/usr/lib/node_modules/iotkit-agent/bin/admin.js:91:11)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; at Module._compile (module.js:456:26)&lt;/P&gt;

&lt;P&gt;Please help!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 23:13:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999193#M29446</guid>
      <dc:creator>Jakub_C_</dc:creator>
      <dc:date>2015-02-05T23:13:55Z</dc:date>
    </item>
    <item>
      <title>Hi Jakub.</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999194#M29447</link>
      <description>&lt;P&gt;Hi Jakub.&lt;/P&gt;

&lt;P&gt;That looks like a bug in the agent but I need to verify. There are a couple of work-arounds.&lt;/P&gt;

&lt;P&gt;1. You can move to the /usr/lib/node_modules/iotkit-agent and run the command.&lt;/P&gt;

&lt;P&gt;2. Move the agent data directory to some non-default location. This is recommended in the update/install instructions as updating the agent will wipe out everything.&lt;BR /&gt;
	# iotkit-admin move-data-directory ~/.data&lt;BR /&gt;
	Then try setting MQTT protocol&lt;BR /&gt;
	# iotkit-admin protocol mqtt&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Brian&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 00:56:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999194#M29447</guid>
      <dc:creator>Brian_B_Intel</dc:creator>
      <dc:date>2015-02-06T00:56:02Z</dc:date>
    </item>
    <item>
      <title>Hi Jakub - sorry. I was away</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999195#M29448</link>
      <description>&lt;P&gt;Hi Jakub - sorry. I was away from my computer until now.&lt;/P&gt;

&lt;P&gt;I forgot to mention that I also had this problem after upgrading to 1.6.4 - it must be a bug.&amp;nbsp;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;I was able to work around it by setting "mqtt" manually in the config file. What iI did was:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;1.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;change directories to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;/usr/lib/node_modules/iotkit-agent/config:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EM&gt;cd /usr/lib/node_modules/iotkit-agent/config&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;2.&amp;nbsp;&lt;/EM&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;edit the file with vi like this:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EM&gt;vi global.json&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;edit the bolded line below and change &lt;EM&gt;REST&lt;/EM&gt; to &lt;EM&gt;mqtt&lt;/EM&gt;:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; "data_directory": "./data/",&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; "listeners": {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "mqtt_port": 1884,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "rest_port": 9090,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "udp_port": 41234,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "tcp_port": 7070&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; },&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; "receivers": {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "udp_port": 41235,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "udp_address": "0.0.0.0"&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; },&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; "logger": {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "LEVEL": "info",&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "PATH": "/tmp/"&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; },&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;"default_connector": "mqtt",&lt;/STRONG&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; "connector": {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "mqtt": {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "host": "broker.us.enableiot.com",&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "port": 8883,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "qos": 1,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "retain": false,&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;If you don;t know vi, you can follow this guide:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;http://www.cs.colostate.edu/helpdocs/vi.html&lt;/P&gt;

&lt;P&gt;If you need help let me know.&lt;/P&gt;

&lt;P&gt;Good luck!&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 05:36:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999195#M29448</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-06T05:36:01Z</dc:date>
    </item>
    <item>
      <title>Hi Jakub and David,</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999196#M29449</link>
      <description>&lt;P&gt;Hi Jakub and David,&lt;/P&gt;

&lt;P&gt;Jakub - Can you please check what's the data directory in global.conf? Did you follow upgrade instructions from&amp;nbsp;https://github.com/enableiot/iotkit-agent? It looks like you didn't perform "move-data-directory" action. Please run:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;./iotkit-admin.js set-data-directory &amp;lt;directory where device.json and user.js are stored&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;To check where you can find device.json, you can run:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;find / -name device.json&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 14.3999996185303px;"&gt;David - you should not edit global.conf. This config is meant to be&amp;nbsp;overridden&amp;nbsp;by updates, such changes should be done in data/user.js.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 12:41:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999196#M29449</guid>
      <dc:creator>Joanna_R_Intel</dc:creator>
      <dc:date>2015-02-06T12:41:14Z</dc:date>
    </item>
    <item>
      <title>Thanks Joanna - that would be</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999197#M29450</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5; -webkit-text-size-adjust: 100%;"&gt;Thanks Joanna - that would be great except the command I was given (see above and copied here) does not work:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 12px; -webkit-text-size-adjust: 100%;"&gt;&lt;SPAN style="font-weight: 700;"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; npm install iotkit-agent&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 12px; -webkit-text-size-adjust: 100%;"&gt;&lt;SPAN style="font-weight: 700;"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; mv node_modules/iotkit-agent/ .&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 12px; -webkit-text-size-adjust: 100%;"&gt;&lt;SPAN style="font-weight: 700;"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; rm –rf node_modules&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 12px; -webkit-text-size-adjust: 100%;"&gt;&lt;SPAN style="font-weight: 700;"&gt;when I execute the move command it fails. Can you please test it on an Edison and post the command that works??&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 12px; -webkit-text-size-adjust: 100%;"&gt;&lt;SPAN style="font-weight: 700;"&gt;thanks!&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 12px; -webkit-text-size-adjust: 100%;"&gt;&lt;SPAN style="font-weight: 700;"&gt;David&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 12px; -webkit-text-size-adjust: 100%;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 18:57:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999197#M29450</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-06T18:57:03Z</dc:date>
    </item>
    <item>
      <title>Thx guys... I managed to fix</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999198#M29451</link>
      <description>&lt;P&gt;Thx guys... I managed to fix that...&lt;/P&gt;

&lt;P&gt;I was messing around trying to run this piece of example code then I broke something and:&lt;/P&gt;

&lt;P&gt;1. reflashed edison&lt;/P&gt;

&lt;P&gt;2. Updated iotkit using command &lt;EM&gt;npm update -g iotkit-agent&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;3. hit myself in the head - I must change protocol to mqtt, trying to do so I encountered problem above and posted it here.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;4. read your advice and what finally helped? &lt;/EM&gt;&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;mv node_modules/iotkit-agent ./
cd iotkit-agent
npm install forever

&lt;/PRE&gt;

&lt;P&gt;Ok, mqtt successfully set... let me try if it works now...&lt;/P&gt;

&lt;P&gt;nope...&lt;/P&gt;

&lt;P&gt;is it normal I cannot download catalog while using mqtt?&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;iotkit-admin catalog
2015-02-06T19:34:16.511Z - info: Getting Component Getting
2015-02-06T19:34:16.540Z - info: Trying with Secure Connection tobroker.us.enableiot.com:8883
2015-02-06T19:34:16.587Z - info: Waiting for MQTTConnector to connect # 1
2015-02-06T19:34:18.528Z - info: MQTTConnector: Connection successful to broker.us.enableiot.com:8883
&lt;/PRE&gt;

&lt;P&gt;and it stucks there...&lt;/P&gt;

&lt;P&gt;edison appears active on dashboard but I cannot see incoming mqtt when I send command from dashboard while running:&lt;/P&gt;

&lt;P&gt;tail -f /tmp/agent.log&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 19:38:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999198#M29451</guid>
      <dc:creator>Jakub_C_</dc:creator>
      <dc:date>2015-02-06T19:38:00Z</dc:date>
    </item>
    <item>
      <title>Hi Jakub,</title>
      <link>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999199#M29452</link>
      <description>&lt;P&gt;Hi Jakub,&lt;/P&gt;

&lt;P&gt;I have the same issue with it failing when I try to run the catalog (good, it's not just me). Again, I suspect it's a big because it's not just me and this stuff seems very buggy/unprepared for production (the commands in the docs don;t work, the "latest" flash dist has a really old version of iotkit and nowhere does it tell you to upgrade it or how, etc. etc. etc.)&lt;/P&gt;

&lt;P&gt;Even though the catalog doesn't work for me the actuator code does. What I'd suggest is you copy the exact code I am running on 1.6.4 which works. I have attached the whole file here (I had to rename it from .ino to .txt. Save it on your system and rename it back to .ino and it should run for you, assuming y&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;ou are using the default "Powerswitch.v1.0" in the IoT Analytics Dashboard. You should not need to change anything on the IoT Dashboard site.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Good luck.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;David&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 19:57:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/IoT-dashboard-Control-Actuator-working-code-or-tutorial/m-p/999199#M29452</guid>
      <dc:creator>David_B_6</dc:creator>
      <dc:date>2015-02-06T19:57:17Z</dc:date>
    </item>
  </channel>
</rss>

