Node-Red Flow Samples/Sharing

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

@Royski, I am also interested in our success since I to am looking at this.

2 Likes

Okay so instead of going through the manage palette I uninstalled node-red-contrib-alexa-remote2 and installed node-red-contrib-alexa-cakebaked via the CLI by doing this in the .node-red directory:

npm uninstall node-red-contrib-alexa-remote2
npm install node-red-contrib-alexa-cakebaked

I did NOT have to change any of my nodes or config!!!! Warning have not really tested this yet but everything appears to be okay. AM NOT RESPONSIBLE FOR BAD THINGS (well not THESE bad things).

edit1: Make a backup first before doing anything!!!
edit2: restart Node-RED afterwards for the changes to show up. (thanks @cjkeenan!)

2 Likes

The change over went ok, albeit manually. Exporting all affected flows, then installing the palette and importing again. then assigning to the new Alexa. Wish I'd have seen @erktrek's post beforehand :smiley:

But..... I'm having issues here, not with the cakebaked version, it started before. NR is no longer picking up any phrase from any device, I was hoping installing this would resolve it, but nope. I'm wondering if Amazon has done something.

Another issue I've been suffering with is losing authentication with Amazon. I can hit deploy, and the Alexa nodes will fail. So I have to flick the init switch again, sometimes more than once and it will work.

Not sure what to do now. :frowning:

Did you make a backup? Restore NR and see if the (limited) Remote2 functionality returns then do the CLI update thing..

edit: just tested a routine - it seems to be working.

It backs up every night, so I already have last nights. But, reading this "failed to load routines: "no body"" · Issue #191 · 586837r/node-red-contrib-alexa-remote2 · GitHub I think it may be you do have to completely remove the remote2, and start afresh with it :expressionless:

I'm going to try this approach.

2 Likes

I was getting the same error message and it appears to work now but your setup is a lot more sophisticated than mine I think.

Everything (well a lot of things) are run via routines and specific phrases in Device Activity, I see nothing in any debug node, its like they have all gone deaf :cry: