From Website to CBUS system to control lights remotely

Discussion in 'C-Bus Automation Controllers' started by eragon1988, May 10, 2024.

  1. eragon1988


    Aug 26, 2015
    Likes Received:
    Hi all legends,
    I have done C-BUS previously but only with some simple stuffs in residential houses. However, just have some interests on moving further with C-BUS and trying to figure out a proposal for a job we have.

    Client will need to have a light group to be turn On/Off based on a booking schedule from a website (just a general website with the booking features and with whatever modules that need to communicate with our CBUS system).
    May I ask if any one has done something similar and is it even a possible thing to do with CBUS - if Yes then what sort of hardware and software on CBUS side that I will need to prepare (put the website development aside somebody will take care of it).

    Thank you very much for your helps gents !!
    eragon1988, May 10, 2024
  2. eragon1988


    Dec 17, 2008
    Likes Received:
    I've never tried this, but an Automation Controller (AC2/NAC2) has a REST API. If where the web site is running can do REST calls according to the schedule then...

    HTTP PUT https://ac-ip-address/api/cac/objvalue/{alias} to set datahex (the GA alias, e.g. 0/56/9, payload of level and ramp rate).
    HTTP GET https://ac-ip-address/api/cac/objvalue/{alias} to get current decoded datahex for a GA.

    Details in the Swagger self-doco.

    (I correct myself on the below... The AC does have luasql, but only luasql.sqlite3...)

    Crushingly, the AC2/NAC2 does not feature the luasql library for many database types. Ugh. If it did then an external database could be queried periodically from the automation controller as an alternative to doing GA sets from the web site side with REST. In script, read web site schedule, set GA as appropriate at the right time. If luasql.(others) were there it would open up a world of possibilities for postgres, mysql/maria & odbc. It would be neat if the automation controller could allow adding script libraries like this, end-user supported, of course, but it doesn't. LuaRocks as a source for bonus points.
    Last edited: May 13, 2024
    ssaunders, May 13, 2024
    eragon1988 likes this.
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.