I have node red installed in Docker and linked to HA. The configuration works fine. I just have problem to access to HA www folder.
If I use an HA palette node, I don’t have any problem to access to HA files (located in the media folder) , like the picture below,
You’ve got the source as destination filenames set to “msg.” - is that what you want? Given the content includes “.jpg”, it looks like you’re wanting to set them to the string (using “az”). As it stands, it’s looking for the “jpg” property on the “fotogarage2” object in the message.
Tks Michael, that was a mistake.
I changed “msg.” to “az” and now the path is correct but still I have an error: Error: ENOENT: no such file or directory, copyfile 'https://mypublicIP/local/Cam/fotogarage2.jpg' -> 'https://mypublicIP/local/Cam/fotogarage3.jpg'
The file are there and if I add a picture card to my lovelace with this path, I get the image…
another question: is it possible to access to HA media folder from node-red (dockerized).?
In my last setup I had Node red inside HA as an addon, and I was able to access to the media folder.
Now Ha is standalone and Node Red is installed on another ip address.
Tks
The problem with the file copy is that it won’t work with URLs, whereas the picture card does. You would have to use something like the SAMBA Share add-on. Then you could mount it on the NR machine and map the volume to the NR docker instance.
The SAMBA share will share both config and media folders (plus othes), so then you’d be referencing /config/www/Cam/... (assuming you map to /config). And similarly for the media folder.
Tks Michael, the problem is surely this but I don’t want to use Samba. I have samba share installed on my HA and works fine, but the Node Red is installed in a LXC under Proxmox and I don’t want to waste too much time on configuring a shared folder inside a Linux Container…
I solved by using the shell_command , Node Red can trigger the shell command, so I can copy via “cp” my files in any directory .