Node-Red Flow Samples/Sharing

I had trouble with the import of you flow?

weird. looks like that has my email address displayed prominently anyway.

I went ahead and changed the flow to the subflow that I’m using. its essentially the same. see if that one works for you.

just make sure you click the box in the alexa node that says “emit only attributes set by alexa”

:grinning:

I've been using node-red-contrib-credentials (node) - Node-RED to store credentials and use them in flows. Even if you have it as part of the flow, it you set a value as "private" it does not get exported (will be blank).

2 Likes

I hadn't noticed UNTIL NOW!!!!!! What the heck? I have the same "????" in dropdown.

1 Like

I am not using routines right now but am getting an error message: "failed to load routines: "no body"" on the config node. Did the same as you - reauthed, updated my linux system, rebooted etc.

1 Like

I get this error now.

Need to escape the quote or restructure your use of the single and double quotes.

1 Like

In a way, phew. Hoping the palette gets an update soon :+1:

Yup, same as here.

How do I escape that quote? It works in the flow, it just won’t export for some reason.

Should be as simple as putting a \ in front of it, thus it becomes something like:

"to": "'{\"hue\":' & pay

ok. try this:

flow

‘’’
[{"id":"cc5490a0.5d9b","type":"subflow","name":"Alexa Color Bulb","info":"","category":"","in":[{"x":122,"y":374,"wires":[{"id":"f8f545a9.76fd3"}]}],"out":[{"x":1210,"y":238,"wires":[{"id":"c93c2e11.70e4","port":0}]},{"x":1210,"y":289,"wires":[{"id":"dd3aa503.a6f6d","port":0}]},{"x":1210,"y":340,"wires":[{"id":"8452c43b.2ba2f8","port":0}]},{"x":1210,"y":391,"wires":[{"id":"6f79aafa.3da2c4","port":0}]},{"x":1210,"y":442,"wires":[{"id":"5e77579d.cfa98","port":0}]}],"env":[],"color":"#C7E9C0","inputLabels":["alexa"],"outputLabels":["On","Off","Level","Color Temperature","Color"],"icon":"node-red/switch.svg"},{"id":"33ef047f.5f7af4","type":"range","z":"cc5490a0.5d9b","minin":"0","maxin":"360","minout":"0","maxout":"100","action":"scale","round":true,"property":"payload.color.hue","name":"hue","x":577,"y":442,"wires":[["372edb60.dcc474"]]},{"id":"372edb60.dcc474","type":"range","z":"cc5490a0.5d9b","minin":"0","maxin":"1","minout":"0","maxout":"100","action":"scale","round":true,"property":"payload.color.saturation","name":"saturation","x":723,"y":442,"wires":[["2f1322be.d5db86"]]},{"id":"2f1322be.d5db86","type":"range","z":"cc5490a0.5d9b","minin":"0","maxin":"1","minout":"0","maxout":"100","action":"scale","round":true,"property":"payload.color.brightness","name":"level","x":883,"y":442,"wires":[["5e77579d.cfa98"]]},{"id":"5e77579d.cfa98","type":"change","z":"cc5490a0.5d9b","name":"Color","rules":[{"t":"set","p":"command","pt":"msg","to":"setColor","tot":"str"},{"t":"set","p":"arguments","pt":"msg","to":"'{\"hue\":' & payload.color.hue & ',\"saturation\":' & payload.color.saturation & ',\"level\":' & payload.color.brightness & '}'","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1036,"y":442,"wires":[[]]},{"id":"f8f545a9.76fd3","type":"switch","z":"cc5490a0.5d9b","name":"Command","property":"payload.directive","propertyType":"msg","rules":[{"t":"eq","v":"TurnOn","vt":"str"},{"t":"eq","v":"TurnOff","vt":"str"},{"t":"eq","v":"SetBrightness","vt":"str"},{"t":"eq","v":"SetColorTemperature","vt":"str"},{"t":"eq","v":"SetColor","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":308,"y":374,"wires":[["c93c2e11.70e4"],["dd3aa503.a6f6d"],["8452c43b.2ba2f8"],["6f79aafa.3da2c4"],["33ef047f.5f7af4"]]},{"id":"8452c43b.2ba2f8","type":"change","z":"cc5490a0.5d9b","name":"Brightness","rules":[{"t":"set","p":"command","pt":"msg","to":"setLevel","tot":"str"},{"t":"set","p":"arguments","pt":"msg","to":"payload.brightness","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":597,"y":374,"wires":[[]]},{"id":"6f79aafa.3da2c4","type":"change","z":"cc5490a0.5d9b","name":"CT command","rules":[{"t":"set","p":"command","pt":"msg","to":"setColorTemperature","tot":"str"},{"t":"set","p":"arguments","pt":"msg","to":"payload.colorTemperatureInKelvin","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":607,"y":408,"wires":[[]]},{"id":"c93c2e11.70e4","type":"change","z":"cc5490a0.5d9b","name":"On","rules":[{"t":"set","p":"command","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":577,"y":306,"wires":[[]]},{"id":"dd3aa503.a6f6d","type":"change","z":"cc5490a0.5d9b","name":"Off","rules":[{"t":"set","p":"command","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":577,"y":340,"wires":[[]]}]
‘’’

(updated the above post also)

@Royski / @stephen_nutt

I found this possible workaround from the Github Issues page:

Hi @brinzlee,
I work with Windows and did it with WinSCP, because I have no idea about linux so I am a linux-idiot. There is certainly a direct way with linux.

Node-red is installed on a Raspberry-pi.

node-red modules are in the path /home/pi/.node-red/node_modules (Attention: there is a dot in front of node-red in the path -> hidden files have to be shown in WinSCP: Preferences / Panels / remote / show inaccessible directories).

Download the current dependency files from https://github.com/Apollon77/alexa-remote/archive/v3.6.0.zip
unpack the zip on the Windows computer

replace the following 3 files with WinSCP in the node-red directory /home/pi/.node-red/node_modules/alexa-remote2:
alexa-remote.js, alexa-wsmqtt.js, package.json
Pay attention to the file permissions, they must not change: right mouse button, properties, octal 0755

The problem is that after an update of node-red or of a node-red-module, it will be reset to the old versions.

Good luck

I have not attempted this yet...

3 Likes

Thanks for this, taking a look now :+1:

And they're back!! Many thanks for this workaround, brilliant!!

2 Likes

I have the same issue, it was working up until today and now the node doesn't see the routines.

Try this - if you know Linux it's just copying files over to the proper spot.

1 Like

Normally I can goof the simplest things up but this worked like a champ, Thanks!

3 Likes

It looks as though Alexa-Remote2 has been superseded perhaps by node-red-contrib-alexa-cakebaked

This is a collection of Node-RED nodes for interacting with the Alexa API. You can emulate routine behaviour, control and query your devices and much more!

All functionality is from alexa-remote2. The goal is to expose all of alexa-remote2s functionality in node-red nodes.

I started having the same issues with Routines (now its not listening to anything) then checked my PI. The BAK directory had gone, and the files I replaced were back to the original. I'm not sure how that could happen, but it did.

The downside is, you cant install this Palette without removing Alexa-Remote2 :expressionless:
I have masses of nodes running this, so here goes nothing!!

5 Likes

Good luck! I am eagerly awaiting hearing of your success so I can follow you down this path. :grin:

2 Likes