Tutorial: Controlling any Device with Alexa and Node Red, NO CLOUD

Please don’t get discouraged. I appreciate your videos. Bypassing the round trip to the cloud could be a reason to reinstall Node-Red.

2 Likes

A video can go along with a tutorial for the young crowd. Adults prefer reading information, videos are for entertainment.

I think you’ve seen that for some people, a video with no write-up is downright insulting. Add to that a click-baity thumbnail and a few of us are throwing up a bit.

I dont doubt your video is exhilarating and you’ll be a big star for sure, beyond that, a video is a very inefficient way to share a node-red flow. When Amazon imposes changes that make your video irrelevant, are you going to edit it? Make a new one? If it was a write-up, you could keep it up to date easily.

2 Likes

This streamlined version of your template may be of interest to you:

- id: alexa_report
  alias: "Alexa Report"
  initial_state: true
  trigger:
  - platform: state
    entity_id: light.alexa_info
    to: 'on'
  condition:
  action:
    - delay: 00:00:01 
    - service: system_log.write
      data_template:
        message: "Automations: Alexa-Report Value: {{states('input_number.alexainfotask')}} | Index:{{(states('input_number.alexainfotask') | int  / 255 * 20) | round }}"
        level: info
    - service: light.turn_off
      entity_id: light.alexa_info
    - service_template: >
        {% set task = (states('input_number.alexainfotask') | int / 255 * 20) | round %}
        {% set scripts = { 0:'taskmessage1', 1:'taskmessage1', 2:'taskmessage2', 3:'taskmessage3', 4:'taskmessage1',
                           5:'taskmessage2', 6:'taskmessage3', 7:'taskmessage1', 8:'alexaheizunginfo', 9:'housetempinfo',
                          10:'taskmessage3', 16:'alexahausinfo' } %}
        script.{{ scripts[task] if task in scripts.keys() else 'taskmessagenotfound' }}
      data:
        mode: 1
1 Like

node-red-contrib-amazon-echo emulates a Philips Hue bridge which means it models all devices as lights. So you can say ‘set thermostat to 22’ (assuming you’re using the metric system) and it would be valid. However, you would need to modify the code in the function node to constrain the temperature range. In other words, it should reject requests to set thermostat to 75 which is perfectly valid for a light but invalid for a heating system. Similarly, requests to change the thermostat’s color would also need to be rejected.

1 Like

Take a look at my other video where I show how I use my setup to control a thermostat and my heating / cooling

  • Finally: Thank you for your feedback. However, I can’t subscribe to your way of thinking,
    – I don’t think I’m that old.
    :rofl:

Thank you Brian.

And I appreciate your continued support fella. :heart_eyes:

1 Like

Sorry to have kicked off this video discussion. Your vids are well produced and helpful. From my point of view I am usually listening to the radio, so clicking on a video is interuptive to me and those in the room. We save that for Trump mashups :slight_smile:

Additiojnally if I click on your video in the forum it plays in the forum page and all the extra useful info on the youtube page doesn’t show unless you also click on “open in youtube” button (I call it the rabbithole button, see you in a couple of hours)

So IMHO providing a short description as well as a text (eg blog/github) link as well as a video is likely to reach the widest and most receptive audience.

Cheers.

3 Likes

Posting the flow’s code would also be helpful (either in your repo or here).

LOL That’s ok Nick, Thank you.
I’m not adverse to or shy away from criticism… in-fact the whole point of sharing content is to GET criticism / feedback, as well as disseminating my knowledge / ideas / etc. - So, we’re good dude. :sunglasses:

It just got my back up that people seemed to be commenting on the medium rather than the message - I thought posting in “Share your projects” forum would invoke comments on the project itself not the delivery method! LMAO

Cheers.

Probably because the majority of topics in ‘Share your projects’ contain all the details and aren’t just a URL to somewhere else.

Here’s a particularly well-documented example that uses both node-red-contrib-amazon-echo and node-red-contrib-alexa-remote2 to create room-based awareness.

1 Like

I refrained from that as the point was not to share the code per-say but, rather a project over-view.
Then I leave it to the individual to seek further info / description / etc.

I didn’t see the point in posting the whole project if when people watch the outline they decide it’s not for them.

Think of my post(s) as announcements - with ‘further’ reading required should you find it / them interesting / useful. :slight_smile:

I understand, I will take that on-board for my next post - Thanks.

@Everyone - Let’s please try and keep this thread about the project I presented and limit comments / suggestions to those about the content going forward.
It’s got over-ly long with hardly ANY posts concerning the message. With that in mind, I will ONLY respond to comments and questions about the project itself.

Cheers.

1 Like

works like a charm! Thanks!

1 Like

EXCELLENT, thanks for your feedback. I’m glad to hear it helped you. :heart_eyes:

I had asked you to share the flow and you dismissed it because it’s merely a “project over-view” and “I leave it to the individual to seek further info”.

Well, I’m seeking further information from the project’s author and that seems like the best person to ask. Except he’s unwilling to provide it. That’s unusual for “Share your Projects”.

I’m more than happy to help you - Please be more specific on what you’re having problems with.

I don’t think one can be more specific than “please post the flow”. That’s commonly done with Node-Red projects here (and on the Node-Red community forum) to spare users the tedium of having to re-create it node by node.

With respect mate, there are no json files on your github page, only a readme.

A readme that contains the ‘Function’ node code I use - Hint: Ctrl+C & Ctrl+V :crazy_face: