Multi-System Reactor

693 Topics 6.8k Posts
  • Build 21313 question

    Locked
    7
    0 Votes
    7 Posts
    230 Views

    @black-cat The improvement being requested is to put some meat on the bones of the thread topic. "Build 21313 question" - way too vague. Updating to something along the lines of "Build 21313: new system capability button questions" so readers know what the thread is about and whether it is something they would read or offer input on is where Patrick was pointing the OP to (hence the link to the pinned post about Best Practices.)

    Hope that helps!

  • Import Vera Rules in Docker Containers?

    Locked
    12
    0 Votes
    12 Posts
    498 Views

    @buxton said in Import Vera Rules in Docker Containers?:

    @3rdstng Ha! if you're in the US, I'll take it. I still have a veralite running in my garage that could do with an upgrade.

    I am in So Cal. I'll DM you.

  • 0 Votes
    20 Posts
    586 Views

    This is expected behavior for the moment, but will be changing. MSR has never had a need to persist entities over restarts because the controllers have the current data. It's not even an issue for MQTT, because retained messages, when used properly, update state correctly on restart/reconnect.

    But, I have been using a version of MSR in my own home that persists entities across restarts, for other reasons, and that will also serve to smooth out the bump for event handling here. I still have a few more wrinkles to smooth out... like how to detect when the user has changed their custom configuration for an entity, modified their own custom declaration of a capability, etc. These are rarely-used features, but I nonetheless want them to require less user intervention (e.g. manual forced purge of retention data, etc).

  • Replacing SiteSensor Plugin (Vera) with MSR

    Locked
    91
    3 Votes
    91 Posts
    5k Views

    The final update here was that I decided against the onboard OWM config and went with creating matching Global Expressions generated via API call that I was using for Ambient's API. Consistency goes a long way for me. Paired up with matching HVAC rulesets that pull from the appropriate expressions and viola.

    My biggest concern was around making useless calls to OWM's API (I try to be a responsible Netizen). I'd resolved that with SiteSensor by having the OWM version only arm itself when the Ambient one failed but, alas, that was not to be the path forward here. I bit the proverbial bullet and have the two running simultaneously and use NULL results from Ambient as my trigger for which rulesets actually action the HVAC. It's been working quite smoothly, knock on wood.

    I do see instances were Honeywell's API for the stats is just a bit finicky about setting both stats in a single call. To resolve this I've added some "course correction" rulesets that resend the correct setpoints after seven minutes. So far, so good.

  • Setting Other State Variables on Vera / Hubitat

    Locked
    15
    0 Votes
    15 Posts
    543 Views

    @librasun They changed from global variable in Rule Machine to Hub Variables. I glossed right over the naming when you asked and assumed you meant Hub Variables. Glad you got it working.

  • 0 Votes
    3 Posts
    119 Views

    @snowman Thank you. I opened PR 0000268 for this; and it's already fixed and will appear in the next build.

  • Finding Missing Devices & Migrating Devices

    Locked
    10
    1 Votes
    10 Posts
    207 Views

    @3rdstng said in Finding Missing Devices & Migrating Devices:

    Maybe just a stupid simple GUI to a fgrep cli command with collected variables

    I think Hubitat handles it by adding a reference - complete with hyperlink - for every Rule containing a specific device or virtual device. One click to jump over to the Rule. Kinda neat.

    As someone mentioned above, I think the idea place for MSR to have this (if it were to become a feature) is under Entities. Truly it could spare me many hours of hunting and pecking - and never being entirely certain - that I sadly do not have most days.

  • How To: Send TCP packet in Reaction

    Locked
    2
    1 Votes
    2 Posts
    135 Views

    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).

  • 0 Votes
    18 Posts
    403 Views

    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
    638 Views

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

  • 1 Votes
    2 Posts
    94 Views

    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
    398 Views

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

  • Deprecated Features

    Locked
    13
    0 Votes
    13 Posts
    298 Views

    @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!

  • 0 Votes
    7 Posts
    209 Views

    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
    187 Views

    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
    223 Views

    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
    151 Views

    +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.

  • 0 Votes
    8 Posts
    178 Views

    @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.

  • 1 Votes
    6 Posts
    237 Views

Recent Topics