Hello,
My question may be stupid but I did not found anywhere an example on how to use the TCP Socket API (https://docs.hyperion-project.org/en/json/#what-is-json)
I use nodeJS.
I successfully sent command with HTTP API, I've been able to play some effects for example, but whatever I tried with Socket, I just see the connection in my logs but no effect at all.
JavaScript
client.connect({host, port}, () => {
console.log(`connected`);
client.write('{"command":"effect","effect":{"name":"Collision"},"priority":50,"origin":"my app"}\\n', function () {
console.log('Test');
});
})
Here is a sample of what I try to do.
I see both "connected" "and Test" messages in my log but the effect does not start.
I first try to JSON.stringify my JSON, here I tried to write it as plain text. I tried to add "\n" at the end.. nothing works.