Samba Update where is the filepath now?

Cool so you’re pumping HA sensor data with it or? Are you trying to read that in from the filesystem on the HA side (this is the part I think we need to change btw)

OK so the aircraft receiver is a separate pi +rtl receiver and that gives me a json file, which I can look at in HA, but I can’t do processing to gain the extra mile. Nodered is simply great for doing stuff and in simplistic ways so thats why I use it. I then have to get it a proper dislplay system, hence HA. I don’t care how I get it there or in what format, I just chose to write it as JSON file and flow it into HA as that was easy for me.

The Tide data I get I can load using an integration, but it gives me non local timing and also I can enhance that to give me tide heights and local time/tides data split into days and I have built a tide clock which is great as a handy reference. So now I have dumped the integration and I pull the data straight into Nodered, maniplutate it it and push it out to to HA

1 Like

K I think i get what you’re doing. It’s either going to come down to there’s a folder that you have write access to in the core filesystem (and what EXACT path it uses (in each container) or we will have to use a ‘network’ connect like FTP to transfer (but I think there’s a folder)

At the end of the day Its possible - you’re just fighting the right way to do it I’m convinced this is in the dev docs I just haven’t read that far yet.

Just think you only have to find one folder. Many of us (including me) had to restore the Entire node red setup. Ultimately the new way will be much better. More secure by a MILE and easier to recover (NR now holds all the NR bits in its own backup instead of being split in core and the addon post 16.0.2 because of this - and ultimately why they did it.)

Thanks for your help on this. I can’t be the only person who does this sort of stuff and to be honest it keeps my brain alive, so i need to keep inventing new ways of enhancing stuff and as my wife says it keeps me off the streets.
I think I am off to crash in the bed now so I will keep playing around with it, but some help is very, very welcome.

1 Like

Get some rest. I’ll read and let you know what I find.

Found what we needed

This is the file map configuration out of the current 16.0.2 docker config for NR:

map:
  - addon_config:rw
  - homeassistant_config:rw
  - media:rw
  - share:rw
  - ssl

So the first four folders have config:rw which means you can read and write in those folders (they will mount and map as we discussed in the article previously)

The way I read the doc You could probably drop the file in /homeassistant (that’s homeassistant_config:rw above as seen from NR) and pick it up in /config on HA and that Should work. If you need to move it from the HA side we might be able to run a command

Reference:

I am sorry but I am not totally grasping this as I don’t understand the architecture of HA or nodered. Please be patient with me.
I presume you wanted me to place the map: set up into the config.yaml, which I have done and I thnk you are telling me to write a file from nodered to /homeassistant_config/. Nodered rerports an error that no such directory is found.
I can get it write a folder that isn’t found from nodered within that write file node, which I did and it supposedly writes it but of course it doesn’t exist.
So to summarise i can write a file to /homeassistant/airdata4.json and it is there, but of course i can’t load it as a resource because I cant use /homeassistant:port 8123, which as far as I understand is HA’s html front end.
If I could move that file out or copy it automatically to local/community, I could use it.

can you write to /homeassistant/www/airdata4.json ?

And please when you say " i can " specify whether you mean “nodered can” or you manually can ,trough some other add-on like file-editor/samba, there is a big different

Just as an aside I can write to /media/ but i cannot load the url at
http://192.168.1.130:8123/media/skyware/airdata.json as I am unauthorised.

Nodered writes a file but it isn’t there, I can write to it from Windows, but that’s no use

/local is a www(web) root

/media is a local share, way “beyond” /www , in the file system

Can “nodered” write to

/homeassistant/local/airdata4.json ?
or
/homeassistant/www/airdata4.json ?

the plot thickens, now I can’t delete the folder I made in media or its contents from Windows, the report says it’s not found.
This is totally above me, I have tried many different scenarios for hours and I just don’t have the knowledge to do this. I hate to give up, but this has me beat, as far as I am concerned this development has ruined what was a fantastic project, which worked like a dream. Developers take note I am sadly dissapointed, but I am done

Can “nodered” write to

/homeassistant/local/airdata4.json ?
or
/homeassistant/www/airdata4.json ?

Did you made this folder in /media, when using windows " Samba " ?
or did “nodered” made this folder in /media ?

I can’t write to either of the locarions from nodered.
/homeassistant/local/airdata4.json
or
/homeassistant/www/airdata4.json
I cannot remember whether it was auto generated by nodered or if I did theis from Windows. I have tried so many options it’s all just a mess now.

Which core-version do you have ?

which supervisor do you have ?

I have to go out now, to do something a little more productive, sso i will back this afternoon

Keep an eye on this post

OK am back in front of this infernal machine and have played for about 2 hrs and this is where I am.

Added to the config.yaml

map:
  - addon_config:rw
  - homeassistant_config:rw
  - media:rw
  - share:rw
  - www:rw
  - local:rw
  - ssl

as suggested.

Sending a file from Node-Red (add on)

/config/www/community/skyware/airdata.json
“failed to write to file: Error: ENOENT: no such file or directory, open ‘/config/www/community/skyware/airdata.json’”

/homeassistant/www/community/skyware/airdata.json
This finally works and writes a file as viewed in Windows file manager
\192.168.1.130\config\www\community\skyware\airdata.json

That is good news at least, but here is the bad news

Viewed as an html page

my resource file needs to see the file as a URL so I tried this in a browser

http://192.168.1.130:8123/config/www/community/skyware/airdata.json 
takes you to a blank home assistant page with menu
http://192.168.1.130:8123/homeassistant/www/community/skyware/airdata.json  
gives error 404

So now all I need to do is figure a way of viewing this an html url

1 Like
http://192.168.1.130:8123/local/community/skyware/airdata.json 

http://192.168.1.130:8123/local/community/skyware/airdata.json

I suggest you mark " This" your own Answer(above) as solution for Your initial Topic, beside you deserve it :smile: