From 2b557ba793ab3c9e62c27f8673b6edafab834e45 Mon Sep 17 00:00:00 2001 From: wouter gordts Date: Thu, 4 Jul 2019 20:32:41 +0100 Subject: [PATCH 1/2] added some systemd documentation --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 5d5f634..3be7393 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,36 @@ The following OSC messages can be sent to the server. /get/cpu ``` +It's running as a systemd service with the following configuration at */etc/systemd/system/osc_server.service*. + +```bash +[Unit] +Description=OSC server for puredata +After=network.target + +[Service] +Type=simple +User=pi +Group=pi +WorkingDirectory=/home/pi/sources/puredata/ +ExecStart=/usr/bin/python3 osc_server.py +StandardOutput=syslog +StandardError=syslog + +[Install] +WantedBy=multi-user.target +``` + +Controlling the service is done with the following commands. + +```bash +sudo systemctl start osc_server.service +sudo systemctl stop osc_server.service +sudo systemctl restart osc_server.service +sudo systemctl status osc_server.service + +``` + # todo * have each chapter be more verbose From bfaf553581b4099527bb7756e6b9cdf79ed111f5 Mon Sep 17 00:00:00 2001 From: waldek Date: Thu, 4 Jul 2019 21:43:56 +0200 Subject: [PATCH 2/2] adding test puredata patch for the weather server --- weather_client.pd | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 weather_client.pd diff --git a/weather_client.pd b/weather_client.pd new file mode 100644 index 0000000..fbf3848 --- /dev/null +++ b/weather_client.pd @@ -0,0 +1,19 @@ +#N canvas 685 54 679 689 10; +#X obj 406 163 mrpeach/udpreceive 8081; +#X obj 406 186 mrpeach/unpackOSC; +#X obj 406 209 print; +#X obj 131 247 mrpeach/packOSC; +#X msg 140 185 send /get/weather \$1; +#X obj 131 322 mrpeach/udpsend; +#X msg 95 94 send /get/bitcoin; +#X msg 131 117 send /get/cpu; +#X msg 158 301 connect 192.168.0.235 8080; +#X msg 140 158 symbol paris; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 5 0; +#X connect 4 0 3 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 5 0; +#X connect 9 0 4 0;