Problem applying cayenne

Hi.
With my little experience I have developed a thermostat program for esp8266 with a single push button and a display.
Once finished and working independently I am trying to enrich it with cayenne functions and I stumbled on the first step.
The most basic thing I have wanted to start with is to take the visualization of the temperature variable to the Cayenne board (I use 2 ds18b20 probes) that I also see on the physical display.
But when doing this (it does it the first time) the program remains as paused, it does not advance or respond to the button, nor does it update the temperature of the probes.
I suspect that having placed the command “Cayenne.loop ();” This is incompatible with the “OneButton.h” library that I use to give various functions to a single button in addition to making me anti-bounce.
I have sometimes read that people use the functions CAYENNE_CONNECTED () and CAYENNE_DISCONNECTED () that they are not used and if that could solve the problem of activating cayenne only when needed in the program.
And another more drastic solution would be to start from zero focusing on Cayenne and then add the rest of the program’s independent functions so that it also responds to the button.
People who have experiences with Cayenne, what would you recommend?

i just tried an example with cayenne and OneButton library and it worked.

/*
  This is a sample sketch to show how to use the OneButtonLibrary
  to detect double-click events on a button.
  The library internals are explained at
  http://www.mathertel.de/Arduino/OneButtonLibrary.aspx

  Setup a test circuit:
   Connect a pushbutton to pin A1 (ButtonPin) and ground.
   The pin 13 (StatusPin) is used for output attach a led and resistor to ground
   or see the built-in led on the standard arduino board.

  The Sketch shows how to setup the library and bind a special function to the doubleclick event.
  In the loop function the button.tick function has to be called as often as you like.
*/

// 03.03.2011 created by Matthias Hertel
// 01.12.2011 extension changed to work with the Arduino 1.0 environment
#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>
#include "OneButton.h"

// Setup a new OneButton on pin A1.
OneButton button(A0, true);

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

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

// setup code here, to run once:
void setup() {
  Serial.begin(9600);

  // enable the standard led on pin 13.
  pinMode(13, OUTPUT);      // sets the digital pin as output

  // link the doubleclick function to be called on a doubleclick event.
  button.attachDoubleClick(doubleclick);
  Cayenne.begin(username, password, clientID, ssid, wifiPassword);

} // setup


// main code here, to run repeatedly:
void loop() {
  Cayenne.loop();

  // keep watching the push button:
  button.tick();

  // You can implement other code in here or just wait a while
  delay(10);
} // loop


// this function will be called when the button was pressed 2 times in a short timeframe.
void doubleclick() {
  static int m = LOW;
  // reverse the LED
  m = !m;
  digitalWrite(13, m);
} // doubleclick

// End