project-alice-assistant / ProjectAlice

Main repository of Project Alice, contains main unit source code
GNU General Public License v3.0
694 stars 62 forks source link

Node red #617

Open Psychokiller1888 opened 2 years ago

Psychokiller1888 commented 2 years ago

After installing Alice, head to admin, and turn on Node Red. Install process goes fine, but fails at the end with:

[DeviceManager]                     Device with uid 9b1f6908-4c62-43a6-bf6f-8aec1b04fcbe does not exist
[WebInterface]                      Found new config for device WebInterface: canPlayAudio
[WebInterface]                      Found new config for device WebInterface: canRecordAudio
[WebInterface]                      Found new config for device WebInterface: hasKeyboard
[DeviceManager]                     Device named WebInterface (9b1f6908-4c62-43a6-bf6f-8aec1b04fcbe) in The Hive connected
[ThreadManager]                     Terminated thread DisplayResourceUsage, thread count: 15
[NodeRedManager]                    Starting
[NodeRedManager]                    Node-RED not found, installing, this might take a while...
[ThreadManager]                     Started new thread DisplayResourceUsage, thread count: 17
[NodeRedManager]                    Successfully installed Node-red
[NodeRedManager]                    Configuring
[ConfigManager]                     Configuration post processing method toggle failed: [Errno 2] No such file or directory: '../.node-red/.config.nodes.json'
[Traceback]                         Traceback (most recent call last):
[Traceback]                           File "/home/pi/ProjectAlice/core/base/ConfigManager.py", line 612, in doConfigUpdatePostProcessing
[Traceback]                             func(*args)
[Traceback]                           File "/home/pi/ProjectAlice/core/webui/NodeRedManager.py", line 140, in toggle
[Traceback]                             self.onStart()
[Traceback]                           File "/home/pi/ProjectAlice/core/webui/NodeRedManager.py", line 65, in onStart
[Traceback]                             self.install()
[Traceback]                           File "/home/pi/ProjectAlice/core/webui/NodeRedManager.py", line 100, in install
[Traceback]                             self.configureNewNodeRed()
[Traceback]                           File "/home/pi/ProjectAlice/core/webui/NodeRedManager.py", line 112, in configureNewNodeRed
[Traceback]                             data = json.loads(config.read_text())
[Traceback]                           File "/usr/lib/python3.7/pathlib.py", line 1199, in read_text
[Traceback]                             with self.open(mode='r', encoding=encoding, errors=errors) as f:
[Traceback]                           File "/usr/lib/python3.7/pathlib.py", line 1186, in open
[Traceback]                             opener=self._opener)
[Traceback]                           File "/usr/lib/python3.7/pathlib.py", line 1039, in _opener
[Traceback]                             return self._accessor.open(self, flags, mode)
[Traceback]                         FileNotFoundError: [Errno 2] No such file or directory: '../.node-red/.config.nodes.json'

File does indeed not yet exist

pi@ProjectAliceDev:~ $ cd .node-red
pi@ProjectAliceDev:~/.node-red $ ls
lib  node_modules  package.json  settings.js
pi@ProjectAliceDev:~/.node-red $

The service is not started

pi@ProjectAliceDev:~/.node-red $ sudo systemctl status nodered
● nodered.service - Node-RED graphical event wiring tool
   Loaded: loaded (/lib/systemd/system/nodered.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: http://nodered.org/docs/hardware/raspberrypi.html

Jan 02 11:22:27 ProjectAliceDev Node-RED[4648]: 2 Jan 11:22:27 - [info]
Jan 02 11:22:27 ProjectAliceDev Node-RED[4648]: Welcome to Node-RED
Jan 02 11:22:27 ProjectAliceDev Node-RED[4648]: ===================
Jan 02 11:22:27 ProjectAliceDev Node-RED[4648]: 2 Jan 11:22:27 - [info] Node-RED version: v2.1.4
Jan 02 11:22:27 ProjectAliceDev Node-RED[4648]: 2 Jan 11:22:27 - [info] Node.js  version: v14.18.2
Jan 02 11:22:27 ProjectAliceDev Node-RED[4648]: 2 Jan 11:22:27 - [info] Linux 5.10.63-v7l+ arm LE
Jan 02 11:22:28 ProjectAliceDev Node-RED[4648]: 2 Jan 11:22:28 - [info] Loading palette nodes
Jan 02 11:22:30 ProjectAliceDev systemd[1]: Stopping Node-RED graphical event wiring tool...
Jan 02 11:22:31 ProjectAliceDev systemd[1]: nodered.service: Succeeded.
Jan 02 11:22:31 ProjectAliceDev systemd[1]: Stopped Node-RED graphical event wiring tool.
Psychokiller1888 commented 2 years ago

Nodered doesn't ship the default node configs anymore, revamping