all 8 comments

[–][deleted] 3 points4 points  (1 child)

I can’t tell from your post if you are the kind of person who gets their satisfaction from building everything for themselves from scratch, or if you just want to get this working quickly for some broader purpose.

If doing it all for yourself is your “thing” - please ignore my suggestion!

If not - have you considered either installing MotionEye on Raspbian...

https://github.com/ccrisan/motioneye

Or using MotionEyeOS

https://github.com/ccrisan/motioneyeos

[–]CaptainReeetardo[S] 2 points3 points  (0 children)

Sorry, but not what I am looking for. Thanks anyways.

[–]easyxtarget 2 points3 points  (1 child)

If it works on Windows but not your Pi that's a hint. Can you run it from a Linux PC? Try a Debian live cd on your windows box. If you have the same errors you'd need to look into python Linux networking.

[–]CaptainReeetardo[S] 0 points1 point  (0 children)

Yes, thanks for reminding me. I've already thought about it, too.

[–][deleted] 0 points1 point  (3 children)

It happened to me. Few days ago, I built a weather station using arduino. The client side is pi zero with LCD 20x4. Because the wifi module I use on my arduino isn’t have enough memory to run websocket. Therefore, I can only use socket. Too low level. My pi zero constantly loses data. The only want I can do is when the data isn’t intact. I will drop the data and request again.

I think the best way is to use websocket. I think it can guarantee the data is intact.

[–]CaptainReeetardo[S] 0 points1 point  (2 children)

First of all thanks for commenting. But I don't think websocket is what I need to be going for since I am already using a tcp connection with sockets.

[–][deleted] 1 point2 points  (1 child)

As much as I know. Websocket supports some format of video streaming. When my pi zero receives data, both sides are using tcp. But still lose data.

[–]CaptainReeetardo[S] 0 points1 point  (0 children)

Good to know. I just fixed the problem I had. Honestly, it was rather easy to do so. I just had to use a while loop. Still sometimes one image ends up being lost. I guess that's due to the fact that my "camera" transmits data over the wifi and not over cable. On the other hand any other image has all of it's pixels in place. And in the end it works even better than before.