Supla na Sonoff jednokanałowy z czujnikiem temperatury
-
[email protected]
- Posts: 61
- Joined: Fri Apr 07, 2017 5:20 am
Czy ktoś wgryzał się w schemat elektryczny jednokanałowego Sonoff, chodzi mi o zwiększenie jego możliwości o jeden port NO - do czujnika otwarcia/zamknięcia - który można by było wykorzystać jako czujnik kontraktonowy - otwarcia drzwi. Mógłbym to zrobić z pominięciem termometru, wejście DATA zwierać z masą ale tracę jedną funkcjonalność. Czy może ktoś rozeznał temat?
-
[email protected]
- Posts: 61
- Joined: Fri Apr 07, 2017 5:20 am
przepraszam za ignorancje, jestem początkujący - a co to oznacza?
-
[email protected]
- Posts: 61
- Joined: Fri Apr 07, 2017 5:20 am
Jaki zrobiłem błąd, nie chce się skompilować
Code: Select all
#include <SPI.h>
#include <Ethernet.h>
#include <SuplaDevice.h>
/*
* SUPLA DEVICE - ARDUINO - ETHERNET SHIELD
* Author: Przemyslaw Zygmunt <[email protected]>
*
*/
void setup() {
Serial.begin(9600);
// Replace the falowing GUID
char GUID[SUPLA_GUID_SIZE] = {0xE2,0x13,0x6A,0x26,0xF3,0x0D,0x38,0xAE,0xE9,0x62,0x3C,0xE1,0x4F,0x70,0xFD,0x95};
// with GUID that you can retrieve from https://www.supla.org/arduino/get-guid
// Ethernet MAC address
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(192, 168, 1, 177);
/*
* Having your device already registered at cloud.supla.org,
* you want to change CHANNEL sequence or remove any of them,
* then you must also remove the device itself from cloud.supla.org.
* Otherwise you will get "Channel conflict!" error.
*/
// CHANNEL0 - RELAY
SuplaDevice.addRelay(44); // 44 - Pin number where the relay is connected
// Call SuplaDevice.addRelay(44, true) with an extra "true" parameter
// to enable "port value inversion"
// where HIGH == LOW, and LOW == HIGH
// CHANNEL1 - RELAY
SuplaDevice.addRelay(45); // 45 - Pin number where the relay is connected
// CHANNEL3 - TWO RELAYS (Roller shutter operation)
SuplaDevice.addRollerShutterRelays(46, // 46 - Pin number where the 1st relay is connected
47); // 47 - Pin number where the 2nd relay is connected
// CHANNEL4 - Opening sensor (Normal Open)
SuplaDevice.addSensorNO(A0); // A0 - Pin number where the sensor is connected
// Call SuplaDevice.addSensorNO(A0, true) with an extra "true" parameter
// to enable the internal pull-up resistor
// CHANNEL5 - Opening sensor (Normal Open)
SuplaDevice.addSensorNO(A1); // A1 - Pin number where the sensor is connected
/*
* SuplaDevice Initialization.
* Server address, LocationID and LocationPassword are available at https://cloud.supla.org
* If you do not have an account, you can create it at https://cloud.supla.org/account/create
* SUPLA and SUPLA CLOUD are free of charge
*
*/
SuplaDevice.begin(GUID, // Global Unique Identifier
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED, // Ethernet MAC address
"svr6.supla.org", // SUPLA server address
216, // Location ID
"66a8"); // Location Password
}
void loop() {
SuplaDevice.iterate();
}
-
[email protected]
- Posts: 61
- Joined: Fri Apr 07, 2017 5:20 am
C:\Users\Jacek\Downloads\ArduinoSuplaDevice1\SuplaDevice\examples\SuplaEthernetShield\SuplaEthernetShield.ino:3:25: fatal error: SuplaDevice.h: No such file or directory
#include <SuplaDevice.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
#include <SuplaDevice.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
-
[email protected]
- Posts: 61
- Joined: Fri Apr 07, 2017 5:20 am
Wszędzie jest opis i instrukcja przy Supla - download - tylko przy Arduino brak
https://drive.google.com/file/d/0B3DJSA ... lLcWc/view
czy można to uzupełnić
https://drive.google.com/file/d/0B3DJSA ... lLcWc/view
czy można to uzupełnić
-
[email protected]
- Posts: 61
- Joined: Fri Apr 07, 2017 5:20 am
a można mieć w jednym urządzeniu RX-a i GPIO3 ?
