FilipDem / Domoticz-NEST-plugin

NEST Plugin for Domoticz using the Google credentials.
13 stars 4 forks source link

Device name #4

Closed rolfie23 closed 4 years ago

rolfie23 commented 4 years ago

Hello,

Finally migrated my profile, to get used your plugin.

But is there an possibility to rename the devices? I have now a long name like "Nest - Living Room Heating Temp" and want to call it simple "Thermostaat" for example. When I rename it, it makes an new one with the old name. How can I solve this?

Rolf

FilipDem commented 4 years ago

You can change the names in the code if you want. Not really a bug.

rolfie23 commented 4 years ago

Yeah, of course.... But where? Looked for Nest - Living Room Heating Temp in the script, but couldn't find it... And I'm not that programmer I can get understand the code.

johnoost commented 4 years ago

Great work !

In response on this question, i also have very long device names. And when i edit them the device does not function anymore. How can this be editted? I do not see the names in the scipts so i guess they come from the google nest account.

FilipDem commented 4 years ago

Hi, Indeed, you cannot change it inside Domoticz because they will be recreated automatically. I did this in this way to avoid any action from the user. All the devices are created automatically (as it was with the first official nest plugin).

How can you change it?

  1. The first part of the name is coming from the nest.py file and indicates the location of the device (as you can set it in the nest app).

    where_map = { '00000000-0000-0000-0000-000100000000': 'Entryway',
              '00000000-0000-0000-0000-000100000001': 'Basement',
              '00000000-0000-0000-0000-000100000002': 'Hallway',
              '00000000-0000-0000-0000-000100000003': 'Den',
              '00000000-0000-0000-0000-000100000004': 'Attic', # Invisible in web UI
              '00000000-0000-0000-0000-000100000005': 'Master Bedroom',
              '00000000-0000-0000-0000-000100000006': 'Downstairs',
              '00000000-0000-0000-0000-000100000007': 'Garage', # Invisible in web UI
              '00000000-0000-0000-0000-000100000008': 'Kids Room',
              '00000000-0000-0000-0000-000100000009': 'Garage "Hallway"', # Invisible in web UI
              '00000000-0000-0000-0000-00010000000a': 'Kitchen',
              '00000000-0000-0000-0000-00010000000b': 'Family Room',
              '00000000-0000-0000-0000-00010000000c': 'Living Room',
              '00000000-0000-0000-0000-00010000000d': 'Bedroom',
              '00000000-0000-0000-0000-00010000000e': 'Office',
              '00000000-0000-0000-0000-00010000000f': 'Upstairs',
              '00000000-0000-0000-0000-000100000010': 'Dining Room'
            }

    Normally I think you can change the texts as only the numbers are returned from nest (to be tested - I suppose you can do it easily).

  2. The second part can be found in the file plugin.py and indicates the name of the device (which corresponds rather to its function).

    _NEST_HEATING = 'Heating'
    _NEST_ECO_MODE = 'Eco mode'
    _NEST_AWAY = 'Away'
    _NEST_TEMP_HUM = 'Temp/Hum'
    _NEST_HEATING_TEMP = 'Heating Temp'
    _NEST_PROTECT = 'Protect'

    Success!

Filip

rolfie23 commented 4 years ago

Thanks for the reply, will try in a few days. How about the Nest - in front? Just want to name it Thermostat. Nothing in front or behind, so where can I find that?

FilipDem commented 4 years ago

This is the name of your hardware device... You should be able to change this in the hardware settings...

rolfie23 commented 4 years ago

And where can I remove that in the code? Don't want to change it in the hardware page, want it gone. No name is not allowed. Think I only going to use the names in plugin.py.

FilipDem commented 4 years ago

Don't understand. This is the domoticz system... You always need to give your device a name and this is shown by the devices. If you don't want this, you need to change domoticz itself.

Op zo 15 mrt. 2020 om 10:31 schreef rolfie23 notifications@github.com:

And where can I remove that in the code? Don't want to change it in the hardware page, want it gone. No name is not allowed. Think I only going to use the names in plugin.py.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FilipDem/Domoticz-NEST-plugin/issues/4#issuecomment-599187007, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3SGC5K5WBYYO4MWGSCRLLRHSN7VANCNFSM4KXL6K6A .

rolfie23 commented 4 years ago

Don't understand. This is the domoticz system... You always need to give your device a name and this is shown by the devices. If you don't want this, you need to change domoticz itself. Op zo 15 mrt. 2020 om 10:31 schreef rolfie23 notifications@github.com: And where can I remove that in the code? Don't want to change it in the hardware page, want it gone. No name is not allowed. Think I only going to use the names in plugin.py. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3SGC5K5WBYYO4MWGSCRLLRHSN7VANCNFSM4KXL6K6A .

The onlye device with hardware name is the one your script makes. If I want only thermostat or heating as name that is possible in Domoticz. So your script is somewhere making the device starting with the hardware name. Previous scripts off the nest didn't do that.

johnoost commented 4 years ago

Changing the names worked fine, you just get new devices but that is OK Unfortunately with the updated beta of today i do not see any devices in the overview :-(

Filip, thanks for your effort !

rolfie23 commented 4 years ago

Fine to hear! So now you have an name link - ?

Op 15 mrt. 2020 12:52, om 12:52, johnoost notifications@github.com schreef:

Changing the names worked fine, you just get new devices but that is OK Unfortunately with the updated beta of today i do not see any devices in the overview :-(

Filip, thanks for your effort !

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/FilipDem/Domoticz-NEST-plugin/issues/4#issuecomment-599200234

rolfie23 commented 4 years ago

Thanks, it's now Nest - <-name>. When it's able to remove the Nest - let me hear!

For now the names are way shorter so my alignment on the phone isn't disrupted!