Philips Hue Dimmer Switch and RF24/ESP8266

Hi!
I am trying to read data from the Philips Hue Dimmer Switch with my ESP8266 (NodeMCU Lua Lolin V3 Modul mit ESP8266 12E) and the NRF24L01 module.
The ESP8266 and the NRF24L01 module are successfully connected according to the isChipConnected() function from the API - see https://tmrh20.github.io/RF24/classRF24.html#ac224c55270d26dbe7b4f3492ea3056b5

However, I am not receiving any data with the ESP8266 when pressing buttons on the dimmer switch. On some websites I read the Philips Hue system uses channels 11, 15, 20 and 25 which I tried without success.

The code looks like this:

#include <SPI.h>
#include <RF24.h>

RF24 radio(2, 4);

char buffer[50];

void rf24_setup() {
  radio.begin();
  radio.setChannel(11);
  radio.setPALevel(RF24_PA_MAX);
  if (!radio.setDataRate(RF24_250KBPS)) {
    Serial.println("RF24 data rate unsupported!");
  }

  if (radio.isChipConnected()) {
    Serial.println("RF24 chip found");
  } else {
    Serial.println("RF24 chip not connected!");
  }
  

// do I need this?
//  radio.openReadingPipe(1, addresses[0]);
  radio.startListening();
}

void rf24_handle() {
  while(radio.available()) {
    uint8_t size = radio.getPayloadSize();
    Serial.print("RF24 data received (");
    Serial.print(size);
    Serial.println(" bytes): ");
    
    radio.read (buffer, size);
    Serial.println(buffer);
  }
}

Do you have a hint for me? Thanks!
inspire

Please post your full sketch.

Hi!
In the meantime I tried another library (without success) exactly like described here: Wireless Communication between Arduino and NodeMCU using NRF24L01 Transceiver Module

The wiring is also done according to this page.

The full sketch is this:

#include <RH_NRF24.h>

RH_NRF24 nrf24(2,4);

char buffer[50];

void rf24_setup() {
   if (!nrf24.init())
  Serial.println("initialization failed");

  
  // I tried all channels from 1 to 30 :(
  if (!nrf24.setChannel(11))
    Serial.println("Channel set failed");
  if (!nrf24.setRF(RH_NRF24::DataRate2Mbps,RH_NRF24::TransmitPower0dBm))
    Serial.println("RF set failed");
  Serial.setDebugOutput(true);
  Serial.println("finished");
}

void rf24_handle() {
  if (nrf24.available())
  {
    uint8_t buf[500];
    uint8_t len = sizeof(buf);
    if(nrf24.recv(buf, &len))
    {
      Serial.print("Received: ");
      Serial.println((char*)buf);
    }
    else
    {
      Serial.println("recv failed");
    }
  }
}

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  Serial.println("");
  Serial.println("Hello :)");

  rf24_setup();
}

void loop() {
  rf24_handle();
  delay(10);
}

I see that the rf24 chip is recognized properly (no error messages). However I do not see any data being transmitted when I push buttons on the Philips Hue Dimmer Switch.

Thanks a lot for your help!
inspire