NeoQuarZ:~Archetype
EN ⇄ ES
← Back to projects

Arduino & Raspberry Pi home automation

Lighting and ventilation controlled by sensors and simple rules.

ArduinoRaspberry PiMQTT
WEB PROTOTYPE

Simulate temperature, presence and ambient light. Outputs follow rules and a sample MQTT message. No devices are connected.

archetype.homeARDUINO → MQTT → RASPBERRY PI

View concept code
export function homeState({ temperature, threshold, lux, presence }) {
  if (
    ![temperature, threshold, lux].every(Number.isFinite) ||
    temperature < 10 ||
    temperature > 40 ||
    threshold < 20 ||
    threshold > 35 ||
    lux < 0 ||
    lux > 1000 ||
    typeof presence !== 'boolean'
  )
    throw Error('Invalid sensor data');
  return {
    temperature,
    lux,
    presence,
    light: presence && lux < 300,
    fan: temperature >= threshold,
    simulated: true,
  };
}

To turn this into a production application

Test real low-voltage sensors, configure MQTT authentication and define safe failure states.

Talk about this project ↗
NEOQUARZ / ARCHETYPE~/projects/smart-home0%