[SOLVED] VS Code: "Resource is not available"

I’m a complete beginner with VS Code but followed BK Hobby’s video tutorial and managed to get up and running quickly. Congratulations to all involved in building the OpenHAB Extension for VS Code! It is huge advance in editing/managing OpenHAB’s configuration files.

I’m using V0.4 of the extension and I’ve encountered one glitch that I don’t know how to fix. I wish to preview a sitemap (called default.sitemap) in BasicUI so I click the OpenHAB icon in the upper-right corner of the editor. The result is an error message indicating “unable to open 'default: resource is not available”. I assume it refers to default.sitemap but it’s unclear to me how to make it “available”.

You’ve come across a recently found issue (as of extension 0.4, the video was made with 0.3.5), which the maintainers are working on. For now, you’ll have to use an external browser to preview your sitemaps.

I’m glad you found the video useful! :wink:

Thank you for your reply and your helpful video! I watched it at least three times to ensure I had configured VS Code correctly (and observe the extension’s features in action). The ability to immediately preview sitemap modifications is a valuable enhancement and I look forward to using it after the maintainers correct the bug.

Although I read about VS Code’s features, seeing them demonstrated in your video helped to make them ‘click’ for me. I’d like to see more about leveraging the usefulness of the OpenHAB extension in VS Code.


This experience has also taught me to check GitHub for issues that might correspond to the problem I’m experiencing!

1 Like

Is this @123 from the Premise forum? Welcome!

Did you make the switch to openHAB?

Thank you!

Yes, I’m that 123; I have been a fan of Premise Home Control since 2008. That’s two years after the company ceased development and released Premise to the public for free.

I don’t foresee switching just yet because of many reasons (Premise’s stability, flexibility, certain device drivers, my long-established familiarity with it, etc). However, I am actively exploring replacement solutions, like OpenHAB, because I foresee the day when it becomes compelling to switch.

Where does OpenHAB currently fit into my home automation system? At the moment, I am using it as a presentation layer for local use and eventually, through MyOpenHAB, remote use.

A few months ago, I added support for MQTT to Premise (leveraging Node-RED). It has opened the door to integration with new devices and other home automation systems, like OpenHAB.

I have developed a converter than exports all devices from Premise Home into an OpenHAB Items file. Location-based Groups are used to represent Premise’s hierarchical structure and functional Groups represent Premise’s device classes (everything in Premise is object-oriented).

So far, I’ve used both HABPanel and sitemaps, for BasicUI, to create modern user-interfaces for Premise. Communication is via MQTT, of course. The diagram below shows how elements from Premise (in its Builder software) are translated into OpenHAB-compliant Groups and Items. I’m still tweaking the converter as I learn more about how sitemaps are rendered in BasicUI.

OpenHAB’s documentation is very good and its community is engaged and helpful. I’ve scoured the forum for solutions and have invariably found them. It was very helpful to study the Items and Sitemaps files posted by OpenHAB users.

I just started openhab as well. This post saved me a few hours of going “what did I do wrong”. Thanks.