openhab / openhab-alexa

openHAB skill for Amazon Alexa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add new regional settings service pid support

jsetton opened this issue · comments

The regional settings service pid changed in openHAB 2.5 from org.eclipse.smarthome.core.i18nprovider to org.eclipse.smarthome.i18n

openhab/openhab-core#1112

@digitaldan since we need to have backward compatibility, do you have any idea how we can support this without doing two api calls?

@digitaldan I just pushed a PR for this one. The discovery process has now an extra service config api call for the new pid support. It's an async call so it shouldn't affect much the overall execution since the get all items call is most likely the longest to complete. I am going to merge it for now and release to live skill. If you feel, there is a better solution to resolve this one, let me know.

@digitaldan my reverse proxy is configured to allow only the necessary api calls from aws lamda to the backend. that means during discovery first a api call to the old url is done and my nginx replies a 403.
Is it possible to do the api call to the new url first and if it fails do a call to the old url?
thx!

@oeiber It would take additional execution time, on every discovery requests, to do two consecutive calls compared to the current asynchronous implementation. Our main goal is to keep that time as low as possible from AWS resources cost perspective. Out of curiosity, is there any reason why you can't allow both urls?

@jsetton ok. i understand. sure its possible to allow both urls. but from your perspective wouldn‘t it be more useful to add oh‘s version to config.js to avoid the 2nd api call?

but from your perspective wouldn‘t it be more useful to add oh‘s version to config.js to avoid the 2nd api call?

While it might work for the private setup, we can't get that information ahead of time from the users of the official skill.

@jsetton sorry i missed this, sounds good.

@oeiber with the change part of #366, your wish has actually been granted! 😄