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