cancel
Showing results for 
Search instead for 
Did you mean: 

Option to replace the Settings.js file from the NodeRed snap

m3yco
Member

Option to replace the Settings.js file from the NodeRed snap

Hallo ctrlX CORE team,

the Settings.js file has many setting options that could be helpful for the development of NodeRed, for example:

  • mqttReconnectTime
  • definition an implementation of global context Function
  • set enviroment variables for configs
  • context Storage parameters to store data globally or persistently in a file
  • to declare own logging levels

After the app installation, this file is in the same root / nodered folder structure as the flows.json is located.

My question is could you not make this file replaceable? In the past, this was possible with the pre-series devices.

I have attached a Settings.js file as an example.

Thank you for your efforts and keep up the good work

 

With best regards

m3yco

Tags (1)
4 REPLIES 4
schoeffler
Member

Re: Option to replace the Settings.js file from the NodeRed snap

I have basically the same issue. We need to change the "uiHost" configuration value of NodeRed. The configuration value can be set within the settings.js file. An option to (easily) replace or modify the settings.js would be very helpful to us.

JohannesA
Established Member

Re: Option to replace the Settings.js file from the NodeRed snap

Hi all,

this feature will be implemented with next release-milestone RM21.07. 

Stay tuned 🙂 

Best regards

Johannes

 

 

jacaré
Established Member

Re: Option to replace the Settings.js file from the NodeRed snap

is this feature available and where can I find the documentation?

CodeShepherd
Community Moderator

Re: Option to replace the Settings.js file from the NodeRed snap

At the moment this info is missing in the documentation. But while booting up the Node-RED snap is looking to following paths in the mentioned order if there is a settings.js ($SNAP_DATA = /var/snap/ctrlx-node-red/current):

  1. $SNAP_DATA/solutions/activeConfiguration/node-RED/settings.js
  2. $SNAP_DATA/settings.js
  3. /snap/ctrlx-node-red/current/settings.js

If you like to change settings you should copy out an original Settings.js already prepared by us for normal usage (otherwise the snap will/could stop working) from the third path, then add your extensions and load it to e.g. the first path to be persistent.

Important notes:
  • Changes in the Settings.js file can have unexpected effects (like crashing the app) and will be done on your own risk.
  • Getting the original file can only be done with a root user at the moment.
  • Beware that the original file probably gets updated in later version of the app so you also will have to adapt your own .js file.

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist