diff --git a/README.md b/README.md index 9e4a36f..b4c8723 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,59 @@ -Testing Hardware (Aliexpress): +# SimpleDerivador + +**Español** + +Derivador excedentes de energia solar, más simple que freeds, para placas chinas + +Necesita recibir la energia del grid por MQTT. No soporta la lectura de inversores u otros. + +**English** + +Diverter surplus solar energy, simpler than freeds, for Chinese Dimmer board + +Need receive the grid power by MQTT. Not support reading from solar inverters or others. + + +## Current Status + * Initial/Beta . + * Works for very basic usage. + +## USAGE + +Edit SimpleDerivador.ino the configuration section and burn with Arduino. + +## NEXT FEATURES + * Some code rewrites + * Add alt wifi + * Publish to MQTT derivation + * MASTER/SLAVES mode + +## LONG TERM FEATURES + * Relay + * web interface (very basic interface) + +## Q&A + +Will you add support for read data directly from inverter? probably not (i will not add), + +Will you add support for read data directly from a shelly device? perhaps, not a priority + + +## Testing Software: + +Arduino 2.0.3 + +## Testing Hardware (Aliexpress): + Dimmer HL 24A-600V - 14€ + ESP32 with OLED (htit-wb32) - 14€ +## Librarys: -Librarys: ArduinoSTL - Basic by Mike Matera + U8g2 for Screen by oliver + PubSubClient for MQTT by Nick O'Leary + Dimmable Light for Arduino by Fabiano Riccardi \ No newline at end of file diff --git a/SimpleDerivador.ino b/SimpleDerivador.ino index 5f11c11..12fdb93 100644 --- a/SimpleDerivador.ino +++ b/SimpleDerivador.ino @@ -11,25 +11,34 @@ char *mqtt_pass_the_baton = "derivador/ESP-1111/pass_the_baton"; */ /******************************************************/ -//ESP32 with OLED +// BEGIN CONFIGURATION +//ESP32 with OLED (NOT TESTED YET WITHOUT IT) #define OLED 1 #define SERIAL_DEBUG 1 +//Zero Pin / Sync Pin const int syncPin = 13; +// Thyristor Pin const int thyristorPin = 25; -const int percent = 1; +//When begin derivation const int beginDerivation = -50; +// keep current power if values are within +- XX const int keepCurrentMargin = 50; +// Power percent 100% const int maxPower = 100; +// Your wifi config char wifiSSID[] = "Casa"; -char wifiPass[] = "esto-es-una-clave-larga"; +char wifiPass[] = ""; +//MQTT Server confiog const char *MQTT_SERVER = "192.168.2.74"; const char *MQTT_USER = "mqtt"; const char *MQTT_PASS = "mqttpassword"; const uint16_t MQTT_PORT = 1883; const char *MQTT_GRID_POWER = "shellies/shellyem-C45BBE6A8DCA/emeter/0/power"; +/* NOT RELEVANT, just for display, at this moment will give error if not provided just add the same to power if you have that value in your mqtt server */ const char *MQTT_SOLAR_POWER = "shellies/shellyem-C45BBE780ED8/emeter/0/power"; +//END CONFIGURATION /******************************************************/ String esp_id;