Chart Scaling

Hi ,wondering if anyone has had issues with history charts and the display scale ?

Some of my devices cant show the full range of readings due to the scale on the chart not matching the range settings on the device.
I have tried changing the range values with no luck , some work fine but others I cant see the upper or lower readings.
Also, they work fine on the phone app , just not on PC either Mac or Windows.

Thanks

1 Like

Thanks for reporting this.we will look into this.can you PM me your email id and also the code you are using.

1 Like

Hi Shramik.

Thanks for the reply .

Below are the codes for the affected devices.

As I mentioned, these work fine on my phone app as do my 6 other

devices.

It just seems to be these particular ones . interestedly the Heat pumps

has 4 working and 2 not.

The code is quite simple which is why I use prefer Cayenne over Blynk

especially with temp sensors.

Regards.

Dave Martin.

1/ POOL TEMP - Channels 1&2 chart issues

//#define CAYENNE_DEBUG

#define CAYENNE_PRINT Serial

#include <OneWire.h>

#include <DallasTemperature.h>

#include <CayenneMQTTESP8266.h>

// WiFi network info.

char ssid[] = "XXXX";

char wifiPassword[] = "XXXX";

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.

char username[] = "e578fe50-e86d-11e6-a446-0d180dc59d42";

char password[] = "-------------------------------------------------------";

char clientID[] = "5be4a220-bf1c-11e8-a79e-89b0eb263992";

#define VIRTUAL_CHANNEL 3

#define ACTUATOR_PIN 5 // Do not use digital pins 0 or 1 since those conflict with the use of Serial.

#define SENSOR_PIN 4 // Do not use digital pins 0 or 1 since those conflict with the use of Serial.

#define VIRTUAL_CHANNEL_1 1

#define VIRTUAL_CHANNEL_2 2

OneWire oneWire(SENSOR_PIN);

DallasTemperature sensors(&oneWire);

void setup()

{

Serial.begin(9600);

pinMode(ACTUATOR_PIN, OUTPUT);

Cayenne.begin(username, password, clientID, ssid,wifiPassword);

sensors.begin();

}

void loop()

{

Cayenne.loop();

}

// This function is called when data is sent from Cayenne.

CAYENNE_IN(VIRTUAL_CHANNEL)

{

int value = getValue.asInt();

CAYENNE_LOG("Channel %d, pin %d, value %d", VIRTUAL_CHANNEL, ACTUATOR_PIN, value);

// Write the value received to the digital pin.

digitalWrite(ACTUATOR_PIN, value);

}

// This function is called at intervals to send sensor data to Cayenne.

CAYENNE_OUT(VIRTUAL_CHANNEL_1)

{

// Send the command to get temperatures.

sensors.requestTemperatures();

// This command writes the temperature in Celsius to the Virtual Channel.

Cayenne.celsiusWrite(VIRTUAL_CHANNEL_1,sensors.getTempCByIndex(0));

}

CAYENNE_OUT(VIRTUAL_CHANNEL_2)

{

// Send the command to get temperatures.

sensors.requestTemperatures();

// This command writes the temperature in Celsius to the Virtual Channel.

Cayenne.celsiusWrite(VIRTUAL_CHANNEL_2,sensors.getTempCByIndex(1));

}

2/ HEAT PUMP TEMPS - Channels 1 & 6 chart issues

**#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space

can you PM me your email_id?

you might have enabled the graph setting for the line chart, so the default y-axis range is set to 0-20.
to solve the issue:

  • change the widget from gauge to line chart.
  • open setting of the line chart.
  • at the bottom disable the graph setting or adjust the value as required.
  • next change the widget from line chart to gauge.

Hi Shramik.

Thanks for the help .

That has sorted out my issue .

I didn’t realise the range could be changed that way

and now it all looks good.

Again , thank you very much.

Dave

1 Like