这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

Conversation

@watou
Copy link
Contributor

@watou watou commented Jul 5, 2015

Problems: (1) Discovered that some users were not entering their OAuth PIN at ecobee.com within the 9-minute window, which was causing an auth token to be persisted that was not usable. When this happens, there is no way to retrieve a new PIN unless the user knew how to find and move or delete the absurdly named and platform-specific Java Preferences file where the bad auth token was stored. (2) Users would then attempt to create a new app at ecobee.com and enter the new ecobee:appkey in openhab.cfg. The binding would not realize that the ecobee:appkey had changed from when the old tokens had been stored, so this was not the solution the user was hoping it would be.

Fixes: (1) The binding now discards expired tokens when an attempt to use them to get new tokens fails with "authorization_expired". (2) The binding also now ignores persisted tokens after the user changes ecobee:appkey in openhab.cfg, since any persisted tokens will not work against this different app key. The Nest binding does something similar to avoid using invalid persisted tokens.

One user discussion and fix is here.

I recommend that this fix be included in OpenHAB 1.7.1. Please let me know if I should or should not merge it into the ecobee-action PR which is currently planned for 1.8.

@teichsta teichsta added this to the 1.7.1 milestone Jul 6, 2015
teichsta added a commit that referenced this pull request Jul 6, 2015
Ecobee: two cases where tokens should be ignored or discarded.
@teichsta teichsta merged commit cf27f4e into openhab:master Jul 6, 2015
@teichsta
Copy link
Member

teichsta commented Jul 6, 2015

Thanks @watou. Yes, it would be great if you could update the ecobee-action PR. Best, Thomas E.-E.

watou added a commit to watou/openhab that referenced this pull request Jul 6, 2015
@milty456
Copy link

milty456 commented Jul 7, 2015

I'm curious, is there a way to pull the currently running time on the Ecobee...so say the AC has been running constantly for 4 hours; is there a way to pull that data...i see alot of runtime strings, but not one that stands out. Thanks

Rich

@watou
Copy link
Contributor Author

watou commented Jul 7, 2015

Hi @milty456, I would look at the persistence extensions or rules in the wiki. Also, howto questions are better asked over on the Google group.

@milty456
Copy link

Just started seeing this in the openhab log; can anyone tell me what is going on here...what is that wacky token...has someone hacked in and replaced something; how can i fix this? Thanks

2015-07-16 05:35:30.873 [ERROR] [g.openhab.io.net.http.HttpUtil] - Fatal transport error: java.net.UnknownHostException: api.ecobee.com
2015-07-16 05:38:31.370 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 500 Internal Server Error
2015-07-16 05:56:44.589 [ERROR] [g.openhab.io.net.http.HttpUtil] - Fatal transport error: java.net.NoRouteToHostException: No route to host
2015-07-16 06:05:46.213 [ERROR] [g.openhab.io.net.http.HttpUtil] - Fatal transport error: java.net.NoRouteToHostException: No route to host
2015-07-16 06:38:54.775 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 500 Internal Server Error
2015-07-16 06:40:17.868 [WARN ] [ipse.jetty.server.CookieCutter] - java.lang.IllegalArgumentException: Cookie name "Greetz to M, st0n3d, Jorgee, CoLdZeRo and justa" is a reserved token

@watou
Copy link
Contributor Author

watou commented Jul 17, 2015

Hi @milty456 , I don't know for sure, but it would appear that the system on which openHAB is running, or a system upstream to it, has been compromised by some form of malware. Your DNS resolution is failing either due to a temporary situation, or as a result of malware. If I were you, I would quickly attempt to scan your systems for malware. Please feel free to continue discussion on the Google Group if you think there is a problem related to openHAB.

@watou
Copy link
Contributor Author

watou commented Jul 17, 2015

...adding, that the last line of your log may in fact be unrelated to the previous lines, and that your openHAB server is possibly directly accessible to the Internet, and someone is attempting to compromise it. I would carefully consider the security ramifications of making openHAB directly accessible to the Internet. Your openHAB server may not be infected, but it's worth reviewing to make sure.

@milty456
Copy link

So I'm trying to SEND a command to change the thermostat from Openhab. Any idea what I'm missing here? I have an item "EcoBeeSetTemp" and i use this:
sendCommand(EcoBeeSetTemp, 68)
Binding is ecobee and >[xxxxxxxxxx#runtime.desiredCool]

Thanks Log Below

2015-07-18 23:09:36.734 DEBUG o.o.b.e.i.EcobeeGenericBindingProvider[:207]- Processing binding configuration: '>[xxxxxxxxxxxxx#runtime.desiredCool]'
2015-07-18 23:09:40.949 DEBUG o.o.b.e.internal.EcobeeBinding[:510]- About to set property 'runtime.desiredCool' to '68'
2015-07-18 23:09:40.964 ERROR o.o.b.e.internal.EcobeeBinding[:544]- Unable to update thermostat(s)
java.lang.IllegalArgumentException: No bean specified
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:883)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:935)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:456)
at org.openhab.binding.ecobee.internal.messages.Thermostat.setProperty(Thermostat.java:144)
at org.openhab.binding.ecobee.internal.EcobeeBinding.updateEcobee(EcobeeBinding.java:512)
at org.openhab.binding.ecobee.internal.EcobeeBinding.commandEcobee(EcobeeBinding.java:462)

@milty456
Copy link

If i change the binding to
Binding is ecobee and >[xxxxxxxxxx#settings.desiredCool]
the log states it's about to change it, but never does

2015-07-19 00:12:59.586 DEBUG o.o.b.e.internal.EcobeeBinding[:510]- About to set property 'settings.desiredCool' to '68'

@watou
Copy link
Contributor Author

watou commented Jul 19, 2015

Hi @milty456, in order to change the cooling setpoint, you have to set a hold, which is basically the code version of what is described here. The binding examples in the Ecobee-Binding wiki show runtime.desiredCool is an in-binding (as in, you can't tell Ecobee to change its value directly). I will give an example soon on the Google Group thread (but think about how the ecobeeSetHold action would be used). An example rule that uses an action is here.

@milty456
Copy link

Which file do i need and where do i get it; i expect a jar file as usual, but i don't see one. Sorry I'm not too saavy with this stuff...what do i need to do to add the new action bundle for the binding?

Thanks

Rich

@watou
Copy link
Contributor Author

watou commented Jul 19, 2015

Hi Rich, please follow the discussion thread here.

watou added a commit to watou/openhab that referenced this pull request Jul 22, 2015
* mult-ecobees-1-acct-bug (PR openhab#2765)
* ecobee-celsius-arithmetic-exception (openhab#2793)
* ecobee-discard-tokens (PR openhab#2849)
* ecobee-echo-cancellation (PR openhab#2942)
watou added a commit to watou/openhab that referenced this pull request Jul 28, 2015
* mult-ecobees-1-acct-bug (PR openhab#2765)
* ecobee-celsius-arithmetic-exception (openhab#2793)
* ecobee-discard-tokens (PR openhab#2849)
* ecobee-echo-cancellation (PR openhab#2942)
@watou watou deleted the ecobee-discard-tokens branch July 30, 2015 12:53
watou added a commit to watou/openhab that referenced this pull request Jul 31, 2015
* mult-ecobees-1-acct-bug (PR openhab#2765)
* ecobee-celsius-arithmetic-exception (openhab#2793)
* ecobee-discard-tokens (PR openhab#2849)
* ecobee-echo-cancellation (PR openhab#2942)
watou added a commit to watou/openhab that referenced this pull request Aug 23, 2015
* mult-ecobees-1-acct-bug (PR openhab#2765)
* ecobee-celsius-arithmetic-exception (openhab#2793)
* ecobee-discard-tokens (PR openhab#2849)
* ecobee-echo-cancellation (PR openhab#2942)
* changes similar to @teichsta's PR openhab#2967 so actions now appear in Designer; moved messages package out of internal; made ecobeeSetHold temp paramter truly optional.
watou added a commit to watou/openhab that referenced this pull request Aug 26, 2015
* mult-ecobees-1-acct-bug (PR openhab#2765)
* ecobee-celsius-arithmetic-exception (openhab#2793)
* ecobee-discard-tokens (PR openhab#2849)
* ecobee-echo-cancellation (PR openhab#2942)
* changes similar to @teichsta's PR openhab#2967 so actions now appear in Designer; moved messages package out of internal; made ecobeeSetHold temp paramter truly optional.
* Quiesce logging when network failure keeps a poll from completing.
paolodenti pushed a commit to paolodenti/openhab that referenced this pull request Sep 28, 2015
* mult-ecobees-1-acct-bug (PR openhab#2765)
* ecobee-celsius-arithmetic-exception (openhab#2793)
* ecobee-discard-tokens (PR openhab#2849)
* ecobee-echo-cancellation (PR openhab#2942)
* changes similar to @teichsta's PR openhab#2967 so actions now appear in Designer; moved messages package out of internal; made ecobeeSetHold temp paramter truly optional.
* Quiesce logging when network failure keeps a poll from completing.
paolodenti pushed a commit to paolodenti/openhab that referenced this pull request Oct 1, 2015
* mult-ecobees-1-acct-bug (PR openhab#2765)
* ecobee-celsius-arithmetic-exception (openhab#2793)
* ecobee-discard-tokens (PR openhab#2849)
* ecobee-echo-cancellation (PR openhab#2942)
* changes similar to @teichsta's PR openhab#2967 so actions now appear in Designer; moved messages package out of internal; made ecobeeSetHold temp paramter truly optional.
* Quiesce logging when network failure keeps a poll from completing.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants