Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript Incorporating JSON into DMX lights

zwarren

New Coder
I have a lighting playback controller with some DMX lights at one of our projects. This specific controller is controlling 31 different fixtures, which are 7 channels a piece. The fixtures are strip LED lights that are over a couple of bowling lanes. The project is requesting they would like the lights to do certain effects when a specific event occurs on the bowling lanes (strike, spare, etc.) . There are only two bowling lanes; the same lighting trigger would occur on either lane from the same LED strips, there is no need to create a separate effect/trigger for each lane as they will both perform the same way.

At this point I am simply trying to determine how and where with json to initiate this response. The bowling lane software is from Qubica. They have provided me with a PDF as to the requirements of the API plugin that would need to communicate with our LPC. I have the bowling server IP and port information and have attached the two small pdf documents the bowling software provided to this email. They are stating that each event has these properties:

  • It is a HTTP POST request (where Conqueror server is the caller and the external system is the callee)
  • It has its own specific endpoint, all having the common prefix “/api/v1/event”
  • The payload is a json document, containing the attributes of the event (e.g. lane where the event occurred)
The APIs post a message of ‘on’ to certain events on the bowling lanes and they have also provided me with the following json payloads:

When a Strike is hit by the bowler

The path is: /api/v1/event/strike

The payload is:

{

“LaneName”: “1”

}

Note: Strike on lane 1

When a Spare is hit by the bowler

The path is: /api/v1/event/spare

The payload for this is:

{

“LaneName”: “1”,

“HitPins”: [1, 2, 3, 4, 5, 7]

}

Note: Spare has been made on lane 1 by hitting the pins in the list

Pins are hit by the bowler:

The path is: /api/v1/event/pin

The payload for this is:

{

“LaneName”: “1”,

“HitPins”: [6, 8, 9, 10]

}

Note: The pins in the list have been knocked down by the current ball (and some
other pins have not, otherwise it would be a spare)

Is anyone able to assist me on how to create this json so that our DMX lights can communicate to the bowling software server to create the lighting effect that I have created?
 

New Threads

Buy us a coffee!

Back
Top Bottom