Code Monkey home page Code Monkey logo

sonoff-tasmota's Introduction

ESP32

ESP32 port of Tasmota Prepared for Wemos ESP32.

Working (Tested)

  • Wifi
  • Flash (by NVS)
  • Relays
  • Switches (as inputs)
  • Webserver (USE_WEBSERVER)
  • MQTT (MQTT_USE)
  • Logging (Serial, Web)
  • NTP (with simple one zone)
  • HTTP Update

Should work (compiles, not tested)

  • DOMOTICZ (USE_DOMOTICZ)
  • Home Assistant (USE_HOME_ASSISTANT)
  • Emulation (USE_EMULATION)
  • I2C (USE_I2C)
  • SPI (USE_SPI)
  • MDNS Discovery (USE_DISCOVERY)
  • WS2812 (USE_WS2812)
  • Counter
  • DHT (USE_DHT)
  • DS DS18x20 (USE_DS18x20 or USE_DS18x20_LEGACY)
  • SHT (USE_SHT, USE_SHT)
  • HTU (USE_HTU)
  • BMx (USE_BMP, USE_BME680, USE_BH1750)
  • VEML6070 (USE_VEML6070)
  • TSL2561 (USE_TSL2561)
  • ADS1115 (USE_ADS1115)
  • INA219 (USE_INA219)
  • DISPLAY (USE_DISPLAY)
  • MHZ19 (USE_MHZ19)
  • ENERGY SENSOR (USE_ENERGY_SENSOR)
  • SENSEAIR (USE_SENSEAIR)
  • ARILUX RF (USE_ARILUX_RF)

Not ported

  • USE_ADC_VCC
  • USE_IR_REMOTE
  • SNFBRIDGE
  • ADC
  • LED

Installation

ESP32 for Arduino IDE

Please follow Installation Instructions

Libraries

If working with Arduino IDE: copy all project libraries from \lib to Arduino\libraries

External additional libraries (in lib directory):

Board

If working with Arduino IDE: set Tool->Board->ESP32 Dev Module

Headers definitions

To compile in user_config_override.h should be:

#undef USE_ADC_VCC    // Needs to be ported
#undef USE_IR_REMOTE  // IRremoteESP8266 needs to be ported
#undef SNFBRIDGE      // No commercial device, no sense porting

WString support

Additionally add:

  • Support of unsigned long long in WString

Partially not working

In code there are marked parts with #warning

License

This program is licensed under GPL-3.0

sonoff-tasmota's People

Contributors

altelch avatar arendst avatar don-willingham avatar flexiti avatar jacekdob avatar thomdietrich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonoff-tasmota's Issues

Wifi Connection issue

Hardware:
Board: ESP32 NodeMCU
Core Installation/update date: 17/Mar/2018
IDE name: Arduino IDE
Flash Frequency: 80Mhz
Upload Speed: ?115200?

Description:
I entered valid SSID an Password in user_config.h. But ESP doesn't connect to Wifi AP. Configuration works fine with a lot of other tasmota devices. I only changed STA_SSID1 and STA_PASS1 in user_config.h but doesn't work at all. The Devices restarts and the same messages appears in serial log

Serial Log Output:
8000,len:0
load:0x40078000,len:11392
entry 0x40078a24

00:00:00 APP: Set Baudrate to 115200

00:00:00 Project sonoff Sonoff (Topic sonoff, Fallback DVES_00000000, GroupTopic sonoffs) Version 5.12.0c-STAGED
00:00:00 WIF: Connecting to AP1 in mode 11
00:00:15 WIF: Connect failed with AP timeout
00:00:15 WIF: Connecting to AP1 in mode 11
00:00:30 WIF: WPSConfig failed to start
00:00:31 WIF: SmartConfigSSId1 , Password1
00:00:33 APP: Restarting
ets Jun 8 2016 00:22:57

Compilation error

In webserver.ino func += String(ESP.getChipId()) failed to compile. I comment the line and everything works fine. I use the latest esp32 core from https://github.com/espressif/arduino-esp32

Please add ESP32Ticker and WebServer-esp32 in lib folder

It will be great if you can update your fork to main Tasmota's updates.

M5Stack with ili9341?

hi,
i ordered a M5Stack - is there a possibility to integrate the display?
Thanks

Peripheral Devices ESP32
ILI9341 RST GPIO33
ILI9341 DC GPIO27
ILI9341 CS GPIO14
ILI9341 MOSI GPIO23
ILI9341 CLK GPIO18
ILI9341 LIGHT GPIO32
TFCARD MOSI GPIO23
TFCARD MISO GPIO19
TFCARD CLK GPIO18
TFCARD CS GPIO4
BUTTON A GPIO39
BUTTON B GPIO38
BUTTON C GPIO37
SPEAKER GPIO25
MPU9250 SDA GPIO21
MPU9250 SCL GPIO22
GROVE SDA GPIO21
GROVE SCL GPIO22

Crash after boot on Wemos Lolin32

Hi,
build (Arduino) and flash looked good, but it dies after boot. Currently I have not much ideas how to hunt this. And hints are very appreciated.
The blink example works on this board, so environments should be ok.
Perhaps I made a beginners mistake (my first esp32 project).

`Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:956
load:0x40078000,len:0
load:0x40078000,len:13076
entry 0x40078a58

00:00:00 APP: Baudrate eingestellt auf 115200

00:00:00 Projekt sonoff Sonoff (Topic sonoff, Fallback DVES_00000000, GroupTopic sonoffs) Version 5.12.0c-STAGED

Backtrace: 0x40088538:0x3ffd4460 0x40088637:0x3ffd4480 0x4008599d:0x3ffd44a0 0x4012916e:0x3ffd44e0 0x4012944e:0x3ffd4500 0x4011bc28:0x3ffd4520 0x4011a1a2:0x3ffd4540 0x4011a263:0x3ffd4560 0x4011a2d9:0x3ffd45a0 0x400d4246:0x3ffd45c0 0x400df904:0x3ffd45e0 0x40140357:0x3ffd4620

Rebooting...`

Watch dog protection

Hi
Would it be possible to add a HW watch dog protection feature : in case of stuck (SW or HW) a reset would be generated after - say 1 minute for instance
I sometimes experiment such "stuckings" on my ESP32 modules
Thanks
Jerome

ESP32 CODE DUMPED BUT PROBLEM WITH OUTPUT

Hi,
build (Arduino) and flash looked good, but it dies after boot. Currently I have not much ideas how to hunt this. And hints are very appreciated.
The blink example works on this board, so environments should be ok.
Perhaps I made a beginners mistake (my first esp32 project).

`Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:956
load:0x40078000,len:0
load:0x40078000,len:13076
entry 0x40078a58

00:00:00 APP: Baudrate eingestellt auf 115200

00:00:00 Projekt sonoff Sonoff (Topic sonoff, Fallback DVES_00000000, GroupTopic sonoffs) Version 5.12.0c-STAGED

Backtrace: 0x40088538:0x3ffd4460 0x40088637:0x3ffd4480 0x4008599d:0x3ffd44a0 0x4012916e:0x3ffd44e0 0x4012944e:0x3ffd4500 0x4011bc28:0x3ffd4520 0x4011a1a2:0x3ffd4540 0x4011a263:0x3ffd4560 0x4011a2d9:0x3ffd45a0 0x400d4246:0x3ffd45c0 0x400df904:0x3ffd45e0 0x40140357:0x3ffd4620

Rebooting...`

[FR] Soldering / wiring guide to upgrade sonoff

Am interested in seeing a pin/wiring guide to replace the esp 8266 on sonoff (basic/th) with an esp32.

I have a few projects which would benefit from hardware pwm and extra pins and being able to solder into existing sonoff after removing the smd esp 8266 would be a great way to encourage interest in this port.

Include appropriate esp dev board models etc.

not really an issue due to it's in beta

do you know when you're going to have the PWM working?
i have it up and running on ESP32 ESP-32S Development Board
and like to use it with led dimming i can use relay but like to dim them
thanks for your time

PlatformIO config example

What settings should I use in platformio.ini for esp32? I have a few different models, most of them Lolin32 knockoffs with varying pinouts but they all have the WROOM-32 version of the module.

call of overloaded 'String(uint64_t)' is ambiguous

Hi,

when I want to debug the code, I get this Error:

call of overloaded 'String(uint64_t)' is ambiguous

And the related line is:
func += F("}1" D_ESP_CHIP_ID "}2"); func += String(ESP.getChipId());

Could you please help me with the problem?
Thanks in advance!

is this fork alive ?

I think the future is ESP32, even for simple switches. Price will drop fast for esp32, and it will become very common.

ESP32 WIFI CONFIGURATION PROBLEM

I entered valid SSID an Password in user_config.h. But ESP doesn't connect to Wifi AP. Configuration works fine with a lot of other tasmota devices. I only changed STA_SSID1 and STA_PASS1 in user_config.h but doesn't work at all. The Devices restarts and the same messages appears in serial log

Serial Log Output:
8000,len:0
load:0x40078000,len:11392
entry 0x40078a24

00:00:00 APP: Set Baudrate to 115200

00:00:00 Project sonoff Sonoff (Topic sonoff, Fallback DVES_00000000, GroupTopic sonoffs) Version 5.12.0c-STAGED
00:00:00 WIF: Connecting to AP1 in mode 11
00:00:15 WIF: Connect failed with AP timeout
00:00:15 WIF: Connecting to AP1 in mode 11
00:00:30 WIF: WPSConfig failed to start
00:00:31 WIF: SmartConfigSSId1 , Password1
00:00:33 APP: Restarting

compiled .bin images

Could some one upload compiled .bin images, just like in the Original Tasmota fork ?

any precompiled binaries?

are there any pre-compiled binaries? I'd like to test the port but cannot get it to compile in any of my environments.

missing statusFWR

JacekDob, thanks for starting the ball rolling for esp32 chips.

My devices were not appearing in TasmoAdmin (https://github.com/reloxx13/TasmoAdmin) ,the report was stuck on spinning arrows.

In comparing to other devices and php code from tasmoadmin, the output depends on a receiving firmware status message in the form of STATUS2 / StatusFWR. Relevent lines 1890 to 1904 in sonoff.ino would provide this response, but had been commented out as a conditional compile "TODO32" for ifdef ESP32. It seems the problem is a probably a missing library call for uint8_t getBootVersion() in ESP32 libraries. I removed the comments and replaced ESP.getBootVersion(), with ESP.getChipRevision() just because it was also a uint8_t that was available in ESP32.

Devices now appear in tasmoadmin ( still missing Vcc ).

device : WEMOS LOLIN32 Lite V1.0.0

ESP8266 user_config_overide.h

#ifdef ESP32
#undef USE_ADC_VCC // Needs to be ported
#undef USE_IR_REMOTE // IRremoteESP8266 needs to be ported
#undef SNFBRIDGE // No commercial device, no sense porting
#else
#define SNFBRIDGE
#define USE_ENERGY_SENSOR
#endif

The second part was important to compile the same source for ESP8266.
Did you fix it elsewhere?

Question: BLE as device tracker?

JacekDob,
thanks for this porting.
I'm thinking on buying an ESP32 and I'm wondering if is possible to use this version of Tasmota to track BLE devices.
I'm already use 3 Tasmota ESP8266 (for a total of 14 relays and 5 different sensors) in my house, controlled by Home Assistant, and recently I had a look on BLE tracking devices.
What I would like to archive is connecting an ESP32 driving 2 more relays and using the internal BLE tracking people on my front door to activating scenes.
Another question if I may: could you gently update to the latest Tasmota version (6.2) and Arduino ESP/Core (2.4.2)?
Thanks.

F.

Compilation error: fatal error: esp_timer.h: No such file or directory

Hi, thanks for porting Tasmota to ESP32, great work!
I'm not able to compile, it get's error:
C:\Users\martin\Documents\Arduino\libraries\Ticker-ESP32-1.1.0\src/ESP32Ticker.h:27:24: fatal error: esp_timer.h: No such file or directory

I've installed al required libraries and compiles using "ESP32 Dev Module". If Select Wemos D1 (ESP8266) it compiles.
¿Where can I find that esp_timer.h for ESP32 ?

Any ideas?
Thanks!!

Martin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.