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

api1.png

api2.png


Thanks for your time!
Regards
Victor of chile.
 
You can run the events using the scheduler API command, run method: https://manual.djsoft.net/radioboss/en/remote_controlapi.htm
 
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.
 
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.
 
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.
 
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.
 
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 :)
 
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.
 
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.
 
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.
 
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.
 
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.
Every modern programming language has tools to work with XML, so I don't see any problem with it. Using XML for APIs is a common practise.
 
It is already possible to run events using the API, see schedule command: https://manual.djsoft.net/radioboss/en/remote_controlapi.htm
If you need to find the "next" event, you can look at IntTimeToStart property, the lower it is, the sooner the event start. A value of MaxInt (2147483647) means that the event is not going to start anytime soon.
Make a script to do exactly this and it works fine. But I agree that an api command that works in the same way as DTMF would be a good idea.

 
But I agree that an api command that works in the same way as DTMF would be a good idea.
It does seem to be a very specific case of usage - I'm not sure the majority of RadioBOSS users will benefit from it.
 
We'll add an option to skip the next scheudled launch if the event was started using the API. Currently I can't offer any solution for this, only if you disable event using the API and then enable it again.
Does this already exist?
Also: Is it possible to add the buffered audio ms to the playbackinfo command when it is stream?

The purpose here is to start an event via API from RB in header. But the receivers should take into account the buffer limits for a synchronized start of advertising.
 
Does this already exist?
Not yet, sorry.

Also: Is it possible to add the buffered audio ms to the playbackinfo command when it is stream?

The purpose here is to start an event via API from RB in header. But the receivers should take into account the buffer limits for a synchronized start of advertising.
Even with this, it wouldn't be possible to calculate it exactly. Some amount is buffered, and there's also position in the buffer, and if you're streaming there are server and player buffers involved.
 
Back
Top