We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm getting the following output from Netcat on the Yi camera:
# echo -ne $head | nc -i 5 local-hass-ip 8123 HTTP/1.0 400 Bad Request Content-Type: application/json Content-Length: 41 Date: Sun, 12 May 2019 22:50:12 GMT Server: Python/3.6 aiohttp/3.5.4 {"message": "Data should be valid JSON."}#
This curl command works from my Mac: curl --trace-ascii - -0 var=val -X POST -H "x-ha-access: password-example" -H "Content-Type: application/json" -d '{"payload": "{\"camera\":\"living room\",\"date\":\"02-16-2018\",\"time\":\"20:13\"}", "topic": "homeassistant/motion", "qos": 0, "retain": 0}' https://example/api/services/mqtt/publish
curl --trace-ascii - -0 var=val -X POST -H "x-ha-access: password-example" -H "Content-Type: application/json" -d '{"payload": "{\"camera\":\"living room\",\"date\":\"02-16-2018\",\"time\":\"20:13\"}", "topic": "homeassistant/motion", "qos": 0, "retain": 0}' https://example/api/services/mqtt/publish
I'm executing these commands on the Yi from a telnet session:
body='{"payload": "{"camera":"living room","date":"02/26/18","time":"2:00pm"}", "topic": "homeassistant-motion", "qos": 0, "retain": 0}' body_len=$(echo -n "$body" | wc -c) head="POST /api/services/mqtt/publish HTTP/1.0\r\nHost: example.com\r\nUser-Agent: curl/7.47.0\r\nAccept: */*\r\nx-ha-access: example-password\r\nContent-Type: application/json\r\nContent-Length: ${body_len}\r\n\r\n${body}" echo -ne $head | nc -i 5 local-hass-ip 8123
Any idea what the issue might be?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm getting the following output from Netcat on the Yi camera:
This curl command works from my Mac:
curl --trace-ascii - -0 var=val -X POST -H "x-ha-access: password-example" -H "Content-Type: application/json" -d '{"payload": "{\"camera\":\"living room\",\"date\":\"02-16-2018\",\"time\":\"20:13\"}", "topic": "homeassistant/motion", "qos": 0, "retain": 0}' https://example/api/services/mqtt/publish
I'm executing these commands on the Yi from a telnet session:
Any idea what the issue might be?
The text was updated successfully, but these errors were encountered: