Is it possible to change a device's address?

Posted on
Sat Sep 10, 2016 4:06 pm
olympus offline
Posts: 15
Joined: Dec 11, 2015

Is it possible to change a device's address?

I have a device (sonos) that has a dynamic local ip. I use fingscan to monitor network devices and would like to update the ip address of the sonos if fing detects a change. I've created a trigger and the only scripting I could come up with is

Code: Select all
dev = indigo.devices["Bedroom Audio"]
newAddress = indigo.devices["Bedroom Sonos Information"].address
dev.address = newAddress
dev.replaceOnServer()


but that doesn't work because the address is read-only. Is there a way for me to accomplish what I'm trying to do? Thanks!

Posted on
Sun Sep 11, 2016 10:06 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Is it possible to change a device's address?

try:

dev.updateStateOnServer("address", newAddress)
if it has a state "address",.

If "address" is a property that will not work.

Karl

Posted on
Sun Sep 11, 2016 11:29 am
olympus offline
Posts: 15
Joined: Dec 11, 2015

Re: Is it possible to change a device's address?

Thanks for the reply! After making that modification, I have this

Code: Select all
dev = indigo.devices[1384505514] # "Bedroom Audio"
newAddress = indigo.devices[194414959].address
dev.updateStateOnServer("address",newAddress)


which results in this

Code: Select all
Script Error                    embedded script: state value updating of plugin devices is private
  Script Error                    Exception Traceback (most recent call shown last):

     embedded script, line 3, at top level
TypeError: state value updating of plugin devices is private


Any ideas? I'd really just like to make sure that when fing detects a change in IP, the IP for the sonos is updated.

Posted on
Sun Sep 11, 2016 7:13 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Is it possible to change a device's address?

= only the plugin can update. So you have to ask the plugin to update the state. = ask the author to add an action that does that. I don't know of any other way.


Sent from my iPhone using Tapatalk

Posted on
Sun Sep 11, 2016 8:22 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Is it possible to change a device's address?

You could also set a DHCP reservation in your router for the Sonos so it doesn't change addresses ever again.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Sep 12, 2016 5:12 pm
olympus offline
Posts: 15
Joined: Dec 11, 2015

Re: Is it possible to change a device's address?

Yeah, that's how I previously had it configured, but my apartment's data line was moved over to a managed network and I no longer have administrative access to the router. Thanks for the suggestion though!

Posted on
Mon Sep 12, 2016 6:38 pm
Different Computers offline
User avatar
Posts: 2550
Joined: Jan 02, 2016
Location: East Coast

Re: Is it possible to change a device's address?

but my apartment's data line was moved over to a managed network and I no longer have administrative access to the router


Have you considered putting your own router between your gear and the apartment's router?

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests