Use Node-RED to make a Weather Notification system. Easy use case of the Home Assistant. (003E)

Поделиться
HTML-код
  • Опубликовано: 15 дек 2024

Комментарии • 14

  • @jeradclark
    @jeradclark 3 года назад +2

    This video is great, thank you!

  • @borchrich
    @borchrich 3 года назад

    Hello.
    I have just discovered your home assistant videos. They are very well-done and informative.
    I have one question for this one - How did you setup your google mini devices in Home Assistant so that they are all in the one group "homegroup" (as shown at 9:25)?

    • @makeshiftsmarthome6748
      @makeshiftsmarthome6748  3 года назад

      Hi, thanks for watching my video. I didn't do anything special for the grouping google home mini speakers. Once you have multiple google speakers in your home and they are all registered in your google home app with single id, the homegroup just appears in the home assistant when you are using/referring google home as a media player. If it is not your case, you might need to integrate the entities of the google home media players. Sorry, I don't know exactly how to add this home group because it was automatically added for my case. The menu for the integration is little bit changed recently. Please go to Configuration -> Devices & Services -> and use Integrations tab.

  • @maro1977pl
    @maro1977pl Год назад +1

    Hi can you show how to do morning (6am) or when you get home weather info. "Good morning, today is January 30, 6 am, the weather ... the weather will change ..."

    • @makeshiftsmarthome6748
      @makeshiftsmarthome6748  Год назад +1

      Hi, thanks for watching my video. There could be multiple ways for doing this (though I tried none yet). One thing could be using some trigger logic (in Node-RED, use big timer node, etc.) and construct some info text regarding current and/or upcoming weather then send it to Google TTS to say that text info. Another method, which I plan to make one, is to use Google Assistant SDK (Available since Jan. 2023). According to the article I read, in Home Assistant side, you just use a command google_assistant_sdk.send_text_command with a text parameter such as "Weather today", then it will act like you say to the Google Speaker. So, all you will need to do is send "Weather today" or other voice command (as text) at a specific time.

  • @patrickmathijssen9388
    @patrickmathijssen9388 10 месяцев назад

    I am running Node Red, but no Home Assistant. Is it still possible to get this working? (text speech over the speaker)

    • @makeshiftsmarthome6748
      @makeshiftsmarthome6748  10 месяцев назад

      It's difficult to answer for me because I only have an experience of Node-Red on Home Assistant. If there is an entity you can continuously check the status of the weather and API accessibility to Google speaker, it could be possible, but I expect the way towards it would be challenging.

  • @krdesigns
    @krdesigns 3 года назад

    function is not working. Its totally different then yours. How to fixed it?

    • @makeshiftsmarthome6748
      @makeshiftsmarthome6748  3 года назад

      Hello King Richard, I opened up my Node-RED and tested the function node with the code for weather notification and it worked well. The Node-RED and Home Assistant are occasionally being updated and sometimes its appearance is changed as they are updated. However, the essential functionalities of nodes are not significantly changed over time. Please check if you picked the exact function node. Second, click the 'See more' of this video, then you can see the code I made for this video. Copy and paste that code onto the function node and check if it is working. If you have further question, please don't hesitate to ask me again with more detailed description of the problem. Thanks.

    • @krdesigns
      @krdesigns 3 года назад

      @@makeshiftsmarthome6748 First of all there are only one functions, which similar with yours. However the functions tab come with 4 tabs instead of 3 like yours. Setup, Function, Close. On my functions there are 4 tabs: setup, on start, on message, on stop. Adding your text does not make the connection into 2 and manually changes works on the one that listed but also push the one that not listing. So basically this functions did not work correctly. Not sure why

    • @makeshiftsmarthome6748
      @makeshiftsmarthome6748  3 года назад

      The difference in the number of tabs is due to the updated Node-RED. It was 3 when I made the video, but now it is changed to 4. The default tab opens up was 'Function', but now it is 'on Message'. You should just key in all the code in the 'on Message' tab. At 15:56 of the video, I changed the number of output at the bottom of the screen. Sorry, this number of input was behind the subtitle so it is difficult to see. However, in the updated version of the function node, this number of outputs can be configured on the 'set up' tab. So you need to open the set up tab and configure it on the tab. Nevertheless, even if the number of output wasn't configured, the function node will work normally because the second node will produce output only when no matching keyword is coming (it is treated in the default clause) and if there's no second output configured for the function node, the node will produce nothing on unmatched keyword. Hope it will help you and if you have any further query, please don't hesitate.

    • @krdesigns
      @krdesigns 3 года назад

      @@makeshiftsmarthome6748 Thanks for the reply. So far eventhough I add 2 output. All response go into the first one only. The 2nd response did not provide any data. Am I missing something?

    • @makeshiftsmarthome6748
      @makeshiftsmarthome6748  3 года назад

      First, please make sure that you copied and paste the exact code appeared when you hit 'See more' button in this video. One chance is that there's some mistake on the default clause. Second, link two inject node to the function node. Change their data type to string and make one node to output 'cloudy' and another to output 'aaa'. Also bring two debug nodes and connect these nodes to each of function nodes' output terminals. After deploying Node-RED, hit 'cloudy' inject node. If 'It is cloudy now' string received by the first debug node (hover mouse on the debug message then the debug node will be outlined with red dashed line). Then click 'aaa' inject node. if same 'aaa' message is received by the second debug node, then it is ok because the function node is designed to produce output to the second terminal only when the input message cannot be handled by the switch clause. If the second debug didn't receive anything when you hit the 'aaa' inject, make sure if your code in the default clause is correctly typed.
      default:
      payload = "";
      return [null, msg];