Skip to content

Multi-System Reactor

746 Topics 7.1k Posts
  • How To: Send TCP packet in Reaction

    Locked
    2
    1 Votes
    2 Posts
    162 Views
    A

    I was able to do it pretty simply in Node-Red, so I set it up there and deleted the question. I put an http listener on the NR flow and call that URL from MSR when I want to trigger the TCP connection. I'll give this solution a try, as having it all in one place seems like a good idea.

    EDIT:

    So I tried and am getting this. I'm working on it, but you'll probably post a solution before I can figure it out. I'm running MSR in Docker on a RPi4.

    Rule<SET>" (rule-kvmgurr3:S) step 3 Shell action failed command "echo '?\"id\?' | nc -C -q 1 192.168.0.25 55443" (1) nc: unrecognized option: C BusyBox v1.31.1 () multi-call binary. Usage: nc [OPTIONS] HOST PORT - connect nc [OPTIONS] -l -p PORT [HOST] [PORT] - listen -e PROG Run PROG after connect (must be last) -l Listen mode, for inbound connects -lk With -e, provides persistent server -p PORT Local port -s ADDR Local address -w SEC Timeout for connects and final net reads -i SEC Delay interval for lines sent -n Don't do DNS resolution -u UDP mode -v Verbose -o FILE Hex dump traffic -z Zero-I/O mode (scanning)

    Edit 2:
    I used my usual brute force method of Googling various terms and mashing the keyboard (aka trial and error by a Linux novice) and finally made this work on my RPi4 Docker install of MSR.

    The '-C' didn't work, but I was able to add $'\r\n' to the end of the echo command which I believe achieved the same effect.

    The '-q 1' didn't work, but I was able to use '-w 1' which again I believe has the same effect.

    So I end up with a shell command of:

    echo '{"id":1,"method":"set_power","params":["on", "smooth", 250]}'$'\r\n' | nc -w 1 192.168.0.25 55443

    0dcb676f-e03e-4464-9b6c-0a4ac39f4176-image.png

    P.S. - I read the 'category topic guide' between my first reply and this edit and realize that I'm probably violating at least one of those rules. I got a good laugh from this part of that post: " I wrote Reactor as a tool for you to use to solve your automation/logic problems, not as a tool for me to use to solve your automation/logic problems." Hopefully I'm living up to that part a little bit by figuring this out for myself (with a initial help from Patrick).

  • [SOLVED] Rethinking HVAC moving from Reactor (Vera) to MSR

    Locked
    18
    0 Votes
    18 Posts
    564 Views
    G

    As I'm marking this as [SOLVED] I thought I'd update on how this all ended up playing out:

    Creation of two API rulesets, one for Ambient, one for OWM, that dump their data into Global Expressions. At issue was how to disable OWM to prevent needless API calls - I ended up doing the maths and making adjustments that this isn't an issue any longer. As such, one API ruleset for each dumping to clearly labeled Global Expressions. Yes, they both call out to their respective APIs but the volume is low enough not to trigger either for overuse.

    The only gotcha here is to make sure that you include in the rulesets for the secondary (OWM) a Trigger that checks for the primary API to be returning null so you don't have both flavors of rulesets competing for Honeywell's API (which is notoriously cranky) as you set the t-stats.

  • [SOLVED] Home Mode setting in Hubitat

    Locked
    9
    0 Votes
    9 Posts
    727 Views
    G

    @librasun Ah, but I've checked the ignore case button and it works wonderfully.

  • Fibaro Modules "Scene Activation" How to here

    Locked
    2
    1 Votes
    2 Posts
    126 Views
    toggledbitsT

    Looks good. This can apply to a variety of scene controllers, not just Fibaro, and one of the vexing things about that is the variables that are set depend heavily on what engineer implemented the device support in the firmware -- there's no consistency. So for some devices, it may be that sl_SceneActivated needs to be tested rather than LastSceneID (which may not even exist). And for others it may be sl_CentralScene.

    A good way to figure out what you need to watch (and set/reset) is to open the detail panel for the entity in the Entities list and play with it. Watch what attributes are changing and how.

  • This topic is deleted!

    Locked
    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • MSR API functions and documentation

    Locked
    10
    1 Votes
    10 Posts
    498 Views
    toggledbitsT

    NOTE: API DOCUMENTATION HAS BEEN MOVED HERE. THE DOCUMENTATION IN THIS THREAD IS NOW OUTDATED.

  • Deprecated Features

    Locked
    13
    0 Votes
    13 Posts
    384 Views
    LibraSunL

    @toggledbits said in Deprecated Features:

    Fixed in 21307 docs. Could/should have been in Mantis?

    Technically yes, it was among the very 1st three things I reported to you, but as "notes" in Github rather than Mantis (which wasn't yet on my radar at the time). Thanks!

  • [SOLVED] Active rules re-set upon docker restart

    Locked
    7
    0 Votes
    7 Posts
    264 Views
    3

    WOW! Thank you for the great explanation and I'm glad it was an easy one for you. I'm betting that the condition doesn't exist with Vera because...well...it's like a sloth. (And I don't think I can get banned here for saying that.)

    My final step to be able to pull the plug out on my Vera Plus is a Dashboard. Preferably with an API capability to blank the screen when my mode is <> Home. For now I have a few virtual devices on the Vera that is acting like a bridge for my Imperihome to keep limping along.

  • How to use the "latch" option/output mode

    Locked
    6
    1 Votes
    6 Posts
    244 Views
    wmarcolinW

    Each day that passes, I am amazed at the amount of resources available in MSR. This "latch" feature is very interesting, and certainly knowing this facility, I will soon find a way to use it.

  • Having trouble with http and basic auth

    Locked
    9
    0 Votes
    9 Posts
    287 Views
    A

    I updated to the latest version and it is working with Digest auth and the new username / password fields. You are going to spoil us with this pace of development 😃

  • Suppressing alerts in HTTP Request actions

    Locked
    4
    0 Votes
    4 Posts
    179 Views
    A

    +1

    I am getting occasional network timeouts on a http request that repeats every two minutes (it is emulating a SiteSensor that I had on Vera). I'd like to be able to suppress those alerts as they are expected to happen from time to time and not anything I need to be notified about.

    Edit:
    Nevermind.... I posted here before looking at the update you just posted in the announcements thread... I see you already made this change.

  • [SOLVED] Lights on all month UNTIL fourth Thursday of the month

    Locked
    8
    0 Votes
    8 Posts
    232 Views
    toggledbitsT

    @gwp1 said in Lights on UNTIL fourth Thursday of the month:

    Am I implementing the latch because there is a availability of multiple Friday's in that 22-EOM after range and latching the extra layer of weekday fourth vs any Friday is what caps the grouped sub-range from going beyond that fourth Friday?

    No, you're using latch because 6 of 7 days of the week aren't Fridays, and as many as 8 days, including another Friday, or as few as 2 with no Friday, may follow the fourth Friday in November of any given year. So once we encounter the fourth Friday, we want to continue to hold that condition state on Saturday, Sunday, Monday, and every other day that may follow through the end of the month. The latch takes care of that easily.

    I know @LibraSun is into expressions, so another possible solution is to use expressions to gin up the timestamp for midnight on the 22nd day of November (the earliest day of the month a fourth Friday could be) of the current year, and then get its day of the week. Knowing that Friday is weekday index 5, you can increment the date to figure out when the fourth Friday occurs. For example, if 11/22 is already weekday 5, you're on target and no offset is needed (that date is the fourth Friday). But if 11/22 is weekday 1 (Monday), you need to add 4 (days, 5-1) to the timestamp to get it to a Friday. I'll leave what to do if 11/22 is a Saturday (weekday index 6) as an exercise for the reader. 🙂 Once you've incremented the date, just compare it to the current time to see if you're on or before it.

  • Will MSR have its own Http API? (Luup Requests)

    Locked
    6
    1 Votes
    6 Posts
    280 Views
    toggledbitsT

    See here for now: https://smarthome.community/post/7572

  • Small cosmetic issue in system time display

    Locked
    2
    0 Votes
    2 Posts
    98 Views
    toggledbitsT

    That's JavaScript doing it. Cool, right? No idea why...

  • Replacing Deus Ex Machina with MSR?

    Locked
    3
    1 Votes
    3 Posts
    175 Views
    R

    Thank you.

  • [solved] Ordering of global expressions

    Locked
    22
    0 Votes
    22 Posts
    744 Views
    tunnusT

    @toggledbits can confirm that the fix is working (tested with 21297)

  • Reactor not starting on latest 21294

    Locked
    8
    0 Votes
    8 Posts
    287 Views
    ElcidE

    just confirming 21297 working with original app.sh

  • Jungle telegraph - MQTT coming to MSR?

    Locked
    4
    0 Votes
    4 Posts
    194 Views
    G

    Return of Lobo...?

  • Sorting arrays

    Locked
    8
    0 Votes
    8 Posts
    233 Views
    wmarcolinW

    @toggledbits PERFECT!!!

    Well, now it's time to review everything I had before and put it in order 😁

    And best of all, remember that I did 3 steps:

    List of all devices; Applying the rule, like battery level; Generate a string to send by message putting the device name.

    Now, with the sort get the name, I can eliminate the third variable, and using format() generate the message directly, SHOW!!

    The game is getting fun.

    It's going to be a long night 🙂

  • Backing / Restoring MSR Rule Sets and Configuration

    Locked
    2
    0 Votes
    2 Posts
    115 Views
    toggledbitsT

    @talisker Backing up your configuration and storage are simply a matter of copying the entire directory in which the config, logs and storage (and possibly others) are kept. If you look at the container's volume configuration, this would be the directory mapped to /var/reactor within the container. Any method of copying will do, including GUI copy to another folder.

    Since I don't have a QNAP NAS, I can't advise on how to update the container. Perhaps a QNAP user can chime in on this with some definitive steps. This previous post covered one approach to the process. I don't know if that's the only way, or the best if there are more ways than this one. Please carry on any QNAP-specific upgrade discussion in that (linked) thread.

Recent Topics