Project

General

Profile

Bug #608

MQTT devices automatically created as JSON, but giving errors if not JSON data

Added by wwolkers almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
07/12/2016
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

If auto device creation is turned on, and DomotiGa receives data, it auto creates the device as MQTT-JSON, even if the data is not valid JSON data, resulting in the following errors:

2016/07/12 14:32:57 [MQTT] Publishing Message '49' to Topic 'domotiga/Slaapkamer sensor/value2'
2016/07/12 14:32:57 [MQTT] > 30 25 00 21 64 6F 6D 6F 74 69 67 61 2F 53 6C 61 61 70 6B 61 6D 65 72 20 73 65 6E 73 6F 72 2F 76 61 6C 75 65 32 34 39
2016/07/12 14:32:57 [MQTT] < 30 25 00 21 64 6F 6D 6F 74 69 67 61 2F 53 6C 61 61 70 6B 61 6D 65 72 20 73 65 6E 73 6F 72 2F 76 61 6C 75 65 32 34 39
2016/07/12 14:32:57 [MQTT] Received published data.
2016/07/12 14:32:57 [MQTT] Received topic : 'domotiga/Slaapkamer sensor/value2'
2016/07/12 14:32:57 [MQTT] Received payload : '49'
2016/07/12 14:32:57 [Devices] Device with type 'MQTT-JSON', address 'domotiga/Slaapkamer sensor/value2', instance 1' and interface 'MQTT Interface' not found!
2016/07/12 14:32:57 [Devices] Auto created device 'MQTT-JSON device #3' with address 'domotiga/Slaapkamer sensor/value2' of type 'MQTT JSON Generic Device' with interface 'MQTT Interface' and instance '1'
2016/07/12 14:32:57 [MQTT] Received JSON formatted data:
2016/07/12 14:32:57 [MQTT] ERROR: 'Type mismatch: wanted Collection, got Integer instead' at 'CMQTT.DecodeJSON.739'
2016/07/12 14:32:57 [MQTT] Received payload is probably not in correct JSON format '49'!
2016/07/12 14:32:57 [MQTT] Publishing Message '49' to Topic 'domotiga/th1 device 1/value2'
2016/07/12 14:32:57 [MQTT] > 30 21 00 1D 64 6F 6D 6F 74 69 67 61 2F 74 68 31 20 64 65 76 69 63 65 20 20 31 2F 76 61 6C 75 65 32 34 39
2016/07/12 14:32:57 [MQTT] < 30 21 00 1D 64 6F 6D 6F 74 69 67 61 2F 74 68 31 20 64 65 76 69 63 65 20 20 31 2F 76 61 6C 75 65 32 34 39
2016/07/12 14:32:57 [MQTT] Received published data.
2016/07/12 14:32:57 [MQTT] Received topic : 'domotiga/th1 device 1/value2'
2016/07/12 14:32:57 [MQTT] Received payload : '49'
2016/07/12 14:32:57 [Devices] Device with type 'MQTT-JSON', address 'domotiga/th1 device 1/value2', instance 1' and interface 'MQTT Interface' not found!
2016/07/12 14:32:57 [Devices] Auto created device 'MQTT-JSON device #4' with address 'domotiga/th1 device 1/value2' of type 'MQTT JSON Generic Device' with interface 'MQTT Interface' and instance '1'
2016/07/12 14:32:57 [MQTT] Received JSON formatted data:
2016/07/12 14:32:57 [MQTT] ERROR: 'Type mismatch: wanted Collection, got Integer instead' at 'CMQTT.DecodeJSON.739'
2016/07/12 14:32:57 [MQTT] Received payload is probably not in correct JSON format '49'!

History

#1 Updated by rdnzl almost 3 years ago

  • Status changed from New to Resolved

Thanks, fixed in beta branch.

#2 Updated by Alexie over 2 years ago

  • Status changed from Resolved to Closed
  • Target version set to 1.0.024
  • Resolution set to Fixed

The BETA has been merged in the MASTER, so i will close this ticket.

Also available in: Atom PDF