Skip to content

Multi-System Reactor

792 Topics 7.5k Posts
  • Category Topic Guide -- Read Before Posting

    Pinned Locked guidelines
    1
    8 Votes
    1 Posts
    930 Views
    No one has replied
  • Reactor (Multi-System/Multi-Hub) Announcements

    Pinned Locked announcements
    122
    5 Votes
    122 Posts
    53k Views
    toggledbitsT
    Reactor STABLE Update The stable branch of Reactor is now updated to build 25139. Please scroll back and see the changes and advisories listed for builds here since the previous stable branch build (which was 24257, 13-Sep-2024), or whatever build you are currently running. ALL USERS: It's always recommended to back up your Reactor system before upgrading. IMPORTANT: Bare-metal users (only) need to do the following: Update dependent packages by executing npm run deps in the Reactor install directory. Reactor no longer supports nodejs versions before 20. If you are running on an earlier version, please upgrade nodejs before upgrading to this build, and make sure your current environment is working. Once you are sure Reactor is happy on the upgraded nodejs, then and only then should you upgrade Reactor to this new stable build. An even-numbered LTS (Long-Term Support) version of nodejs is recommended; the current LTS version is 22. If you are running extension controllers like ZWaveJSController or MQTTController in your configuration, you will need to upgrade those to their respective latest versions.
  • Gradually turn on lights.

    Solved
    4
    0 Votes
    4 Posts
    72 Views
    G
    @Tom_D I've implemented this as it's much slicker than what I'd been previously doing. Of course, now with longer days and Daylight Saving Time in full effect it doesn't get called on very much so I can't confirm success lol
  • Stop the MSR by an external switch on Hubitat.

    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • Error After Upgrade

    4
    1
    0 Votes
    4 Posts
    69 Views
    G
    @tbully thanks for putting a smile on my face today. Much needed. Much appreciated.
  • Reset attribute value of entity in event handler

    5
    1
    0 Votes
    5 Posts
    142 Views
    R
    Seems to be working perfectly. Thanks! Should have thought of that myself.
  • Need help figuring out how to delay a reset on reaction

    22
    3
    0 Votes
    22 Posts
    749 Views
    G
    @therealdb I use those as well. As you see in my AWAY rule there's a catch there using a virtual switch for my calendar integration. If a calendar entry has a specific keyword it turns the switch on. If the switch is on, AWAY knows not to fire.... VACA has it covered. @toggledbits beat me to it: comments, comments, comments. I've lost too many years off my life trying to remember why this rule does what it does and how.
  • Way to search for rules (rule state) in other rules

    3
    0 Votes
    3 Posts
    78 Views
    T
    That's fair. Thanks for answering with a workaround at least
  • Links to MSR from HA

    1
    0 Votes
    1 Posts
    68 Views
    No one has replied
  • Set Reaction > Script Action

    11
    2
    0 Votes
    11 Posts
    399 Views
    wmarcolinW
    @toggledbits said in Set Reaction > Script Action: each id in getEntity("groups>dgc_PushableButton_N0").attributes.sys_group.members: performAction( id, "x_hubitat_Refresh.refresh", {} ) EXCELLENT, IT WORKED!!! Thank you very much. I was already working on this script, based on the example at the beginning of this discussion, but I was using performOnEntity. each id in getEntity('groups>dgc_PushableButton_N0').attributes.sys_group.members: performOnEntity(id, 'x_hubitat_Refresh.refresh') Thank you very much for your help. Another lesson learned, and I am already putting more optimizations into practice.
  • Errors after updating to MQTTController build 25139

    6
    0 Votes
    6 Posts
    230 Views
    toggledbitsT
    Most controllers rebuild their entities when upgraded. Capabilities can change, and the new definition needs to be properly applied. Because you've chosen to add your own attributes to system-defined capabilities, those are not restored when the entity is rebuilt because Reactor knows nothing about them. In fact, to Reactor, they look like attributes from an old definition of the capability that have been removed from the most recent definition. As I've said before, your attributes will eventually be created when the event that writes them (layzspa/message), with a correct payload (e.g. { AIR: 123.456 }), is received by MQTTController. You can wait it out, or force the device to send those events. Or, you could do this the way Reactor expects, which is to define a local capability for yourself (e.g. x_mqtt_tunnus_layzspa) and define your own attributes for all of the things you need. Or, break up your single entity into multiple entities that use the system capabilities unmodified.
  • 🎉 My very first MSR controller: OpenSprinkler

    Locked
    13
    5 Votes
    13 Posts
    890 Views
    therealdbT
    Version 25154 on GitHub: https://github.com/dbochicchio/reactor-opensprinkler No release, just download the code. Fix for station status and support for MQTT capabilities in OS 2.2.1. Still based on both HTTP/MQTT because the underline fw is still not 100% MQTT-ready.
  • Advice reqeusted to migrate MSR from Bare Metal to Container

    5
    0 Votes
    5 Posts
    236 Views
    T
    @toggledbits, Well, I took a first step. I tried using the docker-compose.yaml file with podman-compose, but it gave me some issues. I fell back on just using docker-compose, and it worked with only a minor hickup. It told me the version tag was depricated and to remove it to prevent problems in the future, so I did so, and it's running without issue. Rules and reactions are working as before, which is fantastic. Reactor on my old server is stopped/disabled, so one more item crossed off. I'm hoping to have the old server fully decommissioned this weekend. At some point, I'll go back and try and get it running with Podman, if it's possible. I can engage their community and see if they have any advice, but right now it's more important for me to turn off my office heater going into summer. The other major advantage is that in theory, I won't have to manually update nodejs each release, which has been kind of a pain lately.
  • Can´t restart or upgrade/deploy MSR

    4
    1
    0 Votes
    4 Posts
    251 Views
    toggledbitsT
    @Fanan Great! A little more digging on my end, without a complete picture of your end, leads me to CORS. That is exactly the wording of an error I'd expect from CORS, and since HA Blue proxies for its add-ons, I'm betting that's where the issue lies. I don't know what that means for your (HA + Portainer) configuration, but I'd start with the Portainer add-on's support forums. This isn't really Reactor-related.
  • [Solved] Limit HA Entity in MSR

    7
    1
    0 Votes
    7 Posts
    444 Views
    wmarcolinW
    @toggledbits While you're at it, could you add to Santa's list a request for a function that, when given two coordinates, returns the distance between them? I'll explain the use case: when Life360 worked on Hubitat, one of the variables was precisely the distance between the device and the point determined as the home. However, as I said, it hasn't worked for a long time. This was one of the reasons for installing Home Assistance, which works perfectly, but it doesn't have this information, so I had to do the calculation. I know, you're going to say what a horrible thing, what a mess, but it's working. I prepared a series of calculations, using the coordinates of my home as a reference, for my phone WIL and my wife's phone ADRI. The phone coordinates come from Life360. [image: 1747788334739-525b8ca4-86c2-424f-a3c6-6b11aba39730-image.png] Next, I have the calculations. [image: 1747788467055-391c3a64-dbf9-4a7d-b01c-2a583a6bc83f-image.png] So, I have the result. [image: 1747788504176-36c24be1-f4ec-426e-af61-485de33457de-image.png] I used this formula Python. from math import radians, sin, cos, sqrt, atan2 def haversine(lat1, lon1, lat2, lon2): R = 6371 # raio da Terra em km dlat = radians(lat2 - lat1) dlon = radians(lon2 - lon1) lat1 = radians(lat1) lat2 = radians(lat2) a = sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlon/2)**2 c = 2 * atan2(sqrt(a), sqrt(1 - a)) return R * c # distância em km Thanks.
  • Organizing/ structuring rule sets and rules

    5
    0 Votes
    5 Posts
    492 Views
    G
    @RHCPNG As @toggledbits notes, I've found myself bouncing around a bit. I've settled on what I call Shared Rules - those that impact all things potentially, at a base level. Wx stuff, HVAC stuff, etc. I kinda branch out from there. Interior lighting, Outdoor lighting, Presence, etc. Sorta using "topics" and then rulesets under them. I'm also linked to our local community center via site-to-site VPN and am using my home MSR instance to control the Hubitat C7 over there for lighting and outdoor fans
  • Moving MSR from a QNAP container to RP 5 - some issues

    Solved
    5
    1
    0 Votes
    5 Posts
    523 Views
    G
    @Tom_D please mark issue thread as solved
  • Widget deletion does not work and landing page (status) is empy

    4
    2
    0 Votes
    4 Posts
    544 Views
    G
    @mgvra the landing page issue was addressed here as a side note in another issue thread: https://smarthome.community/post/16764
  • Need help reducing false positive notifications

    7
    1
    0 Votes
    7 Posts
    728 Views
    T
    @toggledbits, I tried to go about the way you mentioned, but I don't think it was quite suited for my purpose. The purpose of the rule is to send a notification through Home Assistant to my phone, and I didn't want a delay that I believe your method would have introduced. What I came up with was creating a global variable and a helper rule, that sets the global variable to true when the 300 seconds is exceeded of power being above 3.7. [image: 1744127635657-b0f50fcc-a06f-49a6-9ccb-38f718d7cc42-image-resized.png] [image: 1744127574793-88547953-dbd8-4646-80a9-48b03a6c09ad-image-resized.png] Then there is a Variable Value check in the Triggers of the Notification rule: [image: 1744127400119-8b91b3c4-cc46-44db-a4f1-a76408f7c79b-image-resized.png] The Reaction resets the Global rule back to false, after the cycle is completed. It may not be the most elegant method, but it reduces the false positives on my phone when the cycle selector is bumped. For the same reason, I have the reactor uptime checked, because I would get tons of notifications on my phone when I did an update to MSR, or when my server was rebooted. I know I could completely encapsulate the logic within MSR, but the overly simplistic sensor in HAAS serves it's own purpose in HAAS for my dashboard, and HAAS can't read rule states from MSR, so for my purpose, I already have the simple sensor in place, so why reinvent the wheel?
  • Deleting widgets

    Locked
    4
    0 Votes
    4 Posts
    643 Views
    toggledbitsT
    As of build 24343, widget deletion is accomplished by dragging the widget to the top navigation bar (only). Dragging to the left margin no longer deletes the widget.

Recent Topics