My Analogue sensor trigger is not working in Cayenne


#1

My Analogue sensor trigger is not working in Cayenne ,
I have 0- to 3.3 volt pressure connected to wemos D1 and receiving the analogue reading in cayenne , but when i set the trigger above a value it is not triggering , please help
THanks


#2

is your trigger counter incrementing?


#3

Yes it is incriminating


#4

can you share a screenshot of your trigger and also of the trigger counter value.


#5



#6

I tried with medical air pressure reading too , it is all channel 1 input


#7

CAYENNE_OUT(1)
{
float Press_bar = (((analogRead(A0)*10)/ 1023) - 0.5); // read adc input pin = 30mv/mbar
// la valeur 0.6 is correction of pressure
Cayenne.virtualWrite(1 ,Press_bar );
}


#8

why are using a slider on your channel 1?
first delete the widget on channel 1 and th trigger, next make the following changes in your code to use the correct data types:

CAYENNE_OUT(1)
{
float Press_bar = (((analogRead(A0)*10)/ 1023) - 0.5); // read adc input pin = 30mv/mbar
// la valeur 0.6 is correction of pressure
Cayenne.virtualWrite(1 ,Press_bar, "analog_sensor", "null");
}

once you upload the code, it will auto create a new green widget with channel 1 on your dashboard. Make it permanent by clicking on +. Add a new trigger to this widget and check if it is working.

Once you have got it working, you will have to change the code so that you don’t hit the trigger limit. Sending MQTT messages within notification limit


#9

Ok great I will try & get back to you


#10

Dear shramik , You are great , it is working now
excellent wish good luck & thanks very much for your quick support
Hope the cayenne service is reliable & I may use this device in hospital environment
Can i have your direct contact details for furure projects & learning more about cayenne & sketches
Best Regards
Muneer
Dubai UAE


#11

Dear It did work for some time , again the trigger stopped , I reset & tried adding the widget & trigger unfortunately it stopped trigger email , any recommendation for stable alert
Thanks & Regards
Muneer


#12

you might hit the limit. did you add the code i shared above?


#13

Yes i updated the sketch as you said and it worked for 3 or 4 times then stopped
I did reach the threshold value


#14

What is the limit ?? How many triggers per day is there a limit
Please confirm

Thanks

Muneer


#15

It triggered only 3 or 4 times i think still did not hit the limit
Thanks and Regards
Muneer


#16

did you make the changes from this topic? Sending MQTT messages within notification limit


#17

No i am still having problem with trigger from set threshold value
Please help


#18

can you share the code you are using?


#19

Please note that the dash board is getting updated voltage changes at wemos D1


#20

I will share the code in 5 min.