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

Invalid Content-Length: value #2069

Open
weyrleader opened this issue Mar 21, 2021 · 6 comments
Open

Invalid Content-Length: value #2069

weyrleader opened this issue Mar 21, 2021 · 6 comments

Comments

@weyrleader
Copy link

I have been looking for a way to add my Kasa KC100 IP camera to motioneye, and found the following articles which looked to suggest it may be possible, in fact I actually used Josh Getters awesome home assistant addon and successfully got it working that way and pointed motioneye at the RTMP stream it creates from the Home Assistant server, however looking at his response in the second link below I thought it may be possible to configure motioneye to get the stream direct from the camera:

https://medium.com/@hu3vjeen/reverse-engineering-tp-link-kc100-bac4641bf1cd
softScheck/tplink-smartplug#73 (comment)

When adding the camera to motioneye, initially it complained about the certificate, but found a config option to ignore validating certificates, but now get a "Invalid Content-Length: value" error. If you look at his curl command he has a flag to ignore Content-Length, so went looking to see if there was an option for motioneye to no avail. Is there such an option or is it possible to add this as a config option?

Regards
James

@starbasessd
Copy link

starbasessd commented Mar 21, 2021 via email

@weyrleader
Copy link
Author

That's the stream that gets created by running Josh Getters HA addon, that works fine but relies on running that addon to create the stream, and adds load to the HA server so I was looking to try and get the stream direct from the camera based on the URL in his response, with the base64 encoded the password, it looks to authenticate fine, just gets stuck on the returned content-length error so doesnt add the camera

@starbasessd
Copy link

starbasessd commented Mar 21, 2021 via email

@weyrleader
Copy link
Author

I assumed the same thing when I saw the entry on ispyconnect, but it didnt work. You'll notice the entry says this:

KC100 Home Assistant Integration FFMPEG rtmp:// /live/BalconyCam

Which lead me to find Josh's HA addon, when you set this up it creates the RTMP stream on your HA server so pointing HA at your HA servers IP with that URL does definitely work but its motioneye -> HA -> camera, not motioneye -> camera.

I have just manually created a camera.conf using this URL
https://ipaddress:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd

with the email address used to create the KASA account the the base64 encoded password and after restarting motioneye it works, so this confirms motion doesn't require the content-length header, its just motioneye not creating the camera.conf entry because it sees the returned error when it connects.

@weyrleader
Copy link
Author

Correction.. the manual entry I created did not work. It looked like it did initially because I used the existing camera.conf that pointed at the HA stream as a template and just updated the netcam_userpass and netcam_url. As soon as I deleted the older entry the new one stopped working, and the logs are complaining that the https url is invalid, not exactly sure what I missed updating in the new conf file that somehow linked them @id maybe?

@starbasessd
Copy link

starbasessd commented Mar 21, 2021 via email

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

No branches or pull requests

2 participants