I have a project where i have a nodemcu+mpu6050, and i have to collect the data and then send it to a plataform via wifi. The plataform should analise the data and then see if there was a fall, if it falls send a warning via email.
My problem is that i would like to know if cayenne can be programed, for example, receive the data and then analize it ?
Sory for my bad english.
you can use this code to send the data to cayenne https://github.com/myDevicesIoT/Cayenne-MQTT-Arduino/tree/master/examples/Connections/ESP8266 and then use trigger feature to send an email notification.
I have already done that but my problem is that the nodemcu is doing all the work, he reads and analise the code. And what i would like to do is: nodemcu reds the data from mcu6050 and send it to cayenne and then i program cayenne for when this happend:
if(abs(AcX_calc)> 100 && abs(AcX_calc)< 1000|| abs(AcY)> 4000 && abs(AcY)< 6000|| abs(AcZ) > 14000)
he sends tthe email
do this calucation on nodemcu and if it is true then send a state change to cayenne.
You cannot analise or do work on cayenne. But use the features provided to optimise with your device.
the problem on doing that is that the device is doing all the work unnecessarily. And the battery will die sonner
So is not possible to analise data in cayenne??
it is not possible directly. but you can try something like a node-red to get and analyse the data.
can you explain me better how does that work?
have a look at this topic Using Node-RED as a Local Fallback Server then modify it to collect data and analise.