Multi-System Reactor

694 Topics 6.8k Posts
  • Contents of fields now hidden

    Locked
    3
    0 Votes
    3 Posts
    128 Views

    I'm still seeing some weird behaviour in regards to this on build 21118.

    This is another rule I've just looked at, the first HTTP request was fully visible OK, however the second HTTP request was not visible at all.

    Noted that the second HTTP request is longer in length than the first one, which is why there is a scroll bar present.

    dbd43f82-1bea-4588-91f4-90d83fa50d33-image.png

  • Build 21117

    Locked
    19
    0 Votes
    19 Posts
    361 Views

    How will subsequent updates to the Docker image be managed after rev. 21117? I'm uncertain whether the Synology NAS > Docker > Registry approach to things means we no longer have to download new Image files and re-launch the Container. Would love to have an Auto-Update option somewhere in the mix.

  • MSR in Alpine Docker

    Locked
    32
    2 Votes
    32 Posts
    1k Views

    I think the main advantage of volumes is that location is controlled by docker, and these locations aren't as easy to screw up if you mess around with the folder structure.. It also puts all volumes in a common folder (var/lib/docker/volumes) that can be copied to a tar or backup folder using one line, but thats just as easy if you organize bind folders the same way.. Let me know if you find other advatages. 🙂

    I have no sunrise/sunset rules, i use light sensors for i.e. outside lighting.. I think about 90% of my "MSR bugs" have been PEBCAC, so check your logic. 😁

  • Reset Reaction evaluate Contraints?

    7
    0 Votes
    7 Posts
    197 Views

    The new Constraints groups, though I haven't yet tried them in practice, seem like the holy grail for some use cases such as yours. Happy to hear that you were able to implement them so swiftly.

    While I will probably slog along using IF/THEN logic (within Expressions) in lieu of Constraint Groups, there will come a time when it's simpler just to add those conditions directly as you have. Pretty sure the typical MSR user will feel that way, too.

    I think @toggledbits has done a really incredible job with the latest release (21117)!! The "look and feel" alone is something to behold.

  • Entity Action/Capabilities

    Locked
    2
    0 Votes
    2 Posts
    92 Views

    The power_switch capability is MSR's native capability. The x_hubitat_Switch capability is MSR echoing Hubitat's native capability. Unfortunately, Hubitat's APIs do not give complete information about devices, and the relationships between their native capabilities and the devices they manage (neither does HomeAssistant, for the record; Vera is the best of the three platforms at this, if you can imagine that).

    Both actions in their respective capabilities will do the same thing. But, if you move a device from Hubitat to another controller, it won't have the Hubitat native capability (x_hubitat.Switch) and its action, but it would retain the MSR capability (power_switch) and action, which may simplify the process of amending your rules to reflect the change..

  • 0 Votes
    9 Posts
    214 Views

    Perfect. Also remember there is an import button on rules, so you can at least import between constraints and triggers.

  • Low-priority GUI feedback

    Locked
    53
    0 Votes
    53 Posts
    2k Views

    I'm not sure I understand your question...

    also... this is that thing... topic title is "Low priority GUI feedback", and your question is about lexpjs/expressions?

  • Why can't I run this LUA code ?

    Locked
    9
    0 Votes
    9 Posts
    325 Views

    @librasun

    Both of these work OK on the Vera unit itself.

    luup.inet.wget("SOME-HTTP-REQUEST") luup.inet.wget('SOME-HTTP-REQUEST' ,5);

    The one with the semi colon has a time out set.

    I have tried making both HTTP requests one or the other / the same, but that's not the problem.

    The problem is the LUA code is just not run on the Vera at all when initiated from the MSR rules Set Reaction.

  • Setting up Pushover in MSR

    Locked
    8
    0 Votes
    8 Posts
    222 Views

    Fixed! Pushover sends just fine now to any designated endpoint.

  • Cant reach MSR after mowing my Pi

    Locked
    9
    0 Votes
    9 Posts
    274 Views

    Good recommendations all. In terms of architecture, I can personally vouch for using a PoE hat and powering the Pi from a UPS-backed PoE switch. If you have IP cameras, you may already have such a switch. While this is really no different in effect from plugging a Pi's regular AC power adapter into a UPS, it gives you vastly more choice on the location of the Pi, which may be important if you are using a Z-Stick, etc. Being able to distribute stable power over a wide area because of PoE is a huge win. I've also powered my Vera via PoE for a long time now (using a PoE adapter).

    And, backing up Reactor is as easy as backing up the "storage" and "config" subdirectories. Any way you do that is probably OK. Depending on what else you might be doing with the Pi, it's likely sufficient to back up storage/config often, but make SSD images only very rarely. Even if the image is a year old, an apt upgrade will quickly bring the OS back to current, and then the MSR upgrade and storage/config restore and you'll quickly be back on line in a blink.

  • Posting from log files

    Locked
    5
    4 Votes
    5 Posts
    125 Views

    My job here is nearly done...

    - YouTube
  • Running reactions /Blocked?

    Locked
    3
    0 Votes
    3 Posts
    119 Views

    As @cw-kid said, empty alerts were an issue several versions ago, but I think they're dealt with, so make sure you're on 21106.

    A reaction being BLOCKED means that it is waiting for a driver of some type to finish work on a step (that step is identified as #0, so it's the first step in those reactions). The drivers can be Controllers (when performing an action on an entity) or Notifiers (when sending a notification). Normally, a reaction will only remain in this state for a few milliseconds, and is so quick that most people will never even know this state exists. If you have reactions in BLOCKED state and that passes within a minute, that's an indication that whatever the step is doing is timing out (e.g. communicating with a remote API that is not responding and timing out, or taking a very long time to respond). This can happen to controllers and notifiers. If a reaction is stuck in BLOCK state until you restart MSR, that indicates something went very wrong with the run of that reaction (there's a lot of coding to prevent situations like this). Either way, looking at the reactor.log file will give some clues.

  • 1 Votes
    4 Posts
    154 Views

    @toggledbits NOTE: Yes, it was just me trying to break stuff. I really don't have any outstanding needs at the moment in terms of my daily workflows. Thanks for the tutorial (which all makes sense)!

  • Problems with Up grading existing MSR.

    Locked
    9
    0 Votes
    9 Posts
    208 Views

    I would strongly recommend that you take the time to learn some basic *nix command line and system administration in the background of other work, and I'm addressing the audience in general here, not @Black-Cat or anyone specifically. This will pay huge dividends. You need to be able to successfully navigate the file system (commands cd, pwd, ls, find, rm, mkdir, rmdir, ln, cat, more/less), understand the differences in user permissions and how to manipulate them (commands chmod and chown), compress and uncompress files (commonly gzip and gunzip; there are many others but all operate in a similar way), edit files (you don't have to learn vi, but nano is useful), and update your system (via apt, yum, apk or whatever it uses). This basic knowledge will vastly increase your comfort with other more complex tasks that incorporate these basic tools. Permissions problems, for example, is probably a top 3, if not #1, *nix issue for beginning users, and changing permissions to everything world-read/write is not an answer (in some cases, it will make the problem worse -- ssh itself, for example, is famous for ignoring its own config files when their permissions don't smell right to its nose).

    I've been on *nix for decades (I was at Berkeley in the late 70s and early 80s), but remember well the pain of trying to learn the odd foreshortened command names (with their quirky history -- why grep and cd are acronyms but ls is not, and what the heck is cat?), the options for those commands, and of course the editing environment (at 300 baud on a good day). And that's when my brain was young and not addled by age and accretion of useless bits that defy purging to make room for things of greater relevance. I empathize; I really do. But the core of what you need to know is actually pretty small, and if you're going to have these systems in your home, you really need to understand them at a basic level. You also make yourself unsupportable when you rely on tools like MC, Norton, or WinSCP; there's a reason that the installation instructions for almost everything rarely mention these tools and give "bare metal" commands. I'm not saying you're wrong to do it and make your life easier for the most common tasks you do for yourself, that's absolutely fine; but know that you won't get away with not knowing what you really need to know. You will continue to hit roadblocks and be frustrated, and helping you will be more complex and take longer. If the tool has side-effects or behaviors that work differently from the system tools, and you just happen to forget to mention that you're using such a tool, you can create a lot of unnecessary confusion and excess, likely fruitless, labor. If you are going to make these systems an indispensable part of your home, you need to understand them well enough to maintain them.

  • Adding Homeseer as a Controller

    Locked
    4
    0 Votes
    4 Posts
    139 Views

    I've done some reading on the HS forums and a workable solution might be to use the HASS Controller.
    The theory being to run HASS > MQTT > HS, it seems convoluted but should work, I'll give a go tomorrow.

  • Vera vs MSR lock code logic

    Locked
    17
    0 Votes
    17 Posts
    548 Views

    I take it by now you read ezlo's list of "Known Issues" that include the specific issue you've reported? Seems to still be a problem, even with the second release of 7.32 beta firmware. Thus, I believe you're taking the smart route away from bridging.

  • Global Reactions - Constraints ?

    Locked
    10
    0 Votes
    10 Posts
    243 Views

    If I could make one small suggestion, which may not fit your use case... namely, creating a single(!) virtual dimmer -- or even just pinpointing an otherwise unused Variable on an existing Vera device -- which MSR can watch for changes?

    Then, (a) you trigger your Vera Scene (manually), (b) the Scene sets the value (of the Dimmer or Variable), (c) MSR detects the change (automatically), and (d) MSR runs the associated Rule (whose trigger is literally "Dimmer" == X or "Variable" == Y). For this setup to work reliably, I'd take it a step further with (e) MSR immediately resets "Dimmer" or "Variable" to 0.

    You can tell I'm trying to get things up and running without the need for an as-yet-uncoded "Incoming HTTP Request". 🙂

  • Feature Request - Reaction to MQTT

    Locked
    6
    0 Votes
    6 Posts
    222 Views

    Have you got anything without spam in it?

  • Import question

    Locked
    12
    0 Votes
    12 Posts
    304 Views

    You're still going to have your work cut out for you. There's a lot of things MSR does differently. Expressions are high on that list.

  • 0 Votes
    69 Posts
    2k Views

    @toggledbits said in Running Lua Code ? And watching device properties?:

    It's not a limitation. It's the way Lua works, combined with one way Luup is broken.
    The problem is that you are declaring your delay callback/handler function in a module. It is therefore not a global function, it is a module function -- it is scoped within the module, not globally.

    To access functions inside a module, you have to use modulename.functionname(arguments), as you know, and the same is true for the delay handler/callback.

    But the way Vera implemented luup.call_delay(), it takes a function name as a string, rather than a function reference. The function, therefore, has to be global. And it's not global, it's in a module.

    One way to solve this problem (which all plugins experience, too, by the way) is to make a global alias. That means in your startup Lua, you do something like this:

    mymodule = require( "mymodule" ) -- this line loads your module

    -- Create a global alias for my delay handler
    mymodule_delayhandler = mymodule.delayhandler

    Then, in your module, instead of doing luup.call_delay( 'delayhandler', 5 ) you have to do luup.call_delay( 'mymodule_delayhandler', 5 ). This makes the delay use your global alias instead of the function name directly (which it can't).

    Just trying this "Global Alias" for function delays, for the first time, but I can't get it working. I must be doing something wrong.

    In the top of my VeraScenes.lua file I have added this code:

    module("VeraScenes", package.seeall) -- TODO: personalize it mymodule = require( "mymodule" ) -- this line loads your module -- Create a global alias for my delay handler mymodule_delayhandler = mymodule.delayhandler --Away Mode Scene function mymodule_delayhandler() local status = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", 419) --Status of Safe to Arm virtual switch if status == "0" then --Safe to Arm luup.inet.wget("http://SEND-TTS-MESSAGE1") else --Not Safe to Arm luup.inet.wget("http://SEND-TTS-MESSAGE2") end end luup.call_delay( 'mymodule_delayhandler', 30 )

    The test code checks the status of a virtual switch and sends a different HTTP request / TTS announcement etc.

    I wanted a 30 second delay before anything happens at all.

    When I call this function from a MSR rule by using

    VeraScenes.mymodule_delayhandler()

    I can hear the TTS announcement right away, so my 30 second delay is not happening.

    What am I doing wrong?

    @Tarkus Did you get this working?

    Thanks

Recent Topics