Commit Graph
900 Commits
Author SHA1 Message Date
Florian a4106cf0e9 MQTT secure improvements (#1047)
* Add SYStoMQTT mqtt secure infos

* BugFix: correct retrieving of mqtt broker secure status and cert from memory
2021-08-01 15:46:14 -05:00
Florian 7f296ff5fa update Ibeacon keys naming (#1045)
lower case as the other json keys
2021-07-31 14:45:31 -05:00
h2zero ad782c4b1f Remove duplicate BLE service data sent over MQTT(#1044)
This will remove the sending of BLE service data when multiple service data attributes are advertised by a broadcasting device.

Instead the data for known device types will be consolidated into a single message to reduce overhead.
2021-07-31 10:08:53 -05:00
h2zero 2dedabc52f Add "server_cert" parameter to firmware_update command. (#1043)
When updating from the MQTT command from a SSL enabled server this adds an option to provide
the server SSL certificate with the command.

This is useful if connecting to different servers or if the configured certificate has expired
and requires updating to not lose the ability to update via OTA.

The certificate provided will be saved to flash memory for use on subsequent restarts.
2021-07-29 16:13:30 -05:00
h2zero a4a85ff14b Bugfix: missing break in BLE connect switch. (#1042)
Fixes #1041, GENERIC device case was falling through to MiFlora.
2021-07-28 16:43:06 -05:00
Florian c2107da1c7 Add BLE TPMS sensors (#1031)
* Add BLE TPMS sensors

tire pressure monitoring system
2021-07-27 06:34:45 -05:00
Daniël Kluivingh b2c09d1fae Added a manual integration for temperature sensor (#1036) 2021-07-27 05:32:07 -05:00
Florian 72f3960c13 Enable transmit outside of CC1101 (#1039)
See:
https://community.openmqttgateway.com/t/esp32-esp8266-fail-to-send-rf-signal/1618/11
2021-07-27 05:29:15 -05:00
DigiH 2d82cacd05 Suggestion to also allow BLE WRITE procedures for characteristics which are only WriteWithoutResponse (#1037)
While playing with the new BLE READ/WRITE feature for my Playbulb Candles I found that writing was not possible for characteristics which are WriteWithoutResponse only.

I implemented this quick fix which might be useful for others with devices for which they want to write to WriteWithoutResponse characteristics.

Alternatively a more slective option could be possible for a future release, i.e. adding an additional WRITE tag like "ble_write_withoutresponse": true/false
2021-07-26 19:40:37 -05:00
Marc Plano-Lesay 91497da71c Advertise discovery of the battery sensor for MiFlora devices (#1032)
Follow-up on #992, #217
2021-07-21 06:30:45 -05:00
Florian 373ec29803 Correct LORA embedded video (#1030) 2021-07-20 19:01:20 -05:00
Florian c06a6c9ceb [DOCS] Add new devices, parameters and LORA tutorial (#1028)
* Add new devices and parameters
* Update readme and lora use
2021-07-18 14:18:40 -05:00
Ray Cielencki 910ff91d08 fix: add code for miscale_v2 lbs (#1029) 2021-07-18 12:53:05 -05:00
Florian e56b4336c2 Add MQTT OTA per default for ESP boards (#1027) 2021-07-17 18:48:27 -05:00
Florian ff089923da Deactivate RF switch discovery per default (#1026)
* Deactivate RF switch discovery per default

To prevent creating many switches into Home Assistant
2021-07-17 17:18:53 -05:00
h2zero 379df34701 Set OTA name as Gateway_Short_Name + MAC if using mac as gateway name. (#1023)
* Set OTA name as Gateway_Short_Name + MAC if using mac as gateway name.

This will set the OTA name of the gateway to the *Gateway_Short_Name*_*MAC* when USE_MAC_AS_GATEWAY_NAME is defined in the config.

* Log OTA hostname when using MAC as gateway name.
2021-07-17 07:50:08 -05:00
Florian 4f1960a566 node-red tutorial (#1024)
* node-red tutorial for ble temperature sensor
2021-07-16 20:53:04 -05:00
Florian bce9bf3e00 Minor readme update (#1025)
* readme and BLE update
2021-07-16 20:09:47 -05:00
FlorianandDave ebe17c8899 Setmqtt setting optional (#1021)
* Define MQTTsetMQTT for configuring MQTT over MQTT

* Enable MQTTsetMQTT per default on all ESP except RFBridge

Co-authored-by: Dave <d.kneisz@gmail.com>
2021-07-14 17:25:09 -05:00
Florian c44ab5aeb9 Update the LED_SEND and LED_RECEIVE macro to fit LED_SEND_RECEIVE (#1020) 2021-07-14 07:37:03 -05:00
Florian 7564cf082b Docs improvements/corrections (#1018) 2021-07-13 17:27:04 -05:00
h2zero e244decbed Set BLE_FILTER_CONNECTABLE default to 0. (#1017) 2021-07-11 20:20:48 -05:00
h2zero 45e9ba79d1 Add support for iBeacons. (#1016) 2021-07-11 19:50:06 -05:00
h2zero 4b135049a5 Set WifiManager debug level. (#1014)
This allows for setting the WiFimanager debug level for more or less verbosity using the WM_DEBUG_LEVEL macro.
Valid values are:
        DEBUG_ERROR     = 0,
        DEBUG_NOTIFY    = 1, // default
        DEBUG_VERBOSE   = 2,
        DEBUG_DEV       = 3,
        DEBUG_MAX       = 4
2021-07-10 17:42:06 -05:00
h2zero e92e468ca6 Add a macro to use the MAC address as the gateway name. (#1013)
Adds the macro USE_MAC_AS_GATEWAY_NAME, when defined the gateway name will default to
OMG_XXXXXXXXXXXX, where the X's are the mac address characters.
This can still be changed in WiFiManager.
2021-07-10 17:35:16 -05:00
h2zero 83b8d88c0f Minimize BLE resources. (#1015)
Adds macros to reduce the flash/RAM use of the BLE library.
2021-07-10 15:13:48 -05:00
h2zero 5e11690b69 Allow trigger gpio and input gpio to be the same pin.
This will provide the expected funtionality for the reset trigger when the button is pressed for more than 10 seconds.
Also allows the same pin to be used as an actuator/relay trigger if pressed for less than 10 seconds.
2021-07-09 21:52:40 -05:00
h2zero 45a0184320 Add triggering of actuator on/off state by button press.
This will enable using button on the gateway to switch any controlled attached actuators/relays when pressed.

Adds the following macros:
- ACTUATOR_ON; 0 or 1, set to the output level of the gpio pin to turn the actuator on.
- ACTUATOR_ONOFF_DEFAULT; ACTUATOR_ON or !ACTUATOR_ON, set to the state desired on reset.
- ACTUATOR_BUTTON_TRIGGER_LEVEL; 0 or 1, set to the sensing level which to detect a button press to change the actuator state.
2021-07-09 21:52:40 -05:00
h2zero 2ae8f0c0c0 Cleanup compiler warning. (#1010)
Resolves #917
2021-07-06 07:48:13 -05:00
h2zero c55646968f Erase stored settings in NVS when triggered. (#1009)
This resolves #994 where the esp32 would still save the client information after a factory reset is performed.
2021-07-05 19:41:57 -05:00
h2zero 3f13984f44 Bugfix: switching brokers with self signed certs. (#1007)
* Fixes BLE scanning being disabled after switching server fails.

* Fixes crash caused by BLE scan results arriving while switching servers.

* Adds documentation to use the server switching command.
2021-07-05 19:40:40 -05:00
h2zero 05dddf42de Implement error LED and status codes. (#1006)
Merges LED_RECEIVE/LED_SEND into LED_SEND_RECEIVE pin definition.

Adds LED_ERROR to display error status based on blink times as follows:

Disconnected from Wifi: 2 seconds on 2 seconds off.
Disconnected from broker: 2 seconds on 5 seconds off.

Other status LED indications added:
WifiManager configuration web portal active: LED_INFO and LED_SEND_RECEIVE = ON.
OTA Update in progress: LED_SEND_RECIEVE and LED_ERROR = ON.
2021-07-01 13:24:20 -05:00
h2zero 76f880dc15 Add support for Mokosmart beacons. (#1003) 2021-06-30 22:16:29 -05:00
dependabot[bot] 706262c9bb Bump color-string from 1.5.4 to 1.5.5 (#1002)
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/compare/1.5.4...1.5.5)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-28 19:09:09 -05:00
Florian 937a417211 Move PR template folder 2021-06-28 16:31:29 -05:00
dependabot[bot] 60d15a3403 Bump prismjs from 1.23.0 to 1.24.0 (#1001)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.23.0...v1.24.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-28 16:17:02 -05:00
h2zero 02c371b0f5 Use native FreeRTOS semaphore functions. (#998) 2021-06-28 15:20:58 -05:00
Gabriel M. Schuyler 8cbd1984af Fix a couple typos (#999) 2021-06-27 14:26:32 -05:00
Chris van Marle d2ff32d56f Allow inversion of input GPIO (#997)
* Allow inversion of input GPIO

* Fix formatting
2021-06-26 09:31:05 -05:00
Florian 90f42990df Add miflora battery (#992) 2021-06-24 20:11:50 -05:00
h2zero 2708858754 Add switching between MQTT brokers with self signed client certificates. (#993) 2021-06-24 19:46:58 -05:00
Chris van Marle f1351ec439 Use correct SDA+SCL pins (#996)
ESP8266 uses D1 (5) and D2 (4), ESP32 uses 21 and 22. Both provide defines for SDA and SCL pin numbers though
2021-06-24 19:13:16 -05:00
h2zero 7cfbd3d050 Ble read/write characteristics over MQTT. (#988)
* EXPERIMENTAL: Ble read/write characteristics over MQTT.

Uses #979

This allows reading and writing BLE characteristics from an MQTT message.

Example format:
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"ble_write_address":"AA:BB:CC:DD:EE:FF", "ble_write_service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b", "ble_write_char":"cba20002-224d-11e6-9fb8-0002a5d5c51b", "ble_write_value":"TEST", "ttl":4 }'
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"ble_read_address":"30:AE:A4:7C:3C:A6", "ble_read_service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b", "ble_read_char":"cba20002-224d-11e6-9fb8-0002a5d5c51b", "ttl": 2 }'
The ttl parameter is the number of calls to connect (defaults to 1), which occur after the BLE scan completes.

A response is provided over MQTT in the format:
write : {"id":"30:AE:A4:7C:3C:A6","service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b","characteristic":"cba20002-224d-11e6-9fb8-0002a5d5c51b","write":"TEST","success":true}
read : {"id":"30:AE:A4:7C:3C:A6","service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b","characteristic":"cba20002-224d-11e6-9fb8-0002a5d5c51b","read":"TEST","success":true}

* Add generic BLE connect class and read data as hex.

* Add value_type parameter and document usage

* Add note to docs
2021-06-21 20:27:06 -05:00
Northern ManandNorthern Man ac23235327 DT24 - Update messages to support temp (#991)
With the additional functionality added by @h2zero I’m able to extract
the temperate data from the 2nd part of the bluetooth message.

Co-authored-by: Northern Man <sgracey@Heisenberg.local>
2021-06-18 21:20:07 -05:00
h2zero 792807e6e5 Create BLE connect class and add derivatives (#979) 2021-06-17 16:52:03 -05:00
dependabot[bot] d35cc03b49 Bump postcss from 7.0.35 to 7.0.36 (#989)
Bumps [postcss](https://github.com/postcss/postcss) from 7.0.35 to 7.0.36.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.35...7.0.36)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-17 16:43:28 -05:00
Northern ManandNorthern Man 09596697b9 Adjustment of DT24 Bluetooth voltmeter MQTT Discovery message (#983)
Updating of DT24 messages to align with MQTT Discovery messages.

Co-authored-by: Northern Man <sgracey@Heisenberg.local>
2021-06-11 22:46:22 -04:00
Northern ManandNorthern Man bdaf097c04 Resolve incorrect wiring instructions (#984)
As identified in this forum post (
https://community.openmqttgateway.com/t/rtl-433-esp32-bme280-but-what-ra
dio/1563) , the default builds have incorrect connections for the
RTL_433 module.  This fixes the default build configuration and
crispness the documentation.

Co-authored-by: Northern Man <sgracey@Heisenberg.local>
2021-06-11 20:33:10 -04:00
h2zero 4467ef9a17 Fix missing gateway name in discovery. (#982) 2021-06-11 15:32:23 -05:00
h2zero 2ece72dd68 Fix null client when using MDNS. (#981) 2021-06-10 17:07:50 -05:00