Commit Graph

144 Commits

Author SHA1 Message Date
Thomas Göttgens
b43a5bc4f8 Fix missing msh default topic. 2023-04-13 23:17:05 +02:00
Thomas Göttgens
43cff7adc9
Implement #2380 (#2418) 2023-04-07 07:52:23 -05:00
ghostop14
990d418dc8
Add MQTT TLS Support for WIFI-Enabled Devices (#2410)
* Testing TLS MQTT Support

* Working TLS connections

* Testing TLS MQTT Support

* Working TLS connections

* Added protobuf support for mqtt.tls_enabled

* fix 'em up good

* don't commit this stuff, jeeez

* there i fixed it

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
2023-04-04 08:14:47 -05:00
Thomas Göttgens
5044169e8d fixes #2330 2023-03-06 14:12:24 +01:00
Thomas Göttgens
b07904fe77 Merge remote-tracking branch 'remotes/origin/master' into rsyslog-client 2023-02-05 01:21:30 +01:00
Thomas Göttgens
22500a6c34 tryfix for #2242 2023-02-04 11:36:35 +01:00
Thomas Göttgens
090d399843 hook up additional rsyslog output if debug printing is active 2023-02-01 15:09:07 +01:00
Thomas Göttgens
81854a173a fix #2109 json mqtt on secondary channel 2023-01-23 21:57:41 +01:00
Thomas Göttgens
cdf379616c whatever makes trunk happy. 2023-01-21 21:23:24 +01:00
Thomas Göttgens
6fdb93cd16 re-add namespacing in protobufs. Let's see what i missed. Portduino likely ...
Checking in generated on purpose.
2023-01-21 21:23:24 +01:00
Thomas Göttgens
51b2c431d9 trunk roundhouse kick 2023-01-21 21:23:24 +01:00
Ben Meadors
9046dacec8 I don't like this formatting but I need trunk to STFU 2023-01-18 14:51:48 -06:00
Ben Meadors
4d4af7de59 generated paths experiment 2023-01-18 08:56:47 -06:00
Ben Meadors
cc0cccbd1b Coerce int 2023-01-16 12:26:10 -06:00
Ben Meadors
34b2d51113 Patch locked_to 2023-01-16 11:05:36 -06:00
Thomas Göttgens
867e55b9e7 sync mqtt with develop 2023-01-12 16:09:03 +01:00
Thomas Göttgens
42122f3d0f
Merge branch 'master' into develop 2023-01-12 15:01:56 +01:00
Thomas Göttgens
1fc5d70221 let the library handle the reconnect, manually do it after 5 seconds 2023-01-09 23:26:47 +01:00
Thomas Göttgens
5cec370cf5 getByName was not used anywhere in the code so that change is safe.
Please TEST this as i don't have a working Json setup in mqtt at the moment.
2023-01-09 11:28:21 +01:00
Thomas Göttgens
d9f0dc7ea4 add MQTT outqueue back in (still broken) 2023-01-04 14:41:58 +01:00
pavelb-techspark
30ae4c2a38
Add QueueStatus sending to the firmware (#1820)
* Yank mqtt service envelope queue

* trybuildfix mqtt system

* removed too much

* no excessive heap debugging on release builds

* send QueueStatus messages

The QueueStatus message is sent as a response to the attempt to queue
an outgoing MeshPacket and contains statuses of the last queue
attempt, TX Queue space and capacity and MeshPacket.id that was
queued.

When TX Queue changes status from completely full to at least
a single slot free a QueueStatus message is also sent to notify
that user can queue more messages.

Signed-off-by: Pavel Boldin <pavel.b@techspark.engineering>

* WIP: update protobufs

Signed-off-by: Pavel Boldin <pavel.b@techspark.engineering>

* update protobufs

* regen protos

Signed-off-by: Pavel Boldin <pavel.b@techspark.engineering>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Sacha Weatherstone <sachaw100@hotmail.com>
2023-01-04 23:56:52 +11:00
Thomas Göttgens
cad5c9b70c removed too much 2023-01-03 22:17:04 +01:00
Thomas Göttgens
5867038abf trybuildfix mqtt system 2023-01-03 22:09:35 +01:00
Ben Meadors
42b24d4510 Yank mqtt service envelope queue 2023-01-03 14:32:28 -06:00
Thomas Göttgens
8a9af37d82
Merge branch 'develop' into nice-threads 2022-12-30 20:18:19 +01:00
joshpirihi
11f1508d85
Merge branch 'meshtastic:develop' into develop 2022-12-31 06:40:25 +13:00
Joshua Pirihi
19436b7d54 Increase MQTT buffer size 2022-12-31 06:40:02 +13:00
Ben Meadors
f1cdfd163d Replaced all of the logging with proper log levels 2022-12-30 10:27:07 -06:00
Ben Meadors
0b5cae5393 Log levels refactoring 2022-12-29 20:41:37 -06:00
Ben Meadors
110c80d045 Make disable return an int32_t for runOnce usage 2022-12-29 16:54:39 -06:00
Ben Meadors
38a1315599 Refactor OSThread consumers to use disable() 2022-12-29 16:26:25 -06:00
Thomas Göttgens
41a1dfec79 a lot of thread housekeeping. Switch them off when not needed / disabled. 2022-12-29 15:45:49 +01:00
Thomas Göttgens
2ac2b6d1b6 replace PB03 compat macros with the real deal. 2022-12-23 10:00:34 +01:00
Thomas Göttgens
bbaeeb7ce9 fixing portduino is getting old ... 2022-12-16 20:46:43 +01:00
Thomas Göttgens
68f6cfde0c Improve Wifi Reconnect handling and add outgoing queue for MQTT packets to bridge short connection issues. 2022-12-16 20:28:28 +01:00
Thomas Göttgens
a00187b97f manual master merge 2022-12-06 16:56:38 +01:00
arduinoGP
8ff5dacc3c
Update MQTT.cpp
case Portnum_POSITION_APP adjusted so the various options allways get encoded into JSON as long as lat and long are present. There are circumstances where timestamp, time, or altitude might be missing and this causes silent failures of JSON encoding..
2022-12-01 15:44:47 -05:00
Thomas Göttgens
679e346bcb
change old field denominator 2022-11-22 16:47:54 +01:00
Thomas Göttgens
71c2af04ec why is this working on pio/windows? 2022-11-22 15:03:01 +01:00
Thomas Göttgens
23466d8eee yank that dreaded json11 - first try 2022-11-22 14:29:00 +01:00
Ben Meadors
abf8fdb661
Merge branch 'master' into develop 2022-11-21 09:39:22 -06:00
Ben Meadors
1c5292ac86 Init default mqtt configurations 2022-11-20 12:29:10 -06:00
Thomas Göttgens
95cc328b5c That wifi update didn't go down well. 2022-11-18 19:37:56 +01:00
Thomas Göttgens
990c0119a7 fix portduino - again 2022-11-18 18:22:35 +01:00
Thomas Göttgens
144afee29e trigger wifi reconnect by mqtt or ntp failures. 2022-11-18 18:03:30 +01:00
Thomas Göttgens
9665c08b59 MQTT: don't subscribe to JSON topic if JSON is disabled in config. 2022-11-17 21:14:49 +01:00
Thomas Göttgens
7a3ad0afba fix #1916 2022-11-08 22:32:53 +01:00
Thomas Göttgens
b7ebe03ca8 API Server and DHCP Lease Management 2022-10-26 11:09:59 +02:00
Thomas Göttgens
a66538fe55 MQTT is working over ethernet 2022-10-26 00:07:02 +02:00
Thomas Göttgens
075a53ced0
Update MQTT.cpp 2022-10-19 11:04:13 +02:00
Thomas Göttgens
18ccb38824
Update MQTT.cpp 2022-10-19 11:01:23 +02:00
Thomas Göttgens
c97831963b just for good measure, correct json type field 2022-10-19 10:58:46 +02:00
Thomas Göttgens
7c3dc076d2 only convert and send JSON topics with type 'sendtext' 2022-10-19 10:54:56 +02:00
Thomas Göttgens
ea87193c8f possible fix for stuck MQTT handler. 2022-10-18 21:51:40 +02:00
Thomas Göttgens
46aee8274f fix JSON red herring error messages and Redirectable Print's new fixed buffer. 2022-10-18 11:16:21 +02:00
Ben Meadors
f10d04591d
Don't make a nested json object payload (#1815) 2022-10-17 09:09:28 -05:00
Thomas Göttgens
186374525a
Don't mix MQTT Payloads of Firmware 1.2 and 1.3/2.0 (#1767) 2022-10-07 12:54:42 -05:00
Ben Meadors
ae311c838e
Try to decode mqtt packets first (#1705)
* Try to decode first

* Remove GPS pins from TLoRAv1 so that it can boot

* Use release version of radio lib

* Use fixed versions of esp framework and tool chain
2022-09-25 09:39:50 -05:00
Thomas Göttgens
f7b12f0695 Adapt to new protobufs - TODO: factory_reset rewire 2022-09-09 12:51:41 +02:00
Ben Meadors
84e438f72f
Mqtt json_enabled (#1672)
* Payload variants

* Waypoints and fixes

* Remove json send to mesh. I think protobuf messages already do that

* whoops

* Added json_enabled mqtt config
2022-09-03 14:06:10 -05:00
Ben Meadors
9d3cac7cdb
MQTT Json Payload variants (#1667)
* Payload variants

* Waypoints and fixes

* Remove json send to mesh. I think protobuf messages already do that

* whoops
2022-09-01 17:54:24 -05:00
Ben Meadors
b54073a8a1
Bluetooth mode unification and behavior tweaks (#1636)
* Esp32 bluetooth modes

* Comment

* Gutting bluetooth

* Cleanup

* Security

* Testing

* NRF bluetooth security

* Reboot on saved lora or bluetooth settings

* Cleanup

* Fixes

* Stub for platforms without screens

* Fixed just-works in esp32

* Cleanup

* Display device name in boot screen

* Added waypoint module routing

* chmod

* Words

* Protos

* Backing out partition changes for testing

* Revert "Backing out partition changes for testing"

This reverts commit 191ed6489c.

* Chmod PR artifacts

* Trying setInitialState again

* Revert "Trying setInitialState again"

This reverts commit 703eac7277.

* External notification module

* Cleanup

* Pin display formatting
2022-08-22 16:41:23 -05:00
loodydo
f26441727c
Update MQTT.cpp (#1534)
Fix returning pointer to local variable that will become invalid when returning.

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2022-07-02 06:53:15 -05:00
Thomas Göttgens
6bb3861e95 Moduleconfig also changed to localConfig Model. 2022-05-22 13:27:56 +02:00
Sacha Weatherstone
6b0ce6b729
Finish config transition 2022-05-07 20:31:21 +10:00
Thomas Göttgens
6e9cf82b68 fixes #1355 2022-04-06 14:11:39 +02:00
Ben Meadors
ba2fa84ebd
Reworked metrics structure and split telemetry into device or environ… (#1331)
* Reworked metrics structure and split telemetry into device or environment

* Comment cleanup
2022-03-27 09:55:35 -05:00
Michael Kleinhenz
d4e6dd32c5
JSON MQTT Integration (#1283)
* Added downstream JSON MQTT handling.

* Added uplink JSON messaging

* Fixed shadow variable.

* Added missing dependency.

* Fixes Environment -> Telemetry.

* Fixed native issue.

* Added json11 pio reg dependency.

* Fixed json11 library dependency.

Co-authored-by: Sacha Weatherstone <sachaw100@hotmail.com>
2022-03-12 08:08:57 -06:00
Michael Kleinhenz
428d062b9a Added txt message publishing on MQTT. 2022-03-07 20:45:50 +01:00
Mike Kinney
caaa235c5d more cppcheck warnings fixes 2022-01-24 17:24:40 +00:00
Sjoer van der Ploeg
6e706e0585
Update MQTT.cpp (#1050)
Was missing a colon in the logs!
2022-01-01 13:12:24 -06:00
Joshua Pirihi
0aa4ea86a0 Add mqtt_username and mqtt_password user preferences 2021-12-24 06:17:08 +13:00
Kevin Hester
52d7a6b8e4 immediately reconnect to mqtt server on wifi reconnect 2021-08-17 19:59:56 -07:00
Kevin Hester
28af18389b If MQTT connected don't let the board enter LS state 2021-08-02 21:34:14 -07:00
Kevin Hester
99d529be51 While connected to MQTT server, veto light-sleep (to keep wifi working) 2021-08-02 17:42:44 -07:00
Kevin Hester
72807f0fa0 CSE to cleanup mqtt addr setting 2021-08-02 10:50:55 -07:00
Kevin Hester
596befff74 Fix invalid heap reference fixed by @flux242 2021-08-02 10:41:31 -07:00
Ben Meadors
035f25190b
Handle MQTT host string with port omitted 2021-07-02 07:47:12 -05:00
Ben Meadors
3ea03dadb5
Convert MQTT server to hostname:port 2021-07-01 16:57:50 -05:00
Kevin Hester
73384c5ac6 mqtt: don't downlink messages from us. 2021-04-11 09:23:34 +08:00
Kevin Hester
a39ba30a70 mqtt: fix downlink check 2021-04-10 11:57:20 +08:00
Kevin Hester
e71758457b use production mqtt server 2021-04-10 10:55:56 +08:00
Kevin Hester
5dfd387b21 use real MQTT server DNS name 2021-04-09 16:56:28 +08:00
Kevin Hester
c0cfd0bb41 remove dead code 2021-04-05 16:27:52 +08:00
Kevin Hester
7f5ab472b9 mqtt: downlink now works 2021-04-05 09:38:00 +08:00
Kevin Hester
a845406a19 cleanup packet encrypt/descrypt 2021-04-05 09:24:00 +08:00
Kevin Hester
50a69d77e6 mqtt: begin subscription support 2021-04-05 08:42:52 +08:00
Kevin Hester
55b8314a2a mqtt: only publish uplink_enabled channels 2021-04-05 07:57:06 +08:00
Kevin Hester
e84edc676f mqtt: automatically start or stop as neede & attempt reconnect 2021-04-05 07:53:07 +08:00
Kevin Hester
d19af8b83d mqtt: send packets after they are encrypted 2021-04-04 09:20:37 +08:00
Kevin Hester
638cec7f25 we now send packets to mqtt server 2021-04-03 22:27:06 +08:00
Kevin Hester
f3f09f0dcf MQTT WIP 2021-04-03 16:06:40 +08:00
Kevin Hester
8890ca759d fix nodeid 2021-04-03 15:04:03 +08:00
Kevin Hester
dcf64dfacd MQTT at least talks to server, works in native and esp32 2021-04-03 14:54:10 +08:00