Skip to content

Multi-System Reactor

774 Topics 7.4k Posts
  • Category Topic Guide -- Read Before Posting

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

    Pinned Locked
    119
    5 Votes
    119 Posts
    17k Views
    toggledbitsT
    Reactor build 25082

    NOTE: Bare-metal users, please run npm run deps in your Reactor directory after updating, then restart Reactor. Generally, you should always do this after upgrading to a new build, but for this build in particular, it's necessary.

    Status Tab: fix an error that could cause lost notifications on object changes to some widgets. Packages: update some packages and force one dependency to eliminate a warning from node about a deprecated subsystem (not every package has caught up yet). Reactor UI: improve cleanup and memory utilization of tabs when switching between them. Engine: The isRuleSet() and isRuleEnabled() expression functions now trigger re-evaluation of expressions in which they appear when the subject rule changes state. HassController: Bless Hass to 2025.3.4 ZWaveJSController build 25082

    This build of ZWaveJSController requires Reactor build 25082 or higher.

    BREAKING CHANGE: For RGBW/RGBWW devices, the color_temperature capability is no longer used; white channels will now be mapped to the dimming capability. If you have such devices and use color_temperature attributes and actions, you will need to make appropriate adjustments to your Rules and Reactions.

    Add support for start and stop heal actions (in zwave_network capability). Improve connection retry decay computation (use slow initial decay with rapid ramp). Improve handling of white channels in RGBW/RGBWW devices. Mapping them to color_temperature seems to be incorrect in most cases, so they are now mapped to dimming. If the device has multiple channels, the white or color channels may be pushed to child entities. The zwave_device.set_value action now accepts JSON in the value fields for Z-Wave JS values that support it. Some devices are able to report or set multiple values simultaneously by using a dictionary as the value (aka JSON object with key/value pairs). RGBWW devices, for example, may support the currentColor and targetColor property with a value object like { "warmWhite": 0, "coldWhite": 0, "red": 128, "green": 0, "blue": 240 }.
  • 0 Votes
    9 Posts
    251 Views
    toggledbitsT

    First, always look at the logs. I'm 100% certain that "nothing happens" isn't what's in the logs.

    It looks like the device has separate targetValue values for the white channels, so you may just need to use those. That means for red, green, and blue, you'll use targetValue for the property with a JSON object, but leave the propertyKey blank. For warm white, you use property targetValue with propertyKey zero (0), and for cold white you'll use propertyKey one (1).

    Edit: look at the logs

  • Problem with simultaneous notifications.

    1
    0 Votes
    1 Posts
    12 Views
    No one has replied
  • MQTT configuration question

    7
    0 Votes
    7 Posts
    146 Views
    toggledbitsT

    @tunnus Kudos! I'm guessing you discovered that something like payload[config.cmd] got you where you were going with that (I'm repeating it here for future readers, since you didn't show your final result).

    To your next question, first thing: I believe you said you are using local_mqtt_devices.yaml. You'll "modernize" a bit by moving your template to its own file (e.g. daikin.yaml) in config/mqtt_templates/. Within template files in that subdirectory, you can define both custom capabilities and the templates that use them. They are structured more like a package, so you can more easily share them as others here have done.

    In this case, though, you probably don't need to define your own capability. While the system-defined capabilities have values for attributes and action parameters, they are not set in stone. The defined values are a reasonable subset that a lot of devices may have in common, but there would be no way for me to know the entire range of values for every device that ever was or will be, so Reactor doesn't enforce them. They are mostly hints to the UI for reasonable values it can display for the user as a starting point. You can use your own values for hvac_blower_unit.set_mode without defining your own capability; it won't be a problem as long as your implementation (template) expects those values and handles them.

    You're on the right track replacing the value_sensor capability with hvac_blower_unit. Using your posted config as a guide, it may look something like below. Let's look at the attributes of the capability first:

    daikin_command: # some config here, redacted in OP's post capabilities: [ "hvac_heating_unit", "hvac_blower_unit" ] primary_attribute: hvac_heating_unit.setpoint events: "some-topic-for-status-I-assume": # topic was redacted in OP's post # hvac_heating_unit stuff redacted for clarity/focus on hvac_blower_unit "hvac_blower_unit.state": json_payload: true if_expr: '! isnull( payload?.fan )' expr: 'payload?.fan !== "X"' # whatever expression you need here. "hvac_blower_unit.mode": json_payload: true if_expr: '! isnull( payload?.fan )' map: A: auto Q: quiet 1: low 2: low-medium 3: medium 4: medium-high 5: high

    What I can't tell from your posts is if there's a value for payload.fan that represents fan off. That would be used to drive the state boolean attribute. You may use an expression like expr: payload?.fan !== "X" Assuming X means off, state will be false when the fan is off, and true when it's running at any speed, which is the intent of the attribute. If the fan is always running or you just don't know (i.e. the device doesn't actually report it), you can forego the if_expr and expr and just supply value: true (or perhaps value: null, meaning "I don't know"), which supplies a fixed value for that attribute that never changes.

    For hvac_blower_unit.mode, you can see I've mapped the single-character values to strings. This isn't strictly necessary, but it's in keeping with the spirit of Reactor's design goals. Some of the values map to pre-defined values in the capability, and some don't, and that's just fine. It won't bother Reactor at all.

    Now on the action side, we need to add:

    actions: hvac_blower_unit: set_mode: topic: "command/%friendly_name%" payload: type: json expr: | value = {}, value.fan = ({ "auto": "A", "quiet": "Q", "low": 1, "low-medium": 2, "medium": 3, "medium-high": 4, "high": 5 })[parameters.mode] ?? parameters.mode, value

    This defines the set_mode action for the capability, preparing it to send a JSON payload. It first sets up an empty object in the value local variable. It then sets the fan key in the object by mapping any words given in the mode parameter to the action back to their letter equivalent for the device. If the value of the mode parameter doesn't map, it's just passed through as given (so you can still use the one-letter values directly if you don't want to use the words). Finally, the object in value is returned as the expression result (that's the , value bit at the end).

    Digging in to that mapping a little more, we're creating a key-value pair object on the fly to use to look the value in parameters.mode. If it matches a key (i.e. left side of a colon), it changes it to the value (the right of the colon). If it matches nothing, the lookup results in null, which is handled by the ?? operator — when given null on its left, it returns the value of the expression on its right (i.e. if the map isn't matched, parameters.mode as given is the result). This is how you can use either the fancy strings or the one-letter values equally.

    Hint: for debugging, when you run an action, MQTTController logs the exact topic and full payload being published at INFO level by default.

    Finally, if you truly wanted to define your own capability, you could make your own Daikin+MQTT custom version of hvac_blower_unit by putting it in a capabilities section of your template file (this does not work in local_mqtt_devices.yaml, only in files in config/mqtt_templates/:

    capabilities: x_mqtt_daikin_moredetail: # moredetail may include device type, model number, interface type, etc. attributes: speed: type: string values: - A - Q - 1 - 2 - 3 - 4 - 5 actions: set_speed: arguments: speed: type: string values: - A - Q - 1 - 2 - 3 - 4 - 5

    This section can just precede the templates: section in your file. You would then adjust the capability name, attribute name, and action and parameters names accordingly in the above example to match your custom definition.

    When you post snippets, please don't redact in a way that disrupts the structure. For example, you removed the topics from under events, and other data in your template. For future readers, that makes your post confusing and misleading, so other people that may find your post because they're having the same problem won't be able to follow it as easily. It would also be a courtesy to those other readers if you posted the final solution, for example the expression you finally came up with for the first problem solved.

    Link to: MQTTController Documentation

  • Problem after upgrading to 25067

    4
    0 Votes
    4 Posts
    148 Views
    R

    I reviewed my Reactor configuration file. Some time ago I had duplicated one of the hubitat device sections in anticipation of making changes to my extended LAN. While one entry was marked as "enabled: false", it seems that MSR did not like the duplicate ID even though the duplicate was disabled. I added and "X" to the "id" and "name" of the duplicated entry and the error messages ceased.
    Thanks for the help

  • Global expressions not always evaluated

    3
    0 Votes
    3 Posts
    111 Views
    tunnusT

    @toggledbits great! Will this fix make it to the next build?

  • [Solved] Local expression evaluation

    13
    0 Votes
    13 Posts
    359 Views
    tunnusT

    @toggledbits the main thing is that now I know that this behaviour is not a bug and there's a clear alternative (not using global variables when rule does not trigger often enough).

    Anyway, MSR is a great software and thanks for your continued support!

  • [Solved] Runtime error when exiting global reaction that contains a group

    7
    0 Votes
    7 Posts
    531 Views
    G

    @toggledbits Confirmed.

  • Cannot delete Global Expressions

    3
    0 Votes
    3 Posts
    179 Views
    SnowmanS

    The new built fixed the issue. Thanks for the fast response. Much appreciated.

  • Local notification methods?

    24
    0 Votes
    24 Posts
    2k Views
    toggledbitsT

    @therealdb said in Local notification methods?:

    @toggledbits time for a custom mqtt template

    LOL! I think for one topic, it might be a bit of overkill, but then, that's kind of how we roll, isn't it?

  • Custom capabilities in MQTT templates

    8
    1 Votes
    8 Posts
    385 Views
    toggledbitsT

    That is cool. I really love stuff that combines simple, available IoT bits with the old greasy bits to solve problems. It appeals to my libertarian steampunk fantasy of how I'd run my home, which unfortunately far exceeds my wife's tolerance for the lower limits of luxury over sustainability. 😆

  • [SOLVED]Hass websocket falsely reporting ready on boot??

    16
    0 Votes
    16 Posts
    494 Views
    toggledbitsT

    The alerts persisting is a sync problem with the alerts data object. I've found and (hopefully) fixed it for the next build. Both it and the Controller Status widget need special handing when the API connection is restarted.

  • [SOLVED]Logs permissions for Docker Install

    8
    0 Votes
    8 Posts
    348 Views
    toggledbitsT

    @vezinpi said in [SOLVED]Logs permissions for Docker Install:

    from the dist-config/logging.yaml that the default is 0644 (which would work just fine)

    Yes, and that needs to read 0o644 now -- I've fixed that for the next build. The default is actually 0o640 in the code, so I've fixed the distribution template for that as well.

  • Button.Since Revisited

    1
    0 Votes
    1 Posts
    174 Views
    No one has replied
  • [SOLVED] reactor_inet_check script... and containers

    9
    0 Votes
    9 Posts
    314 Views
    CatmanV2C

    Oooh thanks!

    C

  • Catch-all lights rule

    7
    0 Votes
    7 Posts
    234 Views
    G

    @toggledbits sorry for the delay, day job has a rude habit of interfering in fun.

    This solution worked perfectly for this need. It's actually quite similar to how I control the outdoor garden fountain, HVAC, and some other things. As usual, I tried to over-complicate things.

    EDIT: in fact, I find I am using this EXACT method for my outdoor LIFX lights. sigh

    I am still looking for that context. Will provide when I locate it.

  • Throttled problem

    15
    0 Votes
    15 Posts
    481 Views
    toggledbitsT

    OK. That's enough info to determine it's a NUT problem (or driver problem), at least.

    You may want to look at this. You should be troubleshooting at the Network UPS Tools level, looking at your (operating) system log files. Restarting the service isn't going to fix it.

  • Dynamic Alert Based on Tripped Expression

    3
    0 Votes
    3 Posts
    143 Views
    T

    This is fantastic (and I’m sure is covered in the manual - oops). Thank you, @tunnus

  • latest-25016 toggle.toggle on VeraController Lock entity not working

    6
    0 Votes
    6 Posts
    171 Views
    CrilleC

    Thank you! toggle.toggle is back in business.

Recent Topics