room-assistant: TypeError: os.version is not a function

Describe the bug Looks like there’s some js error thrown upon startup on the Raspberry Pi Zero W TypeError: os.version is not a function

To reproduce Followed Pi Zero W tutorial with minimal yaml config below.

Relevant logs

*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
2/6/2021, 2:29:20 PM - info - IntegrationsModule: Loading integrations: home-assistant, bluetooth-low-energy
(node:3360) DeprecationWarning: You are using a version of Node.js that will reach EOL in April 2021. The support for this version will be dropped in 7.13. Please refer to https://ela.st/nodejs-support for additional information.
2/6/2021, 2:29:26 PM - info - NestFactory: Starting Nest application...
2/6/2021, 2:29:27 PM - info - InstanceLoader: AppModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: ConfigModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: NestEmitterModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: IntegrationsModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: HttpModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: DiscoveryModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: PrometheusModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: ClusterModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: TerminusModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: BluetoothModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: ScheduleModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: EntitiesModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: BluetoothLowEnergyModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: HomeAssistantModule dependencies initialized
2/6/2021, 2:29:27 PM - info - InstanceLoader: StatusModule dependencies initialized
2/6/2021, 2:29:31 PM - info - RoutesResolver: EntitiesController {/entities}:
2/6/2021, 2:29:31 PM - info - RouterExplorer: Mapped {/entities, GET} route
2/6/2021, 2:29:31 PM - info - RoutesResolver: StatusController {/status}:
2/6/2021, 2:29:31 PM - info - RouterExplorer: Mapped {/status, GET} route
2/6/2021, 2:29:31 PM - info - RoutesResolver: PrometheusController {/metrics}:
2/6/2021, 2:29:31 PM - info - RouterExplorer: Mapped {/metrics, GET} route
2/6/2021, 2:29:31 PM - warn - BluetoothLowEnergyService: The allowlist and denylist are empty, no sensors will be created! Please add some of the discovered IDs below to your configuration.
/opt/nodejs/lib/node_modules/room-assistant/node_modules/systeminformation/lib/system.js:124
          if (!result.virtual && os.version().toLowerCase().indexOf('microsoft') >= 0) {
                                    ^

TypeError: os.version is not a function
    at /opt/nodejs/lib/node_modules/room-assistant/node_modules/systeminformation/lib/system.js:124:37
    at ChildProcess.exithandler (child_process.js:285:7)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:978:16)
    at Socket.stream.socket.on (internal/child_process.js:395:11)
    at Socket.emit (events.js:189:13)
    at Pipe._handle.close (net.js:610:12)

Relevant configuration

global:
  integrations:
    - homeAssistant
    - bluetoothLowEnergy
homeAssistant:
  mqttUrl: 'mqtt://192.168.1.10:1883'
  mqttOptions:
    username: someUsername
    password: somePassword
bluetoothLowEnergy:
  timeout: 10
  maxDistance: 5

Expected behavior When starting room-assistant it should run

Environment

  • room-assistant version: 2.13.0
  • installation type: NodeJS @ v11.5.0 (npm @ 6.4.1)
  • hardware: Raspberry Pi Zero W
  • OS: Raspbian (Linux raspberry 5.10.11+ #1399)

Additional context Followed instructions from tutorial https://www.room-assistant.io/guide/quickstart-pi-zero-w.html#installing-room-assistant

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (6 by maintainers)

Most upvoted comments

Yes, with v14.13 it works. Thanks! New issue: https://github.com/mKeRix/room-assistant/issues/514