Witam
Mam bramy przemysłowe nice sterowanie jest otwórz i zamknij poprzez podanie impulsu
Czyli potrzebuję impuls zamknij i impuls otwórz
Dodatkowo sterownik bramy ma wyjście sygnalizujące otwarcie bramy
I teraz nie mam pomysłu jak to połączyć aby uzyskać w jednym pasku otwórz zamknij i stan
Potrzebne dwa przekaźniki sterowane jednym paskiem otwórz zamknij i podłączyć czujnik otwarcia
Sterowanie bramą otwórz , zamknij i stan otwarcia
-
klew
- Posts: 13908
- Joined: Thu Jun 27, 2019 12:16 pm
- Location: Wrocław
- Has thanked: 134 times
- Been thanked: 137 times
Podasz dokładny model napędu, albo link do instrukcji?cinas wrote: Tue Dec 05, 2023 9:54 pm Ok
Dzięki za odpowiedź - czyli jak podejrzewałem bez napisania programu pod tą funkcjonalność na szybko się nie da
Najlepsze suple dla Twojego domu 
-
cinas
- Posts: 650
- Joined: Sun Aug 14, 2022 6:59 am
- Location: Kaczory
- Has thanked: 3 times
- Been thanked: 7 times
Napęd nice
https://www.nice.pl/nice-pobierz-plik/1144
Zamontowana karta NDA040 rozszerzenia z przekaźnikami pierwszy zaprogramowany jako oświetlenie drugi stan otwarcia bramy
Wyjście ING1-photo- (11) można zaprogramować jako krok po kroku ale jest wykorzystane do
https://www.nice.pl/nice-pobierz-plik/1144
Zamontowana karta NDA040 rozszerzenia z przekaźnikami pierwszy zaprogramowany jako oświetlenie drugi stan otwarcia bramy
Wyjście ING1-photo- (11) można zaprogramować jako krok po kroku ale jest wykorzystane do
-
lukfud
- Posts: 2480
- Joined: Thu Nov 23, 2017 11:33 pm
- Location: Warszawa
- Has thanked: 13 times
- Been thanked: 11 times
Z softem też nie będzie problemu. Jeśli chcesz, mogę pomóc.
https://www.facebook.com/groups/supladiy
https://www.facebook.com/groups/suplazamel
https://www.facebook.com/groups/suplaauraton
https://smartnerzeczy.pl
https://www.facebook.com/groups/suplazamel
https://www.facebook.com/groups/suplaauraton
https://smartnerzeczy.pl
-
cinas
- Posts: 650
- Joined: Sun Aug 14, 2022 6:59 am
- Location: Kaczory
- Has thanked: 3 times
- Been thanked: 7 times
Na szybko płyta z ali z ESP12-F na pokładzie , zasilanie 230 lub 7-30 lub 5V
R1 - IO15
R2 - IO14
R3 - IO12
R4 - IO13
IN1 - IO04
IN2 - IO05
Config IO00
Brakuje tylko polutowanie 2 transoptorów na wejścia
Obudowa Kradex Z110
R1 - IO15
R2 - IO14
R3 - IO12
R4 - IO13
IN1 - IO04
IN2 - IO05
Config IO00
Brakuje tylko polutowanie 2 transoptorów na wejścia
Obudowa Kradex Z110
You do not have the required permissions to view the files attached to this post.
-
lukfud
- Posts: 2480
- Joined: Thu Nov 23, 2017 11:33 pm
- Location: Warszawa
- Has thanked: 13 times
- Been thanked: 11 times
Podrzucam szkic i binarkę
Code: Select all
#define OPEN_PIN1 15
#define CLOSE_PIN1 14
#define OPEN_PIN2 12
#define CLOSE_PIN2 13
#define SENSOR_PIN1 4
#define SENSOR_PIN2 5
#define STATUS_LED_GPIO 2
#define BUTTON_CFG_RELAY_GPIO 0
#include <SuplaDevice.h>
#include <supla/clock/clock.h>
#include <supla/network/client.h>
#include <supla/network/esp_wifi.h>
Supla::ESPWifi *wifi = nullptr;
#include <ESP8266HTTPUpdateServer.h>
ESP8266HTTPUpdateServer httpUpdater;
#include <supla/network/esp_web_server.h>
Supla::EspWebServer suplaServer;
#include <supla/control/button.h>
Supla::Control::Button *buttonCfgRelay = nullptr;
#include <supla/sensor/binary.h>
Supla::Sensor::Binary *sensor_[2] = {};
#include <supla/control/virtual_relay.h>
Supla::Control::VirtualRelay *vrelay_[2] = {};
#include <supla/control/internal_pin_output.h>
Supla::Control::InternalPinOutput *relayPin_[4] = {};
#include <supla/device/status_led.h>
Supla::Device::StatusLed statusLed(STATUS_LED_GPIO, true);
#include <supla/device/supla_ca_cert.h>
#include <supla/storage/eeprom.h>
Supla::Eeprom eeprom;
#include <supla/storage/littlefs_config.h>
Supla::LittleFsConfig configSupla;
#include <supla/network/html/device_info.h>
#include <supla/network/html/protocol_parameters.h>
#include <supla/network/html/status_led_parameters.h>
#include <supla/network/html/wifi_parameters.h>
#include <supla/network/html/custom_text_parameter.h>
enum default_actions {
OPEN_CLOSE_1,
OPEN_CLOSE_2
};
class addedActionsClass : public Supla::ActionHandler, public Supla::Element {
public: addedActionsClass() {}
void handleAction(int event, int action) {
if (action == OPEN_CLOSE_1) {
if (sensor_[0]->getChannel()->getValueBool() == HIGH) {
relayPin_[0]->turnOn(vrelay_[0]->getStoredTurnOnDurationMs());
} else {
relayPin_[1]->turnOn(vrelay_[0]->getStoredTurnOnDurationMs());
}
}
if (action == OPEN_CLOSE_2) {
if (sensor_[1]->getChannel()->getValueBool() == HIGH) {
relayPin_[2]->turnOn(vrelay_[1]->getStoredTurnOnDurationMs());
} else {
relayPin_[3]->turnOn(vrelay_[1]->getStoredTurnOnDurationMs());
}
}
}
};
addedActionsClass *custAct = new addedActionsClass;
const char DEV_NAME[] = "dev_name";
char devName[30] = {};
void setup() {
Serial.begin(115200);
new Supla::Clock;
Supla::Storage::Init();
if (Supla::Storage::ConfigInstance()->getString(DEV_NAME, devName, 30)) {
SUPLA_LOG_DEBUG(" **** Param[%s]: %s", DEV_NAME, devName);
} else {
SUPLA_LOG_DEBUG(" **** Param[%s] is not set", DEV_NAME);
}
wifi = new Supla::ESPWifi;
vrelay_[0] = new Supla::Control::VirtualRelay();
vrelay_[0]->getChannel()->setDefault(SUPLA_CHANNELFNC_CONTROLLINGTHEGATE);
vrelay_[0]->addAction(OPEN_CLOSE_1, custAct, Supla::ON_TURN_ON);
vrelay_[1] = new Supla::Control::VirtualRelay();
vrelay_[1]->getChannel()->setDefault(SUPLA_CHANNELFNC_CONTROLLINGTHEGATE);
vrelay_[1]->addAction(OPEN_CLOSE_2, custAct, Supla::ON_TURN_ON);
sensor_[0] = new Supla::Sensor::Binary(SENSOR_PIN1, true);
sensor_[0]->getChannel()->setDefault(SUPLA_CHANNELFNC_OPENINGSENSOR_GATE);
sensor_[1] = new Supla::Sensor::Binary(SENSOR_PIN2, true);
sensor_[1]->getChannel()->setDefault(SUPLA_CHANNELFNC_OPENINGSENSOR_GATE);
relayPin_[0] = new Supla::Control::InternalPinOutput(OPEN_PIN1);
relayPin_[1] = new Supla::Control::InternalPinOutput(CLOSE_PIN1);
relayPin_[2] = new Supla::Control::InternalPinOutput(OPEN_PIN2);
relayPin_[3] = new Supla::Control::InternalPinOutput(CLOSE_PIN2);
buttonCfgRelay =
new Supla::Control::Button(BUTTON_CFG_RELAY_GPIO, true, true);
buttonCfgRelay->configureAsConfigButton(&SuplaDevice);
new Supla::Html::DeviceInfo(&SuplaDevice);
new Supla::Html::WifiParameters;
new Supla::Html::ProtocolParameters;
new Supla::Html::CustomTextParameter(DEV_NAME, "Device name", 30);
new Supla::Html::StatusLedParameters;
httpUpdater.setup(suplaServer.getServerPtr(), "/update");
SuplaDevice.setName(devName);
SuplaDevice.setSuplaCACert(suplaCACert);
SuplaDevice.setSupla3rdPartyCACert(supla3rdCACert);
SuplaDevice.begin();
SuplaDevice.getSrpcLayer()->client->setDebugLogs(false);
};
void loop() {
SuplaDevice.iterate();
};
You do not have the required permissions to view the files attached to this post.
https://www.facebook.com/groups/supladiy
https://www.facebook.com/groups/suplazamel
https://www.facebook.com/groups/suplaauraton
https://smartnerzeczy.pl
https://www.facebook.com/groups/suplazamel
https://www.facebook.com/groups/suplaauraton
https://smartnerzeczy.pl
