Commit graph

169 commits

Author SHA1 Message Date
Tobias Blum
1b79fa0874 Example line for static IP as discussed in https://github.com/toblum/McLighting/issues/187 2018-06-20 00:08:51 +02:00
debsahu
e499033ef3 Upgrade to ArduinoJSON 6.xx from 5.xx 2018-06-17 15:53:35 -04:00
debsahu
857763cdb4 fix typo
* fix typo assignment and comparison
2018-05-12 01:44:35 -04:00
debsahu
b104178b56 ArduinoJSON replies and strip.trigger() added
* Use ArduinoJSON to send JSON replies
* Add strip.trigger() according to
https://github.com/toblum/McLighting/issues/166
2018-05-11 17:21:12 -04:00
debsahu
d842c6293f versioning + update '/esp_status'
* Start of versioning v2.1, added version support
* '/esp_status' returns lot more info
2018-05-07 12:58:08 -04:00
debsahu
de5f11bab8 Add a check to MQTT_HOME_ASSISTANT_SUPPORT
there is some confusion on gitter on just enabling
MQTT_HOME_ASSISTANT_SUPPORT will enable ENABLE_HOMEASSISTANT. This is a
compiler check to make sure if MQTT_HOME_ASSISTANT_SUPPORT is enabled
ENABLE_HOMEASSISTANT must also be enabled
2018-05-07 12:38:23 -04:00
Tobias Blum
6db19b7555 Send Access-Allow-Control-Origin to allow easier AJAX requests 2018-04-30 02:22:06 +02:00
debsahu
7b49df36a7 no need to send mqtt message on ws call ~ 2018-04-29 01:53:37 -04:00
debsahu
25deb214a2 Code cleanup according to #154
https://github.com/toblum/McLighting/issues/154 needs testing before
merging with master
2018-04-28 18:46:16 -04:00
debsahu
250981ec4a Disable #define ENABLE_MQTT_HOSTNAME_CHIPID as default
* https://github.com/toblum/McLighting/pull/151
2018-04-24 16:27:34 -04:00
debsahu
cd4805a728 Removed ENABLE_HA_HOSTNAME_CHIPID
As per discussion in https://github.com/toblum/McLighting/issues/149
removed ENABLE_HA_HOSTNAME_CHIPID. No point in sending HOSTNAME+ChipID
to HA, just use this feature to create unique ID for MQTT clients.
2018-04-23 17:39:00 -04:00
debsahu
a27611b813 Add ChipID to hostname
* Address https://github.com/toblum/McLighting/issues/149
#define ENABLE_MQTT_HOSTNAME_CHIPID
#define ENABLE_HA_HOSTNAME_CHIPID
2018-04-23 15:55:47 -04:00
debsahu
ba5146d3d7 Use global variables to handle websocket request
modified handleSetWS2812FXMode to use global variables
2018-04-22 10:36:00 -04:00
debsahu
c1c24b42d0 Solve getstatus not return values correctly
Resolve https://github.com/toblum/McLighting/issues/146
2018-04-22 10:01:59 -04:00
debsahu
420909fb20 legacy animations optional
* Added Legacy animations as an option
* Removed ALL mode, replaced with ws2812fx_mode = FX_MODE_STATIC; mode =
SET_MODE;
* When mode == SET_MODE, set speed, color, etc automatically, needs a
new MODE prevMode
2018-04-14 19:19:44 -04:00
debsahu
ed5e4783be updates to previous fix
* updates to previous fix, solves
https://github.com/toblum/McLighting/issues/128
2018-04-12 18:46:10 -04:00
debsahu
a7cce99be3 fixes
* sets speed in getArgs() solves
https://github.com/toblum/McLighting/issues/128
* set strip.setColor in SET_MODE before strip.setMode solves
https://github.com/toblum/McLighting/issues/132
2018-04-12 14:44:42 -04:00
debsahu
f3b6abb52b fix amqtt credentials 2018-04-10 15:36:41 -04:00
debsahu
1560ac8704 UART method as an option 2018-04-10 01:06:47 -04:00
debsahu
b8bb6e8a14 httpUpdater.setup defined twice
merging error?
2018-04-09 20:51:18 -04:00
debsahu
09a26a750b fix #125 2018-04-08 18:18:33 -04:00
Tobias Blum
73f50595f7 Disable MQTT_HOME_ASSISTANT_SUPPORT by default 2018-04-08 20:55:40 +02:00
debsahu
68fc2bce4c Added MQTT Discovery
#define MQTT_HOME_ASSISTANT_SUPPORT // If defined, use AMQTT and select
Tools -> IwIP Variant -> Higher Bandwidth
2018-04-08 00:03:39 -04:00
debsahu
4d9b70d858 fixes to MQTT 2018-04-07 23:00:57 -04:00
debsahu
574c82b55d Messed Up Speed 2018-04-07 22:05:13 -04:00
Tobias Blum
f85805b598 Missing file for last merge 2018-04-07 21:58:17 +02:00
Tobias Blum
9b7ca2ac47 Merge branch 'debsahu/master'
Support for AMQTT, NEOANIMATIONFX
2018-04-07 21:57:21 +02:00
Deb
cb5930d12c
Oops no need to set mode to hold on speed change 2018-04-05 09:49:24 -04:00
debsahu
a3b950df5c Changed the need for seperate HA MQTT topic for speed 2018-04-04 21:34:00 -04:00
debsahu
2a193ff445 Send back speed to HA 2018-04-04 17:37:11 -04:00
debsahu
4dc09f37c9 Updates
* Added support for NeoAnimationFX (USE_NEOANIMATIONFX)
* Better scaling for speed
2018-03-29 23:49:18 -04:00
debsahu
e3060fa7ee MQTT Callback for REST API
* SetBrightness fix from REST API callback from Master
* Added twinkleRandom to REST API (missing?)
* MQTT callback
2018-03-26 16:45:00 -04:00
Tobias Blum
252ae8e2af Changes as proposed in issue: [toblum/McLighting] Set brightness issue (#112) 2018-03-24 23:12:39 +01:00
debsahu
2bc1a68fb3 Update MQTT if WebSockets are changed
Addresses https://github.com/toblum/McLighting/issues/110
2018-03-23 21:43:24 -04:00
debsahu
980bd40567 Forgot to save "speed" in spiffs, set strip mode after read
* Added speed to SPIFFS save
* Should set strip state after succesful read.
2018-03-23 20:43:51 -04:00
debsahu
8b21969784 Stability updates, save state on SPIFFS, MQTT QOS
Modified
* Better implementation of tickers (recommended)
Added
* Save State on SPIFFS (alternative to EEPROM) EEPROM has finite write
cycles.
* Added Custom MQTT QOS levels, as AMQTT can handle QOS level 0,1&2 in
both publish and subscribe. Pubsub can only sunscribe in QOS 1&2,
publish at QOS 1 only.
2018-03-23 13:00:03 -04:00
debsahu
583d1396b7 Speed and Stability updates
If LEDs>100, stalls ESP8266. So bunch of code cleanup and merge with
existing variables used by other sections. Should be more efficient. As
of now on Arduino ESP 2.4.1, WiFi.setSleepMode(WIFI_NONE_SLEEP); is
required for MQTT function. ESP8266 is anyways connected to constant
power supply, so power consumtion is not immidiate concern now.
* HTTP OTA
* Arduino OTA
* Async MQTT
* PubSubClient
* HomeAssistant
2018-03-20 19:08:18 -04:00
Tobias Blum
445e663ca0 Add ESP8266HTTPUpdateServer as alternative 2018-03-18 01:47:13 +01:00
Tobias Blum
47309501b1 Set MQTT Client ID to HOSTNAME 2018-03-18 00:41:29 +01:00
Tobias Blum
bb6958aa00 Fix button code 2018-03-18 00:41:05 +01:00
Tobias Blum
075fd67f5c Merge branch 'feature/ha_integration' 2018-03-18 00:12:28 +01:00
Tobias Blum
e3997ac042 Add informational output 2018-03-17 23:59:46 +01:00
Deb
88cd8d7961
forgot to subscribe to mqtt_ha_speed 2018-03-13 23:03:40 -04:00
Debashish Sahu
0da3e90f71 increase stability. no need for home/<HOSTNAME>_ha/out to be subscribed. 2018-03-13 20:58:41 -04:00
Deb
e7fb54f717
Added updates from main branch to here
button press is published on mqtt #98
2018-03-13 15:27:41 -04:00
Deb
d7c0113110
moved sendState before webSocketEvent 2018-03-12 22:53:40 -04:00
Deb
69a22006c8
Updates HA when changes happen from WebSockets or MQTT
Websockets and MQTT components are separate from HA MQTT JSON. Now if either is changed, HA JSON MQTT component is updated.
2018-02-28 12:55:29 -05:00
ghwc2015
b75a2c4138
set buttonState for medium and long keypress
buttonState (on/off) was only set for short button press - now is set to on also for medium and long press
2018-02-23 07:55:19 +01:00
ghwc2015
763b9855bb
linefeeds removed 2018-02-23 07:42:19 +01:00
ghwc2015
8947ea108b
button press mqtt publish 2018-02-23 07:39:58 +01:00
Deb
75ae63ddb9
HASS sends mode names that match WS2812FX mode names 2018-02-18 15:52:57 -05:00
Tobias Blum
5fed3a4651 Cleanup 2018-02-17 23:30:43 +01:00
Tobias Blum
191c45f014 Make Homeassistant part configurable 2018-02-17 23:25:22 +01:00
Deb
870c47ef45
MQTT JSON Added
Compile with #define MQTT_MAX_PACKET_SIZE 512 modified in PubSubClient library. Default is #define MQTT_MAX_PACKET_SIZE 128. Will not work here.
2018-02-15 13:11:03 -05:00
Deb
1955cbb096
MQTT JSON component added
Compile with #define MQTT_MAX_PACKET_SIZE 512 modified in PubSubClient library. Default is #define MQTT_MAX_PACKET_SIZE 128. Will not work here.
2018-02-15 13:09:27 -05:00
Deb
5b1f020f02
Update definitions.h 2018-02-12 22:47:02 -05:00
Deb
58afbc65e3
Update definitions.h 2018-02-12 22:44:23 -05:00
Deb
462607f29a
Add files via upload 2018-02-12 22:43:26 -05:00
Deb
0c98a1c16b
Subscribe to HA MQTT topic
Subscribe to HA MQTT topic
2018-02-12 16:33:08 -05:00
Deb
daf263a2ca
Adding support for Home Assistant
Don't know if this the most memory efficient way, but my first attempt at integrating into HA. A better implementation would be using Arduino JSON.
2018-02-12 15:11:40 -05:00
Deb
6ab2e6ee38
Adding support for Home Assistant
Don't know if this the most memory efficient way, but my first attempt at integrating into HA. A better implementation would be using Arduino JSON.
2018-02-12 15:09:13 -05:00
Tobias Blum
f00fdfab33 Add links to user manual 2018-01-21 01:05:21 +01:00
Tobias Blum
6f15629072 Disable button by default 2018-01-21 00:45:03 +01:00
Tobias Blum
1380fe8cac Merge with master, reformat 2018-01-21 00:25:50 +01:00
Tobias Blum
92a654b845 Merge branch 'feature/button_support' 2018-01-21 00:11:04 +01:00
Tobias Blum
e64b3991b8 Adapt pull request to McLighting 2018-01-21 00:10:20 +01:00
Tobias Blum
befcebbe9c Fix for MDNS reponder
https://github.com/toblum/McLighting/issues/85
2018-01-20 22:07:37 +01:00
Szép Norbert
84bf3fe255
Added support for input switch
Support one input switch for ON/OFF the LED strip. Also possible to program three modes (short / medium / long press)
2018-01-18 12:21:26 +01:00
Tobias Blum
970c790558 Fix for https://github.com/toblum/McLighting/issues/83 2018-01-14 21:23:17 +01:00
Tobias Blum
3d37c7e60f Add wifi_station_set_hostname(HOSTNAME); to make
https://github.com/toblum/McLighting/issues/79
2018-01-13 23:52:47 +01:00
Patrik Mayer
321c972811 added BUILTIN_LED for ESP-12F 2018-01-12 20:32:02 +01:00
Tobias Blum
8f3deb5f72 Merge branch 'feature/save_state' 2018-01-06 22:40:03 +01:00
Mordy Ovits
d4de45d4fb
Fix cut-and-paste error in request handler comment 2017-12-25 19:44:07 -05:00
Tobias Blum
9dfcf2a391 Initial version with state save 2017-12-18 00:32:01 +01:00
Tobias Blum
2e58d55eec Convert new WS2812FX spped format to McLighting
Keep McLighting speeds (0-255) unchanged and convert to WS2812FX speeds. (65535-0)
2017-12-16 23:43:57 +01:00
Matt Johnson
066c8a47cb remove unnecessary lines 2017-11-23 01:27:35 +00:00
Matt Johnson
e34ffcb983 this debug printf fixes things... WTF 2017-11-23 01:24:37 +00:00
Matt Johnson
19dbd5ccdb example working rewrite of handleSetSingleLED(). Fixes LED's between 80-99 for me 2017-11-23 01:14:24 +00:00
Matt Johnson
a38e386577 Remove unnecessary loop from handleSetSingleLED() 2017-11-22 23:26:42 +00:00
Matt Johnson
d5befdb3eb Padded single digit LED identifiers to two chars (01,02 vs 1,2 etc) 2017-11-22 23:20:10 +00:00
Matt Johnson
7a059a1a14 Support LED ranges via MQTT/WS aka R0110ffffff 2017-11-22 16:16:41 +00:00
Tobias Blum
e79524ed8e Fix for empty intopic?
https://github.com/toblum/McLighting/issues/52
2017-11-05 01:12:51 +01:00
Tobias Blum
a025e0a35a Add new + command also to MQTT
See: https://github.com/toblum/McLighting/pull/45
2017-10-29 00:20:57 +02:00
Tobias Blum
e3a4690693 Add support to light multiple LEDs with one command
https://github.com/toblum/McLighting/pull/45
2017-10-29 00:14:57 +02:00
Tobias Blum
e09957d032 Bugfix: Single LED, index was interpreted as HEX instead of DEC.
https://github.com/toblum/McLighting/issues/44
2017-10-28 23:37:03 +02:00
Tobias Blum
3ba9f1b950 Add /get_speed and /set_speed endpoints
Like proposed in https://github.com/toblum/McLighting/pull/49
2017-10-28 22:07:07 +02:00
Tobias Blum
8bd3c176fe Merge branch 'patch-1' 2017-10-28 21:46:10 +02:00
Tobias Blum
5665545f8f Remove useless sample code 2017-10-25 22:09:06 +02:00
carstenpi
2e5c79791d Added Get/Set Delay to Rest Api 2017-10-23 17:11:47 +02:00
Tobias Blum
47e5afd1dd Adopt changes to HTML source 2017-09-29 23:48:29 +02:00
Keith Lord
bc2984cffc Added auto cycle feature 2017-09-19 18:31:03 -04:00
Tobias Blum
ae371e0844 Bugfix issue: Just a flicker on WS set single pixel command #31
See: https://github.com/toblum/McLighting/issues/31
2017-08-19 23:36:23 +02:00
Tobias Blum
32bb5ed7ac Added hint to pubsubclient length issue
https://github.com/knolleary/pubsubclient/issues/110
2017-08-19 22:27:36 +02:00
Tobias Blum
91571eafcc Limit number of MQTT connection tries
as proposed by @nimbl at https://github.com/toblum/McLighting/issues/22
2017-08-19 22:22:36 +02:00
Tobias Blum
ab9253abde Issue: Memory leak in MQTT callback function #32
https://github.com/toblum/McLighting/issues/32
added free()
2017-08-19 21:29:27 +02:00
Tobias Blum
88b476db51 Handle empty mqtt_host, add /start_config_ap 2017-08-07 23:05:07 +02:00
Tobias Blum
065ae09cea Cleanup 2017-08-06 23:36:34 +02:00
Tobias Blum
0895d542a3 Make MQTT params configurable
Saving into EEPROM
2017-08-06 23:34:59 +02:00
Tobias Blum
20941906e1 Add: MQTT user / pass 2017-08-06 21:36:30 +02:00
Tobias Blum
c160b910d9 Bugfix: payload parsing 2017-08-06 21:20:16 +02:00