1
0
mirror of https://github.com/thingsboard/thingsboard-gateway synced 2025-10-26 22:31:42 +08:00
Commit Graph

1012 Commits

Author SHA1 Message Date
vitalii.bidochka
02b3d4a327 Added ftp connector 2021-08-03 10:23:58 +03:00
Illia Barkov
95edca3098 Merge pull request #545 from samson0v/master
Fixed converting array of objects for MQTT converter (#544)
2021-08-02 13:28:49 +03:00
vitalii.bidochka
d5035c16dc Fixed converting array of objects for MQTT converter (#544) 2021-08-02 13:03:47 +03:00
vitalii.bidochka
922fef6c69 Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	thingsboard_gateway/connectors/mqtt/mqtt_connector.py
2021-08-02 13:01:37 +03:00
vitalii.bidochka
ef40c7861a Fixed converting array of objects for MQTT converter (#544) 2021-08-02 12:48:51 +03:00
Illia Barkov
91d37625cc Merge pull request #527 from slibutti/master
Improvements to RPC handling in MQTT connector
2021-08-02 11:50:41 +03:00
Simone Libutti
9c7fd004a9 Set a maximum wait for rpc sub requests, which may hang
Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-06-17 18:11:45 +02:00
Simone Libutti
8e9058e347 Substituted pass with sleep while waiting for RPC setup completed
Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-06-17 18:09:23 +02:00
Simone Libutti
8a4897ae3b [mqtt] Server-side RPC refactor with 2 bug-fixes
- Refactored Server-side RPC function
- Added some logging
- Wait for MQTT client to be actually subscribed to response topic
  before publishing the request (this sometimes did not happen)
- Wait for gateway to actually register the RPC response
  before publishing the request (this sometimes did not happen)

Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-06-10 18:09:07 +02:00
Simone Libutti
b9ef14d3f0 [mqtt] Fix: RPC subscription topics never removed from __subscribes_sent
__subscribes_sent is used to store the topics for which subscription
has been requested for. Those topics should be tracked until the client
gives a feedback (i.e., subscription request succeeded or failed),
then they should be removed. Else, in case of RPCs, that dict would grow
indefinitely!

Topics were removed only on subscription failure; now they are removed
also in case of success.

Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-06-10 18:09:07 +02:00
Simone Libutti
e01bf80784 [mqtt] Added some required configuration keys for RPC handlers
Note: they were implicitly required, as their presence was checked
in the handler function. It makes sense to discard invalid handlers
when application starts, rather than checking them and fail every time.

- requestTopicExpression
- valueExpression

Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-06-10 18:09:07 +02:00
zbeacon
5f7970b6dd Changed imports 2021-05-24 15:44:07 +03:00
zbeacon
080ac5987c Fix for integers value in SNMP connector (#404) 2021-05-24 09:14:34 +03:00
zbeacon
52494dc39a Added passing config folder path to client. 2021-05-14 10:43:51 +03:00
Illia Barkov
028a9f3c92 Merge pull request #520 from slibutti/master
Bugfix: validation always fails: 'str' object has no attribute 'get'
2021-05-14 10:28:32 +03:00
Simone Libutti
a7836d4a82 [utility][bigfix] Validation: attributes are stored in dict, not list
Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-05-13 15:01:32 +02:00
Simone Libutti
9765b40cda [utility] Solved some PIP warnings
Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-05-13 15:00:57 +02:00
Illia Barkov
37cbf0e509 Merge pull request #521 from slibutti/rpc-fix
[MQTT] Rpc fixes
2021-05-13 14:49:30 +03:00
zbeacon
6c56762f06 Added parameter for checking connectors configuration time (auto-reload) 2021-05-13 14:41:08 +03:00
zbeacon
c92301eb5c Removed redundant code 2021-05-13 14:31:10 +03:00
zbeacon
3599bbe869 Fix for #519 2021-05-13 14:30:00 +03:00
Simone Libutti
4c77227746 [mqtt_conn][bugfix] __rpc_requests_in_progress not available to connector
Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-05-12 17:25:15 +02:00
Simone Libutti
f2880556df [gate] Dead code elimination
Using __rpc_register_queue makes unnecessary any old reference to
__rpc_requests_in_progress, which makes all more confusing.

Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-05-12 17:25:15 +02:00
Simone Libutti
aa4d29176f [gate][bugfix] Removed cancel_rpc_request invocation after reply
cancel_rpc_request actually sends a nack back to thingsboard.
Not be invoked after a successful response!

Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-05-12 17:25:15 +02:00
Simone Libutti
4ad5fd15d2 [mqtt_conn][bugfix] self._client.subscribe called instead of its wrapper
Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-05-12 17:25:15 +02:00
Simone Libutti
95871af2be [mqtt_conn][gate] Added some logging into RPC handling
Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-05-12 17:25:00 +02:00
Simone Libutti
82992c0694 Bugfix: validation always fails: 'str' object has no attribute 'get'
Recently changed data validation function does its checks by treating
attributes/values as they were dictionaries; however, they are lists
of dictionaries.

data["telemetry"].get("ts") is bound to fail: the correct check would be
data["telemetry"][i].get("ts"), for each element i.

Signed-off-by: Simone Libutti <simone.libutti@ibtsystems.it>
2021-05-12 13:38:28 +02:00
zbeacon
afce307e96 Added auto-reloading of connector configuration file 2021-05-11 16:01:55 +03:00
zbeacon
b29194b9b5 Added warning on device name not found 2021-05-11 13:19:50 +03:00
zbeacon
85b2891e1f Merge branch 'master' of https://github.com/thingsboard/thingsboard-gateway into develop/2.4-python 2021-05-11 13:02:23 +03:00
zbeacon
0dc5ccb1e4 Fix for #511 2021-05-11 13:01:55 +03:00
Illia Barkov
da7b4df02f Merge pull request #515 from janglos/master
fix of BACnet connector
2021-05-11 11:03:18 +03:00
Jan Glos
b4c4bb3e4d introduced rising edge function
intended for generating impulse command to the lights objects
2021-05-07 15:18:10 +02:00
Jan Glos
62be4ddf6d fix of BACnet connector, missing changes required by commit "Changed structure for utilities" from Apr 9, 2021 2021-05-07 10:39:39 +02:00
zbeacon
b2ba956a1f Fix for OPC-UA connector node search 2021-04-29 12:31:53 +03:00
zbeacon
f897c65a9e Changed device connecting logic when connection to TB is lost 2021-04-26 13:55:01 +03:00
zbeacon
4e1c603718 Added ability to change statistics pushing period #506 using statsSendPeriodInSeconds parameter 2021-04-26 13:06:01 +03:00
zbeacon
12a88a9693 Refactoring in Modbus Connector 2021-04-13 11:37:24 +03:00
zbeacon
514e5380f3 Added check for connection attempts 2021-04-13 11:35:33 +03:00
zbeacon
b5ebde46c6 Set default value for config RPC value to zero (Required for RPC's) #498 2021-04-13 09:52:04 +03:00
zbeacon
8bb7404f41 Removed useless changes 2021-04-09 09:53:00 +03:00
zbeacon
cfa6d02a27 Updated copyright 2021-04-09 09:15:51 +03:00
zbeacon
64a1eb870a Changed structure for utilities 2021-04-09 09:00:39 +03:00
zbeacon
2739966d17 Changed default host 2021-04-07 08:58:10 +03:00
zbeacon
ae66e6bf98 Changed file cleaning. 2021-04-07 08:56:00 +03:00
zbeacon
675a64d2db TBUtility improvements 2021-04-06 16:06:27 +03:00
zbeacon
49910b42c3 For release 2.6 2021-03-22 12:55:11 +02:00
zbeacon
5b7070e262 Added ability to use multiple ODBC connectors for different tables in the same database #466. Thanks @murp-C2D2 2021-03-22 10:37:24 +02:00
zbeacon
d4ee89640f Fix #489 2021-03-19 20:22:39 +02:00
zbeacon
e8dc141c3a Added ability to pass raw binary data for MQTT connector, according to #490 2021-03-19 20:09:17 +02:00