ProSoundWeb Community

Please login or register.

Login with username, password and session length
Advanced search  

Pages: [1]   Go Down

Author Topic: Pharos LPC and json ethernet trigger  (Read 1139 times)

Zach Warren

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
Pharos LPC and json ethernet trigger
« on: January 25, 2023, 01:24:26 AM »

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?
Logged

Mal Brown

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1340
Re: Pharos LPC and json ethernet trigger
« Reply #1 on: January 27, 2023, 02:22:31 AM »

not that I am in a position to write this but ...  I think your best bet is a json parser to midi command and use a controller with midi.  My Chauvet Obey 70 Clone can trigger scenes using midi CC commands.  A python library like mido might be your answer.  That plus a nerdy high school python coder type...
Logged
Bass player, sound guy.
FB Gorge Sound and Light
FB Willyand Nelson
FB SideShow

Jano Svitok

  • SR Forums
  • Full Member
  • *
  • Offline Offline
  • Posts: 103
  • Bratislava, Slovakia
    • zvukari.sk
Re: Pharos LPC and json ethernet trigger
« Reply #2 on: April 11, 2023, 08:22:41 AM »

I understand your post that:

- The bowling controller (Qubica) will call *your* API with the JSON data. You don't have to provide the JSON data. Instead, you have to provide *receiver* for that data. If you don't need the details (what lane, what pins),
then you don't have to analyze the JSON data. Just attach scene to each URL ("/api/..something")

- Pharos LPC has ethernet connection and supports ethernet triggers.

If this is correct, you have to:

1. Provide a machine (computer/notebook/raspberry/whatever) that will translate billiard events to LPC input triggers.
   The translator is a webserver that listens for HTTP requests and send ethernet triggers to LPC when an event is received.
   Most probably it must be written just for this case. Python is a good tool for this job.
   
2. Connect the machine using ethernet to both qubica and LPC. You may connect both three to the same network or put them in two separate networks (one for qubica + translator, the other for translator + LPC).
   You may even use wifi if cable is not possible (although I'd suggest cable if possible).

3. Configure qubica (you have to tell it where to send the events, i.e. the IP address of the translator).

4. Configure LPC (assign Ethernet messages to triggers/scenes)

Note: I see "custom web interface" and "custom lua scripts" in the Pharos LPC datasheet (https://dl.pharoscontrols.com/documentation/datasheets_specifications/designer/Pharos_Designer_LPC_Datasheet.pdf) so it may be possible to create the translator within the LPC.
Logged

ProSoundWeb Community

Re: Pharos LPC and json ethernet trigger
« Reply #2 on: April 11, 2023, 08:22:41 AM »


Pages: [1]   Go Up
 



Site Hosted By Ashdown Technologies, Inc.

Page created in 0.033 seconds with 23 queries.