Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Send whatsapp from scene


Question

Posted

Hello,

 

i am trying to send multiple whatsap from scene. I can get the scene to send me 1 whatsapp, but not more tan that.

 

This is my code. Am i using the wrong funtion to call the http page? Have this running on raspberry pi. Just open the link and the pi sends a whatsapp to my phone.

Please login or register to see this code.

7 answers to this question

Recommended Posts

  • 0
Guest reiniertc
Posted

hi Patrick,

 

I'm not sure that Whatsapp will work like you would.

I've tried it and it worked, but it broke again becaouse of whatsapp user license violations.

I now use telegram: much easier because they've got a bot-functionality build right in...

  • 0
Posted

Please login or register to see this link.

  • 0
  • Inquirer
  • Posted

    Thanks,that works perfect!

    Hoe do I call the http command in a scène?

    • 0
    Guest reiniertc
    Posted

    I've made a setup where the telegram script to send the message is in php on my nas.

    On the fibaro, I use the following procedure:

     

    1. a variable called telegram_bericht (=telegram payload). This variable contains the message you want to send.

    2. a virtual device with 1 button. When you press the button, the message from telegram_bericht is sent using a GET command on my php script

     

    This way, I can use the same procedure for sending messages in different scripts.

     

    the lua code is as follows:

     

    Lua code in my script that triggers the message:

          fibaro:setGlobal("telegram_bericht", "Televisie%20automatisch%20aangezet");   -- put message in variable telegram_bericht

          fibaro:call(211, "pressButton", "1");  -- send telegram message by pressing button on the virtual device "telegram bericht versturen", in my case deviceno 211.

     

     

    Lua code in the virtual device "telegram bericht versturen":

       HC2 = Net.FHttp("192.168.178.12")  -- ip of my nas

       response = HC2:GET('/telegrambot/stuurTelegramBericht.php?bericht='..fibaro:getGlobalValue("telegram_bericht"))
     

    The php script is pulled from the official telegram documentation. I tweaked it a bit so i can push the message using "?bericht=this%20is%the%20message"

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...