tibay.net


Connecting and Authorization

  1. Connect to:
    host: api.tibay.net
    port: 12673
  2. Send JSON encoded authorization string:
    {
    	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-!
  3. If you get bellow string, you are authorized:
    {"ret":"Hellno!"}!-EOF-!
  4. You can now send and receive messages.


Sending data

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.


Receiving data

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:

  1. Remove !-EOF-! string from the end
  2. Decode from JSON.