Page 1 of 2
Nest Thermostat Meter [Updated 12/28/17]
Posted: November 6th, 2017, 9:54 am
by ObsidianX
Hey folks!
I was surprised to find that this wonderful application didn't have a Nest Thermostat meter so I whipped one up! There's more that I would like to add to make this a complete Nest frontend but it's a great monitor in its current form.
Screenshot:
Download:
https://github.com/ObsidianX/rainmeter-nest-thermostat/releases/download/0.5.2/Nest.Thermostat_0.5.2.rmskin
Source code:
GitHub:
https://github.com/ObsidianX/rainmeter-nest-thermostat
https://github.com/ObsidianX/csharp-web-eventsource
Usage:
After installing and loading the skin click the Lock icon to authorize the plugin with your Nest account. There will be a PIN dialog for you to enter the generated authorization PIN. If you're part of a family account the primary account holder will need to sign in.
I'm planning on adding temperature up/down buttons and a drop-down to select the HVAC mode (heat/cool/off) but haven't had time just yet. If you encounter any issues please leave a bug report on the GitHub project page, and feel free to submit patches!
Enjoy!
Re: Nest Thermostat Meter
Posted: November 6th, 2017, 6:58 pm
by tjhrulz
I dont own a nest but this is awesome. Looking forward to see you add control support in the future.
Also a readme on the github and some documentation for the plugin would be cool :P and once you do that be sure to post the plugin in
https://forum.rainmeter.net/viewforum.php?f=18 because we dont have enough cool plugins for Rainmeter.
Re: Nest Thermostat Meter
Posted: November 6th, 2017, 8:48 pm
by shoek
This is great!
Unfortunately, I can't get past the login with the auth key from NEST
Code: Select all
System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
File name: 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' ---> System.IO.FileLoadException: A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
at ObsidianX.Rainmeter.Nest.NestPlugin.<FetchAuthToken>d__49.MoveNext()
Does the Newtonsoft.Json plugin have to also be in the GAC?
I'm curious if you have thought about supporting multiple NEST's? I have 2 on my account and would like to see them both
Cheers!
Re: Nest Thermostat Meter
Posted: November 6th, 2017, 8:54 pm
by ObsidianX
shoek wrote:
Code: Select all
System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
File name: 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' ---> System.IO.FileLoadException: A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
at ObsidianX.Rainmeter.Nest.NestPlugin.<FetchAuthToken>d__49.MoveNext()
D'oh! I included Newtonsoft.Json in the .rmskin which should have installed it... If you open the Plugins directory at
%APPDATA%\Rainmeter\Plugins does it show up there? You should see
ObsidianX.Rainmeter.Nest.dll,
ObsidianX.Web.EventSource.dll and
Newtonsoft.Json.dll
Edit: Just to confirm, it's not in my GAC and it should be sufficient to install it to the Plugins directory.
Re: Nest Thermostat Meter
Posted: November 6th, 2017, 9:00 pm
by ObsidianX
shoek wrote:
I'm curious if you have thought about supporting multiple NEST's? I have 2 on my account and would like to see them both
Sure! I'm just selecting the first thermostat returned by the API at the moment so it'll be relatively simple to provide an extra option so you can select one yourself.
Re: Nest Thermostat Meter
Posted: November 6th, 2017, 10:25 pm
by tjhrulz
ObsidianX wrote:D'oh! I included Newtonsoft.Json in the .rmskin which should have installed it... If you open the Plugins directory at %APPDATA%\Rainmeter\Plugins does it show up there? You should see ObsidianX.Rainmeter.Nest.dll, ObsidianX.Web.EventSource.dll and Newtonsoft.Json.dll
Edit: Just to confirm, it's not in my GAC and it should be sufficient to install it to the Plugins directory.
When I get a change I am gonna make a PR so that you can have it just be merged into one .dll file using ilmerge. Makes it much easier for users when making Rainmeter plugins, and makes it a little nicer to debug IMO.
Edit: Sent a PR your way.
Re: Nest Thermostat Meter
Posted: November 6th, 2017, 11:02 pm
by shoek
ObsidianX wrote:D'oh! I included Newtonsoft.Json in the .rmskin which should have installed it... If you open the Plugins directory at %APPDATA%\Rainmeter\Plugins does it show up there? You should see ObsidianX.Rainmeter.Nest.dll, ObsidianX.Web.EventSource.dll and Newtonsoft.Json.dll
Edit: Just to confirm, it's not in my GAC and it should be sufficient to install it to the Plugins directory.
Yes I do see Newtonsoft listed in my Plugins tab, but no version is displayed for it like the others.
Re: Nest Thermostat Meter
Posted: December 1st, 2017, 12:55 am
by bandidom9
Im having the same issue
Code: Select all
System.IO.FileLoadException: A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
at ObsidianX.Rainmeter.Nest.NestPlugin.<FetchAuthToken>d__49.MoveNext()
at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at ObsidianX.Rainmeter.Nest.NestPlugin.FetchAuthToken(String pin)
at ObsidianX.Rainmeter.Nest.NestPlugin.<>c__DisplayClass48_0.<ShowPinDialog>b__0(Object s, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Re: Nest Thermostat Meter
Posted: December 9th, 2017, 11:24 am
by springs
hi, is it possible to change the temp from *F to *C?
Re: Nest Thermostat Meter [Updated 12/28/17]
Posted: December 29th, 2017, 12:29 am
by ObsidianX
Uploaded 0.5.1 which uses tjhrulz's ILMerge patch. I've also updated the csproj to automatically run DllExport after merging to produce a working DLL without needing to run clunky batch files manually
Thanks, tjhrulz!
Also, my apologies for the delay in updating this. I haven't had any time to work on this since I originally published it!