Back to Get Started
Create panel
Smart Home
The Smart Home system lets you control lights and a motor while monitoring gas, temperature, humidity, rain, and fire alerts from one dashboard. All data and control commands are sent through the panel topic dash_177xxxxxxxxxx. You can manage devices and view sensor status in real time from a single panel.
dash_177xxxxxxxxxxCreate panel
How It Works
- Create an account if you are a new user, or sign in if you already have an account.
- Create a new panel.
- Add widgets to the panel.
- Save the panel after adding widgets.
- Connect your hardware devices with the respective dashboard topic ID; values will be transmitted and displayed in the widgets.
Default widgets
Lights ON/OFFToggle switch.
Motor ON/OFFToggle switch.
Gas sensorGauge (e.g. ppm or %).
TemperatureGauge (°C).
HumidityGauge (%).
Rain sensorGauge.
Fire alertLED status indicator.
Before You Start
Connect your devices to the same cloud as KiwisIoT.
Your firmware must publish sensor readings and subscribe to control commands using dash_177xxxxxxxxxx.
Use a structured payload format so each sensor and control channel is mapped correctly in the dashboard. For setup details and payload structure, refer to the documentation or contact support.
Tips
- ★ Set gas and fire thresholds in your firmware to trigger local alarms or relays.
- ★ Use the same panel topic in your MCU for both subscribe (switches) and publish (sensors).
- ★ Fire alert LED: publish 1 to channel 6 for alert, 0 for normal.
Smart Home (ESP8266 + KiwisIoT)
#include <ESP8266WiFi.h>
#include <KiwisIoT.h>
#include <DHT.h>
// -------- WiFi ----------
const char* ssid = "real"; // Replace with your WiFi network name
const char* pass = "123456789"; // Replace with your WiFi network password
const char* topic = "dash_1771853312231"; // Replace with your dashboard topic ID
// -------- Pins ----------
#define LIGHT_RELAY D1 // Replace with your light relay pin
#define MOTOR_RELAY D2 // Replace with your motor relay pin
#define GAS_PIN A0 // Replace with your gas sensor pin
#define RAIN_PIN D5 // Replace with your rain sensor pin
#define FIRE_PIN D6 // Replace with your fire sensor pin
#define DHT_PIN D7 // Replace with your DHT sensor pin
#define DHTTYPE DHT11
DHT dht(DHT_PIN, DHTTYPE);
KiwisIoT kiwisiot(ssid, pass, topic);
// -------- Control from App --------
void onControl(String ch, String val) {
if (ch == "0") { // Light
digitalWrite(LIGHT_RELAY, val == "1" ? LOW : HIGH);
}
if (ch == "1") { // Motor
digitalWrite(MOTOR_RELAY, val == "1" ? LOW : HIGH);
}
}
void setup() {
Serial.begin(115200);
pinMode(LIGHT_RELAY, OUTPUT);
pinMode(MOTOR_RELAY, OUTPUT);
pinMode(RAIN_PIN, INPUT);
pinMode(FIRE_PIN, INPUT);
digitalWrite(LIGHT_RELAY, HIGH);
digitalWrite(MOTOR_RELAY, HIGH);
dht.begin();
kiwisiot.begin();
kiwisiot.onReceive(onControl);
Serial.println("Smart Home System Started");
}
void loop() {
// ---- Gas ----
int gasValue = analogRead(GAS_PIN);
// ---- Rain ----
int rainValue = digitalRead(RAIN_PIN);
// ---- Fire ----
int fireValue = digitalRead(FIRE_PIN);
// ---- Temperature & Humidity ----
float temp = dht.readTemperature();
float hum = dht.readHumidity();
// ---- Fire LED & Status ----
String statusMsg = "All Normal";
if (fireValue == LOW) { // depends on module logic
kiwisiot.send("6", 1);
statusMsg = "FIRE ALERT!";
} else {
kiwisiot.send("6", 0);
}
if (gasValue > 700) {
statusMsg = "Gas Leakage!";
}
if (rainValue == LOW) {
statusMsg = "Rain Detected";
}
// ---- Send Data ----
kiwisiot.send("2", gasValue);
kiwisiot.send("3", temp);
kiwisiot.send("4", hum);
kiwisiot.send("5", rainValue);
kiwisiot.send("7", statusMsg);
kiwisiot.run();
delay(2000);
}