Added the Ikea dimmer to the nodes

As new to Red Node when finally got it all up and running and one tutorial
I then added the dimmer switch node,
now all's just blank with
127.0.0.1 refused to connect.
Try:

What modules are your using, what is expected to be at 127.0.0.0.1? Are you using a ZigBee dongle to transmit between the node-red computer and the Ikea dimmer?

Your post lacks a lot of details. Which operating system is node red running on? Where are you seeing the 127.0.0.1 refused to connect message that you are seeing?

I'm not using any modules at present,
at this address 127.0.0.1, I expect node-red interface
no i'm not using any Zigbee dongle, however i downloaded the node as a tutorial, since i have numerous dimmer functions required with a project.
I am using Windows 10
I am seeing the error message when type the address 127.0.0.1:880 into the browser.
the browser is "Brave"

Because that is not the correct port: 1880

typo the port is 1880

the port is 1880

to install, I ran the global code line:-
npm install -g node-red-contrib-time-based-dimmer

Free tip: use the node-red editor to install nodes instead, hamburger menu > manage palette > install tab, search the node, install. (installing globally is weird).

on commandline enter (if you are on a pi):

node-red-restart

Watch the output.

thanks much appreciated

Another question: Are you trying to open the Node-RED editor in the browser (on port 1880) on the same machine as where it is running?

As you might already know, in networking, the address of 127.0.0.1 means "localhost", or the current machine. If for example, you were to run Node-RED on a raspberry pi as a lot of users on this forum do, but were to access it from your computer, 127.0.0.1 will point to the current machine, thus the computer, rather than the pi. In that case, you would need to access Node-RED in the browser with the ip address of the other machine. I'm adding this as it would explain the error you're seeing, as on your computer it might not have a process running on that exact port.

Yes I am at presently, or will be shortly running the Node-Red on the same machine that it is hosted to understand how all this goes together and works now in "Node-Red" day 2,

just now reinstalling Node-Red to alleviate the issue, and start again.

My strategy? was every tutorial add a node or two, as the nodes that I will require for this project are nowhere near the list I have compiled earlier. I have been informed that there is a better way of installing nodes,

But now however after 90 or so minutes uninstall failure, I am used to software working

How are you installing nodes?

ive attempted to completely reinstall again, however different issues now with install that was ok yesterdayt now as i understand theres better wats

i will try the red node editor for new nodes when i get this back up and running

Okay, instead of using 127.0.0.1, use the IP address of the machine that node-red is on. I think this may help.

1 Like

it worked fine on 127.0.0.1:1880 yesterday until i downloaded a module between node red tutorials. now im on install 4 with differnt issues every time, The survey stated 26.7% of Windows 10 users,thats around 220 windows 10 users in the poll, however i'm of the opinion that its not for windows at all, what operating system do you run Node Red

Look it is a voluntary survey, there could be 1 million windows 10 users and we wouldnt know it if they did not participate in the survey.

I gave you a suggestion:

node-red-restart
Watch the output.

Because you are on windows, you need to use node-red on the commandline instead and watch it.
I am pretty sure you receive errors when node red is started.

with the "suggested use of" powershell in admin i get,
this automaatically provides a choice of file extemsions and the cmd is chosen

node-red-pi.cmd : The system cannot find the path specified.
At line:1 char:1

  • node-red-pi.cmd
  •   + CategoryInfo          : NotSpecified: (The system cann...path 
                                specified.:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    
    

with the cmd window with admin io get:

C:\WINDOWS\system32>node-red
25 Feb 11:37:37 - [info]

Welcome to Node-RED

25 Feb 11:37:37 - [info] Node-RED version: v1.0.3
25 Feb 11:37:37 - [info] Node.js version: v12.16.1
25 Feb 11:37:37 - [info] Windows_NT 10.0.18363 x64 LE
25 Feb 11:37:40 - [info] Loading palette nodes
25 Feb 11:37:41 - [error] Failed to start server:
25 Feb 11:37:41 - [error] TypeError: Cannot read property 'forEach' of undefined
at Object.addModule (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\registry.js:186:27)
at C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\loader.js:108:30
at tryCatchReject (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:845:30)
at runContinuation1 (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:804:4)
at Fulfilled.when (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:592:4)
at Pending.run (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:483:13)
at Scheduler._drain (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:62:19)
at Scheduler.drain (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:27:9)
at processTicksAndRejections (internal/process/task_queues.js:79:11)

Can I ask why you're running node-red from an elevated command prompt? The default starting directory for a regular prompt is the C:\Users\... folder iirc, but for elevated prompts it defaults to system32.

with the powershell in admin the cmd option is the :slight_smile:PS C:\WINDOWS\system32> node-red.cmd
25 Feb 11:42:00 - [info]

PS C:\WINDOWS\system32> node-red.cmd
25 Feb 11:42:00 - [info]

Welcome to Node-RED

25 Feb 11:42:00 - [info] Node-RED version: v1.0.3
25 Feb 11:42:00 - [info] Node.js version: v12.16.1
25 Feb 11:42:00 - [info] Windows_NT 10.0.18363 x64 LE
25 Feb 11:42:02 - [info] Loading palette nodes
25 Feb 11:42:02 - [error] Failed to start server:
25 Feb 11:42:02 - [error] TypeError: Cannot read property 'forEach' of undefined
at Object.addModule (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\registry.js:186:27)
at C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\loader.js:108:30
at tryCatchReject (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:845:30)
at runContinuation1 (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:804:4)
at Fulfilled.when (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:592:4)
at Pending.run (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:483:13)
at Scheduler._drain (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:62:19)
at Scheduler.drain (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:27:9)
at processTicksAndRejections (internal/process/task_queues.js:79:11)

PS C:\WINDOWS\system32>

How did you install node-red ?
and the question from @afelix was: why do you run node-red from an admin powershell ?