Commit Graph
47 Commits
Author SHA1 Message Date
Marcelo Aquino 0c11354a2a Fix Client Mode for Ethernet gateway
If MY_GATEWAY_CLIENT_MODE or MY_CONTROLLER_URL_ADDRESS are present, set
MY_GATEWAY_CLIENT_MODE.
MY_USE_UDP requires that MY_GATEWAY_CLIENT_MODE is set.
Add some ifdefs to filter some variables not needed in client mode.
Using global variables to keep the connection to controller open
therefore, no need to reconnect every time we need to send/receive
something.
Add the remaining code to handle incoming messages from controllers.
2016-09-28 15:18:26 -03:00
Embedded Innovation 8ccb1ca86d Fix gateway RX indication
Added GW RX indication for MQTT and Serial gateway (PR #585).
Only send RX indication when valid message has been received.
2016-09-22 18:21:02 +02:00
Henrik Ekblad 75a100f4e9 Merge pull request #570 from marceloaqno/development-serialmode
Add ESP8266 Serial modes
2016-09-20 09:12:01 +02:00
Henrik Ekblad e89e411571 Merge pull request #558 from tekka007/SleepRework
Redesign sleep() functions
2016-09-19 21:35:54 +02:00
Olivier ec6b6ea2bf Refactor and doxygenize EEPROM address definitions (#582) 2016-09-19 21:31:00 +02:00
tekka007 a6cdec2008 Redesign sleep() functions
- unified sleeping function _sleep(), including smartSleep
- prevent sleeping if transport is not ready
- add debug log messages
2016-09-19 19:17:08 +02:00
Marcelo Aquino ebdaedb514 Add ESP8266 Serial modes
SERIAL_TX_ONLY allows to use RX (GPIO3) as a general purpose
input/output
SERIAL_RX_ONLY allows to use TX (GPIO1) as a general purpose
input/output
2016-08-28 09:37:31 -03:00
Marcelo Aquino 48e90983ac Add random number initialization to MyHw layer 2016-08-21 23:42:44 -03:00
Thomas Mørch 15b46f8023 Fixes LED issues as discussed in #562
Removing MY_LED_BLINKING_FEATURE, as we now are
using MY_DEFAULT_LED_xx_PIN defines to enable
LED blinking feature.

updated Gateway sketches to not refer to
MY_LED_BLINKING_FEATURE any more

fixes #562
2016-08-20 09:35:49 +02:00
Henrik Ekblad f9c36c9b74 Merge pull request #554 from tekka007/UpdateOTALogs
Update FW OTA logs and doxygenize lib
2016-08-13 14:22:43 +02:00
Henrik Ekblad 471785316e Merge pull request #553 from tekka007/FixHwDebugPrint
Remove duplicate va_end()
2016-08-13 14:21:21 +02:00
tekka007 9dcb06cdc5 Reorganize RX message buffering checks
- fix doxygen warning
2016-08-13 13:07:16 +02:00
tekka007 cc08240e5d Update FW OTA logs and doxygenize lib 2016-08-13 08:58:37 +02:00
tekka007 9441b30d30 Remove duplicate va_end() 2016-08-12 16:28:31 +02:00
tekka007 94348cec1a Limit payload size to MAX_PAYLOAD_SIZE 2016-08-10 12:08:44 +02:00
Henrik Ekblad dc99e8a8d4 Merge pull request #550 from tekka007/MySensorsBegin
Add debug output if before() and setup() called
2016-08-09 21:14:14 +02:00
tekka007 e9b1ab287c Add debug output for before() and setup() 2016-08-09 21:03:18 +02:00
tekka007 a1a5d0d707 Rename macro param (_msg) to avoid confusions 2016-08-09 12:07:23 +02:00
Henrik Ekblad 67e720394e Merge pull request #548 from tekka007/UseMsgTmp
Use _msgTmp to build messages
2016-08-09 09:12:17 +02:00
Henrik Ekblad c85de960d4 Merge pull request #547 from tekka007/MyMessageUpdate
Set protocol version in MyMessage::clear()
2016-08-09 09:11:52 +02:00
tekka007 6bc4a374ed Use _msgTmp when building messages 2016-08-08 19:49:18 +02:00
tekka007 de896e1827 Set protocol version in MyMessage::clear() 2016-08-08 17:54:05 +02:00
tekka007 e7682cf006 Harmonize message type names 2016-08-08 17:37:42 +02:00
Martin Hjelmare d054c1c0c8 Update doxygen docs with new smartSleep behavior (#545)
* Update doxygen docs with new smartSleep behavior

* Update docs to new behavior.
* Add info on how to set wait time in smartSleep.
* Fix incorrect docs regarding return value of smartSleep.

* Update docs for return value of all sleep methods

* Clarify the return value of the sleep methods, suggested by
  @mfalkvidd.
2016-08-06 14:39:12 +02:00
Embedded Innovation 6bdde5b1ac Add missing GOT_PARENT indication (#541)
* Add missing GOT_PARENT indication

* Fix tabs
2016-08-05 18:37:17 +02:00
Embedded Innovation 5d7f2fe38b Fix delegating constructor 2016-08-05 12:41:53 +02:00
Embedded Innovation 7d84878cb0 Correctly initialize MyMessage 2016-08-05 12:18:24 +02:00
Thomas Mørch 3ba13f1c8c Added production SensebenderGW sketch
preHwInit also added to hook into core startup
before hwInit is called
2016-08-02 23:39:18 +02:00
Martin Hjelmare b293f47a7f Fix smartsleep (#535)
* Make smartSleep send heartbeat before sleeping

Sending the heartbeat (and waiting) after waking up would delay
processing inputs. For example, a switch could be back to the
open state before the wait is over.

* Fix typos in comments in smartSleep methods
2016-08-02 22:21:14 +02:00
Embedded Innovation 99973a346e Add nRF24 receive message buffering (#538)
* Add critical section support

Allows defining a code block which is executed as a critical section.
Supports AVR, ESP8266 & SAMD.

* Add receive message buffering

When MY_RF24_IRQ_PIN is defined (and connected), a buffer will be used
to retrieve & store messages received by nRF24 as fast as possible.
This reduces the chance of losing messages due to a busy
microcontroller.
nRF24 SPI rx message transfer is running from interrupt context when
MY_RF24_IRQ_PIN is defined. If this transfer takes too long, serial
characters received will get lost. Therefore serial rx is enabled during
SPI transfer of nRF messages.

Limitations: Only AVR/SAMD & nRF24L01+ combinations can buffer rx
messages.
nRF24L01+ IRQ pin should be connected to AVR.
Tested on W5100- & Serial-gateway.

SAMD has not been tested yet!

* Fix Doxygen warnings

* Fix more Doxygen warnings
2016-08-02 22:20:25 +02:00
Henrik Ekblad 37119b2a3a Present locally attached sensors and node when missing radio (#532)
* Present locally attached sensors and node when missing radio

Fix #524

* Combining gateway and node presentation.
2016-08-01 23:59:31 +02:00
Henrik Ekblad e475be2980 Merge pull request #533 from tekka007/TransportUpdate
Fix compatibility issue with nRF clones, update documentation
2016-08-01 23:58:57 +02:00
Henrik Ekblad 74556d2d2d Merge pull request #526 from tekka007/CoreDebugMessages
Cleanup debug messages in MySensorsCore
2016-08-01 23:54:12 +02:00
tekka007 ce61b286d5 Cleanup debug messages in MySensorsCore 2016-08-01 14:51:56 +02:00
tekka007 26f20b0e3b Fix compatibility issue with nRF clones, update documentation 2016-08-01 14:10:47 +02:00
Henrik Ekblad ba6fae7596 Fix #449, Fix #507 2016-07-31 15:25:55 +02:00
Henrik Ekblad 929b001305 Merge pull request #522 from tekka007/TransportUpdate
Updates to MyTransport
2016-07-29 00:14:35 +02:00
tekka007 24e3dfa36c Updates to MyTransport 2016-07-27 23:10:02 +02:00
tekka007 56693d5b73 Bumped version to 2.0.1-beta 2016-07-21 21:53:13 +02:00
Patrick Fallberg dda9cefd93 Merge pull request #517 from tekka007/ChangeInitOrder
Calling WiFi.config() before WiFi.begin()
2016-07-17 13:50:03 +02:00
Patrick Fallberg 934ccf30b2 Merge pull request #513 from tekka007/ShiftSetup
Call _nodeRegistration() before setup()
2016-07-17 13:49:46 +02:00
Embedded Innovation 83cbb921f5 Unify interrupt handling (#520)
ATMega328 hardware abstraction used a mix of AVR cli/sei and Arduino
noInterrupts/interrupts calls.
Changed to use AVR cli/sei only.
2016-07-17 10:28:00 +02:00
Embedded Innovation 1305aeca8a Fix race in sleep with interrupts (#519)
* Interrupts occurring during sleep-setup possibly fail to wake mcu
* Detach interrupt handler in interrupt handler to correctly handle
level-interrupts
2016-07-17 09:52:56 +02:00
Thomas Mørch f0f2542df4 Various fixes for SAMD (#510)
* Only serial GW should hold back on USB

* Fixing some examples on archs other than avr

* HwInit() is needed on samd, to init I2C
2016-07-16 10:01:28 +02:00
tekka007 312a69bb6c Calling WiFi.config() before WiFi.begin() 2016-07-14 21:48:01 +02:00
tekka007 eeee3310f9 Move setup() call after node registration 2016-07-13 21:16:50 +02:00
Thomas Mørch ba6bb915c2 Reorganizing library structure, prep for 2.0.0 2016-07-09 21:17:37 +02:00