Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Employee
1,479 Views

Rules based Actuation not working with Intel Analytics dashboard

I have an Edison board set up with the Intel IoT Analytics Dashboard. My iotkit-agent is running and MQTT protocol has been setup. The Date and Time is also correctly setup. I am able to send data to the dashboard and see charts being plotted. (I am using a simple light monitor as an example). I want to send a buzzer actuation from the cloud and have created command and rules.

When I manually trigger the command (created a command called MY_BUZZER_ON with parameter 1), I can see the JSON command in iotkit-agent logs being sent from the cloud to my device. All good till here. But the same command is not triggered by a rule. My rule is that if light > 500, trigger MY_BUZZER_ON command. I can see values more than 500 being received in the dashboard and plotted in the graph, but my rule does not get executed. Very rarely 1 out of 100 times one rule is triggered after 4-5 min of delay.

Is this is a known behavior with the Intel IoT Analytics dashboard or there are some settings to improve rule based actuations? Need some solution desperately.

0 Kudos
13 Replies
Highlighted
Employee
10 Views

Any pointer will be helpful..

0 Kudos
Highlighted
Community Manager
10 Views

Hi Rahul,

 

 

Could you please explain us how did you set your rule? We would like to see your parameters to check if there's anything that can be changed and hopefully improve the results that you're currently getting. Have you tried to change the type of notification? Using Email notifications for example, just to check if you get the same behavior as with Actuations.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Employee
10 Views

Hi Pablo,

In my dashboard I have declared Buzzer of type Actuator with Boolean data type.

In the Control tab, I have created a complex command COMM_BUZZ_ON with the following settings

Parameter name - BUZZ(0,1)

Parameter Value - 1

Transport type - MQTT

If I send this command manually by pressing the send command, I can see JSON message in the iotkit-agent logs.

Next I went to rules tab and formed a rule that whenever light value is > 500

Rule - LIGHT_LED_ON

Notification type - Actuation

Actuation 1 - COMM_BUZZ_ON

But this rule is not getting invoked. Very rarely, 1/100 times I see the rule getting invoked. Manual send command works all the time.

Other notification like email still works better but actuation rules are not working at all.

0 Kudos
Highlighted
Employee
10 Views

Hi Pablo,

Any specific pointers?

- Rahul

0 Kudos
Highlighted
Community Manager
10 Views

Hi Rahul,

This seems to be an issue with the tool. If you are getting different results when using Email as notification (better results) there should be something wrong with the Actuation notifications.

 

I just want you to try something else, have you checked the "Enable automatic reset" checkbox when creating the rule? Take a look at the image below.

Try to mark it just to see if you get a different result.

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
10 Views

Hi Rahul,

 

 

Were you able to find the problem? Do you have any update?

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Employee
10 Views

Hi Pablo,

i tried your suggestion. The behavior is still the same. The condition for the actuation was met around 30 times, but I received actuation callbacks just 3 times. Also there was a delay of approx. 3 minutes between the trigger and actual actuation received. Ideally speaking, this is not the expected outcome for a functional IOT project with actuation.

I used another cloud dashboard, and there the actuation works seamlessly. I hope someone is looking into maintaining the Analytics dashboard so that more users can stick to it for prototyping.

0 Kudos
Highlighted
Community Manager
10 Views

Hi Rahul,

 

 

Thank you very much for the update. I will pass this information to the development team to see if they can do something to fix it. Just to know, did you just change the Cloud platform that you're using? Or did you make some changes to your circuit and program? I would like to know if you had to do some changes to your hardware/software configuration along the way (excluding the new Cloud platform obviously).

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Employee
10 Views

Hi Pablo,

Good point. I haven't changed anything in the circuit, but I have changed my program for sure. Initially I was using socket programming for sending/receiving messages to/from the Intel Analytics Dashboard. But with the new cloud, I moved to Paho-MQTT APIs.

I will give it a try with Intel Dashboard too, but I would need some help. Do you have ant reference code of using Paho MQTT APIs in C++ to connect to the Intel Dashboard.

I specifically need help in these APIs -

MQTTClient_create

MQTTClient_connect

Regards,

Rahul

0 Kudos
Highlighted
Community Manager
10 Views

Hi Rahul,

 

 

Have you checked this document? https://software.intel.com/en-us/blogs/2015/02/20/building-and-running-mosquitto-mqtt-on-intel-ediso... https://software.intel.com/en-us/blogs/2015/02/20/building-and-running-mosquitto-mqtt-on-intel-ediso.... You can find some general instructions on how to test client and server using Mosquito MQTT, this could be an option.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
10 Views

Hi Rahul,

 

 

Do you have updates on this case?

 

 

Regards,

 

Pablo
0 Kudos
Highlighted
Employee
10 Views

Hi Pablo,

If I understand correctly there is already a MQTT broker client on Edison and installation of mosquito MQTT client should not be mandatory. As I wrote above, I am using Paho MQTT APIs and libraries to publish/subscribe. I found no documentation of using Paho MQTT with Intel IOT Dashboard. If you have any docs or contacts, can you help me out. I need specific help for the following APIs

MQTTClient_create(&client, const_cast(host), const_cast(clientID), MQTTCLIENT_PERSISTENCE_NONE, NULL);

MQTTClient_connect(client, &data);

MQTTClient_subscribe(client, const_cast(TOPIC), MQTT_DEFAULT_QOS);

MQTTClient_publish(client, const_cast(MESSAGE_TOPIC), message_size, const_cast(payload), MQTT_DEFAULT_QOS, retained, &dt);

For connection, I need to specify the URL, port, Username, Password, how to address a data/variable to which the value will be published etc.

- Rahul

0 Kudos
Highlighted
Community Manager
10 Views

Hi Rahul,

 

 

I've been looking for reference code for the APIs that you mentioned but I've only found threads in some other sites with similar questions, I came across this Eclipse documentation on the MQTTClient, https://www.eclipse.org/paho/files/mqttdoc/Cclient/_m_q_t_t_client_8h.html# a5cb44bc0e06bcc95a314d51320a0cd1b https://www.eclipse.org/paho/files/mqttdoc/Cclient/_m_q_t_t_client_8h.html# a5cb44bc0e06bcc95a314d51320a0cd1b. I'm wondering if you've checked it before.

 

You might also find useful information in the GitHub site, https://github.com/eclipse/paho.mqtt.c/blob/master/src/MQTTClient.h https://github.com/eclipse/paho.mqtt.c/blob/master/src/MQTTClient.h.

 

 

Regards,

 

-Pablo
0 Kudos