Auto Actions: Difference between revisions

Jump to navigation Jump to search
Lesley (talk | contribs)
Lesley (talk | contribs)
Line 3,219: Line 3,219:


}
}
</div>
</div>
<div class="mw-collapsible mw-collapsed">
<div  class="headline-collapse" >
====Use webhook to switch a Shelly on====
</div>
<div class="mw-collapsible-content">
Here is a simple PHP script with which you can switch a Shelly via an autoaction in beds24.
You can use this to switch on a string of lights on the day of arrival or to charge the night storage heating if a certain info code is set in the booking on the day before arrival.
Create an auto action and enter the PHP script ‘beds24-shelly-steuern.php’ under ‘Webhook’. The parameters for the control are transferred under ‘Data in body’:
id:b0b21c1xxxxx
shelly_server:shelly-123-eu.shelly.cloud
auth_key:ABCDEFGHIJKLMNPQRSTUVWXYZABCDEFGHIJKLMNPQRSTUVWXYZABCDEFGHIJKLMNPQRSTUVWXYZ
shelly_url:device/relay/control
parameter:channel=0&turn=on
email_result:[email protected]
remarks:Text, z.B. mit Template Variablen [GUESTFULLNAME] und [BOOKID]


</div>
</div>