You can do this a little easier (missing out the hardware building) by using something like a RedRat USB Ir blaster (http://www.redrat.co.uk/products/). They also do network attached versions that you can control via ethernet.
Another option is direct serial port control, LG TV's used to come with a RS232 port on the back that you could use to turn the TV ...
It depends on you skills and what exactly do you want to achieve. First of all it's wondering if you want a UI or a terminal-like script.
If you want a UI, and know Python, I'd go with QT or TK to create the interface. Then, use Serial to send messages to any MCU (Arduino or similar) and read those messages in the MCU. Once you got the message you can send ...
A few things:
The mosquittto_pub and mosquitto_sub commands do not support WebSockets at all.
When you run mosquitto from the command line you have to explicitly point to the config file with the -c option
mosquitto -v -c /path/to/mosquitto.conf
The Windows builds available from the mosquitto.org download pages don't support WebSockets, so the only way ...
This is what I do. Following script saved as timestampLog.vbs:
Do While Not WScript.StdIn.AtEndOfStream
str = WScript.StdIn.ReadLine
WScript.StdErr.WriteLine "[" & now & "]" & str
Then I run this from command line:
C:\Program Files\mosquitto>mosquitto_sub -t +/# -v | cscript //nologo timestampLog.vbs 2> C:\*USER*\Desktop\...
Wake-on-LAN is relatively new for the Xbox One. This feature was released with the August update.
Luckily, you don't have to script yourself a solution. Others have already done the work for you:
Xbox on by arcreative: Xbox One power control from CLI or Node.JS application.
Xbox remote power by Schamper: A script that can turn your Xbox One on remotely.
I finally succeeded in finding the correct command on this site. It is:
net start mosquitto
It can be run from any directory. If you receive the following error:
D:\..\MQTT\mosquitto>net start mosquitto
System error 5 has occurred.
Access is denied.
then you need to run the command prompt as an administrator. In case of success the following response ...
There are generally 2 ways to control TVs:
Newer TVs might have Ethernet or Wi-Fi connections available, and also some level of support for CEC. You might be able to control them over the network with a manufacturer-specific app, but probably not via a documented protocol. CEC control was very spotty when it came out. I'm not sure if it's ...
As @hardlib said, you have to compile mosquitto from sources. It took some trial and error for us to get it working on windows, so here some summary in case it helps somebody. Please don't hesitate to correct it:
install Visual Studio
install cmake ( latest version is fine )
install OpenSSL to C:\temp\OpenSSL
unzip pthreads to C:\pthreads
Could you make custom rule by typing the ports (1883 and 8883) and allowing separately with different rules both UDP and TCP on these ports.
This post says you need the described hack that did not work in your case to change the defaults by program name.
The answer of this question: How to enable WebSockets on Mosquitto running on Windows? actually answered this question as well.
As it turned out the Mosquitto's config file has to be added explicitly in the command line.
When you run mosquitto from the command line you have to explicitly
point to the config file with the -c option
mosquitto -v -c /path/to/...
By using the Xbox button on your controller if your controller is paired to your Xbox One.
By using the official Windows 10 Microsoft Xbox app. To make this work, you have to connect your Xbox One to the Windows 10 app by following these steps. If streaming works, your Xbox One is connected to your Windows 10 Xbox app. Now shutdown your Xbox ...
If you want to log the PUBLISH message payload,
here I add custome log in mosquitto v1.5.3 souce:
Source on Git Hub.
//only show ASCII payload, binary data maybe broke the terminal.
1542293777: Received PUBLISH from client_20454 (d0, q0, r0, m0, '$rpc/device1/client_20454/...
For reference here is some C# Universal Windows Platform (UWP) code that I wrote to wake up an Xbox One:
public static async Task XboxWake(IPAddress ipAddress, string liveId, int retries = 5)
using (var socket = new DatagramSocket())
var connectionProfile = Windows.Networking.Connectivity.NetworkInformation.GetInternetConnectionProfile();...
Starting from 1.5.1 the windows package support websocket, see changelog https://mosquitto.org/blog/
You have just to edit mosquitto.conf file, specify to use the websocket protocol by adding "protocol websockets" (see definition around line 145) and eventually restart mosquitto if you run it as a service
I found this a while back but I'm unable to attribute to the original author. Works great for existing logs, but can't 'tail -f' with this solution:
sudo cat /var/log/mosquitto/mosquitto.log | grep -v datab|perl -pe 's/(\d+)/localtime($1)/e'
Using this on linux, but should work on WSL/cygwin.
I found a compiled version of Mosquitto with WebSockets built for Windows on GitHub which may be of use if you don't want to build the code yourself.
While it is documented in Korean, it also includes a PowerPoint presentation with instructions on how to build it yourself, if you do not wish to use the pre-compiled binaries.
I have developed a (paid) app called XBoot One that you can use it to turn on your Xbox remotely both in Android and Windows. It's not integrated with Cortana yet but it will be in future releases.
Play Store Link
It will be in Microsoft Store soon.
My first thought was to delete this question in shame.
Then I thought that I had better answer it, to help anyone else who makes the same silly mistake in future.
To save on manufacturing costs, some USB cables have only two wires, rather than four, and are good only for powering devices, but not for transmitting data.
I had bought some cheap ($1.49) USB ...