jensrossbach / node-red-contrib-chronos

Time-based Node-RED scheduling, repeating, queueing, routing, filtering and manipulating nodes
https://jensrossbach.github.io/node-red-contrib-chronos
MIT License
28 stars 1 forks source link

Able to receive environment variable on the config node (latitude and longitude) #118

Closed Anmirazik closed 8 months ago

Anmirazik commented 9 months ago

Is your feature request related to a problem? Please describe. Yes , this is because I would like to automate and simplified my deployment process of the nodered instances , by having an environment variable it will be easier to deploy nodered instances where the remote locations have different latitude and longitude value. Currently im not able to simplified the deployment process since the config nodes only accept number and not env variable hence leading to me manually configure the latitude and longituded from the nodered editor

Describe the solution you'd like I would like the config node to be able to receive input from environment variable such as ${LATITUDE} or ${LONGITUDE} where the value of the latitude and longitude can be automatically filled by the environment variable and not manually from the nodered flow editor

jensrossbach commented 8 months ago

Feature has been implemented with release 1.20.0.

Anmirazik commented 8 months ago

Hey @jensrossbach , big thanks for the update! Really appreciate the effort. One thing caught my eye though—how about rendering the map on config nodes when env variables are used? Currently, it's just numbers indicating the map. Think it would be a nice touch. What are your thoughts? Thanks!

jensrossbach commented 8 months ago

Rendering the map is not possible when the coordinates are retrieved from environment variables. Therefore it is hidden in that case. The configuration UI runs in the browser in your local environment and the Node-RED instance usually runs on a different machine in different environment. Although there is a possibility to exchange data between runtime and editor, I don't think it's worth the effort for the map. The intention for the map display is mainly to verify that the entered coordinates are correct and therefore it does not make much sense for coordinates coming from environment variables.

jensrossbach commented 8 months ago

After some more thoughts and a little proof of concept, I came to the conclusion that it's not so difficult to achieve a map display also for environment based coordinates. Therefore I will add this with the next patch release.

Anmirazik commented 8 months ago

After some more thoughts and a little proof of concept, I came to the conclusion that it's not so difficult to achieve a map display also for environment based coordinates. Therefore I will add this with the next patch release.

Can't wait to have this implemented ! Thank you @jensrossbach for this amazing library

jensrossbach commented 8 months ago

Map display for coordinates from environment variables is now available with release 1.20.1.

Anmirazik commented 8 months ago

Thank you ! @jensrossbach , really appreciate your effort and time for making this library great :)