Commit Graph
52 Commits
Author SHA1 Message Date
Florian 1a0dacaf3f Remove mono core option for ESP32 BLE
this options is no longer used as now the ESP32 is a stable board with multicore option activated
2019-06-21 23:03:37 +02:00
Florian bc847684f9 correct LYWSD02 not displayed with HM10
#412
2019-06-21 21:51:31 +02:00
Florian de93fd0da0 Avoid publishing of home presence data for HASS when WL or BL are set 2019-06-21 20:22:11 +02:00
Florian 1ef8fff99e Init white and black list to avoid random values
enable to prevent the gateway for filtering not black listed sernsor (this bug apply only with HASS autodiscovery)
2019-06-15 20:54:53 +02:00
Florian 03eba41084 Integrate cleargrass temp and humidity indoor sensor
ESP32, HM10 and discovery with HASS
2019-06-11 21:44:20 +02:00
Florian 4ba27481b5 add of Xiaomi Mijia BT4.0 clock temperature and humidity sensor (LYWSD02)
and enable multiple services data readings for Mijia standard device. Indeed the new version seems to publish several service data compared to old ones.
Please note that I'have update the library with the work of @fguiet
see: https://github.com/nkolban/ESP32_BLE_Arduino/pull/24
2019-05-30 13:37:23 +02:00
Marcin Domański f80d7f4581 Add is_defined filter to the value_template (#403)
Without the is_defined filter home assistant will reset the value to an empty string every time a topic is posted without the value template ie when `home/OpenMQTTGateway/BTtoMQTT/--SNIP-- {"moi":2}` is posted - all other sensor with associated topic `home/OpenMQTTGateway/BTtoMQTT/--SNIP--` will get `""` as their value
2019-05-19 13:13:38 +02:00
1technophile 56bfef8e9c set BLE scans interval per mqtt and on demand BLE scans
#373
to change the BLE scan interval publish a payload {"interval":66666} in
ms to "home/OpenMQTTGateway/commands/MQTTtoBT/set"
to generate a scan publish a 0 interval payload {"interval":0}
2019-04-28 15:06:23 +02:00
Florian 5bc0d4d532 Correct return always false when using HM10 and return number instead of char array for sensors values 2019-04-01 22:30:47 +02:00
Florian bbb4dd3065 remove optimistic and retain flag from auto discovery
#361

and add some json buffer size to avoid identifier lost
2019-03-19 21:38:40 +01:00
Florian 60f68d00f4 publish discovery for sensors BLE once per run, add ble white and black list
Avoid publishing auto discovery on a time basis
publish auto discovery only one time per BLE sensor
add BLE white and black list implementation
set black list
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/set -m '{"black-list":["012314551615","4C6577889C79","edfrgtyjulik"]}'
set white list
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/set -m '{"white-list":["012314551615","4C65A5553C79","edfrgtyjulik"]}'
2019-03-18 23:29:47 +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 97e8217380 a first try for mi flora and mi jia auto discovery on hass
#361
2019-03-01 23:50:30 +01:00
Florian c37a1d28ee Enable to switch HM1X led by a macro
#357
if //#define HM_BLUE_LED_STOP true uncommented
the HM1X led is off
2019-02-15 20:58:40 +01:00
Florian c7fe43eb97 code cleanup and improvment (#339)
* replace string by char array comparison

* take mac adress from user_config for arduino ethernet shield

* remove code for managing HM10 with version < v6xx

* add sys measure call for arduino mega

* code size decrease and optim
2019-01-05 18:11:30 +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 ed44418a7f wdt tip add and presence detection improvments
-improve distance measurement
-add wdt prevent tip
-add conditional macro haroompresence
2018-12-10 21:19:21 +01:00
animavitis a74eb76931 fix ESP32 ble (#304)
* remove redundant code for home presence

* hopefully fix ESP32 BLE hangs

* basic support for duplicate detection when JSON publishing is active
2018-11-09 22:19:02 +01:00
animavitis 07445a278b remove redundant code for home presence (#303) 2018-11-08 21:26:57 +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
animavitis f77df7347f Add Home Assistant MQTT room presence support (ESP32 only) (#294)
* Add Home Assistant MQTT room presence support

ESP32 only
2018-11-02 08:30:33 +01:00
Florian 69e0428084 correct impossibility to read value with HM10
#281 and make the code more flexible (deduct an offset from a key value instead of fixed offset)
2018-10-13 21:44:23 +02:00
Florian bf7e4f1240 change OMG version and some comments change 2018-09-13 21:11:39 +02:00
f-reiling f7eb0b1921 Added decode for battery level and combined temperature/humidity (#265) 2018-09-09 21:54:21 +02:00
Florian e0fe3b721b add MQTT publishing of service data from BLE devices (#264)
* add MQTT publishing of service data from BLE devices

* add service data publishing to HM1X setups
2018-09-09 10:45:07 +02:00
Florian 9b258723a8 correct wrong subject call when using HM10 <6xx ZgatewayBT
#225
and some traces improvments
2018-07-14 14:20:48 +02:00
Torwag 7905910981 ZgatewayBT.ino: Small documentation for the different sensor signals (#222)
This PR add a small documentation to make people aware which sensor unit is going to send what kind of data.
2018-06-30 15:17:16 +02:00
Florian c0fca71619 remove string in trace call
so as to decrease sketch size
2018-05-16 21:56:29 +02:00
Florian ec7cee8f3e publish rssi value to a dedicated mqtt subject
#201 and put defines for other sub subject names
2018-05-12 15:25:57 +02:00
Florian d4ce6e4b64 add compatibility with mi jia (#199)
mi jia temperature and humidity measurement

https://1technophile.blogspot.fr/2018/05/openmqttgateway-now-reads-xiaomi-mijia.html
2018-05-03 22:44:16 +02:00
Florian 566a43f2e8 using wrong compiler condition statement
#186
2018-03-21 22:19:27 +01:00
Florian f515f9c03a per default deactivate multicore for BLE on ESP32
#173
2018-03-19 21:16:47 +01:00
1technophile 638817678d reinit BLE each time we launch a scan to avoid BLE stop
#173
2018-03-01 07:49:18 +01:00
1technophile 597a18165f when temperature are negatives values are not corrects
indeed if negative temperature the hex value is of type 0xffe9 for
example giving a number > 65000, to deduct the negative value we need to
substract 0xffff to the hex value
2018-02-27 13:56:32 +01:00
1technophile f9f04494fa don't recreate callback at each scan to avoid memory consumption
#173
2018-02-17 08:28:19 +01:00
1technophile 8e974ccad9 add manufacturer data and txpower retrieving with ESP32
#80
2018-01-07 14:32:12 +01:00
Florian ebf82fbb38 Add MDNS for ESP8266 (#153)
With ESP32 MDNS causes BLE to don't work properly
2018-01-06 09:42:27 +01: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
1technophile 38665ecc2a arduino compatibility correction 2017-11-25 14:44:52 +01:00
1technophile 1158161a8d put per default the new code with mi flora integration
#100
2017-11-24 23:24:54 +01:00
Florian af5e4e8ec9 Zgateway srfb (#143)
* compatibility with sonoff rf bridge

#81

* update extract_char call
2017-11-24 23:00:21 +01:00
1technophile d094ff3b74 code factoring and improvments
-code factoring by structure use
-present temperature without division per 10 need
-upper case for the mac adress
-correct rssi value
2017-11-10 23:56:09 +01:00
1technophile 26ecec3d86 Integration of mi flora sensor
#100 mi flora beta integration
not integrated per default, so as to enable mi flora reading you must
comment ZgatewayBT_stable into config_BT.h
2017-10-27 00:47:35 +02:00
1technophile 7dbfa6f9ce try to correct random restart of ESP8266 when clone HM10 are connected
#112
2017-09-30 14:18:40 +02:00
1technophile 17a7294c94 moves some parameters to config files 2017-09-06 22:14:36 +02:00
1technophile 9e9a2cd191 MIT -> GPL V3
#51
2017-06-02 23:18:00 +02:00
1technophile 37842bd0c4 sometimes strange partial response are given by serial
Avoid publishing them
2017-05-19 22:24:36 +02:00
1technophile 2ea2576d8d correct pin and unsigned long time with ZsensorDHT
#48
2017-05-19 20:15:25 +02:00
1technophile c0879e8d22 Arduino compatibility for HM10
#19
2017-05-06 23:07:24 +02:00
1technophile a644f1e5d3 comment modification 2017-05-05 12:22:36 +02:00