Commit Graph
31 Commits
Author SHA1 Message Date
Leon Kiefer 10a9d00aaf Added clang-format (#623)
* added .clang-format
* added names to travis jobs
removed deprecated travis option
* check github action
* added .gitignore
2020-06-09 16:09:23 -05:00
Florian 661ef9c55e Refactor BLE gateways (#617)
* Refactor BLE gateways:
-merge HM10 and ESP32 code
-publish sensor values with the other BLE device parameters to avoid MQTT multiple publication
-make uniform the case of mac adress id between HM10 and ESP32
-add the possibility to remove service data publishing either when sensors is recognised or not
-correct manufacturing data display
-merge process cleargrass methods
-check service data validity before processing
2020-06-05 08:09:49 -05:00
Florian f6fa1e52da Hm10 details (#614)
* Add infos and change HM10 speed to a macro
* remove unnecessaries macros
2020-05-12 20:27:05 -05:00
Florian 489ce99659 Implement OpenHAB autodiscovery (#612) 2020-05-12 15:05:37 -05:00
Florian a82bbe684a Optimizations when using low power mode (#608) 2020-05-07 17:28:27 -05:00
Jonathan 9fc5ba99f5 Allow pins/settings to be defined in INI file (#597)
* Allow pins/settings to be defined in INI file

* Open to make publishing ManufacturerData optional
2020-05-03 08:56:40 -05:00
Jonathan 125e7d4f70 Fixing Issues #593 & #591 (#594)
* Add condition to check Low Power Mode

* Added WeatherStation libs platform.ini
2020-05-01 08:18:56 -05:00
Florian 30147140bd Add M5 boards compatibility and low power mode (#586) 2020-04-26 19:56:10 -05:00
ThomasL 133d4c6467 Fixed invalid device_class values (#572)
Removed device_class values unknown to Home-Assistant. Fixes #570 and fixes #571.
2020-03-21 15:07:46 -05:00
Peter Becker 033a583f0a remove duplicate code in main\ZgatewayBT.ino (#557)
* merge duplicate code into function setWorBMac

* rename setWorBMac to updateWorB

* add helper getDeviceByMac

* change updateWorB to use helper getDeviceByMac

* change isWhite to use helper getDeviceByMac

* change isBlack to use helper getDeviceByMac

* change isDiscovered to use helper getDeviceByMac

* eliminate duplicate devices walk for isWhite, isBlack and isDiscovered check

* fix a data corruption race between MQTTtoBT and discovery-functions

the ***Discovery functions every time create a new device unless this device is set to white-list before. as a result of this, the devices list contains the same mac multiple times with different flags

* eliminate duplicate devices walk for oneWhite check

because now we have a utility function 'createOrUpdateDevice' we can globally cache this as a single flag

* secure createOrUpdateDevice agains data races on multicore esp32

* fix the concept of the createOrUpdateDevice

c / c++ does not allow NULL as function parameter like modern languages

* use nkolban Semaphore helper class (already included and used from eos1d3/ESP32_BLE librarie)

this makes the semaphore handling more cleaner and readable

* merge duplicate code during createDiscovery into new helper createDiscoveryFromList

* replace excessive use of ZmqttDiscovery precompiler directive in ble advertised callbacks with dummy functions

for a better readability we can remove this because isDiscovered does not do a devices walk anymore

* fix build errors found by travis-ci
2020-03-02 13:54:53 -06:00
Peter Becker 0681d09b41 fix 'LoadProhibited' in dumpdevice (#555)
booleans can not interpreted as null terminated strings
2020-02-20 22:03:12 +01:00
Florian 31ce9680c9 Add Qingping Cleargrass CGD1 alarm clock (#548)
Alarm clock with BLE temperature and humidity measurement
2020-02-09 16:42:22 +01:00
Florian f3c9d6dd90 Lean on Arduino log library instead of custom logging methods (#546)
* Lean on Arduino log library instead of custom logging methods
2020-02-09 16:01:52 +01:00
Florian db8df1ddf6 Hass discovery improvments (#512)
Rename set commands to config
correct json buffer size and gateway name
replace state to cmd
replace set by config
add restart and erase command
add unicity to gateway command switches
BLE devices shouldn't be child of the gateway
make the BTtoMQTT topic consistent with other definitions
2019-12-20 23:01:56 +01:00
Florian ae33ea7458 publish discovery once at each MQTT connection with retain flag set true (#507)
* publish discovery once at each MQTT connection with retain flag set to true

#448
2019-12-14 19:17:09 +01:00
1technophile 7f9d8d18da Apply VSC auto format to the code and indent macros for readability 2019-12-14 17:14:36 +01:00
1technophile f7ec81ffaa remove string usage for topic comparison 2019-12-14 11:10:12 +01:00
1technophile 7f16d00a55 Change topics concatenation method
Correct regression introduced by #503
Nevertheless this method needs to be optimized to avoid the use of string.
2019-12-13 23:25:09 +01:00
Florian c0ddf77c9f Add VegTrug (Mi Flora like) sensor (#500)
https://community.home-assistant.io/t/anyone-used-a-plant-sensor-other-than-xaiomi/150868/2
2019-12-08 14:10:37 +01:00
Florian 4b1f09b06b Wifi managers improvements (#503)
* Add parameters to wifi manager: gateway name and base topic
Enable to restart the ESP and erase the parameters by MQTT
2019-12-07 10:18:42 +01:00
Florian 2db4da014d Add of cleargrass temperature, humidity and air pressure sensor (#494)
* cleargrass temperature, humidity and air pressure sensor add
* new method of data retrieving for standard cleargrass (enable more frequent data reading)
2019-11-17 21:25:54 +01:00
Florian 6f73160d14 implement minimum rssi filtering (#482) 2019-11-12 20:48:23 +01:00
1technophile 337028ea63 add Xiaomi MiLamp Night led on BLE gateway
report detected mouvement through a "presence" set to true (will never be false for info) & a darkness attribute:
{"presence":true,"darkness":46}
the ble interval must be set to 0 if you want to scan permanently for movements
2019-11-01 15:29:05 +01:00
Florian 82c7d0c781 Miband steps (#478)
add mi band steps reading
2019-11-01 10:25:10 +01:00
Florian 6af57f1db5 add a controller deinit to earn some ble stability (#472)
discussed here
https://community.openmqttgateway.com/t/esp32-doesnt-stay-online/570
2019-10-22 19:22:57 +02:00
kanttti e4de45f219 Add Unit of Measurement for MiFlora Fertility and Fix MiJia BT battery to percentage (#466)
* adds unit for MiFlora fertility value

* fixes MijiaBT battery unit from V to percentage
2019-09-29 21:21:19 +02:00
kanttti 07e32847fa fixes data array length when reversing data (#465) 2019-09-29 21:20:00 +02:00
1technophile d2dd613855 Avoid OMG crash when emitter txpower >0
#457
2019-09-20 23:34:45 +02:00
Florian 1f96635978 Add Ble Xiaomi scale compatibility (#459)
* Add of Xiaomi Miscale v1 & v2

Discussed here:
https://community.openmqttgateway.com/t/ble-scale-support/608/16
2019-09-20 23:28:29 +02:00
1technophile 4b0d3943ce Correct issue with interval being added and not set to the expected value
and add debug infos
2019-07-26 11:13:01 +02:00
Florian 8471585d3d Platformio integration (#424)
* adaptation of structure to platformio

* also remove zgatewayRF315 (not usefull)

* replace boolean by bool

#155
2019-07-18 22:45:45 +02:00