Hi I am trying to play around with triggers and sending emails, however when ever i go in and adjust or try and change any of the trigger settings (IF Or That) they never actually save when i go back in and check them??
has anyone experienced this?
Hi I am trying to play around with triggers and sending emails, however when ever i go in and adjust or try and change any of the trigger settings (IF Or That) they never actually save when i go back in and check them??
has anyone experienced this?
is it web or app issue ?
it seems to be a Web issue…
There is also weird stuff happening to the web version, as my DHT22 sensors keep dropping out with no value displayed and they are soo slow with updating when they actually work… that might be a different discussion though…
i did a quick test at my end and everything is working fine.
which device you are using? browser? and it will better if you can send some screenshot or share a video of it.
which device are you using. if arduino can you share the code you are using.
I’m having issues with uploading a video to show you. However the more i play with it the more there is something wrong with how the data is being refreshed on the web server. Ill try and do a video tomorrow showing the issues, but there is definitely something not right. I’m using safari as the browser.
also pls see the code here below. Its just a basic code as im trying to play with switch states to then try and limit the number of email notifications i get. However im not sure its going to work…
//#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>
#include "DHT.h"
#define DHTPIN D4 // what digital pin we're connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321
DHT dht(DHTPIN, DHTTYPE);
// WiFi network info.
char ssid[] = "XXX
char wifiPassword[] =XXXX
// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
XXXXX
XXXX
XXXX
unsigned long lastMillis = 0;
void setup() {
Serial.begin(9600);
dht.begin();
Cayenne.begin(username, password, clientID, ssid, wifiPassword);
}
void loop() {
Cayenne.loop();
}
// Default function for sending sensor data at intervals to Cayenne.
// You can also use functions for specific channels, e.g CAYENNE_OUT(1) for sending channel 1 data.
CAYENNE_OUT_DEFAULT()
{
// Write data to Cayenne here. This example just sends the current uptime in milliseconds on virtual channel 0.
Cayenne.virtualWrite(0, millis());
// Some examples of other functions you can use to send data.
//Cayenne.celsiusWrite(1, 22.0);
//Cayenne.luxWrite(2, 700);
//Cayenne.virtualWrite(3, 50, TYPE_PROXIMITY, UNIT_CENTIMETER);
float h = dht.readHumidity();
float t = dht.readTemperature();
Serial.print(h);
Serial.print("H");
Serial.print(" ");
Serial.print(t);
Serial.print("C");
Serial.println("\r");
Cayenne.celsiusWrite(1, t);
Cayenne.virtualWrite(2, h, "Humidity", "%");
if(t >= 24.5){
Cayenne.virtualWrite(3,HIGH);
Serial.println("High Temp");
}
else if (t < 24){
Cayenne.virtualWrite(4,HIGH);
Serial.println("Low Temp");
}
else { Cayenne.virtualWrite(3,LOW);
Cayenne.virtualWrite(4,LOW);
}
}
// Default function for processing actuator commands from the Cayenne Dashboard.
// You can also use functions for specific channels, e.g CAYENNE_IN(1) for channel 1 commands.
CAYENNE_IN_DEFAULT()
{
CAYENNE_LOG("Channel %u, value %s", request.channel, getValue.asString());
//Process message here. If there is an error set an error message using getValue.setError(), e.g getValue.setError("Error message");
}
what is the problem here ?
can you try with google chrome?
yup. it is good to go. it is similar to this Sending a lot of SMS alert and email - #4 by shramik_salgaonkar
The data often does not refresh for a significant amount of time on the web server from the arduino. On some occasions the triggers would reflect what i had saved from my iPhone App, more often than not however it would reset to the same value (20 deg). When i then attempted to change the values back to 24 deg, save the trigger, then go back in to check if it saved - it had reset back to the 20 deg again…?
[quote=“shramik_salgaonkar, post:7, topic:10180”]
can you try with google chrome?
I will try when i get a chance.
i haven’t yet tried this code, however has anyone proven it works? I have tried with setting states, so when the temp rises to the trigger point, it sets a button to ‘on’. Then i set another trigger to send a notification when it reads the button is on, however it doesn’t solve the issue, and the flood of notifications still come…
have a look at the code from the link i shared in previous post.
this is because of Sending MQTT messages within rate limits
Hi Thanks for sending me this link. It does have extra information in it that i need, but my data is called within the default 15 second refresh function.
Is there any more information available on this subject, as the Cayenne Docs has very limited information. Also they mention that you can control the interval of refresh but doesn’t explain how you do it? I have found this but this appears to be a separate timer setup…
you can use this one.
or try this from the link above.
unsigned long lastMillis = 0;
void setup() {
Serial.begin(9600);
Cayenne.begin(username, password, clientID);
}
void loop() {
Cayenne.loop();
//Publish data every 10 seconds (10000 milliseconds). Change this value to publish at a different interval.
if(millis() - lastMillis > 10000) {
lastMillis = millis();
Cayenne.virtualWrite(0, lastMillis);
}
}
ok thanks. So essentially anything in the loop needs to be slowed down when writing to Cayenne.?
Also is there anyway we can feedback to the Cayenne team to put some of this in the docs? The information seems to be a little limited and there really hasn’t been much to highlight the importance of writing to Cayenne with timers…
Thanks for your help, we have seemed to drift from my original problem but Ill keep paying around with these and see if it makes a difference to the triggers not saving on the web version.
yup.
the team is working on this and we will have updated docs soon.
did you try on Google Chrome?