Script Result Question and the DIY Interface is Cool

Sean Lavigne sean at houselavigne.us
Thu Dec 22 09:46:24 EST 2022


When we built our house a few years ago I wanted all of the TV components (mostly the satellite and TiVo boxes) out of view.  We ended up running HDMI from the main bedroom and living room (which share a common wall) down to the basement study/tornado shelter (right below that wall) where we put the media cabinet.  I found a 4x4 HDMI Matrix on Amazon and programmed the Harmony remotes to change the input, as needed.  With the new Apple Remote, we’ve stopped using the Harmony and I thought about finding a new HDMI Matrix which would accept commands over IP.  It turns out the unit I have does have an ethernet port and can already accept hex commands over IP.  A huge thank you to James for building the DIY interface into XTension!  Now I have a couple buttons of each room’s X10 PalmPad remote dedicated to swapping inputs.

While it all appears to work correctly, I did have a question about this error message (in red) in the log after each script execution.  The name of the DIY Interface is 4x4 HDMI Matrix.

2022-12-22 08:30:10  Received ON for Remote - Study Desk TV 2
2022-12-22 08:30:10  I was passed data D3
2022-12-22 08:30:10  4x4 HDMI Matrix: received data but has no script to handle it

This is the on Script for X10 PalmPad Remote Button

set param1 to "D1"
execute script "HDMI Matrix" handler "doSomethingClever" parameters {param1}



This is the Global Script: HDMI Matrix

--This is the script for the 4x4 HDMI Matrix
--This will serve as the common area for all commands to be sent

--Outputs
--Output A = Great Room TV
--Output B = Master Bedroom TV
--Output C = Study Wall TV
--Output D = Study Desk TV

--Inputs
--Input 1 = Great Room DirecTiVo
--Input 2 = Master Bedroom DirecTiVo
--Input 3 = Study AppleTV 4K
--Input 4 = TiVo Mini

on doSomethingClever(MatrixChange)
	write log "I was passed data " & MatrixChange
	
	
	--Output A Options:   Great Room TV
	if MatrixChange = "A1" then -- Great Room DirecTiVo
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h01", "&h00", "&h01", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf9"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "A2" then -- Master Bedroom DirecTiVo
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h02", "&h00", "&h01", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf8"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "A3" then -- Study AppleTV 4K
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h03", "&h00", "&h01", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf7"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "A4" then -- TiVo Mini
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h04", "&h00", "&h01", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf6"} interface "4x4 HDMI Matrix"
	end if
	
	--Output B Options:  Master Bedroom TV
	if MatrixChange = "B1" then -- Great Room DirecTiVo
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h01", "&h00", "&h02", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf8"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "B2" then -- Master Bedroom DirecTiVo
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h02", "&h00", "&h02", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf7"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "B3" then -- Study AppleTV 4K
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h03", "&h00", "&h02", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf6"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "B4" then -- TiVo Mini
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h04", "&h00", "&h02", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf5"} interface "4x4 HDMI Matrix"
	end if
	
	--Output C Options:  Study Wall TV
	if MatrixChange = "C1" then -- Great Room DirecTiVo
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h01", "&h00", "&h03", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf7"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "C2" then -- Master Bedroom DirecTiVo
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h02", "&h00", "&h03", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf6"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "C3" then -- Study AppleTV 4K
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h03", "&h00", "&h03", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf5"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "C4" then -- TiVo Mini
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h04", "&h00", "&h03", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf4"} interface "4x4 HDMI Matrix"
	end if
	
	--Output D Options:  Study Desk TV
	if MatrixChange = "D1" then -- Great Room DirecTiVo
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h01", "&h00", "&h04", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf6"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "D2" then -- Master Bedroom DirecTiVo
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h02", "&h00", "&h04", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf5"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "D3" then -- Study AppleTV 4K
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h03", "&h00", "&h04", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf4"} interface "4x4 HDMI Matrix"
	end if
	if MatrixChange = "D4" then -- TiVo Mini
		send data bytes {"&ha5", "&h5b", "&h02", "&h03", "&h04", "&h00", "&h04", "&h00", "&h00", "&h00", "&h00", "&h00", "&hf3"} interface "4x4 HDMI Matrix"
	end if
	
	--ReBoot the 4x4 HDMI Matrix
	if MatrixChange = "reboot" then -- Reboot the Matrix
		send data bytes {"&ha5", "&h5b", "&h08", "&h0d", "&h00", "&h00", "&h00", "&h00", "&h00", "&h00", "&h00", "&h00", "&heb"} interface "4x4 HDMI Matrix"
	end if
	
end doSomethingClever
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20221222/ff417d8e/attachment.html>


More information about the XTensionList mailing list