freakent / node-red-contrib-sunevents

A node for node-red that generates events based on the position of the Sun at the appropriate time of day.
Apache License 2.0
15 stars 13 forks source link

Bug: longitute and attitude not saved on export #2

Closed jk2020 closed 3 years ago

jk2020 commented 6 years ago

After doing and export and import of a sunevents node I realize that the information of longitude/attitude is not saved when doing an export

jomat commented 5 years ago

Same happens after cutting&pasting the node to another flow.

freakent commented 4 years ago

Sorry, I am not providing any support on this. If it doesn't work for you, feel free to clone and make fixes to your own copy.

freakent commented 4 years ago

As I am updating the node I thought I would look into some earlier issues. I believe the reason the latitude and longitude are not being exported are because I store them in the credentials area. Credentials are where you store private information like passwords or credit card details etc. They are encrypted and stored separately from regular configuration data. If, like me, you set the latitude and longitude to your home address you might also consider your lat and long to be confidential information. The end result is that if you were to export your flow and share it on the internet somewhere, it would not contain your home's latitude and longitude. I hope that explains this design decision.

recklessnl commented 4 years ago

@freakent I completely understand that reasoning. Perhaps there's a way to store that data in an encrypted way, like hashing a password?

From a usability perspective, it is much nicer to be able to copy a node with all it's internal fields and settings stored.

freakent commented 4 years ago

Maybe I can look into a configuration node so that you have lat and long set once in a flow and available to all nodes that need it.

freakent commented 4 years ago

After doing and export and import of a sunevents node I realize that the information of longitude/attitude is not saved when doing an export

It is worth saying this is not a bug, it is by design.

freakent commented 3 years ago

Hi, I have a new Beta version of this SunEvents node that I think addresses this issue. Want to test it?

freakent commented 3 years ago

To try the V3 Beta follow the link to this issue:

21 V3 Beta Testers

Thanks!

freakent commented 3 years ago

The proffered way to set the lay and long is now to pass it via the msg.payload. That means you can store the lat and long in anyway that meets your requirements.