question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for openhab 1.x

See original GitHub issue

The current implementation only supports items with tags which are not available in OH1. I would suggest the following additional configuration for making items visible to the skill: dedicated groups. Groups are available in OH1 and OH2, so this solution should be independent of the server version.

A preconfigured group could be ‘gAlexa’ or simply ‘Alexa’. When this group is configured in config.js, it can also be changed as desired. We can even allow a configuration of multiple groups so that all items in all groups are collected. Furthermore, the configured groups could also reflect the supported device types of smarthome skills. Examples:

module.exports = {
    //userpass: 'user@foo.com:Password1',
    host: 'my.openhab.org',
    port: 443,
    path: '/rest/items/',

    generalGroups: ['Alexa'], // item type determines capabilities, e.g. percent for dimmers
    switchGroups: ['AlexaLights', 'AlexaSockets'], // allows on/off messages
    temperatureGroups: ['AlexaThermostats'], // allows temperature messages
    percentageGroups: ['AlexaDimmers', 'AlexaRollershutters'] // allows percentage messages
};

What do you think? I already tested switches with OH1 and it seems to work pretty well.

As part of this implementation, the code should be refactored to eliminate duplicate code (oh1.js and oh2.js are almost identical).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
digitaldancommented, Feb 22, 2017

I am closing as OH2 is now GA and we don’t have an elegant way to support OH1

0reactions
paphkocommented, Jan 24, 2017

You’re right, a sitemap would have been a more elegant solution 😃 However, since OH2 is officially released now, I’ll rather concentrate any further work on that release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Latest 1.x Compatibility topics - openHAB Community
Topic Replies Views Activity MQTT v1 Binding ‑ How to install on OH2.5 6 967 June 9, 2022 Use URL to manipulate items in OH2?...
Read more >
1.X bindings not shown - Installation - openHAB Community
Afterwards, I enabled remote repos and legacy bindings in the Paper UI. However, the bindings-list is only showing the 2.1 bindings. Console ...
Read more >
We need your help on testing! - 1.x Compatibility
I have tried my very best to fix the most critical issues in openHAB 2 and its compatibility layer. There is already a...
Read more >
Removal of the OH 1.x Compatibility Layer - Development
The main concept of openHAB is the eventbus. This is true for OH1 as well as OH2. As soon as any command/state ends...
Read more >
Installation Overview | openHAB
Install Visual Studio Code (opens new window) and the openHAB VS Code Extension on your local machine, to manage your (remote) configuration files....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found