Davit2005 Posted October 3, 2018 Posted October 3, 2018 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 :-( .
bald_pig Posted October 3, 2018 Posted October 3, 2018 https://wiki.alpinelinux.org/wiki/Configure_Networking#IPv4_Static_Address_Configuration
limawhiskey Posted October 3, 2018 Posted October 3, 2018 (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 October 3, 2018 by limawhiskey
Marci Posted October 3, 2018 Posted October 3, 2018 What OS are you using on the pi? (See thread subject ) 1
limawhiskey Posted October 4, 2018 Posted October 4, 2018 (See thread subject )[/color] How did I miss that?!
Davit2005 Posted October 4, 2018 Author Posted October 4, 2018 https://wiki.alpinelinux.org/wiki/Configure_Networking#IPv4_Static_Address_Configuration Yep seen that already :-( . etc/network/interfaces file does not exist. Not sure if it makes a difference but the OS was downloaded as a pachage for Home Assistant. I have copies of the config files so if I need to build Home Assistant again at least I can :-) .
skell Posted October 4, 2018 Posted October 4, 2018 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.
bald_pig Posted October 4, 2018 Posted October 4, 2018 That's not how it works... The home assistant OS uses /etc/dhcpcd.conf
Davit2005 Posted October 4, 2018 Author Posted October 4, 2018 (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? The only file close is udhcpd which I beleive is for setting up a DHCP server. Edited October 4, 2018 by Davit2005
Davit2005 Posted October 4, 2018 Author Posted October 4, 2018 What are you using as a text editor? nano? Good old fashoined vi if on local console but editing via WinSCP if not.
Davit2005 Posted October 8, 2018 Author Posted October 8, 2018 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).
Davit2005 Posted October 11, 2018 Author Posted October 11, 2018 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now