I have a customer that wants the capability to push a button at a work cell and announce a message over a radio system.
Edit 1: I was able to get Ignition to send commands to a 3rd party program espeak and my computer read the text through the speakers. So one possible solution is identifying a radio that can announce a message over audio. After contacting a radio supplier they claim I might be missing some certifications and cause the FCC to “get angry”. I’m not sure if that is a true statement but it’s probably a good idea to investigate further.
Are you going to update the whole system, or use the one they already have in place?
Your SUB D comment makes me think you are using the one already in place. If so, you will need to get specifics on it to find out how it works in more detail.
I am not sure what is the best way to proceed. I found a program called eSpeak that appears to convert text to speech (audio) on a computer.
Now I am trying to send commands from Ignition console.
from subprocess import call
call(["espeak","-s140 -ven+18 -z","Hello From Mike"])
Which is giving me a error:
Traceback (most recent call last):
File "<input>", line 3, in <module>
File "C:\Users\user\.ignition\cache\gwlocalhost_8043\C0\pylib\subprocess.py", line 502, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Users\user\.ignition\cache\gwlocalhost_8043\C0\pylib\subprocess.py", line 859, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\user\.ignition\cache\gwlocalhost_8043\C0\pylib\subprocess.py", line 1369, in _execute_child
raise OSError(errno.ENOENT, os.strerror(errno.ENOENT))
OSError: [Errno 2] No such file or directory
Honestly not sure what that has to do with anything.
I don’t have specific experience with this. But there are a lot of variables. I would start with looking into the radio system they have. If that doesn’t go well, I would look into new radio systems that provide such functionality.
You will probably need to fully qualify the path to the espeak executable. Also, make sure it's available/installed on the gateway. Also, assuming it spits out a file or something, I don't know how you would deliver that data to the actual radio system.
This didn’t work because I was trying to run the command line while already in the command line and my second argument should have been 2 separate arguments.
After talking to Motorola they sent us to one of their vendors who then recommended the following:
Software TRBOnet Enterprise Radio Dispatch System
SWIFT A200 (Ethernet to analog output capabilities)
Motorla XPR5550E radio control station
The software TRBOnet can be configured to listen on a port for incoming messages, convert the text to speech, send it out to the SWIFT A200 which has an audio out cable.
run this ignition code to send messages
import socket
import sys
#Server address running TRBOnet listening on port 17341
TCP_IP = '192.168.1.20'
TCP_PORT = 17341
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
s.send('put custom message here')
s.close()
The first drawback of this system is you can’t channel steer (change channels programatically).
The second drawback is you have to run Ignition on a separate server because of sockets (I don’t fully understand the problem other than sending messages to 127.0.0.1 fails).
Overall not the most elegant solution mainly due to newer radios not allowing channels to be changed programmatically. Some older Vertex radios have pins you can connect to and change the channel.