Simulated data from ESP8266 range 0-1000 volts, with increment of 100V every 500ms. Reset to 0 at 1000V. Updating every 500ms the raw data is perfect. The historical data is perfect. The live data shows the time change on the X axis but no data shows up, always zero.
sir, are you referring to web dashboard or (android or IOS)cayenne app?
Hi Shramik,
I am trying to use it both on my desktop dashboard and my android app. Neither one will display live data, but they both display historical data OK. Also, on the android app the button never actuates, it just sits there and spins, but works great on the desktop dashboard. Thanks, Lee
we are looking at the android issue. regards to web dashboard issue with live data, can you remove and re-add the widget again? though it will delete all the history data of that widget.
I removed the graph widget and under that I had a digital readout for the same channel. That digital readout now shows live data, but I cannot remove it to install the graph widget. In the upper right hand corner of the digital widget there is a plus sign. When I click it then the widget settings can be accessed. In settings I say remove it, but when I exit the digital widget is still there. Thanks, Lee
that is because you are not using the correct data type. can you share the code you are using?
So, resetting the dashboard showed all the widgets, including duplicates. I removed the graph and all the digital readouts but one. When I select the Details and Chart on the digital widget it shows me the live data as a graph just fine. I added a new Custom line chart widget with the same parameters (Voltage, Volts), but the same problem exists: the graph will not show live data at all. I think there is a problem with your Custom widget line chart.
The link to the Cayenne application is:
https://cayenne.mydevices.com/cayenne/dashboard/device/1733f670-42c6-11e9-ba40-5d168a516101
The code is simple:
#include <CayenneMQTTESP8266.h>
#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#define ANALOG_IN 1
char ssid[] = "";
char wifiPassword[] = "";
char userName[] ="1";
char mqttPassword[] = "";
char clientID[] = "";
void setup() {
Cayenne.begin(userName,mqttPassword,clientID,ssid,wifiPassword);
pinMode(2,OUTPUT);
digitalWrite(2,HIGH);
pinMode(ANALOG_IN,INPUT);
Serial.begin(9600);
}
int pressure = 0;
void loop() {
Cayenne.loop();
//pressure = analogRead(ANALOG_IN);
//Cayenne.virtualWrite(1,pressure,TYPE_VOLTAGE,UNIT_PERCENT);
Cayenne.virtualWrite(1,pressure,"Voltage","V");
delay(500);
Serial.print(pressure);
Serial.print("\n");
if(pressure >= 1000){
pressure = 0;
}
else {
pressure += 100;
}
}// end loop
CAYENNE_IN(0)
{
int buttonIn = 0;
buttonIn = getValue.asInt();
digitalWrite(2, !buttonIn );
Serial.print("\n");
Serial.print("The value of button is ");
Serial.print(buttonIn);
Serial.print("\n");
}
New bit of information. The digital widget updates with live data and data are correct. When I select the Details and Chart option in the upper right of the widget, it too displays the live updates correctly. On the line chart widget it update every 500ms and I can see the X axis update. The data is always zero. Holding my cursor on the zero data line I can see a blue data point every 500ms and the text box shown when I clock the data point says 0 volts! How can the other two display work correctly and only the live update on the live chart is wrong?
Shramik, yes I pasted it in a following message to you. No, it’s not because of the data type. The graph look perfect in the historical data, the time stamps and values are correct in historical data, but always zero for live data.
sir, can you create a new device and use this code ( data types are case sensitive). once uploaded, your device on cayenne dashboard will come online and a green temporary widget will auto-populate with channel number 1. Make it permanent by clicking on + on top of the widget. next, open the widget setting and change the widget type to line chart.
#include <CayenneMQTTESP8266.h>
#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#define ANALOG_IN 1
char ssid = “”;
char wifiPassword = “”;
char userName =“1”;
char mqttPassword = “”;
char clientID = “”;
void setup() {
Cayenne.begin(userName,mqttPassword,clientID,ssid,wifiPassword);
pinMode(2,OUTPUT);
digitalWrite(2,HIGH);
pinMode(ANALOG_IN,INPUT);
Serial.begin(9600);
}
int pressure = 0;
void loop() {
Cayenne.loop();
}
CAYENNE_OUT_DEFAULT(){
//pressure = analogRead(ANALOG_IN);
//Cayenne.virtualWrite(1,pressure,TYPE_VOLTAGE,UNIT_PERCENT);
Cayenne.virtualWrite(1,pressure,“voltage”,“v”);
Serial.print(pressure);
Serial.print("\n");
if(pressure >= 1000){
pressure = 0;
}
else {
pressure += 100;
}
}// end loop
CAYENNE_IN(0)
{
int buttonIn = 0;
buttonIn = getValue.asInt();
digitalWrite(2, !buttonIn );
Serial.print("\n");
Serial.print(“The value of button is “);
Serial.print(buttonIn);
Serial.print(”\n”);
}
Shramik,
Thanks for the reply. The code you sent had an open brace after the function, so it would not compile.
CAYENNE_OUT_DEFAULT(){
Also, I had to change the:
Cayenne.virtualWrite(1,pressure,“voltage”,“v”);
to:
Cayenne.virtualWrite(1,pressure,TYPE_VOLTAGE,UNIT_PERCENT);
otherwise I got another compile error.
So, I got it to compile and upload, but it still behaves the same. The digital widget works great using the same data on channel 2, but the line chart(on channel 1) still only displays zero for live data. But, both channels when
displaying historical data shows the graph data correctly. Still a bug somewhere and I think it is in the Line Chart code.
Lee
change
to
Cayenne.virtualWrite(1,pressure,"voltage","v");
Shramik,
After 3 or 4 days of trying to get Cayenne to work I have concluded that you guys are not ready for prime time; your product does not work. I love your user interface and your persistence, Shramik, in trying to get it to behave correctly. But I am now using Blynk. It took me about 20 minutes to get it up and running and it works beautifully.Thanks again for your efforts Shramik.
Lee
sir, it was a small typo in the code that gave you the error while compiling. if you make the changes I suggested earlier, you can get the line chart widget to work without any issue.
we are in progress to make our project best for prototyping and we will surely reach to high benchmark in a couple of months. till then if you want something that works on the production level you got to try our sister product https://mydevices.com/iot-in-a-box/.
Shramik, one thing I didn’t mention was I started developing the app to make a house sprinkler system to protect against forest fires. I live near Paradise California where 80 people died last year and about 14,000 houses were lost. So, even if that one problem was fixed by you there is still the confidence issue. I don’t think I could trust your software in a situation where it involves people’s lives. That’s too bad because very many people in the Sierra mountains could have ended up buying a lot of product from your company. Please forward this email to your CEO, he or she should be interested in it.
Thank you again for your great efforts to get the problem fixed for me.
Lee
in this case you got to check https://www.iotinabox.com/, where you will get what you are looking for.