Does Openhab uses node js and if so, what version?

Configuration

  • Release = Raspbian GNU/Linux 10 (buster)
  • Kernel = Linux 5.10.17-v7+
  • Platform = Raspberry Pi 2 Model B Rev 1.1
  • Openhab Version = 3.0.1 - Release Build

Applications

  • Openhab 3.0.1
  • Nodejs-PoolController v7
  • Nodejs-PoolController-dashPanel v7
  • mosquitto

Problem Statement
I just learned from the other Nodejs-PoolController community that node --version v14.16.1 is not supported on the Nodejs-PoolController. They claim that v14 was just moved to LTS and they haven’t created binaries for all their libraries yet so I need downgrade to 12.x. I haven’t purposely upgrade to v14.x so I wonder if openhab is on v14.x. I checked the community and there was one reference to fronttail. So can someone shed some light on what version of node js we use.

On a VM with debian buster using openhabian I just reinstalled frontail and

ii  nodejs                                14.16.1-1nodesource1                         amd64        Node.js event-based server-side javascript engine

was installed.
The repo to be used was updated to

ls -l /etc/apt/sources.list.d/nodesource.list; cat /etc/apt/sources.list.d/nodesource.list
-rw-r--r-- 1 root root 110 Apr 18 11:41 /etc/apt/sources.list.d/nodesource.list
deb https://deb.nodesource.com/node_14.x buster main
deb-src https://deb.nodesource.com/node_14.x buster main

openHAB is written in Java 11 not Javascript. so node js is not used. As someone else posted an optional third-party program apparently does use node js.

It is generally not recommended to run any additional software not needed for OH on a Pi. On a Pi2 I would say that may ne a requirement. The Pi2 has very little resources remaining for other software after openHAB is running.

@Bruce_Osborne, understood on the minimum resource requirement but it didn’t occur to me that mthenw/frontail was a 3rd party node js application until you and @Wolfgang_S commented. Like @Wolfgang_S, I recently reinstall frontail through openhabian since frontail was not displaying event and openhab entries. It turns out that I didn’t need to do that because the problem was with the log4j2.xml file being corrupted, resulting in events and openhab entries not being captured. I guess the next step is to reach out to the owner of that repository regarding the supported node js versions or open a ticket on openhabian. Thanks for the prompt replies.

1 Like

Actually I think OH3 may use node.js since the web ui is based on Framework7, I forgot that detail.

Node.js is a server side web application server. It’s similar to Jetty (which openHAB uses), Django (Python web app server), Tomcat (a more stand alone Java web app server) etc. Framework 7 is a UI creation framework. Node.js code runs on the server. Framework 7 code runs in the browser. They are not related to each other.

To my knowledge, the only part of actual openHAB code that uses node.js is the openHAB Cloud Server. openHABian has the option to install third party applications that may use node.js (Frontail is the only one I know for sure but I think I remember NodeRed runs on Node.js too). Any concerns about compatibility with node.js versions will have to be taken up with those third party services.

All Framework7 installation instructions involve npm == node Package Manager which requires node.js. That is why I stated OH may use node.js.

That’s to develop using F7. So Yannick needs to mess with npm but end users do not.

Looking into the deb package configuration nodejs is not shown:

apt-cache depends openhab
openhab
  Depends: adduser
  Conflicts: openhab2
  Conflicts: <openhab-runtime>
  Conflicts: <openhab2-online>
  Conflicts: <openhab2-offline>
  Breaks: openhab2
  Recommends: zip
    zip:i386
  Recommends: unzip
    unzip:i386
 |Suggests: default-jre
 |Suggests: <java11-runtime>
    zulu-14
    zulu11-ca-jre
    zulu13-ca-jre
    zulu15-ca-jre
    zulu16-ca-jre
    default-jre
    openjdk-11-jre
  Suggests: <java11-runtime-headless>
    zulu11-ca-jre-headless
    zulu13-ca-jre-headless
    zulu15-ca-jre-headless
    zulu16-ca-jre-headless
    default-jre-headless
    openjdk-11-jre-headless
  Replaces: openhab2

right. openhab cloud uses nodejs.

1 Like

I recently reinstalled frontail manually using the default nodejs package in debian, which was version 10.24.0, and it runs fine, so should most likely work on node 12 as well.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.