Gabor Simon
38b81302e3
sm16716: added config option for custom rgb order
2019-02-24 09:26:10 +04:00
Laurent
dd27ade7ef
Rules: Trigger Event with MQTT Subscriptions
...
Support subscribe/unsubscribe MQTT topics and trigger specified event with the subscribed MQTT topic.
You can subscribe a MQTT topic and assign an event name. Once we received subscribed MQTT message, an event will be automatically triggered. So you can set up a rule with "ON EVENT#<event_name> DO ..." to do whatever you want based on this MQTT message. The payload is passed as a parameter once the event been triggered. If the payload is in JSON format, you are able to get the value of specified key as parameter.
For example, if you have a Tasmota based thermostat and multiple temperature sensors in different place, usually you have to set up a centre home automation system like Domoticz to control the thermostat. Right now, with this new feature, you can write a rule to do this.
Two new commands in Rules:
1. Subscribe
Subscribe a MQTT topic (with or without key) and assign an event name to it.
Command format:
Subscribe [<event_name>, <topic> [, <key>]]
This command will subscribe a <topic> and give it an event name <event_name>.
The optional parameter <key> is for parse the specified key/value from MQTT message
payload with JSON format.
In order to parse value from two level JSON data, you can use one dot (".") to split the key into two section.
Subscribe command without any parameter will list all topics currently subscribed.
2. Unsubscribe
Unsubscribe specified MQTT event.
Command format:
Unsubscribe [<event_name>]
Unsubscribe a topic subscribed by specify the event name.
If no event specified, Unsubscribe all topics subscribed.
Examples:
1.
Subscribe BkLight, Tasmota/BackyardLight/stat/POWER
And define a rule like:
Rule1 on event#BkLight=ON do ruletimer4 60 endon
2.
Subscribe DnTemp, Tasmota/RoomSensor1/stat/SENSOR, DS18B20.Temperature
Define a rule to deal with the MQTT message like {"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}
Rule1 ON EVENT#DnTemp>=21 DO ... ENDON
2019-02-23 22:33:09 -05:00
Laurent
3298048c60
Update support_rtc.ino
2019-02-23 17:41:06 -05:00
Theo Arends
68c60c321e
Handle too many command data
...
Handle too many command data
2019-02-23 19:19:31 +01:00
Theo Arends
93d07c1acc
Webserver memory optimizations
...
Webserver memory optimizations
2019-02-23 18:38:36 +01:00
Theo Arends
19bdf7e803
Free flash space (WSSend)
...
Free flash space (WSSend)
2019-02-23 15:29:42 +01:00
Theo Arends
1cb956b541
Free flash space
...
Free flash space
2019-02-23 13:17:02 +01:00
Theo Arends
5d8ae266d0
Fix RemoveSpace and tune Websend
...
Fix RemoveSpace and tune Websend
2019-02-23 12:48:39 +01:00
Theo Arends
06bec0d95e
Update _changelog.ino
...
Back from the future
2019-02-23 11:18:57 +01:00
Laurent
2cc15a8c34
Merge remote-tracking branch 'upstream/development' into development
2019-02-22 22:53:01 -05:00
Jörg R. Weimar
f0dde50f39
Merge remote-tracking branch 'upstream/development' into development
...
Merge all recent changes into my branch
2019-02-22 15:29:36 +01:00
Theo Arends
e315be0619
Fix command WebSend
...
Fix command WebSend when using a port number as regression from 6.4.1.17 (#5304 )
2019-02-22 15:19:59 +01:00
Theo Arends
d219d1c9b5
Update support.ino
...
Houskeeping
2019-02-22 12:11:15 +01:00
Theo Arends
49f0b514eb
Fix some exceptions and watchdogs
...
* Fix some exceptions and watchdogs due to lack of stack space - part 2
* Add command SetOption62 0/1 to disable retain on Button or Swith hold messages (#5299 )
* Add option WifiConfig 7 to allow reset of device in AP mode without admin password (#5297 )
2019-02-22 12:04:05 +01:00
Theo Arends
8df6bb76d1
Merge pull request #5297 from netpok/wificonfig-7
...
WifiConfig 7, a reset only WifiManager for smart bulbs
2019-02-22 11:44:04 +01:00
netpok
6cbfb0308a
Check no hold retain flag on hold action sending
2019-02-21 21:30:30 +01:00
netpok
b3adab4097
Add flag for no hold retain
2019-02-21 21:27:52 +01:00
netpok
e2bcef16bf
Merge remote-tracking branch 'upstream/development' into wificonfig-7
2019-02-21 19:45:34 +01:00
netpok
e9396d0ed4
Add missing localization strings
2019-02-21 19:45:21 +01:00
netpok
731154cc9b
Handle authentication on reset/restart
2019-02-21 19:45:03 +01:00
netpok
4993d16ecb
Implement WifiConfig 7
2019-02-21 17:49:11 +01:00
netpok
e035a3253a
Add password validation to WebUI
2019-02-21 15:58:37 +01:00
netpok
3c58f5b7b9
Add password validation to password command
2019-02-21 15:57:45 +01:00
Theo Arends
95da493325
Update xdrv_01_webserver.ino
...
Fix compile error
2019-02-21 14:56:39 +01:00
Theo Arends
05b0280019
6.4.1.18 - Fix some exceptions and watchdogs
...
6.4.1.18 20191221
* Fix some exceptions and watchdogs due to lack of stack space - part 1 (#5215 )
2019-02-21 14:31:31 +01:00
Theo Arends
cfd3f3f4f5
Fix WebSend compile warning
...
Fix WebSend compile warning
2019-02-21 09:48:58 +01:00
Laurent
4e66dce049
Merge remote-tracking branch 'upstream/development' into development
2019-02-19 20:15:43 -05:00
Theo Arends
280dd25a8b
Optimize RAM for expression
...
Optimize RAM for expression and add two more constant variables (#5275 )
2019-02-19 14:49:15 +01:00
Theo Arends
06c97c4e19
Fix command WebSend
...
Fix command WebSend intermittent results (#5273 )
2019-02-19 12:51:38 +01:00
Theo Arends
32c1e2d13c
Tuning uptime and add utctime
...
Tuning uptime and add utctime
2019-02-19 10:48:19 +01:00
Laurent
660d0106c2
Revert "Support HttpGet command"
...
This reverts commit c527d4dc99
.
2019-02-18 16:18:01 -05:00
Laurent
6f2f0b6fea
Add two constant varibles in rules expression
...
Add two variables:
- UtcTime
The number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT)
- LocalTime
Seconds passed after Jan 1, 1970 midnight base on current timezone and daylight saving setting.
2019-02-18 16:17:32 -05:00
Laurent
2bc84a9aad
Optimize RAM usage for Expression
2019-02-18 16:12:14 -05:00
Laurent
c527d4dc99
Support HttpGet command
...
HttpGet command send a HTTP Get request to specified URL and return the response from website or error message if failed.
Note: This command support URL encoding, so you do not have to do encode by yourself. For example replacing all " " with %20 is no necessary.
Format:
httpget <url>
With HttpGet command you can do a lot of things.
For example:
- Retrieve your physical location:
httpget http://ipinfo.io/geo
Result is a JSON object
{
"ip": "8.8.8.8",
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.3860,-122.0840",
"postal": "94035",
"phone": "650"
}
- Control another Sonoff switch directly:
httpget http://192.168.1.130/cm?cmnd=power off
2019-02-18 15:41:40 -05:00
andrethomas
1da8f94a05
Introduce Reset 6
2019-02-18 21:52:22 +02:00
Theo Arends
3c3b5bb8ca
Add property Downtime
...
Add property Downtime to state and status 11 message representing the duration of wifi connection loss
2019-02-18 18:02:22 +01:00
Theo Arends
4884a94b6d
Add LinkCount and MqttCount
...
* Add property LinkCount to state and status 11 message representing number of Wifi Link re-connections
* Add property MqttCount to status 6 message representing number of Mqtt re-connections
2019-02-18 17:05:25 +01:00
Theo Arends
0658ae1959
Update sonoff_template.h
...
Fix compile error
2019-02-18 16:19:46 +01:00
Theo Arends
e898dc03e7
Add Wifi Link Connection Count
...
Add Wifi Link Connection (Retry) count to state message. Always starts with 1 being the initial connection.
2019-02-18 15:41:41 +01:00
Theo Arends
a6c7e3b5f4
Update xdrv_01_webserver.ino
...
Force restart on any template change to fix page refresh hang (#5222 )
2019-02-18 15:13:37 +01:00
Theo Arends
483eb4dd44
Change Flags to Options
...
Change Flags to Options and enforce Activate for already active template (#5256 )
2019-02-18 13:10:10 +01:00
Theo Arends
8d2b9e4734
Update xdrv_01_webserver.ino
...
Tune webserver
2019-02-18 11:35:49 +01:00
Theo Arends
c37a4a4398
Update xsns_01_counter.ino
...
Fix non floating point use function (#5265 )
2019-02-18 11:06:16 +01:00
znanev
bd582980e9
Abbreviate translation for D_SENSOR_USER
2019-02-18 09:52:29 +00:00
znanev
8c73cddfed
Update Bulgarian translations
2019-02-18 09:29:23 +00:00
Theo Arends
590c883bbe
Merge pull request #5262 from gfrancesco/development
...
Configuration parameter to send MQTT telemetry on status change
2019-02-18 10:15:29 +01:00
Andre Thomas
5b71095e02
Make sleep for light scheme0 optional
...
Make sleep for light scheme0 optional with compile directive (enabled by default)
2019-02-18 08:21:57 +02:00
Andre Thomas
cee9fee756
Make pwm scheme 0 sleep optional
...
Make pwm scheme 0 sleep optional (enabled by default)
2019-02-18 08:19:17 +02:00
gfrancesco
deeceaf2a0
Add configuration parameter to send MQTT telemetry on status change (SetOption59)
2019-02-17 22:05:02 +01:00
Theo Arends
2c51b8d95d
Merge pull request #5260 from spock64/development
...
mqtt password GUI aligned to revised wifi version
2019-02-17 21:54:49 +01:00
localhost61
ba7c4cd49b
fr-FR.h update
2019-02-17 21:32:07 +01:00
Jason
10bdb7c975
mqtt password GUI aligned to revised wifi version
2019-02-17 18:45:58 +00:00
Theo Arends
4d0ab9448d
Fix unsupported sensor ids
...
Fix unsupported sensor ids popping up after a config restore
2019-02-17 16:43:52 +01:00
Theo Arends
a201dd1222
Remove command SetOption62
...
Remove command SetOption62 as it's functionality is replaced by user changing the device template (#5255 )
2019-02-17 16:05:53 +01:00
Theo Arends
f33c59249e
Fix calibration calculation
...
Fix calibration calculation (#5246 )
2019-02-17 15:30:15 +01:00
Theo Arends
3f6db36187
Update xdrv_01_webserver.ino
...
Fix 404 error
2019-02-17 14:43:07 +01:00
Jason2866
94f1683616
Update de-DE.h
...
Template changes
2019-02-17 12:32:46 +01:00
Theo Arends
577791440e
Add Configure Template menu option
...
Add Configure Template menu option to GUI (#5222 )
2019-02-17 11:32:53 +01:00
Theo Arends
e2540f0afe
Update sonoff.ino
...
Prep for template menu
2019-02-17 10:42:55 +01:00
Xavier MULLER
f94c2245af
Update fr-FR.h
2019-02-17 01:02:52 +01:00
Xavier MULLER
4ed82140af
Update fr-FR.h
2019-02-17 01:01:26 +01:00
Theo Arends
ed0d50a3aa
Fix template support
...
Fix template support
2019-02-16 18:01:54 +01:00
Theo Arends
14d5f7fb54
Fix GUI password and Add rule expression
...
* Fix GUI wifi password acception starting with asteriks (*) (#5231 , #5242 )
* Add rule expression enabled by define USE_EXPRESSION in my_user_config.h (#5210 )
2019-02-16 16:17:17 +01:00
Theo Arends
7c9720de9d
Merge pull request #5210 from laurentdong/development
...
Introduce Expression in Rules - Updated
2019-02-16 15:49:46 +01:00
Jason
e6029e18be
Fix typos.
2019-02-16 12:51:43 +00:00
Jason
02f1052440
Amended wifi password UI to show "****".
...
Only store passwords which are not equal to "****".
Removes previous behaviour where wifi password with an asterisk was
ignored.
2019-02-16 12:48:16 +00:00
Theo Arends
1fde362998
Fix regression from 6.4.1.16
...
Fix regression from 6.4.1.16 where GPIO9 and GPIO10 connected devices did not work (#5197 )
2019-02-16 11:33:29 +01:00
Theo Arends
77db7ba0ff
6.4.1.17 Change template stability
...
6.4.1.17 20190214
* Change template update by removing possibility to add user module config keeping template as defined (#5222 )
2019-02-14 16:48:28 +01:00
Theo Arends
166a625eb8
Revert "Hide templated GPIOs"
...
This reverts commit 4af4ff681d
.
2019-02-14 11:13:47 +01:00
Theo Arends
4af4ff681d
Hide templated GPIOs
...
Hide templated GPIOs in user template too (#5222 )
2019-02-14 11:04:11 +01:00
Theo Arends
4e3d2c63db
Fix timer GUI tab colors
...
Fix timer GUI tab colors
2019-02-13 17:30:07 +01:00
Jason2866
75943f5ea4
Update de-DE.h
...
Changed Template to Vorlage
2019-02-13 17:19:57 +01:00
Theo Arends
8cb33b86cf
Fix compile error ( #5216 )
...
Fix compile error (#5216 )
2019-02-13 17:03:00 +01:00
Theo Arends
74affa1440
Fix Edge and Safari margins
...
Fix Edge and Safari margins
2019-02-13 16:26:16 +01:00
Theo Arends
c39e2da6b5
Update GUI
...
Update GUI
2019-02-13 16:05:25 +01:00
Theo Arends
b9f6bf402a
Add CFG_HOLDER to status 1
...
Add parameter CFG_HOLDER to status 1 message (#5206 )
2019-02-13 10:50:02 +01:00
Laurent
4b4b3709ad
Introduce Expression in Rules
...
Support use an expression as paramter in some rule commands, include Var<x>, Mem<x> and Ruletimer<x>.
Expression is constructed by constants (float number), variables (var<x>, mem<x>, Time, Uptime, Sunrise, Sunset), operators and round brackets.
Currently support 6 operators, order by priority from high to low:
^ (power)
% (modulo)
*, /
+, -
Commands examples:
Var1 3.14 * (MEM1 * (10 + VAR2 ^2) - 100) % 10 + uptime / (2 + MEM2)
Ruletimer4 Time - Sunrise + MEM2/2
2019-02-12 21:46:42 -05:00
Jörg R. Weimar
e8df8c4fa6
corrected sliding hour rounding for pixels < 60
2019-02-12 15:28:45 +01:00
Theo Arends
567bc93623
Add Template GUI update
...
Initial support for online template change using command Template or GUI Configure Other (#5177 )
2019-02-12 11:55:47 +01:00
Jörg R. Weimar
c05e42f563
Changed ws2812 clock to local time instead of UTC
2019-02-12 11:22:46 +01:00
Theo Arends
9dc445f949
Update xdsp_01_lcd.ino
2019-02-11 21:30:30 +01:00
Theo Arends
be82878bd2
Merge pull request #5196 from kevinbaluha/tsl2561interop
...
verify that tsl2561 works with new ads1115
2019-02-11 21:28:25 +01:00
Kevin Baluha
86a56b7b71
verify that tsl2561 works with new ads1115
2019-02-11 11:22:14 -07:00
Theo Arends
98ae3eaf54
6.4.1.16 Online template change
...
6.4.1.16 20190211
* Initial support for online template change using command Template (#5177 )
2019-02-11 19:21:49 +01:00
Theo Arends
de5023fb43
Fix LCD center text
...
Fix LCD center text (#5195 )
2019-02-11 16:53:46 +01:00
Theo Arends
7146b5fd4d
Fix LCD clipped center text
...
Fix LCD clipped center text (#5193 )
2019-02-11 15:43:02 +01:00
Gabor Simon
2d892f64cd
Init delay of SM16716 increased to 1 ms
...
As per measurements by @damondins:
https://github.com/gsimon75/Sonoff-Tasmota/pull/3#issuecomment-462059310
2019-02-10 08:33:05 +00:00
Theo Arends
e18263d796
Add optional smart plug
...
Add optional smart plug (#5171 , #5175 )
2019-02-09 17:01:44 +01:00
Theo Arends
cc8c13b240
Update xdrv_08_serial_bridge.ino
...
SerialBridge revisited
2019-02-09 16:08:09 +01:00
Theo Arends
b3d6857f6a
Remove duplicates
...
Remove duplicates
2019-02-09 15:04:58 +01:00
Theo Arends
3a59084377
Enable group status messages
...
Add status message to former declined group commands (#5145 )
2019-02-09 13:37:27 +01:00
Theo Arends
ab11096f3a
Add command SerialDelimiter 128
...
Add command SerialDelimiter 128 to filter reception of only characters between ASCII 32 and 127 (#5131 )
2019-02-09 13:25:15 +01:00
Theo Arends
10802d11dc
Update sonoff_template.h
...
Housekeeping
2019-02-09 13:24:35 +01:00
Theo Arends
78b2bd3bd5
Merge pull request #4991 from gsimon75/sm16716
...
Add support for the SM16716 RGB LED controller
2019-02-08 20:07:50 +01:00
Andre Thomas
c254410723
PN532: Add // #define USE_PN532_CAUSE_EVENTS
...
PN532: Add // #define USE_PN532_CAUSE_EVENTS
Forgot to include it in the my_user_config.h
2019-02-08 19:26:02 +02:00
Colin Kuebler
f1247a61e5
Renamed SM16716 PWR as per https://github.com/arendst/Sonoff-Tasmota/pull/4991#pullrequestreview-201622697
2019-02-08 12:10:01 -05:00
Gabor Simon
7b93df4978
Merge branch 'development' into sm16716
2019-02-08 20:00:53 +04:00
Theo Arends
953bcd26af
Update xsns_40_pn532.ino
...
Cleanup and use flush
2019-02-08 15:35:28 +01:00
Theo Arends
ae277f59cf
Change image defines
...
6.4.1.15 20190208
* Change image name BE_MINIMAL to FIRMWARE_MINIMAL (#5106 )
* Change image names USE_xyz to FIRMWARE_xyz (#5106 )
2019-02-08 14:55:45 +01:00
Theo Arends
bfcc357573
Housekeeping
...
Housekeeping
2019-02-08 14:25:46 +01:00