2

i'm looking to do something maybe not that common with my Rpi; I have a rowing machine and I want to connect it to my Pi to motivate me to do sport. To do this, I have an Arduino connected to a Pi with 433 Mhz radios which sends every move done by the user on the rowing machine (with a code to identify the user which is rowing (he chooses with buttons connected to the Arduino)). All that stuff works, I receive the moves on the RPi in a Python soft.

Yet, I want to turn my Raspi in a captive portal with sessions. It won't be the classical workflow though: there will be no payement but every move on the rowing machine will unlock bandwidth for the user (it's, I think, the best way to force me to do sport!). So to do this, I thought CoovaChilli will be the best because it's open-source, based on a worthly project (ChilliSpot) and has a JSON Api that I could access through my Python Script.

To summary and illustrate, here is the workflow I'm working on: enter image description here

But I still have questions:

  • Does someone already experimented it on Raspi?
  • Can we use the API a bit more accurately, is there method like controller.setMaxSpeed()?
  • In the JSON Api doc, there is a quote which worries me (below), is it really not implemented or the doc is only not up-to-date?

maxTotalOctets ChilliSpot-Max-Total-Octets (not yet)

  • Did I miss something? Is there a perfect other open-source soft which fits my need?
  • Would it be complicated to build just with a Py webserver and no extra soft? (maybe with a py script acting like a proxy which measures internet consumption).
Laurent Meyer
  • 123
  • 1
  • 5

1 Answers1

1

CoovaChilli on its own doesn't have enough user management capabilities to track utilisation properly. Whatever "state" you set for a particular session would get lost once that session terminates (disconnect, device reboot, etc.)

You may find more flexibility in doing user/bandwidth/capacity management using RADIUSdesk (which also has a JSON API), then getting CoovaChilli - or your captive portal of choice - to use RADIUSdesk as its authentication source.

RADIUSdesk leverages FreeRADIUS and MySQL, adding some of its own logic and tables, which should suit what you'd like to do quite well and avoids re-inventing quite a few wheels.

I've been unable to find confirmed references of RADIUSdesk-on-Pi, but some have tried, and all the sub-components are supposed to work on Pi. Unfortunately I do not have access to a Pi at the moment to confirm myself - worst-case, you'd need to run FreeRADIUS and MySQL externally, but I'm hopeful you wouldn't need to.

Jannie H
  • 26
  • 2