Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major code refactoring #394

Merged
merged 1 commit into from
Nov 9, 2021
Merged

Major code refactoring #394

merged 1 commit into from
Nov 9, 2021

Conversation

jsetton
Copy link
Collaborator

@jsetton jsetton commented Jul 9, 2021

Fixes: #390, Fixes: #391

Changes

  • introduced new item configuration syntax using device metadata concept
  • added new device capabilities for camera, door/window covering, fan, networking and vacuum
  • improved security arm state error handling
  • added input custom mappings support
  • added playback stop and thermostat hold/fan capabilities support
  • added new custom asset ids and semantic extensions
  • added switch support to mode generic capability
  • improved dimmer/rollershutter support for range value generic capability
  • updated test suite increasing code coverage
  • added support for ask-cli v2 using cloudformation deployer
  • improved ci integration with automated production release deployment
  • added github action to update repository locales on crowdin changes
  • deprecated item sensor concept for decouple state support on specific capabilities
  • removed item tag support for oh3.x
  • removed alexa smarthome api v2 support

@jsetton jsetton requested a review from digitaldan July 9, 2021 22:37
@jsetton
Copy link
Collaborator Author

jsetton commented Jul 9, 2021

As side notes, this change includes the support for the KeypadController interface but I wasn't able to get it working during my testing. I have a support ticket opened with the Alexa developer support team but I haven't got any response for couple weeks now.

Also, since I don't own an echo device with a display 😄 , I wasn't able to properly test the support for the CameraStreamController interface.

@jsetton jsetton force-pushed the refactor branch 17 times, most recently from 5a6b338 to 53ed32f Compare July 14, 2021 23:13
@jsetton jsetton force-pushed the refactor branch 4 times, most recently from 3013481 to 6f7c80b Compare July 23, 2021 14:00
lambda/openhab/index.js Outdated Show resolved Hide resolved
@jsetton jsetton force-pushed the refactor branch 2 times, most recently from 4795bb5 to 13a527e Compare July 29, 2021 20:21
@digitaldan
Copy link
Collaborator

Since your last commit, i have not seen any issues, this is using a pretty extensive amount of devices and configurations. The "Blind" endpoint also work nicely. I have not yet spent time getting the camera endpoints up, our IPCamera binding uses a IP port per camera, which really complicates things. Otherwise this PR looks really really good!

@jsetton
Copy link
Collaborator Author

jsetton commented Aug 2, 2021

I have not yet spent time getting the camera endpoints up, our IPCamera binding uses a IP port per camera, which really complicates things.

That's the reason I mentioned about the complexity in the usage documentation. Using NGINX, you would configure a HLS stream as follow.

Different subdomains for each camera:

server {
  listen 443 ssl;
  server_name cam1.myserver.com;

  ssl_certificate cam1.myserver.com.crt;
  ssl_certificate_key cam1.myserver.com.key;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

  auth_basic Restricted;
  auth_basic_user_file htpasswd;

  location / {
    proxy_pass http://127.0.0.1:54321;
  }
}

Different location for each camera under a single subdomain:

server {
  listen 443 ssl;
  server_name openhab.myserver.com;

  ssl_certificate openhab.myserver.com.crt;
  ssl_certificate_key openhab.myserver.com.key;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

  auth_basic Restricted;
  auth_basic_user_file htpasswd;

  location / {
    proxy_pass http://127.0.0.1:8080;
  }

  location /cam1/ {
    proxy_pass http://127.0.0.1:54321/;
  }

  location /cam2/ {
    proxy_pass http://127.0.0.1:54322/;
  }
}

Otherwise this PR looks really really good!

Thanks 😄 Are you good with the new syntax? If so, I will make an announcement on the community forum asking for some feedback and starting a beta test.

@digitaldan
Copy link
Collaborator

I think we are good for a beta test for sure !

Fyi, i just found an issue where one of my items was not discovered , it's using the existing syntax. I have not spent any time debugging why yet, i'll look this week when i have a sec. here's the item in case its clear to you:

String GDSDrivewayGateSwitch "Front Gate" {channel = "grandstreamgds:gds:c074ad335323:dooropen", alexa="ToggleController.toggleState" [category="DOOR", friendlyNames="@Setting.Opening", actionMappings="Close=CLOSE,Open=OPEN", stateMappings="Closed=CLOSED,Open=OPEN"]}

@jsetton
Copy link
Collaborator Author

jsetton commented Aug 3, 2021

Fyi, i just found an issue where one of my items was not discovered

ToggleController.toggleState doesn't support String item type. I am surprised it was getting discovered before. It should have been ModeController.mode instead. On a side note, what binding are you using on this item? I can't seem to find it on the openHAB addons website.

* introduced new item configuration syntax using device metadata concept
* added new device capabilities for camera, door/window covering, fan, networking and vacuum
* improved security arm state error handling
* added input custom mappings support
* added playback stop and thermostat hold/fan capabilities support
* added new custom asset ids and semantic extensions
* added switch support to mode generic capability
* improved dimmer/rollershutter support for range value generic capability
* updated test suite increasing code coverage
* added support for ask-cli v2 using cloudformation deployer
* improved ci integration with automated production release deployment
* added github action to update repository locales on crowdin changes
* deprecated item sensor concept for decouple state support on specific capabilities
* removed item tag support for oh3.x
* removed alexa smarthome api v2 support

Signed-off-by: jsetton <jeremy.setton@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separated by spaces channels aren't discovered by alexa Separate Label
2 participants