Hi. I’m using esp8266 with the arduino IDE.
I’m trying to send a test variable using the following code:
/****************************************
* Include Libraries
****************************************/
#include "Ubidots.h"
/****************************************
* Define Instances and Constants
****************************************/
const char* UBIDOTS_TOKEN = "I Pasted my Token here"; // Put here your Ubidots TOKEN
const char* WIFI_SSID = "my network"; // Put here your Wi-Fi SSID
const char* WIFI_PASS = "my password"; // Put here your Wi-Fi password
Ubidots ubidots(UBIDOTS_TOKEN, UBI_HTTP);
/****************************************
* Auxiliar Functions
****************************************/
// Put here your auxiliar functions
/****************************************
* Main Functions
****************************************/
void setup() {
Serial.begin(115200);
ubidots.wifiConnect(WIFI_SSID, WIFI_PASS);
ubidots.setDebug(true); // Uncomment this line for printing debug messages
}
void loop() {
float value1 = random(0, 9) * 10;
ubidots.add("I pasted the long variable code name here", value1); // Change for your variable name
bool bufferSent = false;
bufferSent = ubidots.send(); // Will send data to a device label that matches the device Id
if (bufferSent) {
// Do something if values were sent properly
Serial.print("Values sent by the device: ");
Serial.println(value1);
}
delay(8000);
}
As you can see this code is from a library called “ubidots-esp8266” https://github.com/ubidots/ubidots-esp8266/archive/master.zip
Based on the serial readout in Arduino IDE it’s connecting to wifi just fine, but the following error has me stumped:
“code”: 403001, “message”: “The user has not permissions to create a new variable.”
I have checked that I’ve created a variable, that the code is correct. I even tried using the “API name” instead. But, I’m stuck. I’m not trying to “create a variable” just update an existing one. But it’s not recognizing that.
What can I try next?