Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send JSON message over TCP? #153

Closed
farhanito opened this issue Aug 13, 2016 · 4 comments
Closed

Send JSON message over TCP? #153

farhanito opened this issue Aug 13, 2016 · 4 comments
Assignees
Labels

Comments

@farhanito
Copy link

Is it possible to send TCP messages in JSON format?
For example:

tcp://192.168.31.102:55443/{"id":1,"method":"toggle","params":[]}

Thanks

@bwssytems
Copy link
Owner

Sure, that will work just fine. See examples in the readme here https://github.com/bwssytems/ha-bridge#multiple-call-construct

@bwssytems bwssytems self-assigned this Aug 16, 2016
@bwssytems
Copy link
Owner

Did you get this to work?

@farhanito
Copy link
Author

farhanito commented Aug 27, 2016

Hi,

Yes it does work. Apparently i need to escape character like this..

tcp://192.168.31.101:55443/{\"id\":1,\"method\":\"toggle\",\"params\":[]}\r\n
tcp://192.168.31.101:55443/{\"id\":1,\"method\":\"set_bright\",\"params\":[${intensity.percent},\"smooth\",500]}\r\n

Thanks

@bwssytems
Copy link
Owner

That is correct. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants