11/13/2017
UniFi HostSpot vouchers by SMS
Description

Couple days of work and I created simple node-red wiring and modified HostSpot portal page to send guest vouchers by SMS.

I have used node-red because now I can send vouchers however I want, and it is very easy to implement. Node-red is using UniFi API to talk with Controller and create vouchers on demand.

 

The downside of this solution is that the JavaScript on page must connect to node-red service using something like cross site request. It would be nice to have something like payment-based authorization, with custom fields, and custom server URL setting, not only defined ones like now.

 

Ps. I am curious when UBNT will correct AngularJS tempate to display flag icons like below Man Happy


Voucher by SMS - Main pageVoucher by SMS - Main page

 

Voucher by SMS - After send phone numberVoucher by SMS - After send phone number

 

Node-red wiringNode-red wiring

 

 

UniFi HostSpot vouchers by SMS

by on ‎11-13-2017 01:34 PM

Couple days of work and I created simple node-red wiring and modified HostSpot portal page to send guest vouchers by SMS.

I have used node-red because now I can send vouchers however I want, and it is very easy to implement. Node-red is using UniFi API to talk with Controller and create vouchers on demand.

 

The downside of this solution is that the JavaScript on page must connect to node-red service using something like cross site request. It would be nice to have something like payment-based authorization, with custom fields, and custom server URL setting, not only defined ones like now.

 

Ps. I am curious when UBNT will correct AngularJS tempate to display flag icons like below Man Happy


Voucher by SMS - Main pageVoucher by SMS - Main page

 

Voucher by SMS - After send phone numberVoucher by SMS - After send phone number

 

Node-red wiringNode-red wiring

 

 

Comments
by
on ‎11-13-2017 10:36 PM

That´s awsome. Great idea!

by
on ‎11-14-2017 12:40 AM

hey i think this is what i have been looking for a long long time.... please get intouch with me... 

Paul

by
on ‎11-14-2017 06:02 AM

good day are you useing node-red for the sms tokens and portal i am looking for e sollution like this for wifi guest

 

thanks

 

by
on ‎11-14-2017 07:13 AM

I am using node-red only for logic stuff, portal is a modified AngularJS UniFi portal.

 

Logic is simple:

-get phone number from portal form

-generate token for phone using UniFi API

-send SMS with token by SMS gateway

-now user can use token to gain free access to guest network

 

There are some things todo , like limits by phone number or by guest mac/IP , but i will do it after tests in a network with one hundred APs,

by
on ‎11-15-2017 01:07 AM

No intent to detract from the hard work done by OP. Great job. There is also a feature request started here:

 

https://community.ubnt.com/t5/UniFi-Feature-Requests/SMS-Service/idc-p/2139219#M12584

 

You folks may want to hop over there and add some kudos to make some noise Man Happy

 

B. 

by
‎11-15-2017 06:09 AM - edited ‎11-15-2017 06:18 AM

I'm currently doing the above using the API, PHP and an external hotspot page Man Happy

 

I was actually considering ditching it in favour of Facebook, been trying to analyse the requirement for it at a few hotels and cafe - seems about 96% of guest users then use facebook anyway.

 

The current setup is 100% automated, limits the user to 1 device (MAC), 1GB data, and max of 1Hour, in a 24 hour period. As the system is also used within a Cafe scenario, I have allowed for access to only granted during business hours and the SMS is only valid for 15 minutes, a phone number that has granted access can not be used more than twice during the 24 hours with no more four failed or unused requests.

 

Hapy to help those out if needed though

by
on ‎11-15-2017 09:00 AM

i really need a setup like this for my retial store getting a sms voucher and we getting there cell number would be great if anyone know of a prject or low cost setup i would be intrested in .

 

thanks 

 

 

by
on ‎11-15-2017 11:56 AM

If anyone have more detail questions please send me a priv message.

 

The reason for using node-red not php like 

 

by
on ‎11-19-2017 12:32 PM

i am waiting for a tutorial Man Very Happy

by
on ‎11-21-2017 05:29 AM

i would love a  tutorial