Git Product home page Git Product logo

Comments (7)

CRImier avatar CRImier commented on August 19, 2024 4

@Morphy99 why don't you just do a poweroff? That should shut down the entire system and actually write all the data that hasn't been written to the SD card yet, simply stopping the MotionEye server won't help much. Otherwise, my experience is that you can use sudo systemctl stop motioneye to stop everything if you're launching motioneye as a service - doesn't seem to be what you actually need, but figured I'd post this just in case.

from motioneye.

ccrisan avatar ccrisan commented on August 19, 2024

Of course there is a way to start and stop it from command line. I should write a small wiki entry on this topic, but until then, meyectl -h should show a basic usage. Depending on how you configured your motionEye, the commands should look something like:

meyectl startserver -b -c /path/to/motioneye.conf

and

meyectl stopserver -b -c /path/to/motioneye.conf

The -b stands for running in background. If you omit it, it will start in foreground and it's your responsibility to kill it (the stopserver command no longer makes sense).

from motioneye.

Samfox2 avatar Samfox2 commented on August 19, 2024

That should do the job, thx!

from motioneye.

Morphy99 avatar Morphy99 commented on August 19, 2024

I'm trying to attempt something similar but with motioneye set to Fast Network Camera. I want to stop it from streaming and turn it on remotely. I've been doing this with a smart plug but I don't want to corrupt the SD card so was going to set a script to SSH and shutdown then switch the plug off however I can't shutdown meye from ssh?

I tried the above but if I do meyectl stopserver -b -c /path/to/motioneye.conf the stream continues however I cant reach the GUI anymore. I had a look at the other issue referenced however I can't find any thread-*.conf files located in /data/etc/. I'm assuming as this is regarding disabling them on a meye server pi.

from motioneye.

Morphy99 avatar Morphy99 commented on August 19, 2024

why don't you just do a poweroff?

Ahh thanks I wasn't aware of that command I was trying 'shutdown -h now' which doesnt work on meyeos.

Otherwise, my experience is that you can use sudo systemctl stop motioneye to stop everything if you're launching motioneye as a service

Yea this doesn't work on meyeos either as systemctl isn't compiled. I'd like to be able to stop the stream without powering off the rpi as I wouldn't need a smart plug then and it would also be faster.

from motioneye.

CRImier avatar CRImier commented on August 19, 2024

Ah, you're using meyeos, got it. I don't actually have SSH enabled on any of my meyeos-powerd Pi, so I can't really check any other options. I figure the actual stream is being done by the motion executable, any chance the meyectl command can start/stop that, too? I can't check ATM, but you might figure something out.

from motioneye.

Morphy99 avatar Morphy99 commented on August 19, 2024

I think the stream is being done by streameye as thats whats consuming the CPU in top. I can't find the correct .conf in /etc/data to use meyectl as just stopserver stops the GUI and not the stream component.

So running the poweroff command has been with its problems, I get no such file or directory when executing via ssh command. I added the /sbin/poweroff path and this works but not from a home assistant shell command as this is how I'm looking to execute it. I think it's because the SSH connection doesn't close gracefully. If I run this script from the terminal it exits ok but I get "return code: 127" in home assistant:
`#!/bin/sh

ssh [email protected] "/sbin/poweroff &&exit"`

Obviously this is something I need to find out over at HA.

from motioneye.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.