---
title: Transformare Interfon Electra și Bticino 321061 cu Shelly Plus UNI (varianta nouă 2024)
description: "[![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/andrei/plus-uni.jpg)](https://smarthome360.ro/?s=shelly+uni&post_type=product) Shelly Plus Uni - Varianta 2024 ![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/429814974_7679156332094641_9187081163553901481_n-600x800.jpg) Interfon Electra ![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/453737025_8469309056412694_8437189964731450468_n-600x800.jpg) Interfon Bticino 321061 ![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/429876722_7679156408761300_9100955606542938542_n-373x800.jpg) - [Instructiunile sunt aproximativ aceleasi ca si la modulul vechi (link)](https://asociatiasmarthome.ro/wiki/transformare-interfon-electra-retro-in-interfon-smart-automatizare-acces-control-smart-home/) - Voltmeter-ul trebuie definit manual - Poate rula scripturi direct in device fara sa…"
url: "https://asociatiasmarthome.ro/wiki/transformare-interfon-electra-si-bticino-321061-cu-shelly-plus-uni-varianta-noua-2024/"
updated: "2026-05-09"
category: "🔌 Tutoriale & DIY"
---

# Transformare Interfon Electra și Bticino 321061 cu Shelly Plus UNI (varianta nouă 2024)

[![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/andrei/plus-uni.jpg)](https://smarthome360.ro/?s=shelly+uni&post_type=product)
Shelly Plus Uni - Varianta 2024

![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/429814974_7679156332094641_9187081163553901481_n-600x800.jpg)
Interfon Electra

![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/453737025_8469309056412694_8437189964731450468_n-600x800.jpg)
Interfon Bticino 321061

![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/429876722_7679156408761300_9100955606542938542_n-373x800.jpg)

- [Instructiunile sunt aproximativ aceleasi ca si la modulul vechi (link)](https://asociatiasmarthome.ro/wiki/transformare-interfon-electra-retro-in-interfon-smart-automatizare-acces-control-smart-home/)
- Voltmeter-ul trebuie definit manual
- Poate rula scripturi direct in device fara sa mai depinda de cloud-ul Shelly sau de un alt server pentru deschiderea automata

```javascript

					##############DESCHIDERE AUTOMATA###############

let CONFIG = {
  scanInterval: 0.5, // secunde, acesta va rula un timer la fiecare 0.5 secunde pentru a obține tensiunea
  voltmeterID: 100,  // ID-ul voltmetrului - când instalăm add-on-ul, dispozitivul va defini acest număr
  voltageThreshold: 2, // Pragul de tensiune peste care se vor activa releele
  switch1ID: 0, // ID-ul switch-ului 1
  switch2ID: 1  // ID-ul switch-ului 2
};

// Variabilă pentru a păstra starea acțiunii
let actionExecuted = false;

function fetchVoltage() {
  // Obține componenta voltmetrului
  const voltmeter = Shelly.getComponentStatus(
    "voltmeter:" + JSON.stringify(CONFIG.voltmeterID)
  );

  // Iese dacă nu poate găsi componenta
  if (typeof voltmeter === "undefined" || voltmeter === null) {
    console.log("Can't find the voltmeter component");
    return;
  }

  const voltage = voltmeter["voltage"];

  // Iese dacă nu poate citi tensiunea
  if (typeof voltage !== "number") {
    console.log("Can't read the voltage or it is NaN");
    return;
  }

  // Loghează tensiunea în consolă
  console.log("Voltage:", voltage);

  // Verifică dacă tensiunea depășește pragul stabilit și acțiunea nu a fost deja executată
  if (voltage > CONFIG.voltageThreshold && !actionExecuted) {
    console.log("Voltage is above threshold, turning on Switch 1");

    // Pornește switch-ul 1
    Shelly.call("Switch.Set", { id: CONFIG.switch1ID, on: true });

    // Așteaptă două secunde și apoi pornește switch-ul 2
    Timer.set(1000, false, function() {
      console.log("Turning on Switch 2");
      Shelly.call("Switch.Set", { id: CONFIG.switch2ID, on: true });
    });

    // Setează variabila pentru a indica faptul că acțiunea a fost executată
    actionExecuted = true;
  }

  // Resetarea acțiunii dacă tensiunea scade sub prag
  if (voltage <= CONFIG.voltageThreshold) {
    actionExecuted = false;
  }
}

// Inițializează scriptul
function init() {
  // Pornește timerul
  Timer.set(CONFIG.scanInterval * 1000, true, fetchVoltage);

  // Obține tensiunea la pornire
  fetchVoltage();
}

init(); // Rulează funcția init pentru a începe
```

```javascript

					######REBOOT - acest script reporneste modulul in fiecare noapte la ora 4 #############

Shelly.call(
  "Schedule.Create",
  {
    enable: true,
    timespec: "0 0 4 * * SUN,MON,TUE,WED,THU,FRI,SAT", // Schedule for 4:00 AM every day
    calls: [
      {
        method: "Shelly.Reboot", // Method to call for rebooting
      },
    ],
  },
  function(result, error_code, error_message) {
    if (error_code === 0) {
      print("Reboot scheduled successfully with ID:", result.id);
    } else {
      print("Failed to schedule reboot. Error:", error_message);
    }
  }
);
```

[![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/andrei/plus-uni-wiring-diagram-1300x365.png)](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/andrei/plus-uni-wiring-diagram.png)

[![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/andrei/plus-uni.jpg)](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/andrei/plus-uni.jpg)

[![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/429750407_7679156515427956_1152491094094060164_n-373x800.jpg)](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/429750407_7679156515427956_1152491094094060164_n.jpg)

[![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/429876722_7679156408761300_9100955606542938542_n-373x800.jpg)](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/429876722_7679156408761300_9100955606542938542_n.jpg)

[![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/429814974_7679156332094641_9187081163553901481_n-600x800.jpg)](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/429814974_7679156332094641_9187081163553901481_n.jpg)

[![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/454429812_8469312153079051_2766928702021335022_n-1067x800.jpg)](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/454429812_8469312153079051_2766928702021335022_n.jpg)

[![](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/453737025_8469309056412694_8437189964731450468_n-600x800.jpg)](https://asociatiasmarthome.ro/wp-content/uploads/betterdocs/acces-control-si-securitate/453737025_8469309056412694_8437189964731450468_n.jpg)
