Support for openhab 1.x
See original GitHub issueThe 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:
- Created 7 years ago
- Comments:5 (4 by maintainers)

Top Related StackOverflow Question
I am closing as OH2 is now GA and we don’t have an elegant way to support OH1
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.