Node-RED nodes for hubitat

Have you tried using setFollowSchedule manually using the web address in your browser? MakerAPI does support secondary values, so if you can control it using the http command you can use the http request node to set it.

it does... what palettes does it need? the nodes aren't clear on that (cron, dropbox out nodes)

Edit: Found 'em!

1 Like

Yeah I think that will work. I'm testing on another hub so I didn't have the items in node-red to see that option... dumb me.

So I have a subflow which runs the Vac after I leave for 60 minutes, then Edge's (until it runs out of battery/goes home), but if I arrive (in another sub flow), how can I send the Vac the charge command? I could check for global.clean=1 in my arrive sub flow (which would indicates the vac is cleaning), and send it back to charge, however if the 60 minute timer hasn't ended then it'll start edging - perhaps after I'm home (if I leave and come back in less than an hour).

The way I did via RM was that "Clean Actions" were to clean, and edge (on 60 min delay). And "Charge Actions" would stop the clean actions and send the unit to charge. Trying to figure out how to implement that same logic in NR.

Thanks!

This seems overly complicated to me. I'm not sure why limiting to 60mins if you're not home. It should clean and then go back to base whenever it's done.

My vacuum control is part of a much larger flow, but in a nutshell it goes like this:
When house mode switches to away, start vacuum.
When house mode switches to home-anything, check if vacuum is running, stop vacuum, delay 30s, send vacuum to base.

I experimented with just the send to base command but I found the vacuum would often be stopped in the middle of the floor. Sending it as 2 commands with the delay in the middle made it much more reliable.

EDIT: The easiest way to prevent it from edging after you've arrived home is to send a STOP payload to that timer as part of your arrival flow.

You can maybe use a link node connected from your arrival sequence + send a "stop" to the timer then go directly to "charge"...

3 Likes

Something like this maybe...

I kinda rushed this pic but you get the idea.. also as an aside you might want to replace stoptimer2 with @putch's excellent stoptimer-varidelay.

2 Likes

Does anyone know of any nodes that interface nicely into Alexa such that I can do a flow that depends on which echo device was spoken to, and by extension which room it was spoken in. Currently I do this using Echo Speaks and the wasLastSpokenToDevice attribute, but that involves a delay of 5+ seconds, which is fine for some applications, but imo lighting is not one of them.

I have been having a hell of time using the Device Type attribute for a given device exposed to Alexa, specifically the determination between Light and Switch, if you want to see more of my issues or have a fix, check the thread below out. But in that thread I was recommended to take a look at Node-RED as a circumvention fix so here I am.

Have a look at node-red-contrib-alexa-remote2
I believe most using Alexa (including myself) use this palette for all Alexa related stuff

U can filter out specific devices via the serial number in a switch node.

I have a flow i can post shortly

Quick question for those who've already done this - what's the best way to upgrade NR to the latest 1.1 on a pi (3 in my case). Use the upgrade script as posted on the NR site (as follows)?

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

Also would I have to reinstall node palettes and node settings (eg maker api/MQTT) or are these preserved?

1 Like

Yes, use the upload script. It worked perfectly for me (although it takes a while so be patient.... It is at least signposted with ticks every so often so that you can see the progress). And no need to reinstall anything else. It was all retained no problem.

2 Likes

For those of you using node-red-contrib-alexa-remote2, and NR is in Docker, what do you have for your File Path to store the authentication results?

Thanks!

@fblackburn In an attempt to get this thread back on topic to Node-red nodes for Hubitat (at least for a few minutes :slight_smile: ... EDIT: Well, only took 9 minutes to go back off topic lol.).

While I am happy if the node set stays as-is at this point, I wanted to ask if you had any thoughts or plans for future versions of the nodes? Or do you also consider them complete at this point?

The only ideas I can really think of (and none are "necessary" in my opinion) are:

  1. Throttling on command (and maybe device?) node to prevent high frequency calls to Hubitat overloading Maker API.
  2. Refactoring the code changing from a local node based cache to a global cache. This is a fairly big change, but could have both memory benefits as well as reduce initialization time when there are a high number of duplicate device nodes. It also makes it trivial to make deviceId, attribute, or command an input settable variable in all cases, as they would already be in the global cache and available for use.
  3. Future node maintenance additions such as new features that are added to Maker API (like the color setting changes)
1 Like

in the alexa2 node, the name of the device is passed in the payload. (msg.payload.name)

So as an example, my node was listening for a routine named "Random Station" and i could then parse out what device that was spoken to so NR would send the command to that device.

Do we have a solution for reading/writing HE Global variables yet? I don't recall seeing that and certainly I don't know how to do it.

That isn't possible through Maker API as far as I know.

Hubitat would have to add maker API support for those before we could do that externally. I don't think anyone has ever make a feature request to Bruce for that.

You could always use a HTTP Node in NR and use the RM HTTP API Interface to do that (at least for writing)

1 Like

Ohh.... good point. I hadn't considered that.

1 Like

What's in your rbe node? Block unless value changes (ignore initial value?). If I do this, Clean goes and blocks, after time edge runs but immediately after edge it goes to charge. I just want it to edge until I get home or until the battery dies. I tried setting rbe to block until the payload is greater than or equal to stop, but it complained it wasn't a number