hassio-addons/addon-node-red

Export file written with node-red (within socker container) to homecassistant directory structure #408

makkie2002 posted onGitHub

Problem/Motivation

From within a nod-red flow I want to log to text files. I want these text files to be available outside the container.

Expected behavior

See above

Actual behavior

Files not available in home assistant directory structure

Steps to reproduce

node-red import:

[{"id":"a0e80e5d.d18be","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"a211a3e5.56538","type":"inject","z":"a0e80e5d.d18be","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":220,"wires":[["4780688b.ac0858","d9d41248.6482b"]]},{"id":"4780688b.ac0858","type":"file","z":"a0e80e5d.d18be","name":"","filename":"/opt/test.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":450,"y":220,"wires":[[]]},{"id":"d9d41248.6482b","type":"file","z":"a0e80e5d.d18be","name":"","filename":"test.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":430,"y":120,"wires":[[]]}]

Proposed changes

It would be nice if a certain directory of the node-red container is mapped to a directory in the home-assistant directory structure (eg. /config/node-red/user)


:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be useful.

posted by addons-assistant[bot] over 5 years ago

Like this? [{"id":"4b317d0b.e52ec4","type":"file","z":"cf1d33be.3010a","name":"","filename":"/share/test.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":460,"y":220,"wires":[[]]}]

posted by sinclairpaul over 5 years ago

I will add, you can also write to /config if you want to.

posted by sinclairpaul over 5 years ago

Thanks ... that was exactly what I was looking for!

posted by makkie2002 over 5 years ago

Fund this Issue

$0.00
Funded

Pull requests