I was able to use the existing code I had prepared for esp8266lighthouse (https://github.com/cnlohr/esp8266lighthouse) and was able to modify the provided code from triad (https://github.com/TriadSemi/TS4231/blob/master/ts4231.cpp) to operate on the ESP8266.
I tried configuring the TS4231 using the default configuration word 0x392B, which is the default configuration. The TS4231 conveniently allows you to read back the configuration word so I verified it could have its configurations set arbitrarily. Sadly, when operating the base stations at 1.8MHz, no more envelopes or data passed. So, I figured maybe the message I need to send the TS4231 a different configuration, so I chugged away...
By using esp82xx's custom command system, it allows me to write javascript code to control and monitor things, so, I wrote some javascript to read GPIO inputs and configure the TS4231. Automatically advancing through. If the GPIOs ever received any lighting events, I would display them. It allowed me to automatically test all 14-bit codes over the course of about 6 hours.
function GPIOUpdateCallback( n, m )
{
var buttons = n;
if( buttons != lastbuttons )
{
mark = 1;
}
lastbuttons = buttons;
if( countthis++ > 120 )
{
if( mark )
{
console.log("!!!\n");
document.getElementById( "results" ).innerHTML += commandid + "<BR>";
mark = 0;
}
//Set the configuration word.
QueueOperation( "CS"+commandid, function( req,data) { $("#custom_command_response").val( data ); } );
document.getElementById("current").innerHTML = commandid;
commandid++; //Advanced to next configuration word.
countthis = 0;
}
}
I tried all 16384 combinations of config words. There were no lighting events from the TS4231 after it was configured with the 1.8 MHz base station. This is disheartening. I am worried the TS4231 cannot operate at all unless there is encoded data in the OOTX and sweeps.
Up Next: Will be trying to use Nairol's custom base station firmware to increase frequency of base station and see if there's any combinations that the configured TS4231 will work with.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.