Commit Graph

121 Commits

Author SHA1 Message Date
GUVWAF
af52dcecdf
Restrict MQTT JSON downlink messages (#3141)
Channel needs to be named "mqtt"
"from" field should be set to the node number of the transmitter

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-01-29 06:13:56 -06:00
Andre K
d6fa190025
fix: allow MQTT encryption_enabled with json_enabled (#3126)
* fix: allow MQTT `encryption_enabled` with `json_enabled`

* fix: copy decoded MeshPacket and release memory after use

* fix: use `packetPool` allocCopy and release methods

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-01-25 08:42:34 -06:00
Manuel
f2c04c5504
fix MQTT crash (#3127) 2024-01-24 14:01:50 -06:00
GUVWAF
8f6a2836b8
Mark packets received via MQTT and add option to ignore them (#3117)
* Mark packets received via MQTT and add option to ignore them

* Don't send packets received via MQTT back into MQTT
Generate implicit ACK for packets we as an MQTT gateway sent

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-01-20 14:22:09 -06:00
GUVWAF
943367edd0
Fix "watch GPIOs" feature of Remote Hardware module (#3047)
* Fix watch GPIO feature of Remote Hardware

* Add Remote Hardware messages to JSON output

* Add curly brackets

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-01-03 15:08:28 -06:00
GUVWAF
16c18d0da9
Add Traceroute, DetectionSensor and Paxcounter to MQTT JSON (#3043)
* Add Traceroute, DetectionSensor and Paxcounter to MQTT JSON

* Guard Paxcounter for ESP32 only
2023-12-27 08:14:25 -06:00
GUVWAF
d88baea627
Make implicit ACKs work on MQTT (#3028)
Don't filter out messages we originally sent via LoRa
2023-12-21 14:59:16 -06:00
Ben Meadors
4720b2874f
Cpp-check warnings cleanup (#3014)
* cpp-check warnings cleanup

* Supressions and more fixes
2023-12-14 07:35:46 -06:00
GUVWAF
6ff61b3e04
Pico W: Initial Wi-Fi support (#2980)
* Pico W: Initial WiFi support: connects, but freezes after a while

* Update arduino-pico core to fix hang with Wi-Fi

* Add `picow` to workflow since it's different from `pico` now
2023-12-02 14:47:52 -06:00
Ric In New Mexico
f57020412e
INA3221 / Power Telemetry Payload Variant Implementation (#2916)
* INA3221 / Power Telemetry Variant Implementation
	modified:   platformio.ini
	modified:   src/configuration.h
	modified:   src/detect/ScanI2C.h
	modified:   src/detect/ScanI2CTwoWire.cpp
	modified:   src/main.cpp
	modified:   src/modules/Modules.cpp
	new file:   src/modules/Telemetry/PowerTelemetry.cpp
	new file:   src/modules/Telemetry/PowerTelemetry.h
	new file:   src/modules/Telemetry/Sensor/INA3221Sensor.cpp
	new file:   src/modules/Telemetry/Sensor/INA3221Sensor.h
	modified:   src/mqtt/MQTT.cpp

* ifdef for portduino / linux native
	modified:   src/modules/Telemetry/PowerTelemetry.cpp

* try #2
	modified:   src/modules/Modules.cpp
	modified:   src/modules/Telemetry/PowerTelemetry.cpp
	deleted:    variants/xiao_ble/1.0.0/libraries/SPI/SPI.cpp

* try #3
	modified:   src/modules/Modules.cpp

* try #4
	modified:   src/modules/Telemetry/PowerTelemetry.cpp

* try #5?
	modified:   src/modules/Telemetry/PowerTelemetry.cpp

* try #6
	modified:   src/modules/Telemetry/PowerTelemetry.cpp

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-11-04 20:07:00 -05:00
Tavis
092e6f2424
add rssi and snr to json output (#2894)
* add rssi and snr to json output

* explicitly cast to int and float
2023-10-17 06:50:36 -05:00
Andre K
2c625f6ba1
fix: channel routing for decoded MQTT packets (#2892)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-10-15 06:41:40 -05:00
GUVWAF
37c3d15978
Check if packet is decrypted before using portnum when converting to JSON (#2857)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-10-03 06:39:35 -05:00
Ben Meadors
b5e952db24
No more goober traffic on public mqtt (#2831)
* No more goober traffic on public mqtt

* Oops
2023-09-26 06:19:17 -05:00
GUVWAF
6d93fab495
Add neighbor IDs to MQTT JSON (#2756)
* Add neighbor IDs to JSON

* Limit #neighbors to what we can actually save

* Put neighbor IDs in an array

* Add SNR to neighbors in nested objects
2023-09-01 14:35:57 -05:00
Ben Meadors
6e0b6684ee
Extend node max to 100 and remove mesh_sds_timeout_secs (#2713)
* Extend node max to 100 and remove mesh_sds_timeout_secs

* Const pointers for you and you and you

* Fixes and supressions

* Missed it

* uint

* Resize

* Derp
2023-08-12 09:29:19 -05:00
Ben Meadors
0821cff1c8 Merge remote-tracking branch 'origin/master' into 2.2-working-changes 2023-07-31 18:54:53 -05:00
Jonathan Bennett
939a359e7e
Adds DOP fields to JSON MQTT output (#2671)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-07-31 15:19:36 -05:00
GUVWAF
32246850aa
Convert protobuf values that are unsigned properly to uint in JSON (#2659) 2023-07-27 13:53:20 -05:00
Ben Meadors
146ed067a1
Merge branch 'master' into neighborinfo 2023-07-25 16:14:50 -05:00
Ben Meadors
96c6a20e03
Ensure that MQTT is enabled and log initialization (#2643) 2023-07-24 12:33:01 -05:00
Ben Meadors
41b07de5a2
Merge branch 'master' into neighborinfo 2023-07-17 09:21:08 -05:00
luzpaz
003047baaf
Fix various typos (#2607)
* Fix various typos

Found via `codespell -q 3 -L acount,clen,dout`

* Trunk reformatting

---------

Co-authored-by: code8buster <communismisgreat@national.shitposting.agency>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-07-14 16:25:20 -05:00
Ben Meadors
6e96216ba3
MQTT client proxying (#2587)
* WIP on MQTT proxy message queue

* Fix copy paste goof

* Progress on uplink

* Has packets

* Avoid trying to connect if we're proxying

* Pointer correctly

* Remove wifi guards

* Client proxy subscribe

* Fixed method that got bababababorked somehow... personally I blame CoPilot

* Short circuit logic

* Remove canned settings

* Missed some stuff in the move

* Guard pubsub client for non-networked variants

* Has networking guard

* else

* Return statement for fall-thru

* More gaurd removals

* Removed source filters. No wonder I was confused

* Bounding

* Scope guard around else and fix return

* Portduino

* Defs instead

* Move macro up to actually fix portduino

* Size_t

* Unsigned int

* Thread interval

* Protos

* Protobufs ref
2023-07-08 20:37:04 -05:00
Thomas Göttgens
61661aed50 Broadcast neighbor info
also update trunk
2023-05-31 13:18:43 +02:00
Thomas Göttgens
f9b2556cd4 add optional GPS fields to JSON 2023-05-15 15:40:22 +02:00
IhorNehrutsa
9c683f4c87
Fix LOG_DEBUG messages when no DEBUG_PORT. (#2485)
* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.
2023-05-13 05:33:14 -05:00
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