Commit Graph
11 Commits
Author SHA1 Message Date
Florian e6191915e3 correct json buffer size optimizations 2019-03-19 21:47:29 +01:00
Florian da859cc6ae Some memory optimization for Arduino UNO following this thread:
https://community.openmqttgateway.com/t/arduino-uno-ethernet-shield-reboots-on-receiving-rf-signal-on-v-0-9/346/22
Rework led management to avoid use of global variables
and specify special JSON_MSG_BUFFER for arduino UNO
led can now be used for all the boards

generalize use of F macro
for memory optimization
change jsonbuffer calculation method
reduce pubsubclient max packet size for uno and nano
2019-03-09 17:28:54 +01:00
Florian 68352f10e6 differentiate receiving and publishing mqtt for the new json option in user_config.h
#318 so as to avoid user with non modified controllers to have regression on receiving (per default receiving is activated for both json and simple and prioritary analysed for json)
2019-01-09 21:01:38 +01:00
Florian 133e9cd33a Mqtt discovery for ha (#323)
* MQTT discovery factoring

* add DHT discovery

* BME topic macro change

* add sensors to ha discovery

* correct a comment typo #327

* let the possibility at buildtime to don't publish service data

* reduce string usage

* change MQTT ONOFF actuator to ON OFF commands instead of true false

* add ZactuatorONOFF discovery

* add simple publishing for GPIO input

* Add RF switch and gateway discovery
2018-12-16 17:05:30 +01:00
Florian d8dba15a81 Publish refactoring (#298)
* factoring of the publishing function
* integration of json publishing to MQTT
* receiving and transcode json messages from mqtt
* replace the TRACE runtime condition by a buildtime one so as to decrease program size
* remove retainFlag parameter not necessary for the moment
* Increase the scope of tests for arduino mega and esp32
* Update arduinojson library to 5.13.3
* add macros to choose between simple or json publishing or both
* differentiate build test for ATmega2560
* correct wrong sprintf definition
* change IDE version for continuous integration
* let default warning level in arduino ide
* correct pins for ESP32
* reorganize user_config
2018-11-05 22:02:27 +01:00
Florian c0fca71619 remove string in trace call
so as to decrease sketch size
2018-05-16 21:56:29 +02:00
Florian 7c6e0ccf61 Esp32 compatibility (#145)
* esp32 init

* RF gateway ok with ESP32

* correct IR gateway compilation errors and test RF2 ok

* divide config per board type

* update test file according user_config

* differentiate variable type following IR libraries aka platforms

* implement BLE beacons detection with ESP32

* Implement multitasking on BLE gateway

* Library add and change core assignement

* change core assignement for BLE

* add mi flora value readings with ESP32

* adding some traces and removing unecessary comment

* correct compilation error due to pin assignement

* correct temperature float value and wrong mac adress rssi publishing

* add esp32 to CI

* correct esp32 ide retrieving

* correcting paths

* CI: correct architecture
* libraries update (irremote) and overwrite ble library files
2018-01-01 18:50:45 +01:00
Philippe LUC 254e616f31 Some code clean, and buffer overflow prevention (2) (#126)
* Remove trailing whitespaces

* RFM69toMQTT: Add the emitting nodeID to the topic, +

 - And remove radio.receiveDone() that is unecessary.
 - Send the ACK before the publish to MQTT, to be faster
 - Prevent buffer overflow, Terminate the data with a "\0"
   - Fix issue with the sender doesn't end its string with "\0"
     and rely only on DATALEN.

* Change topic subjectGTWRFM69toMQTT to be distinct from the commands

 + comments

* MQTTtoRFM69: deduplicate the code

 - Check once and only once if the topic is good.
 - Have or not RCV_ marked doesn't change the structure, as
   valueRCV is correctly set anyway
 + realign

* MQTTtoRFM69: Limit the size of the data

 - Cut the packet to the limit of what can transmit RFM69
   - and terminate the string

* RFM69toMQTT: ACK MQTT message on subjectGTWRFM69toMQTT now contains the nodeID

* RFM69: Publish to MQTT the RSSI on transmit and ACK
2017-10-01 15:50:25 +02:00
1technophile 2c9e584ff2 Haven't seen this one and codacy to
remove unecessary break statement
2017-09-16 15:39:19 +02:00
1technophile 2885a86ef9 some minor code cleaning 2017-09-16 15:33:44 +02:00
Florian ba51e340d2 Zgateway rfm69 (#88)
* some minor correction after coadcy checks

* Put serial communication speed as a parameter in user_config.h

* complete gateway file

receiving ok
sending ko
#32

* add rfm69 to CI

* change receiver key and minor improvments

#32

now ok on receiving and sending with RFM69

* add schema and tested pinout for RFM69/RF/IR wiring

#32

* RFM69 library add
2017-09-01 00:31:49 +02:00