Bug: Plugin not working in existing project, only in new project

Hello,

I’ve created plugin for openhab and tested it out on an empty fresh .hrp project where it worked perfectly. When I was finished I decided to import the plugin into my existing HomeRemote project. So I added the plugin and it called “onConnect” and “OnDisconnect” (I have log messages there) just fine but the plugin is missing “SynchronizeDevices” menu option completely and it also did not generate the devices upon adding the plugin which normally happens see picture below:

broken project

Unfortunately I still cannot upload any attachment (so plugin or hrp file) as I’m classified as new user :frowning:

Designer: 3.4.1.0

Open the Advanced Settings dialog & make sure Is Legacy is unchecked. That will hide the Sync option. My guess is that’s why you’re not seeing it.

I definitely want you to share this plugin with the community. I went ahead & manually upgraded your trust level to Basic User. You should be able to upload now.

Hi Bill,

Yes that solved the problem. I unchecked the is Legacy and now sync option is there. But just a quick question on this? Should Legacy not prevent plugins at all, I mean what’s the point of beeing able to add a plugin but not using it?

I will share the plugin once’s it’s thorougly tested. It uses HTTPClient to connect to OpenHAB2’s REST API. Probably in a week or so.

The legacy setting switches between using Device objects & the old Variable way of doing things. Yes, since Variables are not available for Plugins, the ability to add a Plugin probably shouldn’t be available for legacy projects.

Sounds good!

A quick update for people tracking this thread. The plugin is now available in the plugin section