Jump to content

Recommended Posts

Posted

Jus bought myself a Raspberry Pi to use as a Home Automation Controller. Installed Home Assistant all really good and impressed but a lot of learning to do. I've managed to get it talking to my Z-Wave, Phillips Hue and Hive Hubs and can control the devices.

 

One thing I am really struggling to do is set a Static IP. My Firewall which gives out DHCP does not have the ability to set reservations which would of been the obvious workaround :-( .

 

A lot of guides on the Internet point to files which do not exist i.e. /etc/network/interfaces or /etc/dhcpcd.conf .

 

In /etc/network I can only see files like these in blue text

if-down.d if-post-up.d if-up.d
.

 

Linux is not a skill I have :-( .

Posted (edited)

What OS are you using on the pi?

 

I know you said it doesn't exist, but on my install of Raspbian Stretch, /etc/dhcpcd.conf is definitely the config file to use for IP configuration. Sorry if it sounds patronising but maybe double check that you're not making a typo in the filename / path.

 

Look for the the following lines, copy and/or remove the comment delimiters (hashes: #) and edit as appropriate:

 

# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1

Edited by limawhiskey
Posted

The file probably needs to be made, however I'm not familiar with this distribution.

 

sudo nano /etc/network/interfaces

 

Add the lines in there, edited as appropriate.

Posted (edited)
That's not how it works...

 

The home assistant OS uses /etc/dhcpcd.conf

 

 

Thanks but I defo can't find that file, do I need to create it?

 

dhcpd.jpg

 

The only file close is udhcpd which I beleive is for setting up a DHCP server.

Edited by Davit2005
Posted

Thinking of moving to Rasbian now. Getting to grips with Home Assistant, cannot recommend it enough. Want to start with automation next but Alexa requires SSL connection and I'd really like to use SSL in any case.

 

It talks to Hive, HAB did not :-). I've got components setup to display local weather, London Underground, switching off the Motion detection on my Amcrest IP camera and Z-Wave sensors, my phillips hue bulbs and can even switch off my TV (cannot switch it on yet though).

Posted

Moved to Hassbian, that does indeed have the /etc/dhcpcd.conf file.

 

Got it more or less setup the way it was as I'd copied the conf files to a safe location for the rebuild to the same SD card.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...