1 2 3 Previous Next 33 Replies Latest reply on Jun 16, 2015 6:48 AM by Zoran.Roncevic

    arduino scketches stopped sending data to the iotkit-agent

    marco.lopez.trinidad@gmail.com

      I've started the agent and uploaded some sensor data to the cloud analytics, rather the agent stopped to send data to the cloud. I have tried several things, resetting the Galileo board, starting and stopping the agent rather I'm not be able to get my program continuous sending data to the cloud. Also I erased the register of my device in the cloud and I registered it again.

       

      Here the output of the agent.log file:

       

      {"level":"info","message":"Device ID: 98-4F-EE-00-E4-BF","timestamp":"2001-01-01T00:21:06.591Z"}

      {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2001-01-01T00:21:22.620Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2001-01-01T00:21:22.655Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2001-01-01T00:21:22.715Z"}

      {"level":"info","message":"UDP listener started on port: 41234","timestamp":"2001-01-01T00:21:25.296Z"}

      {"level":"info","message":"Starting listeners...","timestamp":"2001-01-01T00:21:25.316Z"}

      {"level":"info","message":"TCP listener started on port: 7070","timestamp":"2001-01-01T00:21:26.591Z"}

      {"level":"info","message":"Connecting to ws.us.enableiot.com:443...","timestamp":"2001-01-01T00:21:26.513Z"}

      {"level":"info","message":"WSConnector: Connection successful to: ws.us.enableiot.com:443","timestamp":"2001-01-01T00:21:27.926Z"}

      {"n":"temp","v":"29","level":"info","message":"Submitting: ","timestamp":"2001-01-01T00:39:41.630Z"}

      {"response":"none detail","status":0,"level":"info","message":"Response received: ","timestamp":"2001-01-01T00:39:43.737Z"}

      {"n":"temp","v":"29","level":"info","message":"Submitting: ","timestamp":"2001-01-01T00:44:40.745Z"}

      {"response":"none detail","status":0,"level":"info","message":"Response received: ","timestamp":"2001-01-01T00:44:42.835Z"}

      {"n":"temp","v":"29","level":"info","message":"Submitting: ","timestamp":"2001-01-01T00:45:17.787Z"}

      {"response":"none detail","status":0,"level":"info","message":"Response received: ","timestamp":"2001-01-01T00:45:20.268Z"}

      {"n":"temp","v":"29","level":"info","message":"Submitting: ","timestamp":"2001-01-01T00:51:12.206Z"}

      {"response":"none detail","status":0,"level":"info","message":"Response received: ","timestamp":"2001-01-01T00:51:14.313Z"}

      {"n":"temp","v":"29","level":"info","message":"Submitting: ","timestamp":"2001-01-01T00:51:29.360Z"}

      {"response":"none detail","status":0,"level":"info","message":"Response received: ","timestamp":"2001-01-01T00:51:31.801Z"}

      {"n":"temp","v":"29","level":"info","message":"Submitting: ","timestamp":"2001-01-01T00:51:50.396Z"}

      {"response":"none detail","status":0,"level":"info","message":"Response received: ","timestamp":"2001-01-01T00:51:52.866Z"}

      {"n":"temp","v":"29","level":"info","message":"Submitting: ","timestamp":"2001-01-01T00:55:05.808Z"}

      {"response":"none detail","status":0,"level":"info","message":"Response received: ","timestamp":"2001-01-01T00:55:07.828Z"}

      {"level":"info","message":"Device ID: 98-4F-EE-00-E4-BF","timestamp":"2015-05-29T22:03:54.036Z"}

      {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2015-05-29T22:04:09.203Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2015-05-29T22:04:09.238Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2015-05-29T22:04:09.303Z"}

      {"level":"info","message":"UDP listener started on port: 41234","timestamp":"2015-05-29T22:04:12.345Z"}

      {"level":"info","message":"Starting listeners...","timestamp":"2015-05-29T22:04:12.364Z"}

      {"level":"info","message":"TCP listener started on port: 7070","timestamp":"2015-05-29T22:04:13.554Z"}

      {"level":"info","message":"Connecting to ws.us.enableiot.com:443...","timestamp":"2015-05-29T22:04:13.477Z"}

      {"level":"info","message":"WSConnector: Connection successful to: ws.us.enableiot.com:443","timestamp":"2015-05-29T22:04:14.404Z"}

      {"n":"temp","v":"29","level":"info","message":"Submitting: ","timestamp":"2015-05-29T22:06:25.022Z"}

      {"response":"none detail","status":0,"level":"info","message":"Response received: ","timestamp":"2015-05-29T22:06:27.522Z"}

      {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2015-05-29T22:25:24.511Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2015-05-29T22:25:24.585Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2015-05-29T22:25:24.730Z"}

      {"level":"info","message":"UDP listener started on port: 41234","timestamp":"2015-05-29T22:25:30.709Z"}

      {"level":"info","message":"Starting listeners...","timestamp":"2015-05-29T22:25:30.757Z"}

      {"level":"info","message":"TCP listener started on port: 7070","timestamp":"2015-05-29T22:25:33.592Z"}

      {"level":"info","message":"Connecting to ws.us.enableiot.com:443...","timestamp":"2015-05-29T22:25:33.412Z"}

      {"level":"info","message":"WSConnector: Connection successful to: ws.us.enableiot.com:443","timestamp":"2015-05-29T22:25:36.637Z"}

      {"level":"info","message":"Device ID: 98-4F-EE-00-E4-BF","timestamp":"2015-06-01T14:47:32.474Z"}

      {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2015-06-01T14:47:48.171Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2015-06-01T14:47:48.206Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2015-06-01T14:47:48.267Z"}

      {"level":"info","message":"UDP listener started on port: 41234","timestamp":"2015-06-01T14:47:51.410Z"}

      {"level":"info","message":"Starting listeners...","timestamp":"2015-06-01T14:47:51.431Z"}

      {"level":"info","message":"TCP listener started on port: 7070","timestamp":"2015-06-01T14:47:52.712Z"}

      {"level":"info","message":"Connecting to ws.us.enableiot.com:443...","timestamp":"2015-06-01T14:47:52.635Z"}

      {"level":"info","message":"WSConnector: Connection successful to: ws.us.enableiot.com:443","timestamp":"2015-06-01T14:47:53.594Z"}

      {"level":"info","message":"Device ID: 98-4F-EE-00-E4-BF","timestamp":"2015-06-01T15:02:16.885Z"}

      {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2015-06-01T15:05:01.260Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2015-06-01T15:05:01.293Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2015-06-01T15:05:01.355Z"}

      {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2015-06-01T15:10:15.341Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2015-06-01T15:10:15.374Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2015-06-01T15:10:15.442Z"}

      {"level":"info","message":"Initialized","timestamp":"2015-06-01T15:11:53.431Z"} 

      {"level":"info","message":"Device ID: 98-4F-EE-00-E4-BF","timestamp":"2015-06-01T15:13:54.526Z"}

      {"level":"info","message":"Activating ...","timestamp":"2015-06-01T15:15:39.271Z"}

      {"level":"info","message":"Saving device token...","timestamp":"2015-06-01T15:15:41.380Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2015-06-01T15:15:41.437Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2015-06-01T15:15:41.476Z"}

      {"level":"info","message":"Starting registration ...","timestamp":"2015-06-01T15:22:03.820Z"}

      {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2015-06-01T15:22:03.869Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2015-06-01T15:22:03.880Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2015-06-01T15:22:03.938Z"}

      {"0":{"name":"temp","type":"temperature.v1.0","cid":"d4bd1ac8-5ce4-4240-ab38-a354000190ad"},"level":"info","message":"Component registered","timestamp":"2015-06-01T15:22:08.034Z"}

      {"level":"info","message":"Device ID: 98-4F-EE-00-E4-BF","timestamp":"2015-06-01T15:36:39.394Z"}

      {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2015-06-01T15:36:54.669Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2015-06-01T15:36:54.704Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2015-06-01T15:36:54.765Z"}

      {"level":"info","message":"UDP listener started on port: 41234","timestamp":"2015-06-01T15:36:57.379Z"}

      {"level":"info","message":"Starting listeners...","timestamp":"2015-06-01T15:36:57.398Z"}

      {"level":"info","message":"TCP listener started on port: 7070","timestamp":"2015-06-01T15:36:58.594Z"}

      {"level":"info","message":"Connecting to ws.us.enableiot.com:443...","timestamp":"2015-06-01T15:36:58.517Z"}

      {"level":"info","message":"WSConnector: Connection successful to: ws.us.enableiot.com:443","timestamp":"2015-06-01T15:36:59.962Z"}

      {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2015-06-01T15:39:18.872Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2015-06-01T15:39:18.904Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2015-06-01T15:39:18.966Z"}

      {"level":"info","message":"UDP listener started on port: 41234","timestamp":"2015-06-01T15:39:22.052Z"}

      {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2015-06-01T15:44:12.438Z"}

      {"level":"info","message":"Updating metadata...","timestamp":"2015-06-01T15:44:12.470Z"}

      {"level":"info","message":"Metadata updated.","timestamp":"2015-06-01T15:44:12.532Z"}

      {"level":"info","message":"UDP listener started on port: 41234","timestamp":"2015-06-01T15:44:15.500Z"}

      {"level":"info","message":"Starting listeners...","timestamp":"2015-06-01T15:44:15.519Z"}

      {"level":"info","message":"TCP listener started on port: 7070","timestamp":"2015-06-01T15:44:16.705Z"}

      {"level":"info","message":"Connecting to ws.us.enableiot.com:443...","timestamp":"2015-06-01T15:44:16.628Z"}

      {"level":"info","message":"WSConnector: Connection successful to: ws.us.enableiot.com:443","timestamp":"2015-06-01T15:44:17.538Z"}

       

       

      Any idea?

        • 1. Re: arduino scketches stopped sending data to the iotkit-agent
          CMata_Intel

          Hi marco.lopez.trinidad@gmail.com

           

          First, a couple of questions:

          1. When did you download the IoT image from IoT - Intel® Galileo Board Download | Intel® Developer Zone?

          2. What is the result of running iotkit-admin --version?

          3. Do you have errors while running iotkit-admin test?

          4. Are you having network issues?

           

          About your main issue; are you able to upload data just for an interval of time and then the process stops, is this right?  or right now you are not able to receive data in the cloud?

           

          Regards;

          CMata

          • 2. Re: arduino scketches stopped sending data to the iotkit-agent
            Zoran.Roncevic

            Hi,

             

            if sending data stop after reboot, check status of iotkit-agent service. I have similar issue, and here are some points:

            1. iotkit-admin is administration script, iotkit-agent is starting as service (both are NodeJS scripts)

            2. iotkit-admin test could pass (with no error) even iotkit-agent is not started. The main point is testing network visibility of enableiot.com domain.

            3. after reboot, check status of iotkit-agent : systemctl status iotkit-agent. If you found that iotkit-agent is loaded but not enabled, run this : systemctl enable iotkit-agent. Now, linux start iotkit-agent during boot sequence.

            4. look at /home/root/tmp folder. If iotkit-agent work there should be agent.log file .... In that file you will find every log messagge according communication iotkit-agent with Arduino scketch and with enableiot.com

             

            Zoran

            • 3. Re: arduino scketches stopped sending data to the iotkit-agent
              marco.lopez.trinidad@gmail.com

              Hi,

               

              1. I downloaded the SD image around a month

              2. Executing iotkit-admin.js version I got:

              1.7.0

              3. Executing iotkit-admin.js test I got:  

              2015-06-02T15:00:14.651Z - info: Trying to connect to host ...

              2015-06-02T15:00:17.120Z - info: Connected to dashboard.us.enableiot.com

              2015-06-02T15:00:17.137Z - info: Environment: prod

              2015-06-02T15:00:17.144Z - info: Build: 0.14.0

               

              4. No, I've not network issues, I mean I run tests like ping and traceroute and the yocto resolves the Internet address with no problem.

              5. I was able to upload sensor data to the cloud for two days then it stopped sending data. Locally the sensor data recollects data with no problem.

               

              --Marco

              • 4. Re: arduino scketches stopped sending data to the iotkit-agent
                marco.lopez.trinidad@gmail.com

                Hi,

                 

                after executing iotkit-agent status I got:

                 

                ./iotkit-agent.js status

                2015-06-02T15:09:40.140Z - info: Device has already been activated. Updating ...

                2015-06-02T15:09:40.197Z - info: Updating metadata...

                2015-06-02T15:09:40.264Z - info: Metadata updated.

                2015-06-02T15:09:43.208Z - info: UDP listener started on port:  41234

                2015-06-02T15:09:43.230Z - info: Starting listeners...

                2015-06-02T15:09:44.343Z - info: Connecting to ws.us.enableiot.com:443...

                2015-06-02T15:09:44.420Z - info: TCP listener started on port:   7070

                2015-06-02T15:09:45.262Z - info: WSConnector: Connection successful to: ws.us.enableiot.com:443

                 

                Rather I observe the command gets stuck with the acction WSConnector: Connection successful to ws.us.enableiot.com:443 without finish the command.

                 

                Regards,

                --Marco

                • 5. Re: arduino scketches stopped sending data to the iotkit-agent
                  Zoran.Roncevic

                  I found that your datetime on board was 2001-01-01

                   

                  {"level":"info","message":"Device ID: 98-4F-EE-00-E4-BF","timestamp":"2001-01-01T00:21:06.591Z"}

                  {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2001-01-01T00:21:22.620Z"}

                   

                  and then change to

                   

                  {"level":"info","message":"Device ID: 98-4F-EE-00-E4-BF","timestamp":"2015-05-29T22:03:54.036Z"}

                  {"level":"info","message":"Device has already been activated. Updating ...","timestamp":"2015-05-29T22:04:09.203Z"}

                  {"level":"info","message":"Updating metadata...","timestamp":"2015-05-29T22:04:09.238Z"}

                  {"level":"info","message":"Metadata updated.","timestamp":"2015-05-29T22:04:09.303Z"}

                   

                  Did you try start from "zero". Delete device from cloud, and perform iotkit-admin initialize (clear token etc...)

                  • 6. Re: arduino scketches stopped sending data to the iotkit-agent
                    marco.lopez.trinidad@gmail.com

                    Hi Zoran,

                     

                    yes, in fact, after reboot I didn't realise the date was incorrect then I executed the set-time command and then the board changed its date value to the actual value.

                     

                    Yes, I completely cleared and started from zero following the steps:

                     

                    1. I stopped the agent via the stop-agent command.

                    2. I switched off the Galileo board.

                    3. I deleted the device register in the Cloud Analytics platform.

                    4. I switched on the Galileo board and set the time.

                    5. I have run the initialization and registration procedures of the Galileo board via the iotkit-admin command.

                    6. I started the agent via the start-agent command.

                    7. I executed my arduino scketch.

                     

                    I still have a big doubt why the iotkit-admin test and iotkit-agent status commands get stuck in the connection with the

                    ws.us.enableio.com?

                     

                    Cheers,

                    --marco

                    • 7. Re: arduino scketches stopped sending data to the iotkit-agent
                      Zoran.Roncevic

                      Hi Marco,

                       

                      could you post or send your Arduino code ?

                       

                      Maybe we talk about two different configuration. First, I DO NOT USE start-agent.sh, stop-agent.sh at all. Galileo OS image have preinstalled iotkit-agent ... I found some tutorial about running iotkit-agent on PC, Raspberry ... and there are instructions you mentioned. BUT not for Galileo... well, go to zero point :

                       

                      IoTKit-agent on Galileo & Edison board should be prepared Linux service!

                       

                      bold words are command on your Edison terminal :

                      1. Reboot your Galileo

                      2. Set date and time ( I'm using Intel XDK IoT edition and there are menu item (sync pc and board) so I don't know how to do that on Linux

                      - do not nothing about start-stop iotkit-agent you did before -

                      3. systemctl status iokit-agent      (please send response, screenshot or lines from putty...this is checking status of iotkit-agent service)

                      4. systemctl start iotkit-agent    (any response , error or something on screen? this start iotkit-agent service)

                      5. systemctl status iotkit-agent  (checking service again ...)

                      6. iotkit-admin test

                      7. iotkit-admin observation temp 100    (if name of your component is "temp" as is in log data you sent)

                      could you find file : /lib/systemd/system/iotkit-agent.service => if yes, you have iotkit-agent as Linux service, .. if not, something is wrong...

                       

                      Another question:

                      It's strange in your log data

                       

                      {"level":"info","message":"UDP listener started on port: 41234","timestamp":"2015-06-01T15:36:57.379Z"}

                      ... and again

                      {"level":"info","message":"UDP listener started on port: 41234","timestamp":"2015-06-01T15:39:22.052Z"}

                      ...and again

                      {"level":"info","message":"UDP listener started on port: 41234","timestamp":"2015-06-01T15:44:15.500Z"}


                      It's like your iotkit-agent is restarted every few minutes


                      Zoran

                      • 8. Re: arduino scketches stopped sending data to the iotkit-agent
                        Zoran.Roncevic

                        Marco,

                         

                        look at this post :

                        IoT dashboard Control/Actuator working code or tutorial?

                         

                        latest comment is mine ... after solving problem like yours

                        • 9. Re: arduino scketches stopped sending data to the iotkit-agent
                          marco.lopez.trinidad@gmail.com

                          Here the code:

                           

                           

                          #include <IoTkit.h>

                          #include <Ethernet.h>

                          #include <aJSON.h>

                           

                          IoTkit iotkit;

                           

                          int tempChannel = 1;

                           

                          int B = 3975;

                           

                          void setup() {

                            // put your setup code here, to run once:

                            Serial.begin(115200);

                           

                            // call begin on the IoTkit object before calling any other methods

                            iotkit.begin();

                            Serial.println("Start collecting temperature sensor data: ");

                          }

                           

                          void loop() {

                            // put your main code here, to run repeatedly:

                            int sensorReading = analogRead(tempChannel);

                           

                            Serial.print("Raw temperature readings: ");

                            Serial.println(sensorReading);

                           

                            double tempResistance = (double)(1023 - sensorReading)*10000/sensorReading;

                            double temperature = 1/(log(tempResistance/10000)/B + 1/298.15) - 273.15;

                           

                            Serial.print("Sending temperature reading: ");

                            Serial.println(temperature);

                           

                            Serial.print("send function returns: ");

                            Serial.println(iotkit.send("Temp", temperature));

                           

                           

                            // wait a little to get the next sensor reading...

                            delay(1000);

                          }

                           

                          With respect the iotkit-agent restarting is probably the times I've manually stopped and restarted the agent.

                           

                          On the other hand, I don't use the systemctl command because it is not present in the Galileo board linux yocto I have. Instead I use the scripts in the iotkit-agent-master package, iotkit-admin, iotkit-agent, iotkit-agent.service, etc.

                           

                          Apparently the iotkit-admin observation command works, It is the output I get:

                          iotkit-admin.js observation temp 29

                          2015-06-02T21:03:04.677Z - info: Submitting:  n=temp, v=29

                          2015-06-02T21:03:07.231Z - info: Response received:  response=none detail, status=0

                          2015-06-02T21:03:07.252Z - info: Observation Sent response=none detail, status=0

                           

                          Rather the observations are not registered within the Cloud Analytics platform.

                           

                          Yes, I've the iotkit-agent.service file, it contains the following:

                           

                          [Unit]

                          Description=iotkit-agent

                          After=network.target

                           

                          [Service]

                          ExecStart=/usr/bin/iotkit-agent

                          Restart=always

                          RestartSec=10s

                          Environment=NODE_ENV=production

                           

                          [Install]

                          WantedBy=multi-user.target

                           

                          Regards,

                          --marco

                          • 10. Re: arduino scketches stopped sending data to the iotkit-agent
                            Zoran.Roncevic

                            Marco,

                            1. try this IntelGalileoFirmwareUpdater-1.0.4-Windows.zip to update Galileo firmware to latest

                            2. On my yocto image for Galileo there are systemd preinstalled and systemctl works! Something is wrong....my iotdk-galileo-image.bz2 date is 29.april.2015. What you put on SD card?

                             

                            3. try iotkit-admin protocol mqtt to change protocol for communication with cloud.

                            4. In iotkit-agent folder (where you have start.sh stop.sh you mentioned) there are send_udp.js  ... try node send_udp.js temp 25, but before this start iotkit-agent on your way ... Because send_udp.js use iotkit-agent for sending.

                             

                             

                            Here are my NodeJS example working just now

                             

                            ****************

                            "use strict";

                             

                            var fs = require('fs');

                            var fbuff = '';

                            var temp = 0;

                             

                            var fcore1 = "/sys/devices/virtual/thermal/thermal_zone3/temp";

                            var fcore2 = "/sys/devices/virtual/thermal/thermal_zone4/temp";

                            var fmem = "/proc/meminfo";

                             

                            var dgram = require("dgram");

                            var udpclient = dgram.createSocket('udp4');

                             

                             

                            // UDP Options

                            var udpclient_options = {

                                host : '127.0.0.1',

                                port : 41234

                            };

                             

                             

                            function udpSendObservation(name, value, on){

                                var msg = JSON.stringify({

                                    n: name,

                                    v: value,

                                    on: on

                                });

                             

                                var sentMsg = new Buffer(msg);

                                //console.log("Sending UDP observation: " + sentMsg);

                                udpclient.send(sentMsg, 0, sentMsg.length, udpclient_options.port, udpclient_options.host);

                            }

                             

                             

                            function mainloop()

                            {

                              var s = '';

                              var t = 0;


                              fs.readFile(fmem,function(err,data){

                              fbuff = data;

                              s = fbuff.toString();

                                var array = data.toString().split("\n");

                              var i = 0;

                                for(i in array) {

                              var j = 0;

                              var mem_i = array[i].split(":");

                              var name_info = mem_i[0];

                              //console.log(name_info);

                              if (name_info == 'MemFree') {

                              var value_info = mem_i[1].split("kB");

                                udpSendObservation('memfree',value_info[0],new Date().getTime());

                                                });  

                                  }

                                }

                              });

                             

                             

                                setTimeout(mainloop,60*1000); //call the indicated function after nn minutes

                            }

                             

                            // Main Loop

                            mainloop();

                             

                            *****************************

                            • 12. Re: arduino scketches stopped sending data to the iotkit-agent
                              Zoran.Roncevic

                              From your comment

                              ....

                               

                              Apparently the iotkit-admin observation command works, It is the output I get:

                              iotkit-admin.js observation temp 29

                              2015-06-02T21:03:04.677Z - info: Submitting:  n=temp, v=29

                              2015-06-02T21:03:07.231Z - info: Response received:  response=none detail, status=0

                              2015-06-02T21:03:07.252Z - info: Observation Sent response=none detail, status=0

                               

                              Rather the observations are not registered within the Cloud Analytics platform.

                              ........

                              Look underlined line. It's confirmation from cloud (enableiot.com) that your message is received!?! But you tell : " ...observations are not registered...". ???

                               

                              You don't answer did you try send_udp.js ... you have sample in my previous comment

                               

                              Try with forcing error :

                              1. type iotkit-admin.js obseravtion humid 29 (wrong component name)

                              2. unplug your LAN cable from Galileo and send observation

                              3. stop iotkit-agent service and send observation

                               

                              I don't know how systemd (systemctl is one of command) is missing from your yocto Linux. I didn't install anything on my Galileo neither Edison... and evertything work fine. Try to open new discussion about it. You have to have systemd!

                              • 13. Re: arduino scketches stopped sending data to the iotkit-agent
                                marco.lopez.trinidad@gmail.com

                                Hi,

                                 

                                I've run the tests you suggested to me:

                                 

                                1. I unplugged the Ethernet cable for a while.

                                2. I plugged the Ethernet cable and started the agent.

                                3. I used only the send-udp.js command to upload data. After a while the dashboard showed the data.

                                4. I changed the protocol to mqtt and then used the send-udp.js command to upload data. After a while the dashboard showed the data.

                                5. I changed the protocol to rest and then I executed the send-up.js command to upload data. After a while the dashboard showed the data.

                                6. I changed the protocol to rest+ws then I executed the send-up.js command to upload data. After a while the dashboard showed the data.

                                 

                                I think the arduino application is not connecting the iotkit-agent or the agent is not submitting the data to the dashboard.

                                 

                                What do you think?

                                 

                                Regards,

                                --marco

                                • 14. Re: arduino scketches stopped sending data to the iotkit-agent
                                  Zoran.Roncevic

                                  Hi,

                                   

                                  well finally something works. And it give us some answers... IoTKit-admin & IoTKir-agent are NodeJS scripts. "Dashboard" (i will use it as shortname for cloud) is webservice. On GitHub you could find examples to communicate with dashboard without iotkit-agent, only using http protocol (POST some JSON data directly to dashboard)... So, when you use iotkit-admin test/observation, native http communication is used, and iotkit-agent could be stopped. IoTKiT-agent works as "small server" (NodeJS) and listen to from inside on UDP port 41234. And that is why I suggest you to run test with send_udp.js. This script use iotkit-agent, and your dashboard showed the data => iotkit-agent on your board work.

                                  I will prepare NodeJS verion of your Arduino sketch for real testing ...

                                   

                                  OH MY GOD ...  in your Arduino code Serial.println(iotkit.send("Temp", temperature));  what is name of your component "temp" or "Temp" ...

                                  1 2 3 Previous Next