Upcoming Maintenance Alert:

The UBNT Community will be upgraded at 5pm MDT on April 25th. During this time the community forums will be set to read-only status.

Learn more

×
a week ago
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

 

 

Comments
by
a week ago

That´s awsome. Great idea!

by
a week ago

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

Paul

by
a week ago

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
a week ago

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
a week ago

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
a week ago - last edited a week ago

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
a week ago

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
a week ago

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

 

The reason for using node-red not php like 

 

by
Sunday

i am waiting for a tutorial Man Very Happy

by
Tuesday

i would love a  tutorial