Raspberry π

Posted on
Page
of 53
  • I'm using 32bit raspbian. I guess I latched onto the usb3 explanation, as that seemed to fit my own observations. I was fairly reliably able to repeat usb cable plugged in ==> fail , no cable ==> boots fine. So I'm pretty convinced it's an RF interference issue or something like that. I think I also disabled bluetooth service from systemd, but at least by itself that had no effect. I actually don't think wifi drops out once it's fine, but another part of the problem is that spotifyd sometimes hangs without fully terminating so it won't get restarted. In which case just repowering the pi would be the simplest option if I could expect it to work.

  • Out of curiosity, what happens if you use wpa_suplicant to configure WiFi rather than use the set up wizard? Might be worth a try if you have the stomach for a clean install.

  • I've set up wifi config through network manager, but I've also tried wpa_supplicant. I'm suspecting that whatever goes wrong happens early in bootup, but even reloading the kernel module after boot didn't seem to help. I'm pretty much ready to give up with the built-in wifi at this point.

  • Is there a good way to watch Eurosport player on pi? I tried it in chromium and Firefox on my pi 4 the other day, connected via Ethernet and it was laggy and awful.

  • There's probably a Kodi addon for it somewhere

  • Haven’t ventured into Kodi yet. I saw there was one but it doesn’t work now, seemed someone had a project to make a new one.

  • @rhb - have you seen this:

    https://www.lfgss.com/comments/15933656/

    The rpi using MotionOS, that is. It seems like this would be veryt good for your project.

  • Good timing as I will be mouse camm-ing our kitchen tonight due to suspicious movements in one corner. I like the idea of triggering a nerf gun barrage might scare them off. Sprung trap set (away from camera view) unfortunately as yet to find a more reliable way of clearing them out.

  • I've had motioneyeos running on a Pi4 for about 4 months. I don't use any motion detection functionality on it but surprised how stable and reliable it has been. Fire and forget so far.

  • 5into15 is hit n miss annoyingly... can help anyone decipher the error here please?


    1 Attachment

    • Screenshot_20210414-170420_JuiceSSH.jpg
  • 5into15

    Looks like maybe you've passed a malformed request to the Twitter API?

  • It looks like the twitter API is barfing on the X-Rate-Limit-Reset header. Is there an update to the twython library?

  • The request is a constant? I'd expect it to always work or always fail? Not have it work at 3.30pm then fail at 4.30pm on next try?

  • apt get update & upgrade then?

  • Bit of a random one but are you using any symbols in the file names of the files you are sending?

    Also, how are you authenticating?

  • The file I send is called 5into15.mp4 this is then copied with timestamp to archive it and the file (along with the source images) is deleted ready for the next time I run the script.

    Also, how are you authenticating?

    Good question. I didn't know there was more than one way. I'm just using the 4 long codes that the twitter api info says it needs. I'm 2/3rds through a different timelapse process on that pi right now but will paste the .py code snippet (security stuff redacted) shortly if it's any use for diagnosis

  • @Stonehedge here's the relevant bits of code. Might not mean the same out of context of the rest of the code?

    tweetStr = "blah blah blah" 
    
    apiKey = '-'
    apiSecret = '-'
    accessToken = '-'
    accessTokenSecret = '-' 
    
    api = Twython(apiKey,apiSecret,accessToken,accessTokenSecret) 
    
    video = open('5into15.mp4', 'rb')
    response = api.upload_video(media=video, media_type='video/mp4')
    api.update_status(status=tweetStr, media_ids=[response['media_id']])
    

    It works/ fails intermittently.

  • Out of curiosity does inserting a pause between uploading the video and updating the status make the problem go away. Maybe 5 seconds?

    Also, can you verify that the upload_video step is always successful? It could be failing silently and causing the following step to throw the "Bad Request" error.

  • There is a conversation going on about this in another channel

    I currently have a mouse. They are an occupational hazard of Amsterdam, but fucking hell are they annoying.

    Here he is from this morning


    1 Attachment

    • Capture.JPG
  • Thought I'd give motioneyesOS a try on my Pi Zero. Annoyingly it connects to my wifi but I can't connect to the web interface, can't ping it, etc.

    Think I'm going to have to try and find that stupid sized HDMI cable to see what's going on.

  • They are kind of cute though. Think our latest is possibly a missed spot of clean up from the last 2 we had a while back, had no activity on the camera overnight.

  • I'll see if I can add a pause... assuming the code is relatively straightforward?

    verify that the upload_video step is always successful

    I'm not sure how I'd do this? The fact it tweets is usually the verification all went ok. Does twitter return "answers" to each step i could somehow ask the code to delve into?

    E.g. if video upload = success, go tweet, else stop, hammer time?

  • Can't you ssh into it?

  • If that's the trouble @aggi have you tried admin@192.etc for ssh as the default motioneyeos user is 'admin' not 'pi'?

  • For a pause, put

    import time
    

    near the top, then insert

    time.sleep(5.5)    # Pause 5.5 seconds
    

    between the upload_video and update_status lines. It'll probably achieve nothing, but it's something I'd try out of curiosity.

    For verifying that the upload_video step is successful:

    response = api.upload_video(media=video, media_type='video/mp4')
    api.update_status(status=tweetStr, media_ids=[response['media_id']])
    

    On line one, you're uploading your file to Twitter, and the response (including a unique identifier for the media file you just uploaded) is stashed in the response variable. You need that ID because when you then send your tweet with update_status, you need to attach the file to your tweet, and you do that by passing the ID of the media file along with your tweet: media_ids=[response['media_id']]

    To verify the media upload worked, I'd probably start by just printing out response['media_id'] and seeing if it looks sane. E.g.

    video = open('5into15.mp4', 'rb')
    response = api.upload_video(media=video, media_type='video/mp4')
    print('media_id', response['media_id'])
    api.update_status(status=tweetStr, media_ids=[response['media_id']])
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Raspberry π

Posted by Avatar for photoben @photoben

Actions