The Raspberry Pi has come to be used as an IoT hub for many, many projects, from home automation to small-scale DIY projects.
With the Raspberry Pi 3 now available, there is a whole new category of software development tools that can help you build on top of this platform and make your Raspberry Pi a viable IoT hub.
In this article, we will take a look at how to use the Acnhs server maintenance tools on your Raspberry pi 2 to make the best of the Raspberry PI and make it even more reliable than before.
You can read more about Acnhh server maintenance on the Acns website.
This article assumes you have already set up a static IP address for your Raspberry PI 2.
If you haven’t set up this, we highly recommend you do so.
The first thing you’ll need to do is install the following packages:Install the software on your Pi2, using the command below:sudo apt-get install git git-core git-devel-server git-libre-web git-server-utilsIn the next screen, we’re going to create a new folder for our project, named “RaspberryPi” and change its name to something like “AcnhServer”.
Now, we can create our file system:sudo mkdir ~/raspbian-static sudo chown root:raspbtree /raspbios/src/misc/Raspberrypi/RaspbiasConfig.txtIn the new folder, we need to create our Acnhm server configuration file:In this file, we’ll add our Acns server configuration to make it accessible from any IP address in the world:sudo nano /etc/acnhm/server.cfgIn the section where we’re adding this, make sure the “address” section is not blank:And, add the line:acnhsadmin add (or address) To start the server, type the following command on your computer:sudo /etcraspi-configraspberrypi-server.iniAnd, type “yes” when prompted:If you get this error message:Your server was unable to start, then try typing the following commands:sudo ./server.py -hAnd, when it says that everything is working fine, you should see the following message:Acnhmserver can now start automatically!
Now, let’s start our server:AcnnhServer starts automatically!
You can also add other IPs as needed:acnnhserver add (OR address) (or IP address)To test if the server is working, type:acnsadmin list (or “list”)This will show you the IP addresses that are available to the Acnnh server.
Now, you can visit any URL that is available from your RaspberryPi2’s web interface.
For example, let us go to https://www.example.com:This should display the Acnth Server interface.
We can also test if everything is running properly:You can find the current Acnhn server configuration here:AcnthServer:Hostname:Example.com Hostname:Acnserver:HostName:example.netHostname is the IP address you added earlier.
It should be different for every IP address.
If everything works fine, it’s time to configure our Raspberry Pi to use this new server configuration.
To do this, go to the “System” tab of the “Config” tab, and in the “Add” section, add:The first option here will give you the RaspberryPi as the server host.
You can change the hostname later, but it should be something like raspberrypi or raspberrypi.local.
If not, you will need to configure a different hostname.
For example, for example, raspberrypi .local would be good.
Now you can add the server IP address from your web interface to the list.
If everything is configured correctly, you’ll see the RaspberryPI and the Acndh server interface.
When you log in to your RaspberryPI, you need to make sure that the server interface is visible.
You should see a screen like this:If everything is ok, you’re good to go.
To exit, type Ctrl+C.
If you need more help, please visit our Acnnhn forum.
We hope this article helped you.
Have fun with your Raspberrypi!