Logs modified in the openHAB2 Eclipse IDE plugin(Philips Hue) is not printing in the console

Hi,
I am trying to build a binding for Vstarcam. I am new to openhab. I just did some of the stuffs like controlling philips hue lights by using already existing binding. Also controlled remotely by both myopenhab org server and also by my own server.
And referring this video openHAB 2 - Getting Started with Binding Development created my own test binding. But without any controls added in plugin, i mean no items, no scanning code, no control UI i have defined for developed binding.
Later i was trying to modify Philips Hue controller code like scanning code written for Philips Hue modifying that to scan and Discovery of Vstarcam. But Changes i am making are not reflecting in UI. I mean i tried hard code IP address of Philips Hue to custom IP address (say just for play around).
But i didn’t get it. Later i modified the existing logs, but it is not printing modified log. :tired_face:
Please suggest me where i am doing wrong? I tried with

System.out.println() 
logger.info()
logger.debug() 
logger.error(). 

But no new logs getting printed. Please help.

Also i need some guidance to start plugin/binding development. I know concepts like things,items,channel,sitemap but no much experience.

  1. Is openHAB1 is required to learn before start working with openHAB2?
  2. Is Eclipse Smart Home Designer is different from openHAB2 eclipse IDE? Is it like Eclipse Smart Home Designer for openHAB1.x and openHAB2 eclipse IDE for openHAB2
  3. Please suggest me the way to learn and start plugin development.

Thanks

I can’t help with specifics of your problem but I can say:

  1. No and the architecture is vastly different
  2. Eclipse SmartHome is the core of openHAB 2. If you are writing a binding you will be working with Eclipse SmartHome APIs and libraries. Eclipse SmartHome Designer is the equivalent of openHAB Designer for openHAB 1.8. It is used for editing openHAB (or Eclipse SmartHome) configs
  3. The docs:

http://docs.openhab.org/developers/
https://eclipse.org/smarthome/documentation/index.html

But above all that, you must have a better understanding of the OH and ESH architecture and how it is configured and used. See

http://docs.openhab.org/tutorials/beginner/index.html
http://docs.openhab.org/introduction.html
http://docs.openhab.org/concepts/index.html

Most probably you aren’t running bundle from your workspace but from target platform. You can change this from IDE, Debug configuration…->Plug-ins tab->Type filter: hue and change hue bundle from workspace rather than target platform.

While running/debugging even i was selecting hue plugin but i was not able to get modified logs or even i was not able see modified output. But below mentioned stuffs worked for me.

Since i wanted to study how binding works i.e, by modifying the code and debugging i chose hue binding. And

  1. Made a copy of hue project and renamed it.
    from org.eclipse.smarthome.binding.hue to org.eclipse.smarthome.binding.hue_copy
  2. And made changes in .project and pom.xml files
In .project
<name>org.eclipse.smarthome.binding.hue</name> to <name>org.eclipse.smarthome.binding.hue_copy</name>

And in pom.xml i modified artifactId 
<artifactId>org.eclipse.smarthome.binding.hue</artifactId> to <artifactId>org.eclipse.smarthome.binding.hue_copy</artifactId>

and in  META-INF/MANIFEST.INF file changed from
Bundle-Version: 0.9.2.qualifier to
Bundle-Version: 0.9.2.qualifier_copy

Changing Bundle-Version in MANIFEST.INF file will helps in selecting plugin during debug/run as given below


3. Imported project and started debug.

It worked for me.

Thank you all for your support.

Not sure what was wrong last time. But Pali’s suggestion also started working for me now.

Most probably you aren’t running bundle from your workspace but from target platform. You can change this from IDE, Debug configuration…->Plug-ins tab->Type filter: hue and change hue bundle from workspace rather than target platform.

May be i was just right clicking and Running. And later i may selected wrong plugin.
Now i tried to modify org.eclipse.smarthome.io.rest
It was not effecting until i check/select that plugin in Debug configuration. After selecting it started working for org.eclipse.smarthome.io.rest

Anyhow. Thanks everyone for your support.

I found exact reason for my problem now.
There are two category of plugins

  1. Workspace plugin
  2. Target platform plugin

I selected second one - Logs modified in workspace will not effect in Target platform plugin i.e, In Console

So, selecting/checking Workspace plugin solved my problem. :slightly_smiling_face:

And what did I wrote :wink:

You are right. Frankly speaking, I didn’t try your solution :stuck_out_tongue: :grimacing: because i was having unknown solution which was working.
[unknown solution : is copy and paste and running a newly created project, i have selected from workspace project. It worked.]
So i didn’t try any alternatives.

Yes your answer is actual solution. I just added a pic to explain it.
Thanks.