PC setup

Windows 10 setup September 2023

Enable Remote desktop



Node red install

https://nodered.org/docs/getting-started/windows 

Install node js https://nodejs.org/en 


Add palletes, but need to install git for windows for denon, then restart pc

https://git-scm.com/download/win 

Startup Setup

https://learn.microsoft.com/en-us/sysinternals/downloads/autologon 

Download autologon, unzip and double click to run autologon64.exe

Enter password for user you want to log on startup, and now it will logon when PC resets.

Reset


Run node red on startup

Start run command line (find run or windows+r key)

Run "shell:startup" in windows to open startup directory window

Go to C:\Users\USER\AppData\Roaming\npm

create a shortcut for node-red-cmd and move to startup directory window

Reset and node red will run on startup

Note that this will open a command line window to run node red out of.  Don't close the window, just minimize it.


Setup alexa and authfile

made a directory c:\alexa

In node red, setup alexa account settings to store authfile in c:\alexa
You can get to alexa account by opening any alexa apple streudel box and then edit the alexa account you made.

From directory window, right click on alexa directory, properties, security, 

Change permissions to allow users to write to alexa

 open 192.168.xxx.xxx:3456 in your pc browser (PC running node red) , log in to amazon, and it should save authfile to the alexa directory

Home Assistant in Node Red

Using node-red-contrib-home-assistant-websocket

Setup Home Assistant server account with ip address for HA (http://192.168.xxx.xxx:8123) and access token.

https://zachowj.github.io/node-red-contrib-home-assistant-websocket/guide/#generate-access-token 

HA will generate a long lived access token, copy to NR and they can talk.