Start Event by API

konekochancl

New member
Hi all!

I would like to request to consider this characteristic, to be able to launch an EVENT through the API and distinguish if it is advertising or any other type.
For example:

127.0.0.1:9000/?pass=123&action=schedule&type=API&var=User Text




Thanks for your time!
Regards
Victor of chile.
 

djsoft

Well-known member
Staff member
You can run the events using the scheduler API command, run method: https://manual.djsoft.net/radioboss/en/remote_controlapi.htm
 

konekochancl

New member
I know what you are trying to tell me, but I want to sell your product for chain radio stations with more than 3 stations, so I wanted to start the event through the API, quickly and also with DTMF.
The use of xml is very slow. I have to walk a lot and your product is no longer a good option because I will have to work hard.

I just want to mix your product with mine and then sell the package to those interested.
 

djsoft

Well-known member
Staff member
Victor Flores Valenzuela said:
so I wanted to start the event through the API, quickly and also with DTMF.
The use of xml is very slow
Can you please specify what is slow? An XML with scheduled events is parsed instantly, even if you do it for thousands of stations...

Victor Flores Valenzuela said:
I have to walk a lot and your product is no longer a good option because I will have to work hard.
There are libraries to work with XML in any programming language out there. SimpleXML is a good one if you use PHP (it's built-in).

The general algorithm is:

1. Retrieve events list from RadioBOSS using the schedule API command with list method, get the event IDs for events that you have interest in.

2. Use the run method to run the event when needed using the IDs, it's a simple call like
http://example.com:9000/?pass=PASS&action=schedule&type=run&id=EVENTID

All the code to do this will fit in 5-20 lines, depending on the programming language you use :) There's no reason to make it any more simpler.
 

konekochancl

New member
I appreciate your answers :)

My project is something like that, I have a program written by me, in which the audio and embedded commands are sent, then they are received and processed to become instructions for radioboss, my idea is to eliminate the DTMF in remote stations to make the process . more professional, in the advertising programmer I have the option to add DTMF but not api, the search in the xml will be somewhat complicated for my purposes since dtmf triggers the closest event according to the time and that is what I want with api. Although I tried the proposed method and it works perfectly, I did not give the expected result since I must examine it event by event and it does not really convince me, it is not that I can not program it, but other products offer this function (like you with DTMF) and without much return . Your product is very dear to users, so I ask you to make compatibility between my invention and your product always thinking about the sale :)

Thanks again.
 

djsoft

Well-known member
Staff member
Victor Flores Valenzuela said:
since dtmf triggers the closest event according to the time and that is what I want with api
There is an "IntTimeToStart" field in the events XML, it shows a time left before event launch. The value of "2147483647" means event is not going to start any time soon. Values (floating point) between 0 and 2 indicate the time, in days, before event launch. E.g. "0.5" means 12 hours (24 hours in a day * 0.5 = 12 hours). You can find the lowest value (but greater or equal to 0) amongst all the events and determine what event should be launched.
 

konekochancl

New member
That makes sense, look for the lowest one, capture the identification and shoot.
I will try today, since I have some clients waiting for news, haha.

Thanks, I will comment on my results :)
 

konekochancl

New member
Hi, how are you?
I have returned to comment on my results, effectively with less than 20 lines I achieved my goal, shooting an event that has so many minutes left ... now another problem arises, then at a certain point I need to connect to "line-in" to return to the satellite signal, but I see no way, I could schedule an event but it could go off earlier than expected ...: c
Could you enlighten me with a way to shoot the line in from the api at will.

Thanks for everything again.
 

djsoft

Well-known member
Staff member
Victor Flores Valenzuela said:
could schedule an event but it could go off earlier than expected
You can use a disabled event that you can launch using the API.
 

konekochancl

New member
hi dmitry

Thanks, for now, before your answer I used the "relay" option and I control it from the API, it works perfect and does everything I need, now and as a last problem ...

Let's say that the client has his commercial pattern generated and everything, so when he is connected to the chain he has a batch at 13:30:00 and he receives a command at 13:25:00 in my program I validate the time and shoot the 13:30 event, everything goes fine and then it goes back to the bedside, but when 13:30 arrives on the clock, the event goes off again. is there any way to avoid this without disabling or deleting the event?

Thanks again.
 

konekochancl

New member
I have tried thousands of ways and clients keep pushing me.
Do you think that in the future it will be allowed to fire the next event from the api? as if it were an event that has "start by dtmf" but instead "start by API" its solution is still the most economical and functional but without this option I cannot present it to the clients.
 

djsoft

Well-known member
Staff member
Top