Node-RED nodes for hubitat

Yes.

Thanks.

Yes. Clearing the send events box only keeps if from triggering due to a mode change. The node still reports the current state, it just doesn't trigger an action.

1 Like

Maybe one thing you could do is have a bogus parameter on the end of your src url.. something like this in your "Grab Image" function node...

msg.payload = 'http://www.bom.gov.au/radar/IDR713.gif?date=' + (new Date()).toISOString();
return msg;

Then for each injection it will be a unique call..

2 Likes

Thanks. This worked. I have all my blue sky without a cloud for miles showing in my dashboard now (and updated). Nice one. May you get some blue skies your way.

1 Like

This is my fortnightly public service announcement that y'all should get on board with the Sonos palette, and putting playlists on your dashboard. I've got White Noise (rain and flowing river noise), Fleetwood Mac (yeah baby!). I've got a +5/-5% volume, skip song and toggle on/off.

image

The party time switches allow me to have Sonos music follow me around the home - which is working great. It's a flow I've linked to previously about a thousand posts ago.

This flow flushes the queue, and plays a Sonos playlist called Fleetwood Mac.

Summary
[{"id":"e0b2c7f5.3185e8","type":"sonos-control-player","z":"acbd3b2b.717768","confignode":"6cadd770.784a18","name":"Sonos - Office","x":1340,"y":1680,"wires":[[]]},{"id":"3453cd7e.aeebf2","type":"change","z":"acbd3b2b.717768","name":"Play (Vol. 10)","rules":[{"t":"set","p":"payload","pt":"msg","to":"play","tot":"str"},{"t":"set","p":"volume","pt":"msg","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1150,"y":1680,"wires":[["e0b2c7f5.3185e8"]]},{"id":"f07ba8b3.e86478","type":"ui_template","z":"acbd3b2b.717768","group":"2f9ab0f9.45393","name":"[Dash] Fleetwood Mac","order":10,"width":"2","height":"2","format":"\n<md-button class=\"vibrate filled touched smallfont rounded\" style=\"background-color:#1c1c1a\" ng-click=\"send({payload: 'Hello World'})\"> \n   Fleetwood <br> Mac\n</md-button> \n\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":380,"y":1680,"wires":[["a3a17547.00e978","60cc7a25.9a0644","ffb58e12.ee64e"]]},{"id":"a3a17547.00e978","type":"change","z":"acbd3b2b.717768","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"flush_queue","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":1680,"wires":[["d1105f6e.17dbc"]]},{"id":"d1105f6e.17dbc","type":"sonos-manage-queue","z":"acbd3b2b.717768","confignode":"6cadd770.784a18","name":"","x":880,"y":1680,"wires":[["3453cd7e.aeebf2"]]},{"id":"960e8250.0ff16","type":"change","z":"acbd3b2b.717768","name":"Fleetwood Mac","rules":[{"t":"set","p":"payload","pt":"msg","to":"insert_musiclibrary_playlist","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"Fleetwood Mac","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":1720,"wires":[["d1105f6e.17dbc"]]},{"id":"ffb58e12.ee64e","type":"delay","z":"acbd3b2b.717768","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":515,"y":1720,"wires":[["960e8250.0ff16"]],"l":false},{"id":"6cadd770.784a18","type":"sonos-config","z":"","name":"Sonos - Office","serialnum":"B8-E9-37-2F-9C-48:7","ipaddress":"192.168.1.44"},{"id":"2f9ab0f9.45393","type":"ui_group","z":"","name":"Sonos","tab":"98965367.6ffea","order":8,"disp":true,"width":"6","collapse":false},{"id":"98965367.6ffea","type":"ui_tab","z":"","name":"Mike","icon":"dashboard","disabled":false,"hidden":false}]

This flow flushes the queue, and then plays an amazon music/google play song. Get the song details from here

 [{"id":"d2efc0b1.3ae34","type":"ui_template","z":"acbd3b2b.717768","group":"2f9ab0f9.45393","name":"[Dash] White Noise","order":6,"width":2,"height":2,"format":"\n<md-button class=\"vibrate filled touched smallfont rounded\" style=\"background-color:#1c1c1a\" ng-click=\"send({payload: 'Hello World'})\"> \n   White Noise\n</md-button> \n\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":390,"y":1420,"wires":[["efdfac36.b2658","9da30fe3.8ae08","8c35b38a.edc63"]]},{"id":"9c5c2665.dddf28","type":"change","z":"acbd3b2b.717768","name":"Waves Noise","rules":[{"t":"set","p":"payload","pt":"msg","to":"insert_uri","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"x-sonosapi-hls-static:catalog%2ftracks%2fB00LAPJRYO%2f?sid=201&flags=0&sn=7","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":1560,"wires":[["4bebc932.d16058"]]},{"id":"4bebc932.d16058","type":"sonos-manage-queue","z":"acbd3b2b.717768","confignode":"6cadd770.784a18","name":"","x":840,"y":1540,"wires":[["3453cd7e.aeebf2"]]},{"id":"e0b2c7f5.3185e8","type":"sonos-control-player","z":"acbd3b2b.717768","confignode":"6cadd770.784a18","name":"Sonos - Office","x":1340,"y":1580,"wires":[[]]},{"id":"3453cd7e.aeebf2","type":"change","z":"acbd3b2b.717768","name":"Play (Vol. 10)","rules":[{"t":"set","p":"payload","pt":"msg","to":"play","tot":"str"},{"t":"set","p":"volume","pt":"msg","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":1580,"wires":[["e0b2c7f5.3185e8"]]},{"id":"efdfac36.b2658","type":"change","z":"acbd3b2b.717768","name":"Flush queue","rules":[{"t":"set","p":"payload","pt":"msg","to":"flush_queue","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":1420,"wires":[["dde4efc7.0501b"]]},{"id":"dde4efc7.0501b","type":"sonos-manage-queue","z":"acbd3b2b.717768","confignode":"6cadd770.784a18","name":"","x":840,"y":1460,"wires":[[]]},{"id":"9da30fe3.8ae08","type":"delay","z":"acbd3b2b.717768","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":515,"y":1560,"wires":[["9c5c2665.dddf28"]],"l":false},{"id":"bffc062d.ce9e18","type":"change","z":"acbd3b2b.717768","name":"Stream Noise","rules":[{"t":"set","p":"payload","pt":"msg","to":"insert_uri","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"x-sonosapi-hls-static:catalog%2ftracks%2fB00LCTFD28%2f?sid=201&flags=0&sn=7","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":1500,"wires":[["dde4efc7.0501b"]]},{"id":"8c35b38a.edc63","type":"delay","z":"acbd3b2b.717768","name":"","pauseType":"delay","timeout":"200","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":515,"y":1520,"wires":[["bffc062d.ce9e18"]],"l":false},{"id":"2f9ab0f9.45393","type":"ui_group","z":"","name":"Sonos","tab":"98965367.6ffea","order":8,"disp":true,"width":6,"collapse":false},{"id":"6cadd770.784a18","type":"sonos-config","z":"","name":"Sonos - Office","serialnum":"B8-E9-37-2F-9C-48:7","ipaddress":"192.168.1.44"},{"id":"98965367.6ffea","type":"ui_tab","z":"","name":"Mike","icon":"dashboard","disabled":false,"hidden":false}]  

The buttons I got from here. You need to put a styling button on the flow/page with a button.

3 Likes

Great work! Just wish i could do this with Denon HEOS speakers.....

If you don't have this palette - you should get it. I don't have Denon speakers, but it seems like it would give you a good start:

1 Like

I saw that, and tbh, i just assumed it was for receivers.
But i should probably give it a go!

Which pallete? node-red-contrib-sonos-plus?

1 Like

Yes.

1 Like

Are you able to get your Sonos to perform TTS through Node Red? If so, could you share how?

I have a question about locks - how can I differentiate between manual unlock (like from the inside) vs keypad unlock. I know to look at lastCodeName but is there another attribute/property somewhere?

Can anyone give an overview explanation of arguments that can be used with command nodes?

  1. How do arguments get passed? (I think I understand that the argument can be built in the node or passed in as msg.argument)

  2. How do you know what any given argument should be? (Last night I was messing with sending commands to a bulb and it showed argument,argument in the argument field. Turns out the first was the level and the second was the transition duration. ie. 100,5 resulted in a 5 second transition to maximum brightness)

  3. Using the example above, is there an easy non-trial and error method of figuring out what argument can be passed? (I thought maybe it would be possible to look at the options showing for the device itself in HE, but it did not show an option of intensity and duration. It only offered the ability to set intensity. Thus NR actually has more capability, but at the cost of having to experiment to figure it out)

  4. What are the current limitations of the arguments? (Based on reading the thread some, it looks like there are cases where when setting a color, multiple components have to be passed separately.)

  5. Are there known/expected changes to argument handling coming either with future firmware updates that will enhance the Maker API or with future versions of the NR nodes?

Up to now, I have largely been focusing on pulling data from HE to NR, but am starting to ramp up controlling items and hope to be as efficient as possible at taking advantage of the NR node capability.

Go into the Maker API app in the Hubitat console, you'll see a link that says "Get All Devices with Full Details"

You'll see a complete list of devices with the complete list of commands for each device

As you noted, Maker API can't seem to handle an array of values

No one knows, Hubitat plays their hands close to the vest

When you open the command node and select a device, click on the drop-down list for command. That will tell you if there are any arguments, and how many. If you go into Hubitat and open that device, each button represents a command and if there are any attributes, they are shown below the button and a description for each:
image

.
This Alexa-Remote2 node os going to be the end of me !!

I keep getting caught in a loop of "open 192.168.2.71:3456 in your browser" for all Alexa nodes. Running through that process doesn't do a damn thing. It says it was successful (" Amazon Alexa Cookie successfully retrieved. You can close the browser.") but it does nothing :frowning:

Unreliable is easily the worst thing of these pieces of code can be

Somewhere in the 1800+ posts in this thread are some that I started about this and how to fix. I am not near a computer any time soon to incl link unfortunately. I think there is reference to a solution and bottom of the information window when you click on a node.

Yeah, there is a flow in the "Info" for the node, but it doesn't make any sense.. it stores something in "flow.alexa" but doesn't say anything on how to actually leverage it

There was an update pending on the palette, i'll update it and see what happens

** updating to 3.10.0 seems to have fixed things for now... although my faith that this node stays fixed is non existent **

Just out of curiosity - how is your config node auth method set up? Are you using cookies or proxy , are you using an auth file?

I'm wondering in case I run into this same thing - I have not yet :crossed_fingers: .