Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Unsolved
Collapse
Discussion Forum to share and further the development of home control and automation, independent of platforms.
  1. Home
  2. Software
  3. Multi-System Reactor
  4. Help updating node.js for bare metal install
Logon screen timeout
G
Noticing since 170 that the lock screen doesn't switch to the logon prompt but, rather, stays on the active UI until such time as you go to click something within it. Then it jumps to the login screen. Brave browser Brave 1.92.139 (Official Build) (arm64) Chromium: 150.0.7871.114
Multi-System Reactor
Reactor (Multi-System/Multi-Hub) Announcements
toggledbitsT
Build 21228 has been released. Docker images available from DockerHub as usual, and bare-metal packages here. Home Assistant up to version 2021.8.6 supported; the online version of the manual will now state the current supported versions; Fix an error in OWMWeatherController that could cause it to stop updating; Unify the approach to entity filtering on all hub interface classes (controllers); this works for device entities only; it may be extended to other entities later; Improve error detail in messages for EzloController during auth phase; Add isRuleSet() and isRuleEnabled() functions to expressions extensions; Implement set action for lock and passage capabilities (makes them more easily scriptable in some cases); Fix a place in the UI where 24-hour time was not being displayed.
Multi-System Reactor
[MSR] Copy&past of actions and/or drag&drop between set/reset
therealdbT
Hey @toggledbits One thing that bothers me while doing work on new systems/new features, is that I cannot copy&paste actions, and I cannot drag&drop between set and resets. #1 is for when I want to copy an action between different rules opened in two separate browser windows, while #2 is when I just need to flip a bunch of actions in the reset, or move some logic back and forth. Both will be appreciated, but I understand the technical challenges. Thanks!
Multi-System Reactor
Upgrade advice - upgrade from aarch64 to ARM64 image
T
I'm currently on version 26011. I understand that the aarch64 image is no longer supported. So, I therefore need to update to the ARM64 image. Can anyone possibly suggest how I update my docker compose.yaml file (see below). Ideally I'd like to keep my existing reactions etc. rather than start from scratch. # Multi-System Reactor template docker-compose.yml (version 22160) # # Change the lines indicated by "DO"... # services: reactor: container_name: reactor environment: # DO change the TZ: line to set your local time zone. # See valid TZ list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones TZ: GB # # DO NOT change this path. Your directory location is in "source" below. REACTOR_DATA_PREFIX: /var/reactor # DO change the image below to the one you are using (e.g. armv7l or aarch64 for RPi 4) image: toggledbits/reactor:latest-aarch64 restart: "always" expose: - 8111 ports: - 8111:8111 volumes: # DO change the /home/username/reactor below to the directory you created for # your local data; DO NOT change the /var/reactor part - /home/pi/docker/reactor:/var/reactor - /etc/localtime:/etc/localtime:ro tmpfs: /tmp
Multi-System Reactor
Alexa for MSR, any interest?
MikeReadingtonM
Topic thumbnail image
Multi-System Reactor
[RESOLVED] Telegram notification broke with latest update
3
Topic thumbnail image
Multi-System Reactor
[RESOLVED] Phantom device, “INFO” appears
wmarcolinW
Topic thumbnail image
Multi-System Reactor
[RESOLVED] Mode Status NULL
wmarcolinW
Topic thumbnail image
Multi-System Reactor
[RESOLVED] HTTP query failing after version 26177
wmarcolinW
Topic thumbnail image
Multi-System Reactor
Question about the find function
wmarcolinW
Topic thumbnail image
Multi-System Reactor
[Answered] OK to remove old json files?
3
Topic thumbnail image
Multi-System Reactor
Deprecation Announcement: 32-bit ARM *docker* images
toggledbitsT
If you are using the armv7l docker image, the OpenJS Foundation that publishes node is no longer producing 32-bit builds as of v24. That means the last supported LTS version of node for armv7l is v22, which will go End-of-Life in May 2027. Therefore, the Reactor armv7l image is now deprecated and will only be produced until node v22 goes EOL, and I will not publish armv7l images beyond that date. If you are running an RPi 3 or earlier with Reactor, you are on this image, and will need to upgrade hardware to a 64-bit model and use the arm64 image. If you need help getting it done, ask in this category.
Multi-System Reactor
[Solved] build 26150 - engine not starting
G
@toggledbits I pulled the image (well, Watchtower did) and within minutes the whole system went offline. The log looks like it ends with 26143. [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-mkahsmgf/26qq82mw-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-lqyfljfi/22f8on0t-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-lsb61rw8/24oenqi2-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-lrh58he0/rule-lrh58he0:S-1c00gfib-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-lrh58he0/1c00dylr-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-lrh58he0/1nam9w5u-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-miuh2qqi/22ls4lql-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-kwc6rmci/rule-kwc6rmci:S-1vj8sdfc-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-kwc6rmci/rule-kwc6rmci:S-1qanz01x-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-ladyja6a/24lq19p6-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-mk0o8iox/23oy468y-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-miscg2h3/rule-miscg2h3:S-22gmbq1c-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#re-kxgrfjke/238p0old-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#re-m7ccsso5/re-m7ccsso5-1r0myjxa-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-ladyja6a/19nl9wq2-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-ladyja6a/rule-ladyja6a:S-yl3xk9t-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-ladyja6a/rule-ladyja6a:S-yl3vv5m-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#re-ln7j2nqp/re-ln7j2nqp-22mx9lzd-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#re-ln7j2nqp/22mx87c8-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-licneppy/1mzwe7ht-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-ml3194ih/25jqt1j4-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#re-kxgrg7kf/227hshak-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-reactorexmachina/13ua1p95-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-reactorexmachina/13uagam7-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-grpvl9oypg/rule-grpvl9oypg:R-134x4cbv-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-grpvl9oypg/rule-grpvl9oypg:R-134x2fyl-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#re-lscjrws1/238p5c22-cons [latest-26143]2026-05-31T15:23:44.547Z <default:INFO> Closing container Container#Predicate#rule-lbwr0jvq/1xkczf03-cons [latest-26143]2026-05-31T15:23:44.547Z <Structure:NOTICE> Structure Structure#1 stopped [latest-26143]2026-05-31T15:23:44.547Z <app:NOTICE> Closing APIs... [latest-26143]2026-05-31T15:23:44.547Z <wsapi:NOTICE> wsapi: closing... [latest-26143]2026-05-31T15:23:44.547Z <wsapi:NOTICE> wsapi: disconnecting from "192.168.1.23#82" (1001 service closing) [latest-26143]2026-05-31T15:23:44.548Z <httpapi:NOTICE> HTTP API closing... [latest-26143]2026-05-31T15:23:44.549Z <wsapi:NOTICE> wsapi: server closed [latest-26143]2026-05-31T15:23:44.549Z <httpapi:INFO> HTTP server closed. [latest-26143]2026-05-31T15:23:44.549Z <app:NOTICE> Stopping timers... [latest-26143]2026-05-31T15:23:44.551Z <app:null> Shutdown complete, process ID 1 [latest-26143]2026-05-31T15:23:44.551Z <app:null> Closing logs... [latest-26143]2026-05-31T15:23:44.551Z <default:null> Closing log I can SSH to the VM. Alas, I do not have the previous image for 26143 as I'm a little too quick sometimes on housekeeping.
Multi-System Reactor
http request action & digest auth
tunnusT
I’m using the HTTP Request action in MSR and need to authenticate against an endpoint that uses HTTP Digest authentication. Now that endpoint was changed to use SHA-256 in digest auth, so I would like to know if MSR supports it, or is it limited to MD5-based digest auth?
Multi-System Reactor
Cloning actions in reactions does not work
tunnusT
With build 26140 (on Docker) I'm not able to clone any actions in reactions. Using Chrome if it has any relevance.
Multi-System Reactor
Has ping command been removed?
tunnusT
Topic thumbnail image
Multi-System Reactor
ReferenceError with Home Assistant data & build 26140
tunnusT
Topic thumbnail image
Multi-System Reactor
Integrations and 'Loaded'
CatmanV2C
Thanks again for the recent release. One thing I wanted to ask about integrations and their 'loaded' condition: Is there something similar that applies to the entire controller? So if I have (for example) a helper in HA that is used to trigger an automation in MSR, is it possible to effectively exclude it until MSR is 'happy' that HA is stable and its values can be trusted? This, actually goes back to the issue I had. I've got a use case where a 30 second delay from triggering is a bit of a PITA (sustained for...) and was just wondering if there's a way of knowing that 'native' HA functions are working correctly. Probably asking wrong, or it's hideously obvious, but... TIA C
Multi-System Reactor
Possible mismatch between binary_sensor in HA and MSR
CatmanV2C
Hi. First off this is an unsupported version of HS 2026.5.2 so happy to be told it's that. Currently running latest-26130-3d2a489a on a Debian Buster bare metal VM. I've been working on moving away from OpenLuup completely and up until now have been using some virtual switches t manage things like 'Is there anyone home' I have a binary sensor in HA that provides the same thing binary_sensor.someone_home which appears in MSR as hass>binary_sensor_someone_home HA shows on or off. MSR shows true or false All fine. The odd thing happened after an update of HA and a restart. From HA 13:07:04 it turned off 13:07:11 it turned on However that does not appear to have been reflected in MSR which turned all the heating and so on off as it is supposed to do, and I got all my notifications as I should. Here's a huge log section (sorry) as I wanted to show how MSR identifies that HA is up and running at 12:07:08 (Zulu) but triggers the 'There's no one here' at 12:07:17 some 6 seconds after HA updated to on. Checking in the interface MSR said the status was 'False' while HA stated 'On' rule-mkwk2fwa.dval:[{"id":1,"container":2,"value":3,"serial":92,"tss":93,"tsc":93},"rule-mkwk2fwa","rules",{"id":1,"serial":4,"triggers":5,"constraints":21,"expressions":24,"name":25,"react_set":26,"react_reset":88,"ruleset":91},16,{"type":6,"id":7,"op":8,"conditions":9,"editor_version":20},"group","trig","and",[10],{"id":11,"type":12,"data":13},"condmkwk2fwa","entity",{"entity":14,"attribute":15,"op":16,"value":17},"hass>person_rachel_matthews","x_hass.state","change",[18,19],null,"not_home",25351,{"type":6,"id":22,"op":8,"conditions":23},"cons",[],{},"Rachel is on the move",{"id":27,"actions":28,"rule":1,"editor_version":87,"set":61},"rule-mkwk2fwa:S",[29,35,62,83],{"id":30,"type":31,"data":32},"24kv27go","setvar",{"var":33,"value":34},"g_CurrentHour","${{int(strftime(\"%H\", time()))}}",{"id":36,"type":6,"actions":37,"constraints":46},"rule-mkwk2fwa:S-24kv7qgg",[38],{"id":39,"type":12,"data":40},"24kv4y1v",{"entity":41,"action":42,"args":43},"hass>system","x_hass_system.call_service",{"service":44,"data":45},"notify.alexa_media","{\n\"message\":\"Good ${{g_Greeting}} Chris. , Rachel has left the ${{g_rachel_last_area}} zone and is in transit \",\n\"data\":{\"type\":\"announce\", \"method\":\"speak\"},\n\"target\":[\"media_player.everywhere\"]\n}",{"id":47,"name":48,"type":6,"op":8,"conditions":49,"editor_version":20},"rule-mkwk2fwa:S-24kv7qgg-cons","Group Constraints Copy",[50,55],{"id":51,"type":52,"data":53},"cond24kv89zv","comment",{"comment":54},"Should speak only when I'm home",{"id":56,"type":12,"data":57},"cond24kv7qgh",{"entity":58,"attribute":59,"op":60,"value":61},"mqqt>catman_iphone","binary_sensor.state","=",true,{"id":63,"type":6,"actions":64,"constraints":72},"rule-mkwk2fwa:S-24kv2lon",[65],{"id":66,"type":67,"data":68},"28xz6paf","notify",{"method":69,"message":70,"profile":71},"Telegram","Rachel has left the ${{g_rachel_last_area}} zone and is in transit","default",{"id":73,"name":48,"type":6,"op":8,"conditions":74,"editor_version":20},"rule-mkwk2fwa:S-24kv2lon-cons",[75,79],{"id":76,"type":52,"data":77},"cond24kvlpae",{"comment":78},"Should telegram while I am away",{"id":80,"type":12,"data":81},"cond24kvkyz7",{"entity":58,"attribute":59,"op":60,"value":82},false,{"id":84,"type":52,"data":85},"24kv7hvk",{"comment":86},"Enter comment text",25314,{"id":89,"actions":90,"rule":1,"set":82},"rule-mkwk2fwa:R",[],"rs-l5sdq41x",2,1779017869959] rule-mkwk2fwa.json:{"id":"rule-mkwk2fwa","container":"rules","value":{"id":"rule-mkwk2fwa","serial":16,"triggers":{"type":"group","id":"trig","op":"and","conditions":[{"id":"condmkwk2fwa","type":"entity","data":{"entity":"hass>person_rachel_matthews","attribute":"x_hass.state","op":"change","value":[null,"not_home"]}}],"editor_version":25351},"constraints":{"type":"group","id":"cons","op":"and","conditions":[]},"expressions":{},"name":"Rachel is on the move","react_set":{"id":"rule-mkwk2fwa:S","actions":[{"id":"24kv27go","type":"setvar","data":{"var":"g_CurrentHour","value":"${{int(strftime(\"%H\", time()))}}"}},{"id":"rule-mkwk2fwa:S-24kv7qgg","type":"group","actions":[{"id":"24kv4y1v","type":"entity","data":{"entity":"hass>system","action":"x_hass_system.call_service","args":{"service":"notify.alexa_media","data":"{\n\"message\":\"Good ${{g_Greeting}} Chris. , Rachel has left the ${{g_rachel_last_area}} zone and is in transit \",\n\"data\":{\"type\":\"announce\", \"method\":\"speak\"},\n\"target\":[\"media_player.everywhere\"]\n}"}}}],"constraints":{"id":"rule-mkwk2fwa:S-24kv7qgg-cons","name":"Group Constraints Copy","type":"group","op":"and","conditions":[{"id":"cond24kv89zv","type":"comment","data":{"comment":"Should speak only when I'm home"}},{"id":"cond24kv7qgh","type":"entity","data":{"entity":"mqqt>catman_iphone","attribute":"binary_sensor.state","op":"=","value":true}}],"editor_version":25351}},{"id":"rule-mkwk2fwa:S-24kv2lon","type":"group","actions":[{"id":"28xz6paf","type":"notify","data":{"method":"Telegram","message":"Rachel has left the ${{g_rachel_last_area}} zone and is in transit","profile":"default"}}],"constraints":{"id":"rule-mkwk2fwa:S-24kv2lon-cons","name":"Group Constraints Copy","type":"group","op":"and","conditions":[{"id":"cond24kvlpae","type":"comment","data":{"comment":"Should telegram while I am away"}},{"id":"cond24kvkyz7","type":"entity","data":{"entity":"mqqt>catman_iphone","attribute":"binary_sensor.state","op":"=","value":false}}],"editor_version":25351}},{"id":"24kv7hvk","type":"comment","data":{"comment":"Enter comment text"}}],"rule":"rule-mkwk2fwa","editor_version":25314,"set":true},"react_reset":{"id":"rule-mkwk2fwa:R","actions":[],"rule":"rule-mkwk2fwa","set":false},"ruleset":"rs-l5sdq41x"},"serial":2,"tss":1779017869959,"tsc":1779017869959} rule-mkwlg11o.dval:[{"id":1,"container":2,"value":3,"serial":92,"tss":93,"tsc":93},"rule-mkwlg11o","rules",{"id":1,"serial":4,"triggers":5,"constraints":20,"expressions":23,"name":24,"react_set":25,"react_reset":88,"ruleset":91},5,{"type":6,"id":7,"op":8,"conditions":9,"editor_version":19},"group","trig","and",[10],{"id":11,"type":12,"data":13},"condmkwk2fwa","entity",{"entity":14,"attribute":15,"op":16,"value":17},"hass>person_rachel_matthews","x_hass.state","change",[18],"not_home",25351,{"type":6,"id":21,"op":8,"conditions":22},"cons",[],{},"Rachel has arrived",{"id":26,"actions":27,"rule":1,"editor_version":87,"set":65},"rule-mkwlg11o:S",[28,33,39,66,83],{"id":29,"type":30,"data":31},"24kvboht","script",{"expr":32},"g_rachel_last_area = getEntity(\"hass>person_rachel_matthews\").attributes['x_hass'].state",{"id":34,"type":35,"data":36},"24kvbohu","setvar",{"var":37,"value":38},"g_CurrentHour","${{int(strftime(\"%H\", time()))}}",{"id":40,"type":6,"actions":41,"constraints":50},"rule-mkwlg11o:S-rule-mkwlg11o-24kvbohv",[42],{"id":43,"type":12,"data":44},"24kvbohw",{"entity":45,"action":46,"args":47},"hass>system","x_hass_system.call_service",{"service":48,"data":49},"notify.alexa_media","{\n\"message\":\"Good ${{g_Greeting}} Chris. , Rachel has arrived in the ${{g_rachel_last_area}} zone.\",\n\"data\":{\"type\":\"announce\", \"method\":\"speak\"},\n\"target\":[\"media_player.everywhere\"]\n}",{"id":51,"name":52,"type":6,"op":8,"conditions":53,"editor_version":19},"24kvbohv-cons","Group Constraints Copy",[54,59],{"id":55,"type":56,"data":57},"cond24kv89zv","comment",{"comment":58},"Should speak only when I'm home",{"id":60,"type":12,"data":61},"cond24kv7qgh",{"entity":62,"attribute":63,"op":64,"value":65},"mqqt>catman_iphone","binary_sensor.state","=",true,{"id":67,"type":6,"actions":68,"constraints":76},"rule-mkwlg11o:S-rule-mkwlg11o-24kvbohx",[69],{"id":70,"type":71,"data":72},"24kvbohy","notify",{"method":73,"message":74,"profile":75},"Telegram","Rachel has arrived in the ${{g_rachel_last_area}} zone.","default",{"id":77,"name":52,"type":6,"op":8,"conditions":78,"editor_version":19},"24kvbohx-cons",[79],{"id":80,"type":12,"data":81},"cond24kvmzfp",{"entity":62,"attribute":63,"op":64,"value":82},false,{"id":84,"type":56,"data":85},"24kvbohz",{"comment":86},"Enter comment text",25314,{"id":89,"actions":90,"rule":1,"set":82},"rule-mkwlg11o:R",[],"rs-l5sdq41x",1,1770023368433] rule-mkwlg11o.json:{"id":"rule-mkwlg11o","container":"rules","value":{"id":"rule-mkwlg11o","serial":5,"triggers":{"type":"group","id":"trig","op":"and","conditions":[{"id":"condmkwk2fwa","type":"entity","data":{"entity":"hass>person_rachel_matthews","attribute":"x_hass.state","op":"change","value":["not_home"]}}],"editor_version":25351},"constraints":{"type":"group","id":"cons","op":"and","conditions":[]},"expressions":{},"name":"Rachel has arrived","react_set":{"id":"rule-mkwlg11o:S","actions":[{"id":"24kvboht","type":"script","data":{"expr":"g_rachel_last_area = getEntity(\"hass>person_rachel_matthews\").attributes['x_hass'].state"}},{"id":"24kvbohu","type":"setvar","data":{"var":"g_CurrentHour","value":"${{int(strftime(\"%H\", time()))}}"}},{"id":"rule-mkwlg11o:S-rule-mkwlg11o-24kvbohv","type":"group","actions":[{"id":"24kvbohw","type":"entity","data":{"entity":"hass>system","action":"x_hass_system.call_service","args":{"service":"notify.alexa_media","data":"{\n\"message\":\"Good ${{g_Greeting}} Chris. , Rachel has arrived in the ${{g_rachel_last_area}} zone.\",\n\"data\":{\"type\":\"announce\", \"method\":\"speak\"},\n\"target\":[\"media_player.everywhere\"]\n}"}}}],"constraints":{"id":"24kvbohv-cons","name":"Group Constraints Copy","type":"group","op":"and","conditions":[{"id":"cond24kv89zv","type":"comment","data":{"comment":"Should speak only when I'm home"}},{"id":"cond24kv7qgh","type":"entity","data":{"entity":"mqqt>catman_iphone","attribute":"binary_sensor.state","op":"=","value":true}}],"editor_version":25351}},{"id":"rule-mkwlg11o:S-rule-mkwlg11o-24kvbohx","type":"group","actions":[{"id":"24kvbohy","type":"notify","data":{"method":"Telegram","message":"Rachel has arrived in the ${{g_rachel_last_area}} zone.","profile":"default"}}],"constraints":{"id":"24kvbohx-cons","name":"Group Constraints Copy","type":"group","op":"and","conditions":[{"id":"cond24kvmzfp","type":"entity","data":{"entity":"mqqt>catman_iphone","attribute":"binary_sensor.state","op":"=","value":false}}],"editor_version":25351}},{"id":"24kvbohz","type":"comment","data":{"comment":"Enter comment text"}}],"rule":"rule-mkwlg11o","editor_version":25314,"set":true},"react_reset":{"id":"rule-mkwlg11o:R","actions":[],"rule":"rule-mkwlg11o","set":false},"ruleset":"rs-l5sdq41x"},"serial":1,"tss":1770023368433,"tsc":1770023368433} catman@openluup:~/reactor/storage/rules$ exit logout Connection to 192.168.70.249 closed. catman@ChrisMBP2021 ~ % ./NotVera ** WARNING: connection is not using a post-quantum key exchange algorithm. ** This session may be vulnerable to "store now, decrypt later" attacks. ** The server may need to be upgraded. See https://openssh.com/pq.html Linux openluup 4.19.0-20-amd64 #1 SMP Debian 4.19.235-1 (2022-03-17) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon May 18 12:13:38 2026 from 192.168.70.69 cdcatman@openluup:~$ cd reactor/lo locales/ logs/ catman@openluup:~$ cd reactor/logs/ catman@openluup:~/reactor/logs$ ls console.log hass_config.json hass_services-2025-11-1.json hass_services-2026-1-0.json hass_services-2026-5-2.json reactor.log reactor.log.4 vera-user_data-initial.json device_32 hass_device_registry.json hass_services-2025-11-2.json hass_services-2026-1-1.json hass_services.json reactor.log.1 reactor.log.5 e hass_entity_registry.json hass_services-2025-11-3.json hass_services-2026-4-2.json hass_sources.json reactor.log.2 unhandled.json hass_area_registry.json hass_integrations.json hass_services-2025-7-2.json hass_services-2026-4-4.json hass_states.json reactor.log.3 vera-status-initial.json catman@openluup:~/reactor/logs$ less reactor.log catman@openluup:~/reactor/logs$ tail reactor.log [latest-26130]2026-05-19T12:20:08.296Z <httpapi:INFO> httpapi#1 API request from ::ffff:192.168.70.249: GET /api/v1/netstatus [latest-26130]2026-05-19T12:21:03.391Z <httpapi:INFO> httpapi#1 API request from ::ffff:192.168.70.249: GET /api/v1/netstatus [latest-26130]2026-05-19T12:21:08.729Z <Rule:INFO> Rule#rule-mova0cpn re-evaluating local variable L_Cinema_Light_Level for dependency notification from ValueSensor#hass>sensor_cinema_multi_sensor_illuminance [latest-26130]2026-05-19T12:21:08.734Z <Rule:INFO> Rule#rule-mova0cpn requesting eval for changed dependent locals Array(1) ["L_Cinema_Light_Level"] [latest-26130]2026-05-19T12:22:03.501Z <httpapi:INFO> httpapi#1 API request from ::ffff:192.168.70.249: GET /api/v1/netstatus [latest-26130]2026-05-19T12:22:08.614Z <Rule:INFO> Rule#rule-mova0cpn re-evaluating local variable L_Cinema_Light_Level for dependency notification from ValueSensor#hass>sensor_cinema_multi_sensor_illuminance [latest-26130]2026-05-19T12:22:08.624Z <Rule:INFO> Rule#rule-mova0cpn requesting eval for changed dependent locals Array(1) ["L_Cinema_Light_Level"] [latest-26130]2026-05-19T12:23:03.590Z <httpapi:INFO> httpapi#1 API request from ::ffff:192.168.70.249: GET /api/v1/netstatus [latest-26130]2026-05-19T12:23:08.503Z <Rule:INFO> Rule#rule-mova0cpn re-evaluating local variable L_Cinema_Light_Level for dependency notification from ValueSensor#hass>sensor_cinema_multi_sensor_illuminance [latest-26130]2026-05-19T12:23:08.506Z <Rule:INFO> Rule#rule-mova0cpn requesting eval for changed dependent locals Array(1) ["L_Cinema_Light_Level"] catman@openluup:~/reactor/logs$ less reactor.log [latest-26130]2026-05-19T12:07:17.946Z <Rule:INFO> Cyrus Stream Vol+ (rule-ml9yjy9z in Living Room) starting rule state evaluation; because predicate-state-changed Predicate#rule-ml9yjy9z/trig [latest-26130]2026-05-19T12:07:17.947Z <Rule:INFO> Cyrus Stream Vol+ (rule-ml9yjy9z in Living Room) evaluated; rule state transition from RESET to 'SET' [latest-26130]2026-05-19T12:07:17.961Z <Rule:INFO> Cyrus Stream Vol- (rule-ml9ylxw3 in Living Room) starting rule state evaluation; because predicate-state-changed Predicate#rule-ml9ylxw3/trig [latest-26130]2026-05-19T12:07:17.962Z <Rule:INFO> Cyrus Stream Vol- (rule-ml9ylxw3 in Living Room) evaluated; rule state transition from RESET to 'SET' [latest-26130]2026-05-19T12:07:17.995Z <Engine:INFO> Enqueueing "Heating Control Mode is Home<RESET>" (rule-l680lif2:R) [latest-26130]2026-05-19T12:07:17.996Z <Engine:INFO> Enqueueing "House Mode is Home<RESET>" (rule-l5sdqazh:R) [latest-26130]2026-05-19T12:07:17.997Z <Engine:INFO> Enqueueing "Cyrus Stream Play / Pause<SET>" (rule-ml9y0xqo:S) [latest-26130]2026-05-19T12:07:17.997Z <Engine:INFO> Enqueueing "Cyrus Stream Vol+<SET>" (rule-ml9yjy9z:S) [latest-26130]2026-05-19T12:07:17.998Z <Engine:INFO> Enqueueing "Cyrus Stream Vol-<SET>" (rule-ml9ylxw3:S) [latest-26130]2026-05-19T12:07:18.000Z <Engine:NOTICE> Starting reaction Heating Control Mode is Home<RESET> (rule-l680lif2:R) [latest-26130]2026-05-19T12:07:18.000Z <Engine:INFO> Engine#1 perform power_switch.off on Entity#hass>input_boolean_heating_mode with { } by reaction Heating Control Mode is Home<RESET> (rule-l680lif2:R) step 1 [latest-26130]2026-05-19T12:07:18.000Z <HassController:INFO> HassController#hass perform power_switch.off on Entity#hass>input_boolean_heating_mode with { } [latest-26130]2026-05-19T12:07:18.001Z <HassController:INFO> HassController#hass service homeassistant.turn_off target data is { } (empty), assuming default entity target [latest-26130]2026-05-19T12:07:18.001Z <HassController:INFO> HassController#hass: sending payload for power_switch.off on Entity#hass>input_boolean_heating_mode action: { "type": "call_service", "service_data": { }, "domain": "homeassistant", "service": "turn_off", "target": { "entity_id": "input_boolean.heating_mode" } } [latest-26130]2026-05-19T12:07:18.017Z <Engine:NOTICE> Starting reaction House Mode is Home<RESET> (rule-l5sdqazh:R) [latest-26130]2026-05-19T12:07:18.018Z <Engine:INFO> House Mode is Home<RESET> all actions completed. [latest-26130]2026-05-19T12:07:18.074Z <Engine:NOTICE> Starting reaction Cyrus Stream Play / Pause<SET> (rule-ml9y0xqo:S) [latest-26130]2026-05-19T12:07:18.076Z <Engine:INFO> Engine#1 perform x_hass.call_service on Entity#hass>text_living_room_remote_ir_code_to_send with { "service": "text.set_value", "data": "{ \"value\": \"BfcG9wZ8A+ABAeABDRP3BvcGfAN8A/cG9wb///cG9wZ8A+ABAeABDRP3BvcGfAN8A/cG9wb///cG9wZ8A+ABAeABDQv3BvcGfAN8A/cG9wY=\" }" } by reaction Cyrus Stream Play / Pause<SET> (rule-ml9y0xqo:S) step 1 [latest-26130]2026-05-19T12:07:18.076Z <HassController:INFO> HassController#hass perform x_hass.call_service on Entity#hass>text_living_room_remote_ir_code_to_send with { "service": "text.set_value", "data": "{ \"value\": \"BfcG9wZ8A+ABAeABDRP3BvcGfAN8A/cG9wb///cG9wZ8A+ABAeABDRP3BvcGfAN8A/cG9wb///cG9wZ8A+ABAeABDQv3BvcGfAN8A/cG9wY=\" }" } [latest-26130]2026-05-19T12:07:18.077Z <HassController:INFO> HassController#hass: sending payload for x_hass.call_service on Entity#hass>text_living_room_remote_ir_code_to_send action: { "type": "call_service", "service_data": { "value": "BfcG9wZ8A+ABAeABDRP3BvcGfAN8A/cG9wb///cG9wZ8A+ABAeABDRP3BvcGfAN8A/cG9wb///cG9wZ8A+ABAeABDQv3BvcGfAN8A/cG9wY=" }, "domain": "text", "service": "set_value", "target": { "entity_id": "text.living_room_remote_ir_code_to_send" } } [latest-26130]2026-05-19T12:07:18.090Z <Engine:NOTICE> Starting reaction Cyrus Stream Vol+<SET> (rule-ml9yjy9z:S) [latest-26130]2026-05-19T12:07:18.091Z <Engine:INFO> Engine#1 perform x_hass.call_service on Entity#hass>text_living_room_remote_ir_code_to_send with { "service": "text.set_value", "data": "{ \"value\": \"BXsDewP3BkABAXsD4AUBBfcG9wZ7A+ABAQf//3sDewP3BkABAXsD4AUBBfcG9wZ7A+ABAQf//3sDewP3BkABAXsD4AUBD/cG9wZ7A3sDewN7A3sDewM=\" }" } by reaction Cyrus Stream Vol+<SET> (rule-ml9yjy9z:S) step 1 [latest-26130]2026-05-19T12:07:18.092Z <HassController:INFO> HassController#hass perform x_hass.call_service on Entity#hass>text_living_room_remote_ir_code_to_send with { "service": "text.set_value", "data": "{ \"value\": \"BXsDewP3BkABAXsD4AUBBfcG9wZ7A+ABAQf//3sDewP3BkABAXsD4AUBBfcG9wZ7A+ABAQf//3sDewP3BkABAXsD4AUBD/cG9wZ7A3sDewN7A3sDewM=\" }" } [latest-26130]2026-05-19T12:07:18.092Z <HassController:INFO> HassController#hass: sending payload for x_hass.call_service on Entity#hass>text_living_room_remote_ir_code_to_send action: { "type": "call_service", "service_data": { "value": "BXsDewP3BkABAXsD4AUBBfcG9wZ7A+ABAQf//3sDewP3BkABAXsD4AUBBfcG9wZ7A+ABAQf//3sDewP3BkABAXsD4AUBD/cG9wZ7A3sDewN7A3sDewM=" }, "domain": "text", "service": "set_value", "target": { "entity_id": "text.living_room_remote_ir_code_to_send" } } [latest-26130]2026-05-19T12:07:18.093Z <Engine:NOTICE> Starting reaction Cyrus Stream Vol-<SET> (rule-ml9ylxw3:S) [latest-26130]2026-05-19T12:07:18.093Z <Engine:INFO> Engine#1 perform x_hass.call_service on Entity#hass>text_living_room_remote_ir_code_to_send with { "service": "text.set_value", "data": "{ \"value\": \"AXoD4AEBA/EGegPgBQEF8QbxBnoDgAFACQP//3oD4AEBQBHgBQEP8QbxBnoDegN6A3oD8QZ6Aw==\" }" } by reaction Cyrus Stream Vol-<SET> (rule-ml9ylxw3:S) step 1 [latest-26130]2026-05-19T12:07:18.094Z <HassController:INFO> HassController#hass perform x_hass.call_service on Entity#hass>text_living_room_remote_ir_code_to_send with { "service": "text.set_value", "data": "{ \"value\": \"AXoD4AEBA/EGegPgBQEF8QbxBnoDgAFACQP//3oD4AEBQBHgBQEP8QbxBnoDegN6A3oD8QZ6Aw==\" }" } [latest-26130]2026-05-19T12:07:18.111Z <HassController:INFO> HassController#hass: sending payload for x_hass.call_service on Entity#hass>text_living_room_remote_ir_code_to_send action: { "type": "call_service", "service_data": { "value": "AXoD4AEBA/EGegPgBQEF8QbxBnoDgAFACQP//3oD4AEBQBHgBQEP8QbxBnoDegN6A3oD8QZ6Aw==" }, "domain": "text", "service": "set_value", "target": { "entity_id": "text.living_room_remote_ir_code_to_send" } } [latest-26130]2026-05-19T12:07:18.113Z <Rule:INFO> Rule#rule-l5sdqazh reaction rule-l5sdqazh:R completed This is hardly the end of the world as HA restarting is rare and I simply hit refresh on the entity in MSR but is this some kind of race condition or something that needs addressing? Hoping I've given enough data to make it sensible C
Multi-System Reactor
[Solved] Rulesets with multiple groups in Set Reaction not working post-26116
G
Topic thumbnail image
Multi-System Reactor

Help updating node.js for bare metal install

Scheduled Pinned Locked Moved Multi-System Reactor
14 Posts 6 Posters 9.0k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • cw-kidC Offline
    cw-kidC Offline
    cw-kid
    wrote on last edited by
    #3

    This is the contents of that log file it mentioned:

    0 verbose cli /usr/bin/node /usr/bin/npm
    1 info using npm@8.19.4
    2 info using node@v16.20.2
    3 timing npm:load:whichnode Completed in 1ms
    4 timing config:load:defaults Completed in 7ms
    5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 3ms
    6 timing config:load:builtin Completed in 3ms
    7 timing config:load:cli Completed in 10ms
    8 timing config:load:env Completed in 1ms
    9 timing config:load:project Completed in 26ms
    10 timing config:load:file:/root/.npmrc Completed in 10ms
    11 timing config:load:user Completed in 11ms
    12 timing config:load:file:/usr/etc/npmrc Completed in 1ms
    13 timing config:load:global Completed in 1ms
    14 timing config:load:validate Completed in 1ms
    15 timing config:load:credentials Completed in 6ms
    16 timing config:load:setEnvs Completed in 4ms
    17 timing config:load Completed in 73ms
    18 timing npm:load:configload Completed in 74ms
    19 timing npm:load:mkdirpcache Completed in 4ms
    20 timing npm:load:mkdirplogs Completed in 1ms
    21 verbose title npm install npm@10.2.5
    22 verbose argv "install" "--global" "npm@10.2.5"
    23 timing npm:load:setTitle Completed in 5ms
    24 timing config:load:flatten Completed in 14ms
    25 timing npm:load:display Completed in 24ms
    26 verbose logfile logs-max:10 dir:/root/.npm/_logs
    27 verbose logfile /root/.npm/_logs/2023-12-08T14_42_53_914Z-debug-0.log
    28 timing npm:load:logFile Completed in 25ms
    29 timing npm:load:timers Completed in 0ms
    30 timing npm:load:configScope Completed in 0ms
    31 timing npm:load Completed in 138ms
    32 silly logfile start cleaning logs, removing 1 files
    33 silly logfile done cleaning log files
    34 http fetch GET 200 https://registry.npmjs.org/npm 126ms (cache hit)
    35 timing command:install Completed in 275ms
    36 verbose stack Error: Unsupported engine
    36 verbose stack     at Object.checkEngine (/usr/lib/node_modules/npm/node_modules/npm-install-checks/lib/index.js:14:25)
    36 verbose stack     at Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:109:16)
    36 verbose stack     at async module.exports (/usr/lib/node_modules/npm/lib/cli.js:78:5)
    37 verbose pkgid npm@10.2.5
    38 verbose cwd /root
    39 verbose Linux 4.19.0-21-amd64
    40 verbose node v16.20.2
    41 verbose npm  v8.19.4
    42 error code EBADENGINE
    43 error engine Unsupported engine
    44 error engine Not compatible with your version of node/npm: npm@10.2.5
    45 error notsup Not compatible with your version of node/npm: npm@10.2.5
    45 error notsup Required: {"node":"^18.17.0 || >=20.5.0"}
    45 error notsup Actual:   {"npm":"8.19.4","node":"v16.20.2"}
    46 verbose exit 1
    47 timing npm Completed in 774ms
    48 verbose code 1
    49 error A complete log of this run can be found in:
    49 error     /root/.npm/_logs/2023-12-08T14_42_53_914Z-debug-0.log
    
    
    1 Reply Last reply
    0
    • PablaP Offline
      PablaP Offline
      Pabla
      wrote on last edited by Pabla
      #4

      So i ran into almost the exact same issue and this is how I managed to update NodeJS. Instead of running sudo apt update and sudo apt upgrade I followed the install instructions on NodeJS Github.

      To make Reactor happy I copied the path the old nodejs file was in and in my case it was /home/arman/.local/lib/nodejs I believe yours looks like it should be the same. Before doing anything copy and delete the NodeJS folder and put it somewhere where you can access it again if you run into any issues. Following the steps replace anywhere where it says /usr/local/lib/nodejs with /home/{user}/.local/lib/nodejs. This is where I have a band-aid repair to get Reactor back up and working. I renamed the new folder in the /home/{user}/.local/lib/nodejs directory from the new version of NodeJS to the previous version. In my case it I changed it from node-v20.10.0-linux-armv7l to node-v16.15.1-linux-armv7l. Then Reactor was happy and no error saying I need to update Node. This is a temporary fix however.

      I am no Linux expert so please take my advice with caution lol!

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gwp1
        wrote on last edited by
        #5

        I had same issue and went back to the MSR manual where it noted if you didn't have a system install of nodejs MSR would do a local one for just it's user.

        I reran the opening steps from the manual and it updated to 18.x just fine.

        *Hubitat C-7 2.5.0.159
        *Proxmox VE v8, Beelink MiniPC 12GBs, SSD

        *HAOS
        Core 2026.7.2
        w/ HA Connect ZWA-2
        FW: v1.1
        SDK: v7.23.1

        *Prod MSR in docker/portainer
        MSR: latest-26193-8dd8f854
        MQTTController: 25139
        ZWave Controller: 25139

        1 Reply Last reply
        0
        • cw-kidC Offline
          cw-kidC Offline
          cw-kid
          wrote on last edited by cw-kid
          #6

          Thanks for the replies and tips.

          In the end after more Googling for my Debian Buster install this seems to have fixed it for me.

          I removed the new /usr/local/bin/node directory that got installed the other day.

          rm /usr/local/bin/node

          Then running the command "which node" the path was back to the old path of /usr/bin/node and "node -v" was showing the old version again of 16.20.2

          I then found these commands on Google and tried them:

          curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -

          sudo apt-get install -y nodejs

          This seems to have upgraded the 16.20.2 version with a newer version, I saw this line in the terminal output

          Unpacking nodejs (20.5.1-deb-1nodesource1) over (16.20.2-deb-1nodesource1)

          Now when I do a node -v it says its version 20.5.1 and the alert message in MSR has now gone.

          "which node" still says the path is the original path of /usr/bin/node also.

          I have no idea if this was the correct way to do it but I think it has worked.

          1 Reply Last reply
          0
          • wmarcolinW Offline
            wmarcolinW Offline
            wmarcolin
            wrote on last edited by
            #7

            I think we all have a similar problem. My step-by-step was as follows.

            sudo apt remove nodejs
            sudo apt remove npm
            sudo apt autoremove
            
            sudo apt purge nodejs
            sudo apt purge npm
            sudo apt autoremove
            
            sudo apt-get update
            sudo apt-get install -y ca-certificates curl gnupg
            sudo mkdir -p /etc/apt/keyrings
            curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
            
            NODE_MAJOR=20
            echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
            
            sudo apt-get update
            sudo apt-get install nodejs -y
            

            Now comes the very rare story, if I'm not as toot I get this information.

            node -v
            v20.10.0
            
            npm -v
            10.2.3
            
            

            PERFECT!!

            But after the su --, I become root and the version that comes is 12? and then I really don't understand. I did the tasks like this, as root and without root, in the same way.

            If any expert can help me understand this madness.

            Thanks.

            1 Reply Last reply
            0
            • toggledbitsT Offline
              toggledbitsT Offline
              toggledbits
              wrote on last edited by
              #8

              The PATH environment variable for root is different from that of regular users. You can echo $PATH in each to see the differences. The path is processed in order, first come first served.

              Author of Multi-system Reactor and Reactor, DelayLight, Switchboard, and about a dozen other plugins that run on Vera and openLuup.

              1 Reply Last reply
              1
              • wmarcolinW Offline
                wmarcolinW Offline
                wmarcolin
                wrote on last edited by
                #9

                Well, I've just solved my problem, whether it's the right way or not I can't say, but it was brute force, I used the "which node" command, I located all the directories regardless of version and deleted them (rm node -r), this while being root. Then I did a fresh install 🙂 solved.

                toggledbitsT 1 Reply Last reply
                0
                • wmarcolinW wmarcolin

                  Well, I've just solved my problem, whether it's the right way or not I can't say, but it was brute force, I used the "which node" command, I located all the directories regardless of version and deleted them (rm node -r), this while being root. Then I did a fresh install 🙂 solved.

                  toggledbitsT Offline
                  toggledbitsT Offline
                  toggledbits
                  wrote on last edited by toggledbits
                  #10

                  @wmarcolin That may have worked, but it's not strictly right and may lead to complications down the road, like versions of node and npm being out of sync.

                  NOTE: Some of this can be used as instructions. Read all carefully and understand what you are doing before you actually do anything. If you don't understand, ask first, understand first, then proceed (always with caution and careful attention to detail).

                  Generally speaking, it's not a good idea to tamper with the system-installed version of any utility if there is one. If you use a command like apt-get install node or similar and it puts a version into /usr/bin, that's where you should leave it, and never change it (unless apt or yum does). That's because the system packages are versioned together as a group, so other system utilities may have dependencies on that system-blessed version of the package and its associated utilities and libraries.

                  When you want a newer version of node, the generally-recommended way is to do a custom install, which can be done either to a user-specific directory (so that one user can have a private version), or system-wide in a location under /usr/local (usually installed in /usr/local/lib with symbolic links from /usr/local/bin for the executables).

                  Either way, the version of node that runs is the first one encountered in the PATH environment then in effect.

                  Reactor has been tested with all three common install methods: the native system packages, when up to date; a /usr/local install; and a user-directory-specific install. All work fine.

                  Taking the structure of one of my RPis running Raspbian Buster (Debian 10), but should apply to almost any Linux-based platform...

                  The default system install puts a node and npm in /usr/bin:

                  pi@rpi4-2:~ $ ls -l /usr/bin/node
                  -rwxr-xr-x 1 root root 5536 Feb 24  2023 /usr/bin/node
                  pi@rpi4-2:~ $ /usr/bin/node -v
                  v10.24.0
                  pi@rpi4-2:~ $
                  

                  Notice that when I ran the node command, I ran it with a full path (i.e. as /usr/bin/node and not just typing node). That's because I have a newer version of node installed in /usr/local that is configured to take precedence. And also notice how old that system-installed package is!

                  My later-version installation in /usr/local/lib (specifically) looks like this:

                  pi@rpi4-2:~ $ ls -l /usr/local/lib/
                  total 12
                  drwxr-xr-x 3 root root  4096 Nov 26 08:59 nodejs
                  drwxrwsr-x 4 root staff 4096 Nov 26 09:13 python2.7
                  drwxrwsr-x 3 root staff 4096 May  7  2021 python3.7
                  pi@rpi4-2:~ $ ls -l /usr/local/lib/nodejs
                  total 42112
                  drwxr-xr-x 6 1001 1001     4096 Oct 13 10:03 node-v18.18.2-linux-armv7l
                  -rw-r--r-- 1 root root 20932900 Oct 13 10:05 node-v18.18.2-linux-armv7l.tar.xz
                  -rw-r--r-- 1 root root 22182716 Nov 22 07:30 node-v20.10.0-linux-armv7l.tar.xz
                  pi@rpi4-2:~ $
                  

                  You can see here, I have a nodejs subdirectory in /usr/local/lib. In here, I've got the downloaded archives for two versions (an 18 and a 20), of which the 18 is currently unpacked in the directory node-v18.18.2-linux-armv7l. That's a completely self-contained package for nodejs, ready to run. All that was needed was to configure it to run.

                  Configuring this version of node to run took two additional steps. First, I went to /usr/local/bin, and symbolically linked the executables from the v18 package, like this (notice I'm doing this step as root) :

                  root@rpi4-2:~# cd /usr/local/bin
                  root@rpi4-2:/usr/local/bin# ln -sf /usr/local/lib/nodejs/node-v18.18.2-linux-armv7l/bin/* .
                  root@rpi4-2:/usr/local/bin# ls -l
                  total 4
                  lrwxrwxrwx 1 root root 61 Dec 11 12:30 corepack -> /usr/local/lib/nodejs/node-v18.18.2-linux-armv7l/bin/corepack
                  lrwxrwxrwx 1 root root 57 Dec 11 12:30 node -> /usr/local/lib/nodejs/node-v18.18.2-linux-armv7l/bin/node
                  lrwxrwxrwx 1 root root 56 Dec 11 12:30 npm -> /usr/local/lib/nodejs/node-v18.18.2-linux-armv7l/bin/npm
                  lrwxrwxrwx 1 root root 56 Dec 11 12:30 npx -> /usr/local/lib/nodejs/node-v18.18.2-linux-armv7l/bin/npx
                  root@rpi4-2:/usr/local/bin#
                  

                  The first command changes directory to /usr/local/bin, and the second symbolically links all files in the package's bin subdirectory to the current directory (which is our /usr/local/bin). The ls command shows the result of that operation. So you can see, the executable in /usr/local/bin/node isn't an executable at all, it's a symbolic link to the executable in the package directory. Same with the other nodejs commands in the package.

                  The last step is to get that executable in /usr/local/bin/node to take precedence over the older version in the system install (i.e. the one in /usr/bin/node). All that is required to do this is that /usr/local/bin/node be seen by the shell before /usr/bin/node. This is done by making sure /usr/local/bin comes before /usr/bin in the PATH environment variable. On most systems, this is already the default case -- it's set up that way and you don't need to do anything. On some systems, you may need to add it. This can be done by adding a snippet like the following to the end of /etc/profile (to make it a system-wide change):

                  PATH=/usr/local/bin:$PATH
                  export PATH
                  

                  This puts /usr/local/bin at the head of the PATH. Again, this usually isn't necessary, because /usr/local/bin is already early in the path on most systems by default. You can check your path by doing echo $PATH as I said before. If you do end up having to make this change, you'll need to log out and log back in to make it take effect. And, any time you edit anything in /etc, it's a good idea to make a backup copy of the unmodified file first, in case you goof something up and need to revert (cp /etc/profile /etc/profile.old is sufficient).

                  If you're installing a per-user version of nodejs, the structure is fairly similar, but rather than unpacking the nodejs archive into /usr/local/lib/nodejs, you unpack it into ~/.local/lib/nodejs/ (remember ~ is a synonym for $HOME and means the current user's home directory path) with the same structure that I showed above for /usr/local/.... Notice we are not root here!

                  # For user-local install, all work is done NOT as root. Here, I'm just "pi"
                  pi@rpi4-2:~ $ mkdir -p ~/.local/lib
                  pi@rpi4-2:~ $ mkdir -p ~/.local/bin
                  pi@rpi4-2:~ $ cd ~/.local/lib/
                  pi@rpi4-2:~/.local/lib $ mkdir -p nodejs
                  pi@rpi4-2:~/.local/lib $ cd nodejs
                  pi@rpi4-2:~/.local/lib/nodejs $ wget 'https://nodejs.org/dist/latest-v20.x/node-v20.10.0-linux-armv7l.tar.xz'
                  --2023-12-11 12:46:55--  https://nodejs.org/dist/latest-v20.x/node-v20.10.0-linux-armv7l.tar.xz
                  Resolving nodejs.org (nodejs.org)... 104.20.23.46, 104.20.22.46, 2606:4700:10::6814:162e, ...
                  Connecting to nodejs.org (nodejs.org)|104.20.23.46|:443... connected.
                  HTTP request sent, awaiting response... 200 OK
                  Length: 22182716 (21M) [application/x-xz]
                  Saving to: ânode-v20.10.0-linux-armv7l.tar.xz.1â
                  
                  node-v20.10.0-linux-armv7l.tar.x 100%[==========================================================>]  21.15M  18.5MB/s    in 1.1s
                  
                  2023-12-11 12:46:57 (18.5 MB/s) - ânode-v20.10.0-linux-armv7l.tar.xz.1â saved [22182716/22182716]
                  
                  pi@rpi4-2:~/.local/lib/nodejs $ ls
                  node-v20.10.0-linux-armv7l.tar.xz
                  pi@rpi4-2:~/.local/lib/nodejs $ tar xJf node-v20.10.0-linux-armv7l.tar.xz    # J is for .xz, z is for .gz
                  pi@rpi4-2:~/.local/lib/nodejs $ cd ~/.local/bin
                  pi@rpi4-2:~/.local/bin $ ln -sf ~/.local/lib/nodejs/node-v20.10.0-linux-armv7l/bin/* .
                  pi@rpi4-2:~/.local/bin $ ls -l
                  total 16
                  lrwxrwxrwx 1 pi pi 66 Dec 11 12:48 corepack -> /home/pi/.local/lib/nodejs/node-v20.10.0-linux-armv7l/bin/corepack
                  lrwxrwxrwx 1 pi pi 62 Dec 11 12:48 node -> /home/pi/.local/lib/nodejs/node-v20.10.0-linux-armv7l/bin/node
                  lrwxrwxrwx 1 pi pi 61 Dec 11 12:48 npm -> /home/pi/.local/lib/nodejs/node-v20.10.0-linux-armv7l/bin/npm
                  lrwxrwxrwx 1 pi pi 61 Dec 11 12:48 npx -> /home/pi/.local/lib/nodejs/node-v20.10.0-linux-armv7l/bin/npx
                  pi@rpi4-2:~/.local/bin $
                  

                  Reading these steps, the first five commands create the structure of the .local subdirectory needed, with subdirectories bin, lib and lib/nodejs within just like we would have in /usr/local. At this point, the current directory is ~/.local/lib/nodejs, and the wget command is used to download the nodejs package we want (change version and architecture to what you need if you are actually doing this). Then we un-tar it right where we are. After un-taring it, we change directory to our own ~/.local/bin and make the symbolic links for the nodejs commands in the package directory, just like we did for /usr/local.

                  The last step is again, and this may be default, is making sure this user's PATH environment variable includes our new local ~/.local/bin directory. Check it with echo $PATH to see if you need to make the addition. If so, the easiest way to do that is to add the following snipped to ~/.profile, which is the per-user equivalent to /etc/profile (the per-user script runs after the /etc script at login) to set up the shell environment. My Raspbian Buster (Debian 10) systems seem to have this done already as a default, so before making any changes, check your PATH and/or ~/.profile.

                  PATH=$HOME/.local/bin:$PATH
                  export PATH
                  

                  Log out and back in, and then a which node should give you ~/.local/bin/node (or /home/username/.local/bin/node). You then have a per-user custom version of nodejs that doesn't interfere with any system versions.

                  Now, for running Reactor as a service, you need to be aware of where you are running it, and as who. It's generally not recommended to run Reactor as root on any bare-metal system (it runs as root on docker containers, but that's OK because the container is a constrained virtual environment). So when setting up, for example, your systemd profile for Reactor, you would want to make sure the profile contains both a User directory to set the correct (non-root) user for the running process, and a full path to the correct node executable in ExecStart (e.g. ExecStart=/home/pi/.local/bin/node app -p).

                  One last point: nodejs is so well-written that its entire dependencies exist entirely within its package structure, so whatever node command runs knows automatically where to find everything else it needs — you don't need to set a bunch of other environment variables to make each version work properly. That means you could, for example, run /usr/bin/node and see a perfectly working v10.24.0 as I showed above, or /usr/local/bin/node and get a perfectly-working v18.18.2 if that's what is installed there, and ~/.local/bin/node to get a fine v20.9.0 environment if that's what's installed there. Not all packages are this tight, and we can be grateful for it.

                  Tip: don't stop at which node when you are trying to figure out what is running. nodejs itself makes extensive use of symbolic links, so doing which node is only the tip of the iceberg. You need to then do ls -l /that-path and see if it's a symbolic link to somewhere else, as I showed in the output above. Keep following those links until you find the "real deal" and you'll find which version is actually running and where it actually lives.

                  I hope some of this clarifies how nodejs is installed, and highlights how you can actually have multiple versions of it installed on the system and they co-exist quite well, you just have to be careful.

                  Author of Multi-system Reactor and Reactor, DelayLight, Switchboard, and about a dozen other plugins that run on Vera and openLuup.

                  wmarcolinW 1 Reply Last reply
                  3
                  • CatmanV2C Offline
                    CatmanV2C Offline
                    CatmanV2
                    wrote on last edited by
                    #11

                    @toggledbits fabulous post, there. Thanks. 18.19.0 in /usr/local/bin for Reactor and, apparently working fine 🙂

                    Any particular reason not to go to 21?

                    Cheers

                    C

                    The Ex-Vera abuser know as CatmanV2.....

                    toggledbitsT 1 Reply Last reply
                    0
                    • CatmanV2C CatmanV2

                      @toggledbits fabulous post, there. Thanks. 18.19.0 in /usr/local/bin for Reactor and, apparently working fine 🙂

                      Any particular reason not to go to 21?

                      Cheers

                      C

                      toggledbitsT Offline
                      toggledbitsT Offline
                      toggledbits
                      wrote on last edited by toggledbits
                      #12

                      @CatmanV2 said in Help updating node.js for bare metal install:

                      Any particular reason not to go to 21?

                      Yes! Only even-numbered versions of nodejs are LTS (long-term support). For the longest life of the system between upgrades like this, use the LTS versions only. That's why I recommend 18 and 20.

                      Here's their release and support calendar: https://nodejs.github.io/nodejs.dev/en/about/releases/

                      Notice that 21 will be EOL far sooner than either 18 or 20.

                      Author of Multi-system Reactor and Reactor, DelayLight, Switchboard, and about a dozen other plugins that run on Vera and openLuup.

                      1 Reply Last reply
                      1
                      • CatmanV2C Offline
                        CatmanV2C Offline
                        CatmanV2
                        wrote on last edited by
                        #13

                        Doh! Thanks for that!

                        C

                        The Ex-Vera abuser know as CatmanV2.....

                        1 Reply Last reply
                        0
                        • toggledbitsT toggledbits

                          @wmarcolin That may have worked, but it's not strictly right and may lead to complications down the road, like versions of node and npm being out of sync.

                          NOTE: Some of this can be used as instructions. Read all carefully and understand what you are doing before you actually do anything. If you don't understand, ask first, understand first, then proceed (always with caution and careful attention to detail).

                          Generally speaking, it's not a good idea to tamper with the system-installed version of any utility if there is one. If you use a command like apt-get install node or similar and it puts a version into /usr/bin, that's where you should leave it, and never change it (unless apt or yum does). That's because the system packages are versioned together as a group, so other system utilities may have dependencies on that system-blessed version of the package and its associated utilities and libraries.

                          When you want a newer version of node, the generally-recommended way is to do a custom install, which can be done either to a user-specific directory (so that one user can have a private version), or system-wide in a location under /usr/local (usually installed in /usr/local/lib with symbolic links from /usr/local/bin for the executables).

                          Either way, the version of node that runs is the first one encountered in the PATH environment then in effect.

                          Reactor has been tested with all three common install methods: the native system packages, when up to date; a /usr/local install; and a user-directory-specific install. All work fine.

                          Taking the structure of one of my RPis running Raspbian Buster (Debian 10), but should apply to almost any Linux-based platform...

                          The default system install puts a node and npm in /usr/bin:

                          pi@rpi4-2:~ $ ls -l /usr/bin/node
                          -rwxr-xr-x 1 root root 5536 Feb 24  2023 /usr/bin/node
                          pi@rpi4-2:~ $ /usr/bin/node -v
                          v10.24.0
                          pi@rpi4-2:~ $
                          

                          Notice that when I ran the node command, I ran it with a full path (i.e. as /usr/bin/node and not just typing node). That's because I have a newer version of node installed in /usr/local that is configured to take precedence. And also notice how old that system-installed package is!

                          My later-version installation in /usr/local/lib (specifically) looks like this:

                          pi@rpi4-2:~ $ ls -l /usr/local/lib/
                          total 12
                          drwxr-xr-x 3 root root  4096 Nov 26 08:59 nodejs
                          drwxrwsr-x 4 root staff 4096 Nov 26 09:13 python2.7
                          drwxrwsr-x 3 root staff 4096 May  7  2021 python3.7
                          pi@rpi4-2:~ $ ls -l /usr/local/lib/nodejs
                          total 42112
                          drwxr-xr-x 6 1001 1001     4096 Oct 13 10:03 node-v18.18.2-linux-armv7l
                          -rw-r--r-- 1 root root 20932900 Oct 13 10:05 node-v18.18.2-linux-armv7l.tar.xz
                          -rw-r--r-- 1 root root 22182716 Nov 22 07:30 node-v20.10.0-linux-armv7l.tar.xz
                          pi@rpi4-2:~ $
                          

                          You can see here, I have a nodejs subdirectory in /usr/local/lib. In here, I've got the downloaded archives for two versions (an 18 and a 20), of which the 18 is currently unpacked in the directory node-v18.18.2-linux-armv7l. That's a completely self-contained package for nodejs, ready to run. All that was needed was to configure it to run.

                          Configuring this version of node to run took two additional steps. First, I went to /usr/local/bin, and symbolically linked the executables from the v18 package, like this (notice I'm doing this step as root) :

                          root@rpi4-2:~# cd /usr/local/bin
                          root@rpi4-2:/usr/local/bin# ln -sf /usr/local/lib/nodejs/node-v18.18.2-linux-armv7l/bin/* .
                          root@rpi4-2:/usr/local/bin# ls -l
                          total 4
                          lrwxrwxrwx 1 root root 61 Dec 11 12:30 corepack -> /usr/local/lib/nodejs/node-v18.18.2-linux-armv7l/bin/corepack
                          lrwxrwxrwx 1 root root 57 Dec 11 12:30 node -> /usr/local/lib/nodejs/node-v18.18.2-linux-armv7l/bin/node
                          lrwxrwxrwx 1 root root 56 Dec 11 12:30 npm -> /usr/local/lib/nodejs/node-v18.18.2-linux-armv7l/bin/npm
                          lrwxrwxrwx 1 root root 56 Dec 11 12:30 npx -> /usr/local/lib/nodejs/node-v18.18.2-linux-armv7l/bin/npx
                          root@rpi4-2:/usr/local/bin#
                          

                          The first command changes directory to /usr/local/bin, and the second symbolically links all files in the package's bin subdirectory to the current directory (which is our /usr/local/bin). The ls command shows the result of that operation. So you can see, the executable in /usr/local/bin/node isn't an executable at all, it's a symbolic link to the executable in the package directory. Same with the other nodejs commands in the package.

                          The last step is to get that executable in /usr/local/bin/node to take precedence over the older version in the system install (i.e. the one in /usr/bin/node). All that is required to do this is that /usr/local/bin/node be seen by the shell before /usr/bin/node. This is done by making sure /usr/local/bin comes before /usr/bin in the PATH environment variable. On most systems, this is already the default case -- it's set up that way and you don't need to do anything. On some systems, you may need to add it. This can be done by adding a snippet like the following to the end of /etc/profile (to make it a system-wide change):

                          PATH=/usr/local/bin:$PATH
                          export PATH
                          

                          This puts /usr/local/bin at the head of the PATH. Again, this usually isn't necessary, because /usr/local/bin is already early in the path on most systems by default. You can check your path by doing echo $PATH as I said before. If you do end up having to make this change, you'll need to log out and log back in to make it take effect. And, any time you edit anything in /etc, it's a good idea to make a backup copy of the unmodified file first, in case you goof something up and need to revert (cp /etc/profile /etc/profile.old is sufficient).

                          If you're installing a per-user version of nodejs, the structure is fairly similar, but rather than unpacking the nodejs archive into /usr/local/lib/nodejs, you unpack it into ~/.local/lib/nodejs/ (remember ~ is a synonym for $HOME and means the current user's home directory path) with the same structure that I showed above for /usr/local/.... Notice we are not root here!

                          # For user-local install, all work is done NOT as root. Here, I'm just "pi"
                          pi@rpi4-2:~ $ mkdir -p ~/.local/lib
                          pi@rpi4-2:~ $ mkdir -p ~/.local/bin
                          pi@rpi4-2:~ $ cd ~/.local/lib/
                          pi@rpi4-2:~/.local/lib $ mkdir -p nodejs
                          pi@rpi4-2:~/.local/lib $ cd nodejs
                          pi@rpi4-2:~/.local/lib/nodejs $ wget 'https://nodejs.org/dist/latest-v20.x/node-v20.10.0-linux-armv7l.tar.xz'
                          --2023-12-11 12:46:55--  https://nodejs.org/dist/latest-v20.x/node-v20.10.0-linux-armv7l.tar.xz
                          Resolving nodejs.org (nodejs.org)... 104.20.23.46, 104.20.22.46, 2606:4700:10::6814:162e, ...
                          Connecting to nodejs.org (nodejs.org)|104.20.23.46|:443... connected.
                          HTTP request sent, awaiting response... 200 OK
                          Length: 22182716 (21M) [application/x-xz]
                          Saving to: ânode-v20.10.0-linux-armv7l.tar.xz.1â
                          
                          node-v20.10.0-linux-armv7l.tar.x 100%[==========================================================>]  21.15M  18.5MB/s    in 1.1s
                          
                          2023-12-11 12:46:57 (18.5 MB/s) - ânode-v20.10.0-linux-armv7l.tar.xz.1â saved [22182716/22182716]
                          
                          pi@rpi4-2:~/.local/lib/nodejs $ ls
                          node-v20.10.0-linux-armv7l.tar.xz
                          pi@rpi4-2:~/.local/lib/nodejs $ tar xJf node-v20.10.0-linux-armv7l.tar.xz    # J is for .xz, z is for .gz
                          pi@rpi4-2:~/.local/lib/nodejs $ cd ~/.local/bin
                          pi@rpi4-2:~/.local/bin $ ln -sf ~/.local/lib/nodejs/node-v20.10.0-linux-armv7l/bin/* .
                          pi@rpi4-2:~/.local/bin $ ls -l
                          total 16
                          lrwxrwxrwx 1 pi pi 66 Dec 11 12:48 corepack -> /home/pi/.local/lib/nodejs/node-v20.10.0-linux-armv7l/bin/corepack
                          lrwxrwxrwx 1 pi pi 62 Dec 11 12:48 node -> /home/pi/.local/lib/nodejs/node-v20.10.0-linux-armv7l/bin/node
                          lrwxrwxrwx 1 pi pi 61 Dec 11 12:48 npm -> /home/pi/.local/lib/nodejs/node-v20.10.0-linux-armv7l/bin/npm
                          lrwxrwxrwx 1 pi pi 61 Dec 11 12:48 npx -> /home/pi/.local/lib/nodejs/node-v20.10.0-linux-armv7l/bin/npx
                          pi@rpi4-2:~/.local/bin $
                          

                          Reading these steps, the first five commands create the structure of the .local subdirectory needed, with subdirectories bin, lib and lib/nodejs within just like we would have in /usr/local. At this point, the current directory is ~/.local/lib/nodejs, and the wget command is used to download the nodejs package we want (change version and architecture to what you need if you are actually doing this). Then we un-tar it right where we are. After un-taring it, we change directory to our own ~/.local/bin and make the symbolic links for the nodejs commands in the package directory, just like we did for /usr/local.

                          The last step is again, and this may be default, is making sure this user's PATH environment variable includes our new local ~/.local/bin directory. Check it with echo $PATH to see if you need to make the addition. If so, the easiest way to do that is to add the following snipped to ~/.profile, which is the per-user equivalent to /etc/profile (the per-user script runs after the /etc script at login) to set up the shell environment. My Raspbian Buster (Debian 10) systems seem to have this done already as a default, so before making any changes, check your PATH and/or ~/.profile.

                          PATH=$HOME/.local/bin:$PATH
                          export PATH
                          

                          Log out and back in, and then a which node should give you ~/.local/bin/node (or /home/username/.local/bin/node). You then have a per-user custom version of nodejs that doesn't interfere with any system versions.

                          Now, for running Reactor as a service, you need to be aware of where you are running it, and as who. It's generally not recommended to run Reactor as root on any bare-metal system (it runs as root on docker containers, but that's OK because the container is a constrained virtual environment). So when setting up, for example, your systemd profile for Reactor, you would want to make sure the profile contains both a User directory to set the correct (non-root) user for the running process, and a full path to the correct node executable in ExecStart (e.g. ExecStart=/home/pi/.local/bin/node app -p).

                          One last point: nodejs is so well-written that its entire dependencies exist entirely within its package structure, so whatever node command runs knows automatically where to find everything else it needs — you don't need to set a bunch of other environment variables to make each version work properly. That means you could, for example, run /usr/bin/node and see a perfectly working v10.24.0 as I showed above, or /usr/local/bin/node and get a perfectly-working v18.18.2 if that's what is installed there, and ~/.local/bin/node to get a fine v20.9.0 environment if that's what's installed there. Not all packages are this tight, and we can be grateful for it.

                          Tip: don't stop at which node when you are trying to figure out what is running. nodejs itself makes extensive use of symbolic links, so doing which node is only the tip of the iceberg. You need to then do ls -l /that-path and see if it's a symbolic link to somewhere else, as I showed in the output above. Keep following those links until you find the "real deal" and you'll find which version is actually running and where it actually lives.

                          I hope some of this clarifies how nodejs is installed, and highlights how you can actually have multiple versions of it installed on the system and they co-exist quite well, you just have to be careful.

                          wmarcolinW Offline
                          wmarcolinW Offline
                          wmarcolin
                          wrote on last edited by
                          #14

                          @toggledbits

                          Super thanks for the master class!!!!

                          1 Reply Last reply
                          1
                          • toggledbitsT toggledbits locked this topic on
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          Recent Topics

                          • openLuup console disappeared - 500 - Internal Server Error
                            A
                            a-lurker
                            0
                            2
                            83

                          • Logon screen timeout
                            G
                            gwp1
                            0
                            5
                            71

                          • Reactor (Multi-System/Multi-Hub) Announcements
                            CatmanV2C
                            CatmanV2
                            5
                            146
                            122.7k

                          • [MSR] Copy&past of actions and/or drag&drop between set/reset
                            toggledbitsT
                            toggledbits
                            0
                            9
                            204

                          • Upgrade advice - upgrade from aarch64 to ARM64 image
                            toggledbitsT
                            toggledbits
                            0
                            4
                            97

                          • Alexa for MSR, any interest?
                            CatmanV2C
                            CatmanV2
                            2
                            4
                            253

                          • Ezlo Paid Subscription for Vera Cloud Services
                            therealdbT
                            therealdb
                            4
                            2
                            248

                          • [RESOLVED] Telegram notification broke with latest update
                            CatmanV2C
                            CatmanV2
                            0
                            11
                            580

                          • [RESOLVED] Phantom device, “INFO” appears
                            toggledbitsT
                            toggledbits
                            0
                            2
                            119

                          • [RESOLVED] Mode Status NULL
                            wmarcolinW
                            wmarcolin
                            0
                            18
                            410

                          • [RESOLVED] HTTP query failing after version 26177
                            wmarcolinW
                            wmarcolin
                            0
                            3
                            155
                          Powered by NodeBB | Contributors
                          Hosted freely by 10RUPTiV - Solutions Technologiques | Contact us
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Unsolved