Code Monkey home page Code Monkey logo

arendst / tasmota Goto Github PK

View Code? Open in Web Editor NEW
21.3K 629.0 4.7K 223.86 MB

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. Full documentation at

Home Page: https://tasmota.github.io/docs

License: GNU General Public License v3.0

PHP 0.01% Python 0.71% C 62.13% C++ 34.51% Makefile 0.13% Processing 0.09% Shell 0.10% HTML 0.02% CSS 0.01% XSLT 0.01% sed 0.01% CMake 0.01% Yacc 0.01% Euphoria 0.01% Berry 1.95% Jupyter Notebook 0.27% Perl 0.02% Assembly 0.04%
tasmota firmware esp8266 sonoff tuya knx arduino iot mqtt ota

tasmota's People

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  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

tasmota's Issues

Request - BME280 support

I know space is tight, but I'm hoping to standardise on the BME280 temperature/humidity/pressure sensor. Is there any possibility of adding I2C support for it in Tasmota?

(Adafruit seems to be the most popular library, or this cactus.io one more stand-alone)

Extra GPIO

I noticed that i can set GPIO3 on my normal sonoff and use the RX pin as a GPIO and then of course we have GPIO14 at the end which we can use. But where is GPIO4? i tested the TX pin but no luck.

Does the normal sonoff have GPIO 4 to use somewhere? or did i just get really lucky with gpio3 working with the RX pin on the sonoff?

Upload Error

Hi.
When I tried to upload the firmware, I got this error:

[02/06/17 19:07:46] Processing sonoff (platform: espressif8266, lib_deps: PubSubClient, NeoPixelBus, build_flags: -Wl,-Tesp8266.flash.1m64.ld -DMQTT_MAX_PACKET_SIZE=400, board: esp01_
1m, framework: arduino)
 
Verbose mode can be enabled via `-v, --verbose` option
Collected 25 compatible libraries
Looking for dependencies...
Library Dependency Graph

|-- <PubSubClient> v2.6
|-- <NeoPixelBus> v2.2.6
Linking .pioenvs\sonoff\firmware.elf
.pioenvs\sonoff\libFrameworkArduino.a(core_esp8266_main.o):(.text._ZL12loop_wrapperv+0x4): undefined reference to `setup'
.pioenvs\sonoff\libFrameworkArduino.a(core_esp8266_main.o):(.text._ZL12loop_wrapperv+0x8): undefined reference to `loop'
.pioenvs\sonoff\libFrameworkArduino.a(core_esp8266_main.o): In function `loop_wrapper()':
core_esp8266_main.cpp:(.text._ZL12loop_wrapperv+0x21): undefined reference to `setup'
core_esp8266_main.cpp:(.text._ZL12loop_wrapperv+0x2d): undefined reference to `loop'
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\sonoff\firmware.elf] Error 1
 [ERROR] Took 3.31 seconds

Can anybody help me please?
Thank you,
Boris.

Request: dynamic relays and keys

Hi,
this is a great firmware, my congratulations.
I wanted to ask: why not also make the relays and keys configurable from the web page ?

Best Regards
Alessandro

why I fail to verify / compile?

I tried to move on with next gem firmware for sonoff, and I got difficult with compile,
I can't compile with modified user_config.h than try with all default and still fail
Log shows it fails at the final when linking everything together, why was that?
I got no issue to compile with Sonoff-MQTT-OTA-Arduino 3.2.13 and I just did it once again with success after fail with Tasmota, Did I miss something or did anything wrong?

Linking everything together...
"C:\Temp\arduino-1.8.0\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-gcc" -g -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static "-LC:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/lib" "-LC:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/ld" "-Teagle.flash.1m64.ld" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy -o "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370/sonoff.ino.elf" -Wl,--start-group "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\sketch\sonoff.ino.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\Ticker\Ticker.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WiFi\ESP8266WiFi.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WiFi\ESP8266WiFiAP.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WiFi\ESP8266WiFiGeneric.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WiFi\ESP8266WiFiMulti.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WiFi\ESP8266WiFiSTA.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WiFi\ESP8266WiFiScan.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WiFi\WiFiClient.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WiFi\WiFiClientSecure.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WiFi\WiFiServer.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WiFi\WiFiUdp.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266HTTPClient\ESP8266HTTPClient.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266httpUpdate\ESP8266httpUpdate.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\pubsubclient\PubSubClient.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WebServer\ESP8266WebServer.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266WebServer\Parsing.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\DNSServer\DNSServer.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\ESP8266mDNS\ESP8266mDNS.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\Wire\Wire.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\NeoPixelAvr.c.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\NeoPixelEsp8266.c.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\HsbColor.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\HslColor.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\HtmlColor.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\HtmlColorNameStrings.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\HtmlColorNames.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\HtmlColorShortNames.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\NeoEsp8266UartMethod.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\NeoGamma.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\NeoPixelAnimator.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\RgbColor.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\NeoPixelBus-master\internal\RgbwColor.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370\libraries\SPI\SPI.cpp.o" "C:\Users\Ham\AppData\Local\Temp\arduino_build_520370/arduino.ar" -lm -lgcc -lhal -lphy -lpp -lnet80211 -lwpa -lcrypto -lmain -lwps -laxtls -lsmartconfig -lmesh -lwpa2 -llwip_gcc -lstdc++ -Wl,--end-group "-LC:\Users\Ham\AppData\Local\Temp\arduino_build_520370"
c:/temp/arduino-1.8.0/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\Ham\AppData\Local\Temp\arduino_build_520370/sonoff.ino.elf section .text' will not fit in region iram1_0_seg'

collect2.exe: error: ld returned 1 exit status

Using library Ticker at version 1.0 in folder: C:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0\libraries\Ticker
Using library ESP8266WiFi at version 1.0 in folder: C:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi
Using library ESP8266HTTPClient at version 1.1 in folder: C:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266HTTPClient
Using library ESP8266httpUpdate at version 1.1 in folder: C:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266httpUpdate
Using library pubsubclient at version 2.6 in folder: C:\Temp\arduino-1.8.0\portable\sketchbook\libraries\pubsubclient
Using library ESP8266WebServer at version 1.0 in folder: C:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer
Using library DNSServer at version 1.1.0 in folder: C:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0\libraries\DNSServer
Using library ESP8266mDNS in folder: C:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266mDNS (legacy)
Using library Wire at version 1.0 in folder: C:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0\libraries\Wire
Using library NeoPixelBus-master at version 2.2.6 in folder: C:\Temp\arduino-1.8.0\portable\sketchbook\libraries\NeoPixelBus-master
Using library SPI at version 1.0 in folder: C:\Temp\arduino-1.8.0\portable\packages\esp8266\hardware\esp8266\2.3.0\libraries\SPI
exit status 1
Error compiling for board Generic ESP8266 Module.

Request: Using Override.h file

Hi Theo,
Please enable the ability to preconfigure devices using the override file as before. I don't seem to be able to configure the DHT sensor using the override file anymore.

Maybe have a option to rename /TELEMETRY? Or option to rebroadcast /POWER during TELEPERIOD

Currently I had TELEMETRY topic rename to RESULT, reason being is that my current program are coded in such a way that I use the same topic name for both feedback and periodically cross checking the status.

We could do that previously with Legacy Mode MessageFormat as the topic are rebroadcasted as /POWER. Would be nice if we have some options available so that people who uses the TELEMETRY the same way as me can have a easier time porting from MQTT-Arduino to Tasmota.

Alternatively, we can just abuse the single level wildcard of MQTT on the application side, but it might not be ideal for busy environment with many devices pumping to the same topic.

DomoticzUpdateTimer for Sensor

Hello Theo,

thanks for your great work here... Today I updated my Sonoffs from the old version to the new Tasmota. This version makes everything so easy :-). And now it is possible to add Sensors Idx for Domoticz... Nice.

I have one little question:
My Temperature in Domoticz is only up to date when my Sonoff reboots. Is it possible to set an Updatetimer for the Sensor?

Greetings
Fabian

Crash by click on "Configure Wifi"

Hi Theo,

I got a crash in a Sonoff Basic.
The Wifi definition in the user_config.h:

// -- Wifi ----------------------------------------
#define STA_SSID1              "XiaoMI"          // [Ssid1] Wifi SSID
#define STA_PASS1              "Xiaomi110"       // [Password1] Wifi password
#define STA_SSID2              "sonoff"          // [Ssid2] Optional alternate AP Wifi SSID
#define STA_PASS2              "YjvUodcPU0NHu2"  // [Password2] Optional alternate AP Wifi password
#define WIFI_HOSTNAME          "%s%04d"          // [Hostname] Expands to <MQTT_TOPIC>-<last 4 decimal chars of MAC address>
#define WIFI_CONFIG_TOOL       WIFI_WPSCONFIG    // [WifiConfig] Default tool if wifi fails to connect
                                                 //   (WIFI_RESTART, WIFI_SMARTCONFIG, WIFI_MANAGER, WIFI_WPSCONFIG, WIFI_RETRY)

If you need the Wifi password, I can send it in PM.

Thanks for your work, you owe more than one beer!
Regards, Jacques-D.

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
▒
00:00:00 APP: Project sonoff Sonoff (Topic sonoff, Fallback DVES_95FD98, GroupTopic sonoffs) Version 3.9.11
00:00:00 Wifi: Connecting to AP1 XiaoMI in mode 11N as sonoff-7576...
00:00:09 Wifi: Connected
00:00:09 HTTP: Webserver active on sonoff-7576 with IP address 10.211.122.191
11:16:54 MQTT: Attempting connection...
11:16:54 MQTT: Connected
11:16:54 MQTT: tele/sonoff/LWT = Online (retained)
11:16:54 MQTT: cmnd/sonoff/POWER =
11:16:54 MQTT: tele/sonoff/INFO1 = {"Module":"Sonoff Basic", "Version":"3.9.11", "FallbackTopic":"DVES_95FD98", "GroupTopic":"sonoffs"}
11:16:54 MQTT: tele/sonoff/INFO2 = {"WebserverMode":"Admin", "Hostname":"sonoff-7576", "IPaddress":"10.211.122.191"}
11:16:55 MQTT: stat/sonoff/RESULT = {"POWER":"OFF"}
11:16:55 MQTT: stat/sonoff/POWER = OFF
11:17:02 MQTT: tele/sonoff/STATE = {"Time":"2017-02-07T11:17:02", "Uptime":0, "POWER":"OFF", "Wifi":{"AP":1, "SSID":"XiaoMI", "RSSI":76}}

Exception (28):
epc1=0x4000bf80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x000002e8 depc=0x00000000

ctx: cont
sp: 3fff1fe0 end: 3fff2490 offset: 01a0

>>>stack>>>
3fff2180:  00000003 06a14ca5 00000000 4000050c
3fff2190:  402324de 4010346c 3fffc200 00000022
3fff21a0:  00000010 000002e8 00000000 3fff2230
3fff21b0:  3fff2240 40107b8c 3fff50dc 3fff22e0
3fff21c0:  4025b6a5 00000021 3fff22e0 401004d8
3fff21d0:  3fff137c 000004bd 000004bd 4021b968
3fff21e0:  00000a00 3fff5e7c 3fff540c 4021bcd5
3fff21f0:  3fff2240 3fff2230 0000000c 7fffffff
3fff2200:  000006e0 3fff2328 3fff2260 3fff2260
3fff2210:  00000002 00000001 00000000 4021bd0c
3fff2220:  3fff2240 3fff2230 0000000c 4021af0f
3fff2230:  00000002 00000001 3fff2328 000002e8
3fff2240:  00000000 4025ee6e 00000000 3fff2260
3fff2250:  00000002 00000001 00000000 402102b8
3fff2260:  00000000 00000000 00000000 401023f2
3fff2270:  3ffea745 401056cf 3ffee1d0 401023f2
3fff2280:  40103105 3ffee1d0 00000002 401023f2
3fff2290:  00007fff 06d80d23 3ffeebbc 40103294
3fff22a0:  3fff137c 000001ea 000001ea 3fff137c
3fff22b0:  00000010 3fff2380 00000000 4010053d
3fff22c0:  00000010 3fff2380 00000000 4010053d
3fff22d0:  3fff137c 00000203 00000203 4010020c
3fff22e0:  00000000 00000000 00000000 3fff137c
3fff22f0:  00000010 3fff2380 00000000 4010053d
3fff2300:  40248316 00000000 3fff2380 4024832d
3fff2310:  3fff3e3c 3fff2380 3fff2380 3ffe93f2
3fff2320:  00000010 3fff2380 3fff5e7c 000009ff
3fff2330:  000009f5 3fff23c0 00000000 4010053d
3fff2340:  3fff137c 000001d6 000001d6 3fff137c
3fff2350:  00000010 3fff23e0 00000000 40217ec8
3fff2360:  00000010 3fff23c0 3fff23c0 4021aec0
3fff2370:  3fff3544 00000003 3fff23c0 40217ec8
3fff2380:  00000002 00000001 3fff31dc 40210478
3fff2390:  00000002 00000001 3fff23c0 4021bdda
3fff23a0:  00000000 00000000 3fff31dc 40217ebe
3fff23b0:  3fff31dc 3fff42e4 3fff31dc 40217efa
3fff23c0:  00000000 00000000 00000000 4021b070
3fff23d0:  3fff31dc 3fff42e4 3fff42a4 40217f8d
3fff23e0:  3fff3544 0000000f 00000003 40214b8c
3fff23f0:  00000000 00000000 00000000 00000001
3fff2400:  00000002 4021742c 0000000e 3fff1470
3fff2410:  00000000 00000000 3fff0350 3fff1460
3fff2420:  00000001 3fff42c8 3fff42a4 40218117
3fff2430:  3ffe9508 00000000 3fff1470 00000000
3fff2440:  3fffdad0 3fff1460 4021bb0c 3fff1470
3fff2450:  3fffdad0 00000000 3fff1458 40203e96
3fff2460:  00000000 00000000 00000001 40213a64
3fff2470:  3fffdad0 00000000 3fff1458 4021bb58
3fff2480:  feefeffe feefeffe 3fff1470 40100718
<<<stack<<<

 ets Jan  8 2013,rst cause:1, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d

Keeps reconnecting to AccessPoint

I am having a strange issue, not sure if anyone else runs into it.

I am not using MQTT and enabled Wemo simulation. I can connect to the Wifi Manager, configure SSID/Password. The device will restart and connect to access point. When I monitor the logs on serial port, I see device is connecting to access point periodically. Looks like it is loosing wifi connection and connecting again. And when I connect to webserver to see/change config, I often get time outs due to wifi connection issues. Anyone seeing similar issues?

Thanks in advance.

BMP_ADDR hardwired to 0x77

Many of the modules available from eBay and AliExpress (and elsewhere) use 0x76 instead. If Tasmota could recognise the BMP280 with either of these 2 addresses that would be ideal.

Thank you for an INCREDIBLE piece of software that just keeps getting better and better :)

Regards,
Michal

Service: http hosting binary images

UPDATED 2nd July
Now checking for new version every 10 minutes and if so copying all assets from the latest release, as listed here:

https://github.com/arendst/Sonoff-Tasmota/releases/latest

and host them in this folder:

http://sonoff.maddox.co.uk/tasmota/

then updating the version number on my mqtt server (see comment below)

Also copying sonoff.bin to sonoff.ino.bin for backward compatibility.

UPDATED 6th April
Now copying everything (*) from /api/arduino folder to hosted area. Currently this adds http://sonoff.maddox.co.uk/tasmota/sonoff-minimal.ino.bin, in case anyone is doing 2-stage uploads.

UPDATED 23rd Feb

Not sure if this is useful for anyone, but I am hosting the binary image on an http server to allow Sonoffs to update via URL (Github insists on https which is beyond the standard configuration of firmware).

Every 10 minutes I check for a new version, and if so pull the update and compile to the following URL:
> http://sonoff.maddox.co.uk/tasmota/sonoff.ino.bin

Every hour, on the hour I get the latest binary from
> https://github.com/arendst/Sonoff-Tasmota/raw/master/api/arduino/sonoff.ino.bin
and host it at
> http://sonoff.maddox.co.uk/tasmota/sonoff.ino.bin

I was wary of doing this with the old version of the software, due to the number of tweaks needed in the config file before compiling. Still, if you want the raw mqtt-ota version from
> https://github.com/arendst/Sonoff-MQTT-OTA-Arduino/raw/master/api/arduino/sonoff.ino.bin
it's also available at
> http://sonoff.maddox.co.uk/mqtt-ota/sonoff.ino.bin

How do I add another GPIO function

Hi,

fumbled something during testing yesterday. Now I found that if setting GPIO14 to my newly assigned function (sonoff_template.h) the system reboots and after reboot says it switches to default configuration and reboots again which invalidates my changed GPIO_USER function. I added a new Function between GPIO_SENSOR_START and GPIO_SENSOR_END, incremented GPIO_SENSOR_END, increased the second sensors[][] index and added my function name. I can see the new function assigneable to GPIO_USER in the webfront but after assigning I get 2 reboots and after the second reboot everything is on config_default.
What would be the supposed way to add another function?

Sorry to bother,

         Heiko.

Need help integrating in Home Assistant

I have a Sonoff POW. When I do:

pi@HomeAssistant:~$ mosquitto_sub -h 192.168.178.123 -p 8883 -t 'cmnd/sonoff_droger/status 8' -v -u ha -P ha

I get:

pi@HomeAssistant:/var/www/html$ mosquitto_sub -h 192.168.178.123 -p 8883 -t stat/sonoff_droger/RESULT -v -u ha -P ha stat/sonoff_droger/RESULT PWR: Voltage 228 V, Current 0.000 A, Power 0 W, Today 0.005 kWh, Factor 0.00'

But how to do this in Homeassistant ?

Home Assistant Gather Temperature Data via JSON Possible missing "}"

I'm trying to get Temp data with my DHT22 via HomeAssistant

Running this command
mosquitto_pub -h localhost -p 8883 -t 'cmnd/sonoff/status' -m '10'
outputs this

stat/sonoff/STATUS10 {"StatusSNS":{"Time":"2017-02-10T19:27:09", "DHT":{"Temperature":"69.8", "Humidity":"26.9"}}

I'm trying to capture this with home assistant. if anyone has done this please hit me up. it was easier with not having to parse JSON before.

sensor:

  • platform: mqtt
    state_topic: 'stat/sonoff/STATUS10'
    command_topic: 'cmnd/sonoff/status'
    payload: '10'
    name: 'Temperature'
    unit_of_measurement: '°F'
    value_template: '{{ value_json.StatusSNS.DHT.Temperature }}'

but i get an error saying it can't parse it

INFO:homeassistant.core:Bus:Handling <Event mqtt_message_received[L]: topic=stat/sonoff/STATUS10, payload={"StatusSNS":{"Time":"2017-02-10T19:33:25", "DHT":{"Temperature":"70.0", "Humidity":"27.0"}}, qos=0>
ERROR:homeassistant.helpers.template:Error parsing value: 'value_json' is undefined (value: {"StatusSNS":{"Time":"2017-02-10T19:33:25", "DHT":{"Temperature":"70.0", "Humidity":"27.0"}}, template: {{ value_json.StatusSNS.DHT.Temperature }})

Error, missing file #include <NeoPixelBus.h>

Hi,
I'm testing your latest code on sonoff devices. I'm getting the following error when verifying the code.

C:\Users\GuyPERERA\Documents\Arduino\Sonoff-Tasmota-master\sonoff\xdrv_ws2812.ino:31:25: fatal error: NeoPixelBus.h: No such file or directory
#include <NeoPixelBus.h>

Can you please give me a possible solution. Thanks.

Some information only published via JSON on boot?

Again. thank you for your excellent work. you should really fix a donate button...

Question. it appears as if some telemetry information is only published on boot? I'm specifically thinking on the /RESULT topic which contains Info1 and Info2 messages with Version, IP Address and device type information in the JSON message. - Is there a way to have the device publish it at a interval similar to how it publishes Uptime and SSID for example?

The reason why i ask is that since the IP address, version and device type MQTT messages doesn't get stored then i loose this information when my MQTT broker goes down and after that i need to reboot all of my sonoff devices in order to get the info back.

Thanks again.

Two Sonoff Pows playing Ping-Pong

I flashed two Sonoff Pows with the Tasmota Firmware. If both are online, they seem to Play Ping-Pong with each other! ;)

mosquitto_sub -v -t 'tele/#' -t 'stat/#' gives me this:

tele/sonoff_DiWa/STATE {"Time":"2017-02-07T20:13:42", "Uptime":1, "POWER":"ON", "Wifi":{"AP":1, "SSID":"xxx", "RSSI":56}}
tele/sonoff_DiWa/ENERGY {"Time":"2017-02-07T20:13:42", "Yesterday":"0.000", "Today":"0.002", "Period":0, "Power":0, "Factor":"0.00", "Voltage":247, "Current":"0.000"}
tele/sonoff_WaMa/LWT Online
tele/sonoff_DiWa/LWT Online
tele/sonoff_WaMa/LWT Online
tele/sonoff_DiWa/LWT Online
tele/sonoff_WaMa/LWT Online
tele/sonoff_DiWa/LWT Online
tele/sonoff_WaMa/LWT Online
tele/sonoff_WaMa/STATE {"Time":"2017-02-07T20:13:52", "Uptime":0, "POWER":"OFF", "Wifi":{"AP":1, "SSID":"xxx", "RSSI":68}}
tele/sonoff_WaMa/ENERGY {"Time":"2017-02-07T20:13:52", "Yesterday":"0.000", "Today":"0.000", "Period":0, "Power":0, "Factor":"0.00", "Voltage":0, "Current":"0.000"}
tele/sonoff_DiWa/LWT Online
tele/sonoff_WaMa/LWT Online
tele/sonoff_DiWa/LWT Online
...

I set TelePeriod 20, which is working fine on each device, but the "LWT Online"-messages are disturbing me. If one of the Sonoff Pows is offline, there's no "LWT Online" message at all.

is there a way to tell them to stop this? ;)

Using Sonoff SV for dimming Power LEDs

Can I use Sonoff SV to dimming a set of 12V LEDs from one of the outputs 4,5 or 14? It works on the WS2812, but that is all dimming 3 colors as I had a peek in your source code. Of course I'II have to put a LED driver in too, but that could even be integrated over the contacts of the relay and us full on(relay) and dimmed when relay off and PWM out from the "dimmer".

Crash when select "Sonoff 4CH"

when i select "Sonoff 4CH" the System is rebooting and can no more starting!
I must reflashed the Module with MQTT Version, this is ok!

LG

Mismatch of GPIO3/4 with Sonoff SV calling it GPIO4/5

I am confused now. The pins GPIO4 and 5 are called GPIO3 and 4 in your template. I connected a LED WS2812 string to GPIO4 and configured that, works very nice. I noticed @mihalski with his Huzzah Feather defined the template with GPIO4 and 5 available for that module.
On the board it is called 4 and 5!
What is going on here, I am obviously missing something?

Help needed adding MQTT_GRPTOPIC to all topics

Hello, I'd like to know if there is any way to achieve (in a relatively easy way) an extra level on my MQTT topics:
I have to deploy sensors on a 3 floor building, some of them are sonoffs, some other are not.
To make everything easier for me, I decided to make everything follow the cmnd, stat, and tele scheme, but now I realize i should have something that differenciates my sonoffs from other sensors, but still be able to tell one sonoff from the other.
What I want to achieve is a topic structure like this:
MQTT_GRPTOPIC/SUB_PREFIX/MQTT_TOPIC
MQTT_GRPTOPIC/PUB_PREFIX/MQTT_TOPIC
MQTT_GRPTOPIC/PUB_PREFIX2/MQTT_TOPIC/UPTIME, POWER/LIGHT and TIME

So I can subscribe to (for example): 3FSonoffs/tele/+/uptime (where MQTT_TOPIC is unique for each sonoff on the third floor)

I have tried "patching" this on user config, by adding concatenating like this:
#define PUB_PREFIX2 MQTT_GRPTOPIC "/tele"
I succesfully send mqtt messages with the topic structure I want, but the problem comes when I try to access the console web interface: I just get a blank console where there used to be a lot of useful info.

Can anyone help me?

Sonoff RF issue

Hi!
I'm struggling with a Sonoff RF Problem.
I'm trying to pair my RF button with sonoff rf. (I don't havany special connection for R21 )
So I pushed button on RF module, LED blinked red one time. I bushed my RF button and LED blinked 3 times.
Now, every time I push my RF button, Sonoff's Led blinks red, but power doesn't switch.
Could you please help me?

HC-SR501 PIR motion detector as switch not working as expected

Is POWER = OFF the intended result when motion is detected? Or is there some further configuration to the type of switch required to make this work more reliably.

And on another identical device with identical configuration and hardware I am getting mostly "correct" behaviour except that sometimes when it is triggered it wobbles from On to OFF to ON a few times changing every 4/5 seconds.

Perhaps there needs to be 30 seconds or so of "calibration" before the firmware takes any readings from a PIR sensor? That was my impression though I don't know if that just means unpredictable behaviour for the first 30 seconds or whether it sets the tone for future readings.

PS. I think it may have stabilised now.. I Manually toggled the switch to OFF over the web interface while no motion was being detected and so far so good.. Going to continue testing to see if the behaviour remains consistent.

EDIT: SWITCH_MODE needs to be FOLLOW right? I just can't get reliable behaviour.. I switched from TOGGLE to FOLLOW and it was acting weird and ignoring motion.. So I tried FOLLOW_INV and it worked INVERSELY like I described in the first paragraph so I tried going back to FOLLOW and it didn't work at all.. Now a few minutes later it's inverted itself again.. No idea what's going on. Hope to hear from others trying to use this sensor with this firmware.. I have about 15 of these sensors and I set them all the same and switch them around to make sure it's not a faulty sensor.

EDIT2: OK.. Things appear to have stabilised.. Not sure if why or how. We'll see how it continues.

Offset if Maxdevice is more then 1 Relais

Hello I've tried to switch the relais for the Sonoff 4CH device and also for the ElectroDragon but the latest relay isn't switchable because there is an offset between the command and the relay definition

Please see the realtionship for the Sonoff 4CH device below

cmnd Power1: no action
cmnd Power2: GPIO_REL1
cmnd Power3: GPIO_REL2
cmnd Power4: GPIO_REL3

button behavior

I want to use (actually, to keep) the button behavior described in wiki:

1 short press: Toggles the relay either directly or by sending a MQTT message

In fact I had this working before but now with v3.9.10 it does not work for me anymore.
I have a separate buttontopic (sonbutt1), so I want Sonoff to send a message only and not toggle the relay - this will be handled externally.

This is what I see on the broker when the button is pressed (there is no external logic in place):

cmnd/sonbutt1/POWER TOGGLE
cmnd/sonoff1/power ON
stat/sonoff1/RESULT {"POWER":"ON"}
stat/sonoff1/POWER ON

Why "cmnd/sonoff1/power ON" is here? Please advise how to restore the desired button behavior. Thanks!

Sonoff TH not working properly

I have a Sonoff TH that has starting behaving strangely. 2 indicators:

  1. The web server returns ERR_CONTENT_LENGTH_MISMATCH
  2. Any MQTT command sent to it returns stat/......../COMMANDS1 to COMMAND4 reminders of which commands are available.

It's not very accessible, so before getting ladders to power cycle it is there anything else I can try?

Compile fails when USE_WEBSERVER is not defined

When #define USE_WEBSERVER is commented out in user_config.h, then I get the following compile errors:

xdrv_domoticz:319: error: '_httpflag' was not declared in this scope
   if (_httpflag == HTTP_USER) {
       ^
xdrv_domoticz:319: error: 'HTTP_USER' was not declared in this scope
   if (_httpflag == HTTP_USER) {
                    ^
xdrv_domoticz:320: error: 'handleRoot' was not declared in this scope
     handleRoot();
                ^```

Not getting any Temp data from Tasmota

Updated to Tasmota (first version and now todays version)
and i can't get any data for my Temp/Humidity sensor.
I turned on 4 debug logging and i don't see anything that says its even trying to get the data.
it is a dht22 sensor
i have configured gpio 14 for dht22 in the web interface and tried to set the other two GPIO options the same. tried am2301 as the device in the web configuration.
tried setting the module as a Sonoff TH instead of basic.
nothing give me any temp data.

not sure what else to do to get data like i did in the previous git hub project.
here is my user_config.h minus the irrelevant parts.
http://pastebin.com/xfdVWN29

thanks

here is my console output

00:00:00 Config: Loaded configuration from flash at 3F8 and count 13
00:00:00 APP: Bootcount 5
00:00:00 APP: Project sonoff Sonofftemp (Topic sonoff, Fallback DVES_1C9FD0, GroupTopic sonoffs) Version 3.9.11
00:00:00 Config: Saved configuration (1196 bytes) to flash at 3F7 and count 14
00:00:00 Wifi: Checking connection...
00:00:00 Wifi: Attempting connection...
00:00:00 Wifi: Patch issue 2186
00:00:00 Wifi: Connecting to AP1 CitrusNet in mode 11N as sonoff-8144...
00:00:01 Wifi: Checking connection...
00:00:01 Wifi: Attempting connection...
00:00:02 Wifi: Checking connection...
00:00:02 Wifi: Attempting connection...
00:00:03 Wifi: Checking connection...
00:00:03 Wifi: Attempting connection...
00:00:04 Wifi: Checking connection...
00:00:04 Wifi: Attempting connection...
00:00:05 Wifi: Checking connection...
00:00:05 Wifi: Attempting connection...
00:00:06 Wifi: Checking connection...
00:00:06 Wifi: Connected
00:00:06 mDNS: Initialized
00:00:06 HTTP: Webserver active on sonoff-8144.local with IP address 192.168.1.116
00:00:06 UPnP: Multicast (re)joined
00:00:08 UPnP: Multicast disabled
00:00:08 MQTT: Attempting connection...
00:00:09 mDNS: Query done with 0 mqtt services found
00:00:09 MQTT: Connected
00:00:09 MQTT: tele/sonoff/LWT = Online (retained)
00:00:09 MQTT: cmnd/sonoff/POWER =
00:00:09 MQTT: tele/sonoff/INFO1 = {"Module":"Sonoff Basic", "Version":"3.9.11", "FallbackTopic":"DVES_1C9FD0", "GroupTopic":"sonoffs"}
00:00:09 MQTT: tele/sonoff/INFO2 = {"WebserverMode":"Admin", "Hostname":"sonoff-8144", "IPaddress":"192.168.1.116"}
00:00:09 UPnP: Multicast (re)joined
00:00:09 RTC: (UTC) Mon Feb 06 19:58:22 2017
00:00:09 RTC: (DST) Sun Mar 26 02:00:00 2017
00:00:09 RTC: (STD) Sun Oct 29 03:00:00 2017
20:58:23 MQTT: stat/sonoff/RESULT = {"POWER":"ON"}
20:58:23 MQTT: stat/sonoff/POWER = ON
20:58:30 MQTT: tele/sonoff/STATE = {"Time":"2017-02-06T20:58:30", "Uptime":0, "POWER":"ON", "Wifi":{"AP":1, "SSID":"CitrusNet", "RSSI":60}}
20:58:36 HTTP: Handle root
20:58:37 HTTP: Handle console
20:58:41 Wifi: Checking connection...
20:58:41 Wifi: Connected
20:59:01 Wifi: Checking connection...
20:59:01 Wifi: Connected

Can't connect to Wifi

Since I updated to the newer version, it doesn't connect to any wifi. With the default configuration the serial output is:
0:00:00 Wifi: Connecting to AP256 � in mode 11N as enchufe5...
00:00:07 Wifi: Connect failed as AP cannot be reached

Can you please help me?

Thanks

PWM control on any pin

I've been looking at GPIO_PWM* and I'm not sure that they can be used as general PWM control of an exernal device - I think they are just for the SONOFF LED?

(I want to dim 12v/30W LED fixtures via external MOSFETS using PWM)

Do you have code coming/ready that could do this? If not I'll have a go hacking something in tonight.

MQTT Topic and unique identifiers

When the MQTT topic is set to e.g. "sonoff-E8A6E4" the topic actually published is "sonoff_E8A6E4".

Why is that?

Edit: Could this be related to the fact that "MQTT Client and Fallback Topic" and "MQTT Topic" are the same on my modules? It's actually nowhere documented what the difference between the two of them is.

Button Header on Dual

Not sure exactly if it is feature request or a fix but on the Dual I would expect the button header (GND/Button0/Button1/GND) to work with external wall switches like on the basic (GND/GPIO14), it is not working for me, button1+gnd does nothing, button0+gnd reset to defaults.

Doing some research, realized that the protocol on the serial for the F330 is the same in both ways, which means that enabling the relays or receiving a switch/button change from the F330 is the same as the protocol you have already implement, the difference is that it has to read serial and enable the relays accordingly.

I've tried to understand the code and make my own changes but my coding skills are limited.

By the way, amazing project!
Regards,
Gabriel.

espcomm_open failed; espcomm_upload_mem failed

I'm trying to flash a Sonoff POW with 3.9.11a, doing these steps:

  1. preparing the sonoff (connecting 3.3V, GND, TX-RX, RX-TX)
  2. not connecting 230V! ;)
  3. connecting the "Yongse – FT232RL FTDI USB zu TTL Serial Adapter Modul" with my Win10-USB
  4. creating a directory and "git clone https://github.com/arendst/Sonoff-Tasmota"
  5. "open Folder" in PlatformIO (running on python 2.7)
  6. PlatformIO: Build (works without a problem)
  7. pressing the button >5secs to get the Sonoff POW in flashmode (blue LED blinking fast)
  8. PlatformIO: Upload

now I get this errors in my log:

|   |-- <ESP8266HTTPClient> v1.1
|   |   |-- <ESP8266WiFi> v1.0
|-- <ESP8266WiFi> v1.0
|-- <ESP8266mDNS>
|   |-- <ESP8266WiFi> v1.0
|-- <ESP8266WebServer> v1.0
|   |-- <ESP8266WiFi> v1.0

Compiling .pioenvs\sonoff\src\sonoff.ino.o
Linking .pioenvs\sonoff\firmware.elf
Checking program size
text       data     bss     dec     hex filename
445299    10668   35136  491103   77e5f .pioenvs\sonoff\firmware.elf
Building .pioenvs\sonoff\firmware.bin
Looking for upload port...
Auto-detected: COM5
Uploading .pioenvs\sonoff\firmware.bin
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
*** [upload] Error -1
 [ERROR] Took 17.86 seconds

What am I doing wrong?

WS2812b LEDs with unusal GRB mapping

Is there an easy way to configure an LED string that is mapped weirdly - where Red and Green are swapped?

I was wondering about adding another LedTable.

Apologies if I missed the obvious. I'm on 3.9.7 IIRC.
And again many thanks for an awesome fw!

How to make relay ON with power cycle

Sorry if this is the wrong place, I don't know where to post questions...

How can I make the sonoff relay start ‘on’ when power is connected (normal state is off when power is connected). I’m trying to send mqtt commands and nothing seems to save once power cycled?

I've tried everything I can see in the command lists but it always starts with relay off:

-t cmnd/sonoff_02/status -m 0

{"Status":{"Module":1, "FriendlyName":"Sonoff_02", "Topic":"sonoff_02", "ButtonTopic":"sonoff_02", "Subtopic":"POWER", "Power":0, "PowerOnState":1, "LedState":1, "SaveData":1, "SaveState":1, "ButtonRetain":1, "PowerRetain":1}}
{"StatusPRM":{"Baudrate":115200, "GroupTopic":"sonoffs", "OtaUrl":"http://domus1:80/api/arduino/sonoff.ino.bin", "Uptime":0, "Sleep":0, "BootCount":35, "SaveCount":189}}
{"StatusFWR":{"Program":"3.9.10", "Boot":4, "SDK":"1.5.3(aec24ac9)"}}
{"StatusLOG":{"Seriallog":2, "Weblog":2, "Syslog":0, "LogHost":"domus1", "SSId1":"nootnoot_optout_nomap", "SSId2":"indebuurt2", "TelePeriod":300}}
{"StatusMEM":{"ProgramSize":449, "Free":488, "Heap":20, "SpiffsStart":940, "SpiffsSize":64, "FlashSize":1024, "ProgramFlashSize":1024}}
{"StatusNET":{"Host":"Sonoff-02", "IP":"10.1.1.10", "Gateway":"10.1.1.1", "Subnetmask":"255.255.255.0", "Mac":"60:01:94:07:E2:6F", "Webserver":2, "WifiConfig":2}}
{"StatusMQT":{"Host":"10.1.1.58", "Port":1883, "ClientMask":"Sonoff_02", "Client":"Sonoff_02", "User":"adam", "MAX_PACKET_SIZE":400, "KEEPALIVE":15}}
{"StatusTIM":{"UTC":"Wed Feb 01 14:38:14 2017", "Local":"Wed Feb 01 15:38:14 2017", "StartDST":"Sun Mar 26 02:00:00 2017", "EndDST":"Sun Oct 29 03:00:00 2017", "Timezone":1}}
{"StatusSNS":{"Time":"2017-02-01T15:38:14"}}

high latency

just noticed high latency time after changing to Tasmota 3.9.11. When issuing power commands it takes up to 2 seconds before relay is switching. mqtt-spy shows command transmitted in time. Sporadically it turns into loop with fast flashing green led on sonoff th10 and restarting after stopped wifi comm. Sri had no time yet for further investigations but wonder if this problem is known and/or I am misconfiguring something ... (same config as in Sonoff-MQTT-OTA-Arduino 3.2.13 btw. where everything was OK).

Sonoff LED

I don't seem to be able to adjust the brightness of the LED's.
Currently, they are not as bright as a sonoff LED with the default firmware

Telemetry with Uptime only

TELEMETRY messages sent periodically are used to report various parameters in a single JSON.
Sometime, probably when the new hour of operation begins, TELEMETRY message is sent with only Uptime in the body.

The problem is: I'm using openHAB to extract a single parameter from TELEMETRY message by using jsonpath transformation. When message with Uptime only arrives this generates an error as there is no parameter of interest is present.
tele/sonoff1/TELEMETRY {"Time":"2017-01-29T19:59:17", "Uptime":2, "POWER":"OFF", "Wifi":{"AP":1, "SSID":"crazy", "RSSI":48}}
tele/sonoff1/TELEMETRY {"Time":"2017-01-29T20:02:30", "Uptime":3}
tele/sonoff1/TELEMETRY {"Time":"2017-01-29T20:04:23", "Uptime":3, "POWER":"OFF", "Wifi":{"AP":1, "SSID":"crazy", "RSSI":44}}

May I suggest to either send complete messages all the time or move Uptime to a separate topic?
Thanks!

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.