Still struggling with getting the image from the esp32-cam into a jpg for later processing.
In node red, I have an Inject node, and a Call-Service node. The Call-service node just calls the snapshot service on the camera. JSON is:
{"filename":"/config/image.jpg"}
Full node-red config:
[{"id":"14ca3abb6a3d4588","type":"api-call-service","z":"d5ad3b24d52309ef","name":"","server":"c97f930d.6fa18","version":5,"debugenabled":false,"domain":"camera","service":"snapshot","areaId":["downstairs"],"deviceId":["7cbfd58903f3f2ed8cca3f9ac1af20ba"],"entityId":["camera.esp_cam_1_esp_cam_powerbox"],"data":"{\"filename\":\"/config/image.jpg\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":340,"wires":[[]]},{"id":"76a113aa2f96e4ca","type":"inject","z":"d5ad3b24d52309ef","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":620,"y":340,"wires":[["14ca3abb6a3d4588"]]},{"id":"c97f930d.6fa18","type":"server","name":"Home Assistant","addon":true}]
Initially, I had errors that I could not write to that folder so I added this to my configuration.yaml and restarted HA.
homeassistant:
allowlist_external_dirs:
- /config
whitelist_external_dirs:
- /config
I do not want the file in that folder, but HA does not like me putting anything but that folder in the allowlist and whitelist. One issue at a time.
With the above configuration, clicking the inject node results a few seconds of “Sending” under the call service node, and then the error:
Call-service error.
And I cannot find anything on this error. Any thoughts on what I should try next would be greatly appreciated.