Open [Home Assistant] How do you "ring" a device from Node Red? And use the other special features

Discussion in 'Join' started by 3m0, Jun 9, 2018.

  1. 3m0

    3m0 New Member

    Joined:
    Jan 28, 2017
    Messages:
    11
    Likes Received:
    0
    Hi, I've read the documents and searched but I cannot find out how do ring a device from Node Red and I also could not figure out how to do in with regular yaml. Can anyone help please?

    Here is what the docs say for regular yaml:

    The services exposed in the joaoapps_join component can be used with the service data described below:
    Service Data
    joaoapps_join/ring
    joaoapps_join/send_sms {"number":"5553334444", "message":"Hello!"}
    joaoapps_join/send_tasker {"command":"test"}
    joaoapps_join/send_url {"url":"http://google.com"}
    joaoapps_join/send_wallpaper {"url":"http://www.planwallpaper.com/static/images/ZhGEqAP.jpg"}
    joaoapps_join/send_file {"url":"http://download.thinkbroadband.com/5MB.zip"}

    I just don't understand how to format that into Node Red (either in function node or the home assistant call service "Domain" "service" and "data" fields. Can anyone provide a working example of their flow successfully ringing another device? I would also be curious to see a yaml example of it too because I've googled and never have found one.

    Here's what I've tried. In Node Red, I only see send or received message for the actual Join node. As far as I know, only these 4 things can be used when sending messages via a function node and the Join node. In the function node I have:

    msg.title = "Location " + msg.payload;
    msg.text = "Your location changed to " + msg.payload;
    msg.devices = "Galaxy Note8";
    msg.icon = "http://www.website.com/images/homeassistant.png"
    return msg;

    Is there another line that would produce the ring device feature? or the send tasker command or file url?
    like
    msg.extra = ring or I don't know

    If it's not possible with what I tried above, I also tried to use the "Call Service" Home Assistant node.
    But I am not sure what to put for Domain, Service and Data.
    I don't see a "joaoapps_join" service and thought it probably should be to use the Ring and other extra features.

    Thanks for any help!

     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Try using this:

    Code (Javascript):
    msg.push = {
        "text":"finding device...",
        "find":true
    }
    return msg;
    You can also use any of the fields here in the msg.push object.

    Hope it helps! :)
     
  3. 3m0

    3m0 New Member

    Joined:
    Jan 28, 2017
    Messages:
    11
    Likes Received:
    0
    Thank you! That works nicely but how do I do the same thing in YAML? I'm trying to make a script and am trying without success.

    ```
    join_ring_gn8:
    alias: Join Notify GN8
    sequence:
    - service: ring.gn8
    data:
    message: 'Ringing Phone'
    ```
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Unfortunately that I don't know. I'm not familiar with Home Assistant at all... Maybe you can ask the Join plugin's developer for it?
     
  5. 3m0

    3m0 New Member

    Joined:
    Jan 28, 2017
    Messages:
    11
    Likes Received:
    0
    oh wow I never realized you were not the creator of the join addon for home assistant, I just assumed you were since you've got your hands in so many pies :D I will seek him out, thanks for helping me with the node red stuff
     
  6. Eddie1974

    Eddie1974 New Member

    Joined:
    Jun 18, 2016
    Messages:
    4
    Likes Received:
    0
    joaomgcd,

    how do you send the speak command from node red? what is the syntax?
     
  7. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    You need to create a push object and then in that create a "say" field. :) Let me know if you need further help.
     
  8. Eddie1974

    Eddie1974 New Member

    Joined:
    Jun 18, 2016
    Messages:
    4
    Likes Received:
    0
    Hi, can you post an example please? Having trouble working this out. Thanks.
     
  9. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Try using this:

    Code (Javascript):
    msg.push = {
        "say":"Hello!"
    }
    return msg;
     
  10. Eddie1974

    Eddie1974 New Member

    Joined:
    Jun 18, 2016
    Messages:
    4
    Likes Received:
    0
    Hi again,
    Can you post an example on how to send a file (photo) though node red please.
     
  11. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Do you mean from Node-RED to a phone?
     
  12. Eddie1974

    Eddie1974 New Member

    Joined:
    Jun 18, 2016
    Messages:
    4
    Likes Received:
    0

    Yes, a file/photo from Node Red to a phone.
     
  13. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    You would have to first upload it somewhere and then send the link. There's no way to send a file directly, sorry!
     

Share This Page