Comfort  Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

Make sure your Pi has a static IP
 Moderated by: slychiu, mattbrain, benstinton
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Thursday Mar 30th, 2017 01:19 am
   PM  Quote  Reply 
1st Post
benstinton
UCM Pi Users


Joined: Tuesday Jan 24th, 2017
Location: Birmingham, United Kingdom
Posts: 9
Status: 
Offline

  back to top

So, its really important that your Pi has a static IP. If you leave it to DHCP and for any reason your Pi is assigned a new IP via DHCP from your router, then all of your devices will become inactive. This is because their network address, which includes the original IP is stored by SmartThings. This has happened to me a couple of times and is really frustrating. At this point you have two choices, either delete all devices and smartapps and start again, or set your Pi to the static IP that SmartThings has stored. If you are still in your initial set-up or have only just started and don't mind starting again, then I would recommend the former so you can choose an IP address from outside the range allocated to DHCP in your router (this way you can move straight to part B).
So here are the steps needed to:
A: Recover the old IP address that SmartThings has recorded
  1. Go to the SmartThings IDE 
  2. Go to the My Devices page, and look down the table of devices. 
  3. Pick one of your comfort devices other than the bridge.
  4. Look across to the Device Network Id column and you will see string that looks like xxxxxxxx:xxxx
  5. Copy the first bit before the colon. This is basically your Hex address.
  6. In a new tab navigate to this page
  7. Use the form on the right hand side to convert 'Hex to IP Address', and the IP address you need will be displayed below
B: Set your Raspberry Pi's IP to static (as found in step A)
  1. This bit requires you to be familiar with the CLI (Command Line Interface) and happy using SSH. On a mac start 'Terminal' or on a Windows pc download and use Putty (instructions)
  2. Type in ssh pi@alpha-uhai.local
  3. When prompted type '@lphaWerk' as the password. If you are worried that it is insecure to have this password posted here, then be aware that this is only useful if you have are already inside your network. So if your network is not secure or if you are still worried, then please feel free to change this password by typing 'sudo raspi-config' and the changing the user password.
  4. Follow the instructions here to set your Pi to use the static IP you discovered or chose above.
  5. If you are using an IP address that previously assigned dynamically, then you will need to enter your routers configuration panel, and adjust the range of address allocated to DHCP, so your Pi's IP address falls outside of that range. Any other devices managed by DHCP, that now fall out of the dynamic pool, will get a new dynamic IP when they renew their lease.
Finally, you should make sure your Comfort alarm has an IP that falls outside of the dynamic pool. You can change this via the comfigurator, and it is much easier to change to an IP that is not in the dynamic pool. All you need to do at this point is to update your alarm.config file with the new IP to the Pi, and restart the service. 
Make a note of the new IPs you have assigned in case you need them in the future. 
Even if you haven't had this problem yet, its worth following this process anyway in order to prevent it happening at all.

Last edited on Thursday Mar 30th, 2017 12:05 pm by benstinton



 Posted: Thursday Mar 30th, 2017 09:43 am
   PM  Quote  Reply 
2nd Post
juwi_uk
Member


Joined: Friday May 25th, 2007
Location: Newbury, United Kingdom
Posts: 1255
Status: 
Offline

  back to top

Do you not need to do anything on your dhcp server as well to remove this ip address from the pool of available addresses or is this done automatically for you such that other devices arent leased the same IP address?



 Posted: Thursday Mar 30th, 2017 11:56 am
   PM  Quote  Reply 
3rd Post
benstinton
UCM Pi Users


Joined: Tuesday Jan 24th, 2017
Location: Birmingham, United Kingdom
Posts: 9
Status: 
Offline

  back to top

You are quite right. Normally I would say choose an IP from a range not assigned to DHCP with your router, but in this case unless you are willing to delete all devices and smartapps from SmartThings and start again, you need to work with the IP that has already been assigned.Therefore probably the best thing to do is to see if you can move the range of dynamic IPs slightly so your target IP address falls outside it. I'll update the instructions a bit to reflect this.



 Current time is 08:11 pm
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems