Roller shutter 595 dlaczego się nie kompiluje przykład z bibiolteki Supli?

nebraska
Posts: 204
Joined: Thu Dec 08, 2022 3:00 pm
Been thanked: 1 time

Post

Cześć
Próbowałem przykładu z biblioteki Supla Device rolety z rejestrami 595 i nie kompiluje się poniżej nie widzi tych bibliotek #include <supla/control/EXT_SR166.h>
#include <supla/control/EXT_SR595.h>
Bardziej mi zależy na tej <supla/control/EXT_SR595.h>
Myślałem że są zaszyte w SD gdzie mam tego szukać?


Code: Select all

#define NUMBER_OF_SR595 \
  4  // number of shift registers eg 4 x 74HC595 = 32 outputs  pin 0 - 31
#define DATA_SR595_GPIO  14  // data pin 14 on 74HC595
#define CLOCK_SR595_GPIO 13  // clock pin 11 on 74HC595
#define LATCH_SR595_GPIO 12  // latch pin 12 on 74HC595

#define NUMBER_OF_SR166 \
  4  // number of shift registers eg 4 x 74HC166 = 32 intputs  pin 0 - 31
#define DATA_SR166_GPIO  4  // data pin 13 on 74HC166
#define CLOCK_SR166_GPIO 5  // clock pin 2 on 74HC166
#define LOAD_SR166_GPIO  0  // load pin 1 on 74HC166

#include <SuplaDevice.h>
#include <supla/control/EXT_SR166.h>
#include <supla/control/EXT_SR595.h>
#include <supla/control/button.h>
#include <supla/control/pin_status_led.h>
#include <supla/control/relay.h>
#include <supla/control/roller_shutter.h>
#include <supla/device/status_led.h>
#include <supla/network/esp_web_server.h>
#include <supla/network/esp_wifi.h>
#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/storage/littlefs_config.h>

#define STATUS_LED_GPIO 2

Supla::ESPWifi wifi;
Supla::LittleFsConfig configSupla;

Supla::Device::StatusLed statusLed(STATUS_LED_GPIO, true);  // inverted state
Supla::EspWebServer suplaServer;

void setup() {
  Serial.begin(115200);

  // HTML www component
  new Supla::Html::DeviceInfo(&SuplaDevice);
  new Supla::Html::WifiParameters;
  new Supla::Html::ProtocolParameters;
  new Supla::Html::StatusLedParameters;

  auto ExtSr595 = new Supla::Control::ExtSR595(
      NUMBER_OF_SR595, DATA_SR595_GPIO, CLOCK_SR595_GPIO, LATCH_SR595_GPIO);
  auto ExtSr166 = new Supla::Control::ExtSR166(
      NUMBER_OF_SR166, DATA_SR166_GPIO, CLOCK_SR166_GPIO, LOAD_SR166_GPIO);

  auto r1 = new Supla::Control::Relay(ExtSr595, 0, true);
  auto r2 = new Supla::Control::Relay(ExtSr595, 14, false);
  auto r3 = new Supla::Control::Relay(ExtSr595, 27, true);

  Supla::Control::RollerShutter *rs = new Supla::Control::RollerShutter(
      ExtSr595, 3, 4, true);  // Q3 and Q4 from first 74HC595

  Supla::Control::Button *buttonOpen = new Supla::Control::Button(ExtSr166, 4);
  Supla::Control::Button *buttonClose = new Supla::Control::Button(ExtSr166, 5);

  // Add two LEDs to inform about roller shutter relay status
  // If inverted value is required, please add parameter with true value
  new Supla::Control::PinStatusLed(
      NULL,
      ExtSr595,
      15,
      30,
      true);  // gpio 15 on ESP status to be informed on pin 30 of 74HC595
  new Supla::Control::PinStatusLed(
      ExtSr595,
      ExtSr595,
      4,
      31,
      true);  // pin 4 on 74HC595 status to be informed on pin 31 of 74HC595

  buttonOpen->addAction(Supla::OPEN_OR_STOP, *rs, Supla::ON_PRESS);
  buttonClose->addAction(Supla::CLOSE_OR_STOP, *rs, Supla::ON_PRESS);

  SuplaDevice.setInitialMode(Supla::InitialMode::StartInCfgMode);
  SuplaDevice.begin();
}
User avatar
george1255
Posts: 426
Joined: Fri Sep 02, 2022 8:48 pm
Location: Włodawa
Has thanked: 12 times
Been thanked: 7 times

Post

niczego nie przeoczyłeś — w aktualnej bibliotece brakuje implementacji ExtSR595, mimo że przykład jej używa.
nebraska
Posts: 204
Joined: Thu Dec 08, 2022 3:00 pm
Been thanked: 1 time

Post

george1255 wrote: Mon Jul 27, 2026 11:43 am niczego nie przeoczyłeś — w aktualnej bibliotece brakuje implementacji ExtSR595, mimo że przykład jej używa.
Dzięki to już wiem przynajmniej jaki jest problem. Czyli na tą chwilę nie ma szans to zrobić?
User avatar
george1255
Posts: 426
Joined: Fri Sep 02, 2022 8:48 pm
Location: Włodawa
Has thanked: 12 times
Been thanked: 7 times

Post

trzeba modtydikowac i dopisywac klasy do SD. Zglos issue na Gicie
nebraska
Posts: 204
Joined: Thu Dec 08, 2022 3:00 pm
Been thanked: 1 time

Post

george1255 wrote: Mon Jul 27, 2026 11:53 am trzeba modtydikowac i dopisywac klasy do SD. Zglos issue na Gicie
Mam pewien pomysł z wykorzystaniem wirtualnego ekspandera do rolet będę próbował.
User avatar
veeroos
Posts: 1080
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

ja często korzystam z wirtualnego ekspandera, a zwłaszcza w roletach, nawet w projekcie sterownika do szklarni, gdzie okna były sterowane mostkiem H potrzebowałem tego. jak chcesz to napisz czego potrzebujesz to może coś podpowiem
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005
User avatar
klew
Posts: 13907
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 134 times
Been thanked: 137 times

Post

Czym jest wirtualny ekspander?
Najlepsze suple dla Twojego domu :mrgreen:
User avatar
veeroos
Posts: 1080
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

ja używam go do wirtualnych wyjść, których stan mogę odczytać dalej w programie na przykład poprzez:

Code: Select all

if (OUT->isOn()){
}
tak wykorzystałem te wyjścia we wspomnianej szklarni gdzie okna sterowane siłownikami liniowymi i były podłączone do mostka H, bo sterowanie kierunkiem siłownika było poprzez zamianę biegunów, a odbywało się to na kanale rolety (no dobra na kanale okna dachowego).
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005
User avatar
klew
Posts: 13907
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 134 times
Been thanked: 137 times

Post

veeroos wrote: Wed Jul 29, 2026 7:09 am ja używam go do wirtualnych wyjść, których stan mogę odczytać dalej w programie na przykład poprzez:

Code: Select all

if (OUT->isOn()){
}
tak wykorzystałem te wyjścia we wspomnianej szklarni gdzie okna sterowane siłownikami liniowymi i były podłączone do mostka H, bo sterowanie kierunkiem siłownika było poprzez zamianę biegunów, a odbywało się to na kanale rolety (no dobra na kanale okna dachowego).
Nadal nie rozumiem :)
Chodzi o zwykłe "przekaźniki wirtualne" VirtualRelay?
Najlepsze suple dla Twojego domu :mrgreen:
User avatar
veeroos
Posts: 1080
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

W teorii tak, ale Virtual relay zajmuje nam jeden kanał, gdyby coś było takiego jak Virtual Internal Output, to by było idealne 😉.
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005

Return to “supla-dev”