Difference between revisions of "PartsPC"

From NURDspace

Jump to: navigation, search
m
Line 9: Line 9:
 
}}
 
}}
 
= What =
 
= What =
Workstation in Zaal 2. It has a barcode scanner which can be used for [[Parts|Partkeepr]].
+
Workstation in Zaal 2. It has a [[Honeywell Voyager Barcode Scanner|barcode scanner]] which can be used for [[Parts|Partkeepr]].
 
= Auto shutdown =
 
= Auto shutdown =
 
We want this machine to shutdown when space is closed. We check MQTT for this in a simple python script. We use paho, so let's install that:
 
We want this machine to shutdown when space is closed. We check MQTT for this in a simple python script. We use paho, so let's install that:

Revision as of 19:17, 1 February 2020

PartsPC
IMG 20190105 215626.jpg
Owner Space
Status Working
Hostname partspc.dhcp.nurd.space
Location Zaal 2
Tool No
Tool category

PartsPC

IMG 20190105 215626.jpg

{{{InventoryOwner}}}
"{{{InventoryOwner}}}" cannot be used as a page name in this wiki.

Zaal 2

What

Workstation in Zaal 2. It has a barcode scanner which can be used for Partkeepr.

Auto shutdown

We want this machine to shutdown when space is closed. We check MQTT for this in a simple python script. We use paho, so let's install that:

apt-get install python-paho-mqtt

Normally the script would ask for a password to execute the shutdown command. We can avoid this with following line in /etc/sudoers (use visudo for this):

hark harktv =NOPASSWD: /bin/systemctl poweroff

Now we just run a cronjob every 5 minutes:

*/5 * * * * ~/space_status_shutdown.py

 
Our site is hosted by Site4U
Site4U
Our connectivity is made available by BIT
To BIT's website