Giter VIP home page Giter VIP logo

stefanbode / sonoff-tasmota Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arendst/tasmota

127.0 36.0 41.0 403.92 MB

Provide ESP8266 based itead Sonoff with Web, MQTT and OTA firmware using Arduino IDE, enhanced with I2C options

License: GNU General Public License v3.0

PHP 0.01% Python 0.52% C 63.02% Makefile 0.13% C++ 31.34% Processing 0.08% Shell 0.03% HTML 2.81% JavaScript 0.01% CSS 0.02% XSLT 0.01% sed 0.01% Euphoria 0.01% Berry 1.72% Yacc 0.01% CMake 0.03% Roff 0.01% Meson 0.01% Jupyter Notebook 0.26%

sonoff-tasmota's Introduction

Tasmota logoTasmota logo

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Written for PlatformIO.

GitHub version GitHub download License Discord Gitpod Ready-to-Code


In light of current events we like to support the people behind PlatformIO Project, especially Ivan Kravets, and wish them the strength to help stop the war. See platformio-is-ukrainian-project-please-help-us-stop-the-war for what you can do.


Easy install

Easy initial installation of Tasmota can be performed using the Tasmota WebInstaller.

If you like Tasmota, give it a star, or fork it and contribute!

GitHub stars GitHub forks donate

See RELEASENOTES.md for release information.

Firmware binaries can be downloaded from http://ota.tasmota.com/tasmota/release/ or http://ota.tasmota.com/tasmota32/release/ for ESP32 binaries.

Development

Dev Version Download Dev Tasmota CI Build_development

See CHANGELOG.md for detailed change information.

Unless your Tasmota powered device exhibits a problem or lacks a feature that you need, leave your device alone - it works so don’t make unnecessary changes! If the release version (i.e., the master branch) exhibits unexpected behaviour for your device and configuration, you should upgrade to the latest development version instead to see if your problem is resolved as some bugs in previous releases or development builds may already have been resolved.

Every commit made to the development branch, which is compiling successfully, will post new binary files at http://ota.tasmota.com/tasmota/ (this web address can be used for OTA updates too). It is important to note that these binaries are based on the current development codebase. These commits are tested as much as is possible and are typically quite stable. However, it is infeasible to test on the hundreds of different types of devices with all the available configuration options permitted.

Note that there is a chance, as with any upgrade, that the device may not function as expected. You must always account for the possibility that you may need to flash the device via the serial programming interface if the OTA upgrade fails. Even with the master release, you should always attempt to test the device or a similar prototype before upgrading a device which is in production or is hard to reach. And, as always, make a backup of the device configuration before beginning any firmware update.

Disclaimer

⚠️ DANGER OF ELECTROCUTION ⚠️

If your device connects to mains electricity (AC power) there is danger of electrocution if not installed properly. If you don't know how to install it, please call an electrician (Beware: certain countries prohibit installation without a licensed electrician present). Remember: SAFETY FIRST. It is not worth the risk to yourself, your family and your home if you don't know exactly what you are doing. Never tinker or try to flash a device using the serial programming interface while it is connected to MAINS ELECTRICITY (AC power).

We don't take any responsibility nor liability for using this software nor for the installation or any tips, advice, videos, etc. given by any member of this site or any related site.

Note

Please do not ask to add new devices unless it requires additional code for new features. If the device is not listed as a module, try using Templates first. If it is not listed in the Tasmota Device Templates Repository create your own Template.

Quick Install

Download one of the released binaries from http://ota.tasmota.com/tasmota/release/ or http://ota.tasmota.com/tasmota32/release/ and flash it to your hardware using our installation guide.

Important User Compilation Information

If you want to compile Tasmota yourself keep in mind the following:

  • For ESP8285 based devices only Flash Mode DOUT is supported. Do not use Flash Mode DIO / QIO / QOUT as it might seem to brick your device.
  • For ESP8285 based devices Tasmota uses a 1M linker script WITHOUT spiffs 1M (no SPIFFS) for optimal code space.
  • To make compile time changes to Tasmota use the user_config_override.h file. It assures keeping your custom settings when you download and compile a new version. You have to make a copy from the provided user_config_override_sample.h file and add your setting overrides.

Configuration Information

Please refer to the installation and configuration articles in our documentation.

Migration Information

See migration path for instructions how to migrate to a major version.

Do not upgrade from minimal to minimal version. It will most likely fail at some point and will require flashing via serial. If you do have to use minimal versions, always OTA to a full version of the same release before applying next minimal version.

Pay attention to the following version breaks due to dynamic settings updates:

  1. Migrate to Sonoff-Tasmota 3.9.x
  2. Migrate to Sonoff-Tasmota 4.x
  3. Migrate to Sonoff-Tasmota 5.14
  4. Migrate to Sonoff-Tasmota 6.7.1 (http://ota.tasmota.com/tasmota/release_6.7.1/sonoff.bin) - NOTICE underscore as a dash is not supported in older versions
  5. Migrate to Tasmota 7.2.0 (http://ota.tasmota.com/tasmota/release-7.2.0/tasmota.bin)

--- Major change in parameter storage layout ---

  1. Migrate to Tasmota 8.5.1 (http://ota.tasmota.com/tasmota/release-8.5.1/tasmota.bin)

--- Major change in internal GPIO function representation ---

  1. Migrate to Tasmota 9.1 (http://ota.tasmota.com/tasmota/release-9.1.0/tasmota.bin.gz)
  2. Upgrade to latest release (http://ota.tasmota.com/tasmota/release/tasmota.bin.gz)

While fallback or downgrading is common practice it was never supported due to Settings additions or changes in newer releases. Starting with release v9.1.0 Imogen the internal GPIO function representation has changed in such a way that fallback is only possible to the latest GPIO configuration before installing v9.1.0.

Support Information

For a database of supported devices see Tasmota Device Templates Repository

If you're looking for support on Tasmota there are some options available:

Documentation

Support's Community

  • Tasmota Discussions: For Tasmota usage questions, Feature Requests and Projects.
  • Tasmota Users Chat: For support, troubleshooting and general questions. You have better chances to get fast answers from members of the Tasmota Community.
  • Search in Issues: You might find an answer to your question by searching current or closed issues.
  • Software Problem Report: For reporting problems of Tasmota Software.

Contribute

You can contribute to Tasmota by

  • Providing Pull Requests (Features, Proof of Concepts, Language files or Fixes)
  • Testing new released features and report issues
  • Donating to acquire hardware for testing and implementing or out of gratitude
  • Contributing missing documentation for features and devices

donate

Credits

People helping to keep the show on the road:

  • Sfromis providing extensive user support
  • Barbudor providing user support and code fixes and additions
  • David Lang providing initial issue resolution and code optimizations
  • Heiko Krupp for his IRSend, HTU21, SI70xx and Wemo/Hue emulation drivers
  • Wiktor Schmidt for Travis CI implementation
  • Thom Dietrich for PlatformIO optimizations
  • Marinus van den Broek for his EspEasy groundwork
  • Pete Ba for more user friendly energy monitor calibration
  • Lobradov providing compile optimization tips
  • Flexiti for his initial timer implementation
  • reloxx13 for his TasmoAdmin management tool
  • Joachim Banzhaf for his TSL2561 library and driver
  • Andre Thomas for providing many drivers
  • Gijs Noorlander for his MHZ19, SenseAir and updated PubSubClient drivers
  • Erik Montnemery for his HomeAssistant Discovery concept and many code tuning tips
  • Federico Leoni for continued HomeAssistant Discovery support
  • Aidan Mountford for his HSB support
  • Daniel Ztolnai for his Serial Bridge implementation
  • Gerhard Mutz for multiple sensor & display drivers, Sunrise/Sunset, and scripting
  • Nuno Ferreira for his HC-SR04 driver
  • Adrian Scillato for his (security)fixes and implementing and maintaining KNX
  • Gennaro Tortone for implementing and maintaining Eastron drivers
  • Raymond Mouthaan for managing Wemos Wiki information
  • Norbert Richter for his decode-config.py tool
  • Joel Stein, digiblur and Shantur Rathore for their Tuya research and driver
  • Frogmore42 for providing many issue answers
  • Jason2866 for platformio support and providing many issue answers
  • Blakadder for managing the document site and providing template management
  • Stephan Hadinger for refactoring light driver, enhancing HueEmulation, LVGL, Zigbee and Berry support
  • tmo for designing the official Tasmota logo
  • Stefan Bode for his Shutter and Deep sleep drivers
  • Jacek Ziółkowski for his TDM management tool and Tasmotizer flashing tool
  • Christian Staars for NRF24L01 and HM-10 Bluetooth sensor support
  • Paul Diem for UDP Group communication support
  • Jörg Schüler-Maroldt for his initial ESP32 port
  • Javier Arigita for his thermostat driver
  • Simon Hailes for ESP32 Bluetooth extensions
  • Many more providing Tips, Wips, Pocs, PRs and Donations

License

This program is licensed under GPL-3.0-only

sonoff-tasmota's People

Contributors

ajithvasudevan avatar andrethomas avatar arendst avatar arijav avatar ascillato avatar ascillato2 avatar barbudor avatar blakadder avatar bovirus avatar btsimonh avatar chaosmaster avatar crispy78 avatar curzon01 avatar device111 avatar effelle avatar emontnemery avatar gemu2015 avatar gtortone avatar hallard avatar jason2866 avatar localhost61 avatar marcvs avatar md5sum-as avatar mike2nl avatar pcdiem avatar reloxx13 avatar s-hadinger avatar staars avatar stefanbode avatar tiagofreire-pt 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonoff-tasmota's Issues

Update language files

Hi,

Could you update language files, I will translate , I do not know which variables I need to add

Momentary mode

Hi Stefan,
In my case I have momentary buttons, one opens and one closes the shutter. If I press the open button the shutter opens totally, If I want to open 50% I push open button and then push again when the shutter is 50% open to stop it. So I set pulsetime1 and pulsetime2 to 5, shutteropenduration 24 and shuttercloseduration 21, when I send shutterposition 50 command, relay 1 goes on and off correctly, but nothing else happens and the shutter opens totally.

Is it possible to make it work as needed for me?

deepsleep command not exists

Hi,

After upgrade deepsleep is lost

22:26:29 MQT: stat/zewnetrzne/RESULT = {"Command":"Unknown"}
22:26:40 CMD: deepsleep 1200
22:26:40 MQT: stat/zewnetrzne/RESULT = {"Command":"Unknown"}

I think that should be like this in sonoff.ino line 872

else if (CMND_DEEPSLEEP == command_code ) {

  if ((data_len > 0) && (payload32 >= 0) ) {

    Settings.deepsleep = (uint32_t)payload32;

instead

else if (!strcmp_P(type,PSTR("DEEPSLEEP"))) {
  if ((data_len > 0) && (payload32 >= 0) ) {
    Settings.deepsleep = payload32;

and added in i18n.h

#define D_CMND_DEEPSLEEP "DeepSleep"

and in sonoff.ino line 82

//STB mod
CMND_GPIO, CMND_GPIOS, CMND_PWM, CMND_PWMFREQUENCY, CMND_PWMRANGE, CMND_COUNTER, CMND_COUNTERTYPE, CMND_COUNTERDEVIDER, CMND_MQTTENABLE,
//end
CMND_COUNTERDEBOUNCE, CMND_SLEEP, CMND_DEEPSLEEP, CMND_UPGRADE, CMND_UPLOAD, CMND_OTAURL, CMND_SERIALLOG, CMND_SYSLOG,

result is:

23:18:15 CMD: deepsleep
23:18:15 MQT: stat/podlewaczka/RESULT = {"DeepSleep":"-1 (-1)"}

23:18:53 CMD: deepsleep 0
23:18:53 MQT: stat/podlewaczka/RESULT = {"DeepSleep":"0 (0)"}

23:26:52 CMD: deepsleep
23:26:52 MQT: stat/zewnetrzne/RESULT = {"DeepSleep":"1200 (1200)"}

Pulsetimers

Hi,

There are still only 4 pulsetimers available for PCF8574 setup. This is not ideal especially for irrigation.

Thanks

mqtt tele/sensor data

hi, after the deep sleep mqtt does not send my sensor data. But why?
I have changed the teleperiod to 30 but I get no sensor data

PCF8574 support

as i understand pcf8574 support is disabled. I enabled it and compiled it on latest git(148fdc3).

  1. to get it compiled i needed to disable USE_TIMERS and USE_TIMERS_WEB otherwise
    it showed an error because of a duplicate label case7 in webserver.ino
sonoff-sb-20180506/sonoff/webserver.ino: In function 'void HandleSaveSettings()':
webserver:1140: error: duplicate case value
   case 7:
   ^
webserver:1108: error: previously used here
   case 7:
   ^
exit status 1
duplicate case value
  1. there are two many Relays shown. the elektrodragen board has 2 Relays on Board the PCF8574 adds 8. In Total it should be 10.

snapshot1

As the picture shows, there are 18 (10 plus 8) the Relays 3 to 10 do nothing the Relays 1,2 and 11-18
can be switched by the webgui.

How can i help to fix this?.

Best Regards

SR04 and deepsleep dosn`t work

I have connected an SR04 distance meter to the GPIO TX and RX, if I activate the deepsleep it will also be executed, but the esp will not be activated anymore. Where can that be?

HC-SR04 feedback

Thank you for adding support for HC-SR04.

I have used it this morning on a christmas tree water level sensor. The only change I needed to make was upping the MAX_DEVIATION_BETWEEN_MEASURES from 0.1 to 75.00. The original value left me wondering if the sensor was fried, but enabling the "HS-SR04 In Duration:" debug showed that it was indeed changing with new depths. The 0.1 value for MAX_DEVIATION_BETWEEN_MEASURES was acting as an intended damping factor , but was so slow that I got confused. I know that the sensor is "noisy" so I was thinking about taking the 10 samples and getting the median value instead.

No changes requested, just feedback that might help another user.
Thanks again

Device hangs, when HC-SR04 sensor is connected

Hi,

I installed this tasmota port on a 8266 Nodemcu. I connected a HC-SR04 ultrasonic sensor on 2 ports. The distance is measured well, but after a few seconds the Nodemcu get's inaccessible. The webinterface isn't reached any longer and i get ping timeouts.

After resetting the device it works again for a few seconds, before it get's down again.
This also occurs if I only select that a HC-SR04 is connected to 2 GPIOs. It doesn't matter if a sensor is connected physically or not....

Thanks a lot

Helmar

Temporary disable deep sleep for maintenance

Hi

Thanks for the good extension to the fine Tasmota firmware.

Occasionally, I may need to temporary disable the deep sleep to reconfigure some parameters. Is there a way disable it like in ESP-EASY firmware SleepMode via a jumper setting?

Thanks
Ghee Sung

Add multi-PZEM support - 3-phase support

In Germany all houses are connected through a three phase power connection. To measure the complete energy usage it is required to measure all three phases. Instead of using 3 ESP8266 and PZEM-004T there is some convenience to connect all 3 PZEM to one ESP.

The trick is to use 3 TX lines communicating all over ONE RX line, because the ESP does not support more.

On Hardware wire you have to remove resistor R15 at TWO of the three devices. Please see: https://github.com/apreb/eNode/issues/1#issuecomment-354369777

ADS1115 Support

Hallo Stefan
Habe versucht zu compilieren, leider habe ich nichts lauffähiges zustande gebracht. Sonoff ist nach 15s "abgestürzt" und war danach nicht mehr erreichbar. Ich verwende Sonoff Basic und wollte eine Füllstandsensor 4-20mA mittels des ADS1115 einbinden.
Kommt deine Unerstütung für ADS115 in absehbarer Zeit in das Sonoff-Tasmota Projekt ? oder könntest du mir eine lauffähiges bin file für den Sonoff Basic zukommen lassen ?

Besten Dank

Michael

PW in user_config_override.h?

Hallo Stefan,

evtl. stehen echte SSID/PW in der Datei user_config_override.h - zumindest sehen die nicht nach Dummy aus ("BodeNet_Keller" etc.)

Grüße
Johannes

PS: Gibt es einen Trick, den jetzt oft tiefschlafenden ESP wieder länger wach zu halten, um z.B. neue Werte für TelePeriod oder Deepsleep zu setzen (oder das normale Webinterface zu nutzen)? z.B.
http://192.168.178.56/cm?cmnd=TelePeriod 120

compile error

i get a compile error when i uncomment pcf8574

exit status 1
'pcf8574_switchrelay' was not declared in this scope

Module Configuration

Despite having selected:

#define USE_SERIAL_BRIDGE                        // Add support for software Serial Bridge (+0k8 code)
#define USE_SDM120                               // Add support for Eastron SDM120-Modbus energy meter (+1k7 code)
  #define SDM120_SPEED         9600              // SDM120-Modbus RS485 serial speed (default: 2400 baud)
#define USE_SDM630                               // Add support for Eastron SDM630-Modbus energy meter (+2k code)
  #define SDM630_SPEED         9600              // SDM630-Modbus RS485 serial speed (default: 9600 baud)

these module config options don't show up in the config menu. It show Option Nr. 72,73,74,75 without
description

Selective Interlock

I'm building a sprinkler controller with a 16 relays board using two PCF8574. Only 12 of the relays go to the sprinkler valves (yes! I have 12 zones) and the other 4 in the board + the single relay in the Sonoff basic are for different purpose. I need those 12 relays (Relay 2 to Relay 13) to have interlock among them, while the other 5 relays should be operated independently. I've been trying to setup rules but since there are 12 relays the rules result too large for the limit in the number of characters (511) and with only 3 sets of rules I can only fit 9 of the 12 relays there. The original software only has "SetOption 14" which affects all the relays.

Since this fork has support for PCF8574 then probably this feature request is better here: Is it possible to somehow modify the "SetOption 14" to allow selective interlocking? It would be great if I could indicate which group of relays will work this way.

Thanks... Nestor Perozo.

Device stays active for 155 seconds before go back to sleep

Thanks a lot for this nice fork of my favorite ESP8266 firmware. I use it on the ESP01 module which I want to power with 2 penlights. Going into and recovering from Deepsleep works fine. However it takes 155 seconds before it goes to sleep again. It also send a number of MQTT messages which would not be needed:
{"WebServerMode":"Admin","Hostname":"ESP01-01","IPAddress":"192.168.2.111"}
{"Module":"Generic","Version":"5.12.0c","FallbackTopic":"DVES_360491","GroupTopic":"sonoffs"}
qos : 0, retain : false, cmd : publish, dup : false, topic : cmnd/ESP01/01/POWER, messageId : , length : 21
{"Time":"2018-03-13T22:36:41","Uptime":"0T00:02:35","Vcc":3.422, "Wifi":{"AP":1, "SSId":"xxxx", "RSSI":48, "APMac":"F8:D1:11:xx:xx:xx"}, "DeepSleep":900, "Heap":23184}

Any idea why this happens?

deepsleep does not goes down when connection is lost to mqtt

Hi,

Is it possible to change deepsleep function according to lost connectivity to mqtt.
I noticed that, when mqtt conection was lost because of mqtt server error, the ESP did not gone to sleep mode and the battery has gone empty after 8 h trying to connect to mqtt.

Rgs,
RL

Problem with distance measurement

Hi Stefan,

I am trying your firmware on a WeMos D1 mini but I can't get it to work.

I am connecting the sensor as:

D1 GPIO5 - 68 SNS_TRIG
D5 GPIO14 - 69 SNS_TRIG

I am getting wrong distance .... always > 1000 cm!!!

Any suggestions?

Thanks

WH
tas

HS-SR04 Wires are twisted change ECHO <-> TRIG

Hey,
I've uploaded your firmware to Wemos D1 mini and no matter how I define pins I'm getting message "HS-SR04 Wires are twisted change ECHO <-> TRIG" on console output.
Any idea?

Thanks and regards,
Przemek.

Alexa Emulation support

Hi,
Will this work with the Philips hue emulation?

For example: I want to send a command to set the curtain to 50% through my Amazon echo.

Is this possible?

Will the fork be merged back to the original Sonoff-Tasmota including the PCF8574

Hi Stefan, I like your fork, because I use it with a ESP01, a PCF8574 module and a 8 port relay-bank - see the attached picture. It works fine.
My question is, if your enhancements mainly the PCF8574 will be merged back to the original Sonoff-Tasmota project from arendst? I have seen, that you are in tight contact with him.

8-port-relay

No distance in the sonoff-adapter witch HC-SR04

Hi and thank you for this project.

I use your software on a nodeMCU with ESP8266. On the web page I see the correct value and the ioBroker also get the distance. But I have the problem that there is no line with a distance value under the object sonoff.0

I use iobroker.admin 3.3.5 and sonoff-adapter 2.0.2

01

02

03

pulsetimers

When switching pulsetimer1 and 5 to 10 sec. If relay 1 is switched on its own it works. If switch 5 is triggered after switch1 while timer still running, switch1 timer is cancelled and switch5 works.

PCF8574 with Sonoff SV relay switching

When running the PCF8574 on the SV, the relay 1 is obviously the onboard relay.

The 8 other relays work just fine as well.

The problem is that when the relay one is switched off, the relay 5 and sometimes 9 is switched on by itself. relay 9 (relay 8 on PCF8574) is not configured at this stage. It is set as input

Then also if relay 5 is switched off in turn, relay 9 also switches off. Again there is a dependancy between the nth and n + 4th relay just as on pulsetimers

The behaviour changes when relay 9 is defined as output and then does not switch on and off.

The relay 5 behaviour seems to alternate. So switches on and then off again on each Relay 1 off sequence.

Haw to switch on for operate when deepsleep is runing ?

Hi,

Is it possible to add deepsleep came back, when deepsleep starting there is no possibility to do any changes or update. What do you think about add button function to break deep sleep after pressing of button a couple of times ? It will give possibility to change something, after that (some period time) deep sleep will continue.

Rgds,
RL

Compile Errors

Hi Stefan,
I'm trying to compile with Arduino-IDE but I get this error:

In file included from /Users/marcobucari/Downloads/Sonoff-Tasmota-master/sonoff/sonoff.ino:33:0:
sketch/user_config.h:354:34: fatal error: user_config_override.h: No such file or directory
#include <user_config_override.h>
^
compilation terminated.
exit status 1

if I comment this line #include <user_config_override.h> at the end of user_config.h
then I get this errors:

sonoff:95: error: expected ',' or ';' before 'D_CMND_INTERLOCKMASK'
D_CMND_GPIO "|" D_CMND_GPIOS "|" D_CMND_PWM "|" D_CMND_PWMFREQUENCY "|" D_CMND_PWMRANGE "|" D_CMND_COUNTER "|" D_CMND_COUNTERTYPE "|" D_CMND_COUNTERDEVIDER "|" D_CMND_MQTTENABLE "|" D_CMND_DEEPSLEEP "|" D_CMND_INTERLOCKMASK "|"
^
xdrv_02_webserver:187: error: expected ',' or ';' before 'D_CLOSE'
"

" D_CLOSE "" D_OPEN "
"
^
In file included from /Users/marcobucari/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/Arduino.h:241:0,
from sketch/sonoff.ino.cpp:1:
/Users/marcobucari/Downloads/Sonoff-Tasmota-master/sonoff/xdrv_02_webserver.ino: In function 'void HandleAjaxStatusRefresh()':
xdrv_02_webserver:642: error: 'D_CMND_POSITION' was not declared in this scope
snprintf_P(svalue, sizeof(svalue), PSTR(D_CMND_POSITION " %s"), tmp);
^
/Users/marcobucari/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/pgmspace.h:16:68: note: in definition of macro 'PSTR'
#define PSTR(s) (extension({static const char __c[] PROGMEM = (s); &__c[0];}))
^
xdrv_02_webserver:642: error: expected ')' before string constant
snprintf_P(svalue, sizeof(svalue), PSTR(D_CMND_POSITION " %s"), tmp);
^
/Users/marcobucari/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/pgmspace.h:16:68: note: in definition of macro 'PSTR'
#define PSTR(s) (extension({static const char __c[] PROGMEM = (s); &__c[0];}))
^
/Users/marcobucari/Downloads/Sonoff-Tasmota-master/sonoff/xdrv_97_shutter.ino: At global scope:
xdrv_97_shutter:23: error: 'D_CMND_OPEN' was not declared in this scope
D_CMND_OPEN "|" D_CMND_CLOSE "|" D_CMND_STOP "|" D_CMND_POSITION "|" D_CMND_OPENTIME "|" D_CMND_CLOSETIME "|" D_CMND_SHUTTERRELAY;
^
/Users/marcobucari/Downloads/Sonoff-Tasmota-master/sonoff/xdrv_97_shutter.ino: In function 'boolean Xdrv97(byte)':
xdrv_97_shutter:165: error: 'D_SHUTTER' was not declared in this scope
snprintf_P(mqtt_data, sizeof(mqtt_data), JSON_SHUTTER_POS, mqtt_data, D_SHUTTER, Shutter_Real_Position * 100 / Shutter_Open_Max);
^
Più di una libreria trovata per "TasmotaSerial.h"
Usata: /Users/marcobucari/Documents/Arduino/libraries/TasmotaSerial-2.0.0
Non usata: /Users/marcobucari/Documents/Arduino/libraries/TasmotaSerial-1.1.0
exit status 1
expected ',' or ';' before 'D_CMND_INTERLOCKMASK'

what am I doing wrong?

error in counterdevider in xsns_01_counter.ino

Hi,

I discovered that COUNTERDEVIDER is not being set during compilation

// STB mode
//avoid DIV 0 on unitiialized

  if (Settings.pulse_devider[i] == 0 || Settings.pulse_devider[i] == 65535 ) {
    Settings.pulse_devider[i] = COUNTERDEVIDER;
  }

// end

but Settings.pulse_devider[i] will never be set when do not have 0 or 65535
only through CMD it can be set
in my opinion should be
should not be set somwere else

Settings.pulse_devider[i] = COUNTERDEVIDER;

because COUNTERDEVIDER
does not set value in user_config.h

Support for multible Shutters

Hi

could you please add support for multible Shutters on one ESP ?
So that it's possible to use Sonoff 4ch or a NodeMCU Dev Board ?

Thanks

Unable to compile

Hi,
Tried to compile with Arduino IDE 1.8.3 and i'm getting this error. pcf8574 libarary seems to be installed. Any ideas would be appreciated @stefanbode
Thanks

C:\Users\Brad Harvey\Downloads\Sonoff-Tasmota-stefan_patch1\Sonoff-Tasmota-stefan_patch1\sonoff\sonoff.ino: In function 'void setRelay(uint64_t)':

sonoff:353: error: 'pcf8574_switchrelay' was not declared in this scope

   pcf8574_switchrelay(i, state);

                               ^

C:\Users\Brad Harvey\Downloads\Sonoff-Tasmota-stefan_patch1\Sonoff-Tasmota-stefan_patch1\sonoff\sonoff.ino: In function 'void every_second()':

sonoff:1652: error: 'pcf8574_detect' was not declared in this scope

     pcf8574_detect();

                    ^

C:\Users\Brad Harvey\Downloads\Sonoff-Tasmota-stefan_patch1\Sonoff-Tasmota-stefan_patch1\sonoff\sonoff.ino: In function 'void GPIO_init()':

sonoff:2103: error: 'pcf8574_Init' was not declared in this scope

 pcf8574_Init();

              ^

C:\Users\Brad Harvey\Downloads\Sonoff-Tasmota-stefan_patch1\Sonoff-Tasmota-stefan_patch1\sonoff\webserver.ino: In function 'void startWebserver(int, IPAddress)':

webserver:329: error: 'handleI2C' was not declared in this scope

   webServer->on("/i2c", handleI2C);

                         ^

C:\Users\Brad Harvey\Downloads\Sonoff-Tasmota-stefan_patch1\Sonoff-Tasmota-stefan_patch1\sonoff\webserver.ino: In function 'void handleSave()':

webserver:929: error: 'pcf8574_saveSettings' was not declared in this scope

   pcf8574_saveSettings();

                        ^

exit status 1

Full AP mode

Can you please add a full AP mode so you can use it in a caravan without wlan router ?

WS2812 - Add MQTT command to bulk load of patterns

Would it be possible to add a way of loading 'pattern' for all pixcells in the LED string as:
RRGGBB1,RRGGBB2...RRGGBBN --> px1,px2...pxN

Arendst declines as it is 'too much hassle' in his issue #1790.
The idea is to use that feature for making 'big 7-segment digits display'.

I guess there will be a lack or RAM for that and the my proposal for solutions is:

  • combining a number of physical pixcells as 'virt.pixcell' - (ex.each 5 px --> 1 vpix)
  • Then load pattern to vpix-es:
    RRGGBB1,RRGGBB2...RRGGBBN --> vpx1,vpx2...vpxN

Example for one 7-segment big digit (5 pixcells for each segment):

  • define new param: vpixcel-llenght=5
  • physical pixcells - 35 (px0-px34)
  • resulting virtual pixcells - 7 (vpx0-vpx6)

Then loading a desired 7-segment pattern (and desired color as well) with:
RRGGBB0,RRGGBB0...RRGGBB6 --> vpx0,vpx1...vpx6

Thanks.
Borislav Bangov.

Power on state

I know the MQTT configuration is not working, but this means that the power on state cannot be set. maybe worth defaulting to off?

Update Tasmota?

Tasmota 5.13 has been released. Time for an update?

Deepsleep is very useful with the new Wemos D1 with 18650 but this build doesn't seem to be working correctly with it. Web interface saves are not persistent. Regular Tasmota works.

Kevin

Cannot load Shutter mode

Hi stefane!

I flashed my sonoff dual R2 setoption14 and 81 on but I cannot perform shutteropen and close commands.

Did I missed something?

bin file with pcf8574 support

I commented this already in the closed issue. But perhaps it might be better to open a new issue.

I use your last bin file with the electrodragon 2 Relay board and a chinese pcf8574 and an 8 relay board.
The relays connected to the pcf8574 are working, the relays onboard don't switch anymore but they show up in the weggui.
Any Idea?

screenshot_20171117_103837
screenshot_20171117_104000

MQTT TLS issue

Cannot obtain MQTT TLS connection. Always receiving 'insecure connection due to invalid fingerprint'.
The same user_config .h settings are used in 'arendst' version with no problem.

Compile error

Hi,

Ok, I missed the //#define USE_PCF8574 previously but now I get a compile error like I am missing some files.

image

ESP-01: No D0 available, D4 (GPIO2) not working?

tl;dr: Waking up from Deep Sleep on the ESP-01 is not possible without hardware modification. See this article on hackaday

Hi,

I tried to use this fork and I struggled with getting DeepSleep on an ESP-01 to work.

Things I've done:

  • Flashed the firmware with the usual setup
  • Connected RST to D4 (GPIO2) and configured it in the Web Interface
  • Set deepsleep 60

The device enters deep sleep fine. However, when attempting to wakeup, I see the blue LED blinking (AFAIR it's Serial TX) in very short intervals. It looks like the device tries to wakeup and gets to sleep immediately.

Can you give me a bit of info on how the DeepSleep pin is supposed to work? Is it floating during non-deepsleep operation and does it get pulled up or down for waking up?

Shutters - hardware switches and state ON/OFF.

Hello,
Great extension for sonoff!

I have question for you. Maybe nothing bad, but anyway I'd like to ask.

I have standard doorbell switches = momentary switches.

GPIO0 - Switch1
GPIO9 - Switch2
switchmode1 0
switchmode2 0

Everything is working very well most of the time.

But normal status is:

18:51:42 MQT: tele/roleta_balkon1/STATE = {"Time":"2018-07-16T18:51:42","Uptime":"0T00:01:38","Vcc":3.186,"POWER1":"OFF","POWER2":"OFF", "Wifi":{"AP":1, "SSId":"hass", "RSSI":82, "APMac":"02:9F:C2:74:3E:8C"}, "DeepSleep":0, "Heap":18208}
18:51:42 MQT: tele/roleta_balkon1/SENSOR = {"Time":"2018-07-16T18:51:42","Switch1":"ON","Switch2":"ON","SHUTTER-0":54}

when I click switch then switch1 or 2 is Off.

Is it suppose to be like that?

bin file with pcf8574

Could you be so nice and put a compiled bin file with pcf8574 support
in your bin folder?

I would like to test it with a 8 relay board.

Thank you very much.

Issue with deepsleep

Hi, I've

got a ESP8266 Nodemcu . I want to realize the follwoing scenario.
Wakeup of Nodemcu, measure Distance, deepsleep for 1 hour.
I tried to send the following command:

18:31:13 CMD: deepsleep 3600
18:31:13 MQT: stat/sonoffAkku/RESULT = {"DeepSleep":"3600 (3600)"}

But the NodeMCU doesn't fall to deepsleep. I also connected D0 to RST, this doesn't help..

Any idea, what to do?

Thanks a lot!

Shutter MQTT - send message instead of topic

Right now with shutter blinds I have to send empty message to topic shutteropen, shutterclose etc.
I think it would be better if user can send mqtt message to topic like this:

mosquitto_pub -h 192.168.4.15 -u mqtt -P pass -t "cmnd/sonoff/shutteroperation" -m shutteropen

instead of

mosquitto_pub -h 192.168.4.15 -u mqtt -P pass -t "cmnd/sonoff/shutterstop" -m ''

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.