Hi
what is wrong on my flow???
{
"id": "1e03ce048d71e10b",
"type": "ui_template",
"z": "fcb20266.ce938",
"group": "",
"name": "show image",
"order": 4,
"width": "0",
"height": "0",
"format": "<img height=\"100%\" src=\"data:image/jpeg;base64,{{msg.payload}}\" />",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 790,
"y": 600,
"wires": [
[]
]
},
{
"id": "5e8b13a9fea4b33e",
"type": "base64",
"z": "fcb20266.ce938",
"name": "",
"action": "",
"property": "payload",
"x": 520,
"y": 600,
"wires": [
[
"1e03ce048d71e10b"
]
]
},
{
"id": "c3c37cbc9b948369",
"type": "debug",
"z": "fcb20266.ce938",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 550,
"y": 660,
"wires": []
},
{
"id": "a6b455bd1ca3d44a",
"type": "mqtt in",
"z": "fcb20266.ce938",
"name": "Photo",
"topic": "door/photo",
"qos": "2",
"datatype": "auto",
"broker": "07d3db087409f398",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 190,
"y": 600,
"wires": [
[
"5e8b13a9fea4b33e",
"c3c37cbc9b948369"
]
]
},
{
"id": "07d3db087409f398",
"type": "mqtt-broker",
"name": "Door",
"broker": "192.168.1.101",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
}
]
the ESP32-Cam sent a foto with the following sketch:
void take_picture() {
camera_fb_t * fb = NULL; // pointer
Serial.println("Taking a photo...");
fb = esp_camera_fb_get();
if (!fb) {
Serial.println("Camera capture failed");
return;
}
if (MQTT_MAX_PACKET_SIZE == 128) {
//SLOW MODE (increase MQTT_MAX_PACKET_SIZE)
client.publish_P("door/photo", fb->buf, fb->len, false);
Serial.print("SLOW MODE ");
}
else {
//FAST MODE (increase MQTT_MAX_PACKET_SIZE)
client.publish("door/photo", fb->buf, fb->len, false);
Serial.print("FAST MODE ");
}
Serial.print(" message and Foto sent... ");
esp_camera_fb_return(fb);
}
the ESP-Cam show's in the serial-monitor a successful capture and sending
18:44:40.788 -> Connecting to WiFi...
18:44:40.788 -> Initializing the camera module...init Cam..1..
18:44:41.100 -> Camera init successfully
18:44:41.100 -> Ok!
18:44:41.100 -> IP Address: http//192.168.1.69
18:44:41.100 -> Attempting MQTT connection...connected
18:44:51.319 -> Ring-Button Pressed
18:44:51.319 -> Taking a photo...
18:44:51.387 -> FAST MODE message and Foto sent... Message arrived on topic: door/comming. Message: on
no item will be listed in the Node-Red-Log and no message are given in the Node-Red Debug-list !!!
Node-Red-Log:
6 Mar 17:58:00 - [info] Started flows
6 Mar 17:58:01 - [info] [mqtt-broker:Door] Connected to broker: mqtt://192.168.1.101:1883
6 Mar 17:58:01 - [info] [mqtt-broker:0a052b42825e3cd5] Connected to broker: mqtt://192.168.1.101:1883
the ESP32-Cam ist tested, as a http-Webserver he are sending normal pictures
Examples in Github: botabotlab/ ESP32CAM-MQTT also doesn't show's a picture in the Dashboard/Template - and - tested by an independent body with the same result, no photo in the template!
many thanks in advance for further informations