Hi
Anyone help with a Homeyduino issue? I’m sure I’m missing something simple but just cannot see the issue. I’m building a small power fail sensor project and hardware side is working fine. The unit connects to nextwork correctly and I can see it has an IP address etc. but the Homey Pro simply doesnt see any devices.
I’ve stripped the code right back to bare minimum as a test - see below but when looking for a device in Homey Pro it sees nothing. The App seems to have installed fine, just doesnt find anything.
Any advice appreciated as I can’t see what I missed.
The code
/*****
#include <WiFiNINA.h>
#include <Homey.h>
bool state = false;
bool previousButtonState = false;
unsigned long previousMillis = 0;
const unsigned long interval = 100; //Interval in milliseconds
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int status = WL_IDLE_STATUS; // the Wifi radio's status
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial);
// attempt to connect to Wifi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to network: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network:
status = WiFi.begin(ssid, pass);
// wait 10 seconds for connection:
delay(10000);
}
Homey.begin("Power Sensor");
Homey.setClass("sensor");
// you're connected now, so print out the data:
Serial.println("You're connected to the network");
Serial.println("----------------------------------------");
printData();
Serial.println("----------------------------------------");
}
void loop() {
Homey.loop();
}
void printData() {
Serial.println("Board Information:");
// print your board's IP address:
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
Serial.println();
Serial.println("Network Information:");
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
// print the received signal strength:
long rssi = WiFi.RSSI();
Serial.print("signal strength (RSSI):");
Serial.println(rssi);
byte encryption = WiFi.encryptionType();
Serial.print("Encryption Type:");
Serial.println(encryption, HEX);
Serial.println();
}
*****/