Giter Club home page Giter Club logo

pioneerav's Introduction

PioneerAV

My VSX-1123 Remote Access and Control.

I want to control it with my RaspberryPi and automatically turn it on/off and set the volume when I change the input.

Install as Daemon

Source: http://pmcgrath.net/running-a-simple-dotnet-core-linux-daemon

  • Create SystemD service file

Will run the application from the bin sub directory for now

cat > piopi.service <<EOF [Unit] Description=PioPi service After=network.target

[Service] ExecStart=/usr/bin/dotnet /home/bem/Projects/BeM_Apps/PioPi/bin/Debug/netcoreapp2.0/PioPi.dll Restart=on-failure

[Install] WantedBy=multi-user.target EOF

Configure SystemD so it is aware of the new service

  • Copy service file to a System location sudo cp piopi.service /lib/systemd/system

  • Reload SystemD and enable the service, so it will restart on reboots sudo systemctl daemon-reload sudo systemctl enable piopi

  • Start service sudo systemctl start piopi

  • View service status systemctl status piopi

Tail the service log

Since we are just writing to stdout the output can be examined with journalctl

sudo journalctl --unit piopi --follow

Stopping and restarting the service

  • Stop service sudo systemctl stop dnsvc systemctl status dnsvc

  • Restart the service sudo systemctl start dnsvc systemctl status dnsvc

Cleaning up

  • Ensure service is stopped sudo systemctl stop dnsvc

  • Disable sudo systemctl disable dnsvc

  • Remove and reload SystemD sudo rm dnsvc.service /lib/systemd/system/dnsvc.service sudo systemctl daemon-reload

  • Verify SystemD is no longer aware of the service - Empty is what we want here systemctl --type service |& grep dnsvc

pioneerav's People

Contributors

quantumsingularity avatar

Watchers

Bas ten Den avatar

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.