Release Notes June 23, 2017 (Dashboard Sharing, ESP8266 Support)

Release Notes June 23, 2017

New Features

  • Dashboard Sharing! Share your Cayenne projects with others (either as view-only or with permission to change actuators) by using the new Sharing button at the top of each Project view to generate a shareable link.

  • ESP8266 Support! We’ve added official support for the SparkFun ESP8266 Thing Dev Board and Generic ESP8266 boards to the Cayenne UI. Add these from Add New > Device/Widget > Microcontrollers.

Known Issues

  • Custom ranges for data history graphs are currently not working for MQTT and LoRa connected devices.
  • Server side slowness with MQTT and LoRa triggers/notifications.
5 Likes

I like that!

Hi rsiegel, great announcement !!
esp8266 library works ok!, digital pins works ok! but widget interface doesnt let us add ie. an ds18b20 to esp8266, this is known? is in development stage?
regards
rck

Hi @rmoscoloni, this is because our initial ESP8266 support guides you through adding the device as a ‘Bring Your Own Thing’/MQTT device rather that the Arduino or Raspberry Pi options you might have used on Cayenne previously.

It’s by design that that you can’t add something like the DS18B20 because the process for adding sensors is different for MQTT devices. Rather than choosing a sensor like DS18B20 from Add New > Device/Widget > Sensors > etc, you publish the sensor data to Cayenne on a channel and we will automatically create the widget on your dashboard, which you can then manipulate as you please.

Here are some real examples from the ESP8266.ino sketch we provide when adding the device:

	Cayenne.celsiusWrite(1, 22.0);
	Cayenne.luxWrite(2, 700);
	Cayenne.virtualWrite(3, 50, TYPE_PROXIMITY, UNIT_CENTIMETER);

Each of these when executed will publish data to Cayenne on the selected channel, and create a widget based on the data type. This is what it looks like with those 3 in place:

Those are passing the static values of 22.0, 700, 50, of course. For a real world sensor you would want that parameter to be a variable or call to a function that reads your actual sensor.

Please note that you can, however, add Custom Widgets to MQTT devices, you just have to point them to a channel, and then use statements like above to populate them with data.

1 Like

Hi, rsiegel
Many thanks for the long post answering my question!
i have realize the same minutes ago! auto creation of widget is fantastic
you know, cayenne rocks.
many many thanks
regards
rck

1 Like

Hi rsiegel
Did you know if slider widget is working in mqtt under android app?
i have a simple slider and the app reflects when i set value in a browser but its says device not connected when i move the slider in the app.
needless to say cayenne is great, did you plan an implementation of a fallback local server, or simply a local server?
regards
rck

Hi rsiegel!

If I publish a project (with the ‘Sharing’ button), the link it’s good for a PC with a browser but how can I send this link to a friend that use only IPhone/IPad or Android?

The link opens a browser but the browser asks to install the app.

When app starts, asks to make login but my friends haven’t a login, so the project it’s not accessible!

In short, my project was public only for a PC… not for mobile?

Thanks a lot!!

I too would like to see the sharing feature work on a mobile device or using another users Cayenne app.

@Maurizio @walters

Yeah, the mobile app right now doesn’t have any awareness of the Dashboard Sharing feature, and right now it generates a web dashboard link for viewing someone else’s dashboard. There is nothing explicitly stopping it from being opened on a mobile browser, but the Cayenne browser site isn’t designed for mobile and will collapse down to 2 app store buttons once the window dimensions get small enough.

It’s officially unsupported, but we’ve had a number of users (especially Android) with success from ‘Request Desktop Site’ within the mobile browser allowing them to work around this size limitation.

I’m sure that the ability to share a dashboard from the mobile apps will be coming soon, and I’ll log a suggestion that we should support the viewing part on mobile as well.

hi rsiegel,
did you read my post #6?
thanks
regards
rck

I haven’t forgotten, thanks for your patience :slight_smile:

As far as a local Cayenne server, it’s been discussed plenty on this forum and in the company, but right now I’m not aware of any work toward that end internally. Certainly if there is any update on that end we’ll share it with you in the community.

I’ll set up a test for Android MQTT sliders and report back later today.

2 Likes

@rmoscoloni

Just wanted to update that I’ve been a little blocked from investigating this by connectivity issues we’ve been experiencing today. As soon as I can get a stable MQTT connection, I’ll investigate this specific issue in the app. By the way, which app are you having this trouble with? iOS or Android?

1 Like

hi rsiegel
im on android.
as a note: from here mqtt was working fine the last couple of days. The slider works ok from a web browser (chrome), and the app reflects the value set in the browser.
only when in the app the slider is moved it says unable to conect to device or so.
many thanks
regards
rck
PS: i could post the code and share the widgets if you like

I would be interested in the code if you don’t mind (without the MQTT Username/password/client ID values)

1 Like

hi rsiegel
I’m running a lolin nodemcu 1.0
By the way is a very simple code thanks to cayenne.

reads a ds18b20 and display on channel 1
set a pin on channel 0
publish state of a pin on channel 2
reads slider
publish the slider value on channel 3 (only for testing purposes)
publish a fixed value on channel 6 (i change this value to verify ota upload)

// This example shows how to connect to Cayenne using an ESP8266 and send/receive sample data.
// Make sure you install the ESP8266 Board Package via the Arduino IDE Board Manager and select the correct ESP8266 board before compiling. 

//#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>
#include <OneWire.h>
#include <DallasTemperature.h>
//#include <ESP8266mDNS.h>
//#include <WiFiUdp.h>
#include <ArduinoOTA.h>

// Virtual Pin of the DS18B20 widget.
//#define VIRTUAL_PIN V2

// Digital pin the DS18B20 is connected to. Do not use digital pins 0 or 1 since those conflict with the use of Serial.
const int tmpPin = 2;
double slider1;

OneWire oneWire(tmpPin); //tmpPin
DallasTemperature sensors(&oneWire);

// WiFi network info.
char ssid[] = "...";
char wifiPassword[] = "...";

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = "...";
char password[] = "...";
char clientID[] = "...";

unsigned long lastMillis = 0;

void setup() {
  Serial.begin(9600);
  Cayenne.begin(username, password, clientID, ssid, wifiPassword);
  pinMode(0, OUTPUT);
  pinMode(5, INPUT_PULLUP);
  sensors.begin();
  ArduinoOTA.begin();
}

void loop() {
  Cayenne.loop();

  //Publish data every 3 seconds (3000 milliseconds). Change this value to publish at a different interval.
  if (millis() - lastMillis > 3000) {
	lastMillis = millis();
	//Write data to Cayenne here. This example just sends the current uptime in milliseconds.
	//Cayenne.virtualWrite(0, lastMillis);
	sensors.requestTemperatures();
	//Some examples of other functions you can use to send data.
	Cayenne.luxWrite(6, 1000);
	Cayenne.virtualWrite(1, sensors.getTempCByIndex(0), TYPE_TEMPERATURE, UNIT_CELSIUS);
   
	Cayenne.virtualWrite(3, slider1, TYPE_TEMPERATURE, UNIT_CELSIUS);
	Cayenne.virtualWrite(2, digitalRead(5), "digital_sensor", "d");
  }
   ArduinoOTA.handle();
}

CAYENNE_IN(0)
{
  digitalWrite(0, getValue.asInt());
}

CAYENNE_IN(5)
{
  slider1 =  getValue.asDouble();
}
/*
//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("CAYENNE_IN_DEFAULT(%u) - %s, %s", request.channel, getValue.getId(), getValue.asString());
 //Process message here. If there is an error set an error message using getValue.setError(), e.g getValue.setError("Error message");
}
*/

hope this helps
regards
rick

@rmoscoloni Thank you again for sharing the code and for your patience. I had run into an unrelated and sort of bizarre issue that needed to be ironed out before I was properly set up to reproduce this.

Now that I’m past that, I can reproduce it, and I’m confident that it isn’t your code and rather a bug in our Android app with the slider widget. We just recently introduced MQTT support there and this one slipped by us, apologies. I’m sure it will be a top priority to fix in the next release.

Until then, it’s not the best experience, but if you need mobile control for this widget you could try ‘Request Desktop Site’ in your mobile browser to see if you can get the web dashboard slider to work around this issue.

1 Like

Hi rsiegel
thanks for the support.
regards
rck

1 Like