host: api.tibay.net port: 12673
{ key: '[your network key here]', pass: '[your network password here]', protocol: 1 }Additionaly you may end message with !-EOF-!, so it will looks like:
{key:'[your network key here]',pass:'[your network password here]',protocol:1}!-EOF-!
{"ret":"Hellno!"}!-EOF-!
You can now send and receive messages.
Just send JSON encoded data and all devices from your network will receive it. You can send single text or objects, or even array of objects. Example:
This is an example
or:
{ toDevice: 123, message: 'Turn off light' }
or:
[ { toDevice: 123, message: 'Turn off light' }, { toDevice: 321, message: 'Open gate' } ]
If you use !-EOF-! string in your message, it will be automatically removed.
All data is JSON encoded and ended with !-EOF-! string. Example:
This is an example!-EOF-!
or:
{toDevice:123,message:'Turn off light'}!-EOF-!
Steps: