Planyo - advanced integrations
Here you will find information about Planyo and advance integrations. Some of the information is written in norwegian.
Her finner du informasjon som ikke er nødvendig for å komme i gang med Planyo, men kan være nyttig for å få Planyo til å fungere akkurat som du ønsker det.
NB: Alle ord og uttrykk som er forklart på denne siden er på engelsk. Grunnen til dette er for å gjøre det enklere å referere til hjelpedokumentasjonen til Planyo. Du kan bruke Planyo på norsk siden "back-end" har blitt oversatt, men det er enklere om du venner deg til å bruke engelsk.
Control Lights based on reservations in Planyo
Planyo does not have an integration for controlling lights directly. However you can use their Google Calendar extention to control lights if your smarthouse or controller supports triggering of events based on events in Google Calendar. Here are some suggestions for controllers and contact information.
Sensio
Vendor: Sensio AS
Technical contact: Gard Sveen phone: +47 90625479
Used by: HIL Tennis
Description: The Sensio controller is a standalone controller. It can also be used together with an app for controlling the lights manually. It is being used by HIL Tennis, and you can find more detailed information about how it is being used in lysstyring (in norwegian)
Dali/Gratech
Vendor: Gratech
Technical Contact: Erik Grabner phone: +47 40045671
Used by: Gjøvik TK
Description: Please contact Gratech for detailed information about this integration
Homeseer
Vendor: Homeseer
Technical Contact: Intin AS
Used by:
Description: HomeSeer is a homeautomation system typically used to control lights, locks in your home. HomeSeer can be used to control lights together with Planyo by using the GCalSeer plug-in (free). This will trigger events (lights on/off) when there are events in your Google Calendar. The exact same solution is being used by HIL Tennis to control locks. Used with Aeotec Heavy Duty smart switch (Z-wave), this will provide you with a very cost effective solution especially if you are using HomeSeer to control locks aswell.
1 x heavy duty relay switch will set you back approx NOK 1000,- Can be purchased from Eldirekte in Norway. You will need one switch for each court
1 x HomeSeer licence cost USD 250,- can be installed on any Windows PC or purchase HomeTroller with HS preinstalled on a RPI
Control Locks based on reservations in Planyo
Planyo does not have an integration for controlling locks directly. Typical use for this is if you would like your code locks to automatically open x minutes before an event and lock x minutes after. Another use is to generate a unique access code for your locks based on the reference code from Planyo or part of the customers mobile phone number that will be programmed into the lock. You can also choose to send a SMS with the code to the customer with the code that they must use to unlock the door. The code will be automatically removed from the lock after x amount of minutes so it cannot be used again.
There are two know solutions that involves using 3rd party software or cloud integrations. Both solutions are using "Home automation" software or HUB . Most locks that are using Zigbee or Z-wave for controlling them are supported.
Alternative 1: Planyo Google Calendar Synchronization - Google Calendar - HomeSeer with GCal Seer plug-in
One of the most advanced and feature rich integrations that has been made to work with Planyo is the GCal Seer plug-in for HomeSeer. You must be using Planyos Google Calendar extention to control locks if your smarthouse or controller supports triggering of events based on events in Google Calendar or Planyo Notifications. This solution will allow you to control one or more electronic code locks based on events in one or more online calendars (Office 365 and Google Calendar is supported). See Control Locks based on Calendar Events using HomeSeer in hjemmeautomasjon.no for complete english instructions. Approx cost of integration approx USD 250,- one time purchase not including hardware.
Planyo Google Cal sync: CHF 3.9/month - Support: yes from Planyo
Google Calendar: Free - Support: Google does not offer paid support
HomeSeer : Lifetime licence USD 250,- (on sale in May and November with 50% discount) - Support: 3rd party paid support from Intin AS
GCal Seer HomeSeer plug-in: Free - Support: 3rd party paid support from Intin AS
Alternative 2: Planyo Notifications - Zapier - SmartThings with Rboy Lock Manager API
This solution will use the built-in Notifications feature in Planyo to trigger a Zapier "Zap" (task or workflow) that will send a webhook to the Rboy Lock Manager RESTful API creating and deleting lock codes. You may also choose to automatically open or close doors using the same solution. See Control Locks from Planyo using Rboy Lock Manager API for complete instructions. Approx cost of integration approx 250,- one time purchase including hardware but not including Zapier subscription.
Planyo Notifications: Included with Planyo subscription - Support: yes from Planyo
Zapier: Price depends on how many court bookings you have. If you have up to 750 bookings each month you will have to subscribe for the "Starter" plan with 1500 tasks (750 tasks to create codes/750 to delete them) See Zapier pricing for more information - Note: Zapier can be used for much more. As an example HIL Tennis use Zapier to create Coupons in Planyo based on purchase on our home page with Stripe integration using the s2member Wordpress plug-in
Aeotec Smart Home Hub (previously SmartThings Hub): Price approx USD 150,- Can be purchased worldwide (60M+ users) Support: yes from Samsung and Aeotec
Rboy Lock Manager API: Price USD 99,- for "Rental & Office" lifetime license including support
Recommended Locks that can be used
Small or medium use: The ID Lock 150 with Z-wave module is recommended to be used in areas with small to medium amount of access. The lock itself is good quality and works really well. Typical use is for Club House, wardrobes etc
Heavy or outdoor (both out and indoor of lock is outdoor) use: If you are planning to use the lock in areas where you require a reliable door lock, an electronic strike lock is recommended. You can in theory use any kind of electronic strike lock. HIL Tennis is using electromagnetic locks. They are cheap to purchase and durable. When power is on the door is locked, when power is off then door is unlocked. To control the lock you must use a controller that is compatible with HomeSeer. One controller that works really well is the UMV3 from Danalock. Can be purchased from Intin AS. This controller can be used together with Danapad. If you are looking to install this outdoor (IP66) for controlling access to your courts, then a electromagnetic lock MAG2500 from Locinox is recommended. Can be purchased from from Saco Teknikk in Norway approx NOK 2000,- for each lock.
Example of complete lock that can be used with Planyo and Homeseer. UMV3 Controller, electromagnetic lock with strike plate, and Danapad code panel.
Hvordan sette opp toveissynkronisering med banekalender i Google
Toveissynkronisering mellom Planyo og Google Kalender gjør det f.eks mulig å: styre lys, styre kodelåser, allokere timer i banekalender via andre tredjepartssystemer som f.eks Spond osv. I tillegg kan du gi andre tilgang til å styre en eller flere banekalendere ved å gi de tilgang til akkurat kalenderne som de skal ha rettigheter til.
Før du starter må du ha en eller flere kalendere å synkronisere til. Dette oppretter du enkelt ved å lage en Google Kalender. Husk å sette rettigheter til "Gjør kalenderen offentlig tilgjengelig" og "Se alle aktivitetsopplysninger". Du oppretter så mange banekalendere som du ønsker skal synkroniseres med ressurser (baner) i Planyo. Når du har gjort dette kan du aktivere Google Calender Extention i Planyo. Når du setter opp toveissynkronsering mellom Planyo og Google Calender vil baneleie som blir lagt inn i Planyo automatisk opprettes i banekalenderen i Google Calender, dette skjer umiddelbart. Om du oppretter avtaler i Google Calender vil det synkroniseres 1 gang i timen.
Etter at du har valgt å aktivere Google Calender må du sette opp synkroniseringen. Velg "Go to the setup script". Etter å ha godkjent kobling mot din Google konto vil du kunne velge de ulike Google kalenderne og matche de mot ressurser/baner i Planyo. Det er en god ide å kalle Google Kalenderne det samme som ressursene i Planyo.
Eksempel: her har "Ute 1" i Planyo blitt satt opp til å synkroniseres mot "Ute 1" Google kalender", deretter har det blitt satt at "Export confirmed reservations" som gjør at kun baneleie som har blitt godkjent/betalt blir synkronisert. I Import identifier for Ute 1 har det blitt lagt inn en * som gjør at om det eksisterer aktiviteter i Google kalenderen som ikke eksisterer i ressursen vil de bli lagt inn som "Holidays" og dermed sperre for baneleie.
I Title template for exported reservations kan du tilpasse hva som skal vises i "Tittel" i Google Kalender. I Description template kan du bestemme hva som skal vises i "Description". I eksempelet under har det blitt lagt inn flere valg. Blant annet så vil det legges inn "kodeord" om noen har leid ballmaskin eller bestilt utlån av garderobe eller racket. Dette blir brukt for å sette kode på kodelås og sende SMS til den som har leid bane.
Etter at du har satt opp synkronisering vil dette gå av seg selv. Eksempel på hvordan det ser ut i Google Kalender. Alle som har en R og et nummer bak seg er reservasjoner som kommer fra Planyo. "UTLBALLM" og "UTLRACK" blir lagt inn om det har blitt reservert ballmaskin eller racket. Water level updated: 94% kommer fra det automatisk vanningsanlegget som også rapporterer når det vannes og hvor lenge. "Privattime" ,"Kurs" og "Trening" kommer fra Spond og opprettes automatisk når det opprettes aktiviteter i Spond. Om en aktivitet blir avlyst i Spond blir kalenderoppføringen automatisk slettet. På den måten frigis tidspunktet til andre som ønsker å bestille baneleie. Om du ikke ønsker å bruke Spond for å blokkere treningstider kan du fint opprette dette direkte i Google Kalender, bruk da gjerne "egendifinerte gjentakelser" for å sette opp avanserte valg for repetering av aktiviteter.
Vise banekalender på enten web eller Info TV
Aktiver Ical feed i Planyo
Opprett en kalendervisning på http://www.planyo.net/ for hvert anlegg
Legg til kalenderfeed for ressursene (banene) som du ønsker å vise.
Her er eksempel på hvordan vi viser våre 3 innebaner. Pass på å velge akkurat det som er valgt under for å få med alle detaljer!
Automatic refund of Stripe payments in Planyo
Planyo only offers you to manually refund payments. If you would like to automate this process you can forward the "Reservation cancelled by client" email to Zapier Mail parser and extract the necessary information to be used by Zapier to create a refund in Stripe. There are other ways of doing this of course since Planyo offers API and list_reservation_payments, but the method described below will enable you to do this without writing any code.
Activate "Reservation cancelled by client" notification to "Site admin" in Planyo
Find "Reservation cancelled by client"
Activate Email for "Site Admin"
In Subject create a codeword that will be used to filter the email for forwarding to the Zapier Mail Parser.
Modify "Subject" in template to : $(if) $(coupon_used) $(then)Reservation paid for with coupon has been cancelled$(endif)$(if) $(reservation_payment_count) greater than 0 $(then)reservation cancelled planyo_auto_refund_stripe$(endif) This will send you an email wth the subject "Reservation paid for with coupon has been cancelled" if the reservation was paid for by using a Coupon and cancelled by the client. If a reservation was cancelled and it was paid for by using Stripe, the subject will be : "reservation cancelled planyo_auto_refund_stripe". We will use the codeword "planyo_auto_refund_stripe" to filter and forward the email later.
In "Your message" in the message template insert the following:
$(if) $(coupon_used) $(then)Reservation paid for with coupon has been cancelled by
Customer firstname: $(first_name)
Customer lastname: $(last_name)
Customer email: $(email)
Coupons has been recharged.
$(endif)$(if) $(reservation_payment_count) greater than 0 $(then)
Reservation ID $(reservation_id)
Resource: $(resource)
Date: $(start_date)
Start time: $(start_time)
End time: $(end_time)
Payment method and amount: $(foreach:$(reservation_payment_count))$(reservation_payment_mode:$(it)) $(reservation_payment_amount:$(it))$(endfor)
Customer firstname: $(first_name)
Customer lastname: $(last_name)
Customer email: $(email)
Stripe TXN: $(reservation_payment_id:1)
$(endif)
Remember to press "Submit" to save the template.
Create a Zapier account, Email Parser by Zapier mailbox and create a forwarding rule in your email
Before you start: Create a Zapier account. You can choose the "Free" plan since you will only use one trigger and event. If you would like to have multi-steps you must subscribe to the "Starter plan". Before you create your Zap (Zapier event) you will need to create an Email Parser by Zapier mailbox that will be used to parse information in the email from Planyo:
Goto https://parser.zapier.com/login/ Choose "Log in with your Zapier account" (provided you already have a Zapier account)
Choose "Create Mailbox"
The message "We're waiting... " and " Send an email to ****@robot.zapier.com!" is displayed
Goto your mailbox and creat a forwarding rule for email received that has the subject "planyo_auto_refund_stripe" to be forwarded to ****@robot.zapier.com (replace the **** with the actual email address)
Login to your planyo site and choose to edit the "Reservation cancelled by client" Site admin Email.
Go to the bottom of the page an choose "Test". Make sure you test wit a reservation that has been cancelled by client and was paid for by Stripe. When you press OK an email with information about the cancellation will be sent to the site admin
If all goes well the mail that was sent from Planyo was automatically forwarded to ****@robot.zapier.com - normally you also need to confirm the forwarding emailaddress following the procedure informed by your mail service provider. In Gmail you must confirm forwarding by entering a code.
Create an Email parser template to extract the information from the notification email from Planyo
If you have followed the steps above you should now have an email from Planyo in your ***@robot.zapier.com mailbox. You will have to create a template to be able to extract the information that is going to be used for automatically refund in Stripe. The only information that is required for refund is the Stripe TXN. If you would like to create extra steps with name of the customer and so on you need to select the other fields in the template.
Log into https://parser.zapier.com/mailboxes
Find the mailbox you created and click the cogwheel to edit the template
select Stripe TXN (pi_a long number) and name it "stripetxn". Stripe TXN: {{stripetxn}} By doing this the Stripe TXN will be available in the Zap you will create later for refunding the payment
Remember to Save Address and Template after you have updated the template!
Create a Zap in Zapier that will trigger the refund in Stripe
Log into https://zapier.com/
Choose create Make a Zap!
Choose "Email Parser by Zapier" as app for triggering the Zap and "New Email" as Trigger Event
Connect to your Zapier Email Parser Account if you have not already done this
In "Customize Email" you must choose the mailbox where the mail refund mail from Planyo is forwarded to
Choose "Find data" and choose the email that you just edited the email parser template for
Make a new step in your Zap and find and select "Webhooks by Zapier" as your App
In "Choose Action Event" select "Post"
In "Customize Post" use the following values URL: https://api.stripe.com/v1/refunds Payload Type: Form. In Data you will have two rows: "payment_intent" with the data "Parse Output Stripetxn" from the trigger step "New Email". Use the "Insert field" button to select this . The second row is "reason". It is required by Stripe when issuing a refund. You can hardcode this to "requested_by_customer". In "Basic Auth" enter your Stripe secret key/live key token. You will find your Secret key in your Stripe Dashboard. Important: remember to put a | after the secret key!
Tip: if you are getting error messages in Zapier when you run the Zap use the logs in Stripe Dashboard. That was how I found out I was missing the "reason" parameter required by Stripe for refunding. Also instad of using pi_ (payment intent) I was using ch_ (charge). More information about refunding Stripe payments using their API using their refund object
Hvordan synkronisere Spond mot Google Kalender og la aktiviteter fra Spond blokkere timer i Planyo?
Dette har ikke noe med Planyo å gjøre, men viser at ved å sette opp synkronisering mellom Planyo og Google Kalender kan gjøre det mulig å la andre systemer blokkere for baneleie ved at du lar de opprette aktiviteter i Google Kalender. Spond appen har mulighet til å synkronisere alle aktiviteter mot elektroniske kalendere. Du velger dette i "Meg" (din profil) i appen og "Innstillinger for kalender". Du kan sette opp en "Standardkalender" som gjør at når du oppretter en ny gruppe i Spond vil alle aktiviteter som opprettes i den gruppen automatisk synkroniseres mot kalenderen. Om du har en bane som brukes mest til kurs og trening bør du velge den her. Videre kan du velge forskjellige kalendere for forskjellige grupper. Det kan derfor være smart å ha forskjellige grupper om du har trening på forskjellige baner. I eksempelet under har det blitt valgt forskjellige baner for forskjellige grupper. Du kan når som helst endre på dette ved f.eks endring av baner
Eksempel på hvordan en privattime som har blitt opprettet i Spond og som det har blitt betalt for opprettes i banekalenderen i Google
To-veissynkroniseringen mellom Planyo og Google Kalender sørger for at den samme timen blir blokkert i Planyo