Luup plugins in UI3 - what's wrong?

Just upgraded Vera to UI3… Created a device from my own plugin code working in UI2 - device is there, variables/fields are there, but it has no buttons or other controls.

What am I missing?

Hard to say without seeing any code… but in general UI3 is more picky at the time of matching custom interfaces with device types. Be sure to declare the correct service file, and use the right DeviceType in the “Create Device” screen.

Well the code part is easy

It’s a binary switch from UI perspective, any tips what to check?

@everyone here:
Is there any user’s Luup plugin that works in UI3?

[quote=“325xi, post:3, topic:165729”]Well the code part is easy

It’s a binary switch from UI perspective, any tips what to check?[/quote]

See [tt]D_BinaryLight1.xml[/tt], it references the [tt]D_BinaryLight1.json[/tt] file for UI. Maybe you can use the same file, or declare your own

Wait a second… So UI3 is NOT backward compatible from Luup perspective?
But isn’t UI2 and UI3 said to be fully inter-replaceable? I don’t recall any references to json in UI2.

Are the changes affecting plugins in UI3 documented anywhere - wiki, documentation, etc?

Yes, it’s the same Luup engine

UI3 allows a plugin to define it’s own dialog panes. You can still use existing ones; but it’s more picky to find the relation between a plugin and a panel style.

The easiest way is to add this


to your definition [tt]xml[/tt]. I just put it under the [tt][/tt] line and got a On/Off switch on the main panel (and a lightbulb icon).

not really… as usual, the quickest is to check what’s already there and copy.

How D_BinaryLight1.json affects UI2? It ignores it, or…?

Added it, now the icon shows indeed.
I used to manipulate Status like below to change the icon between On and Off.

Now it seems to ignore this variable. What is the new way to show the status of binary switch?

I checked the log - Status of SwitchPower1 is changed as expected according to the status of the physical device - but for some reason the icon on UI stays the same.

Even further - after Save, it displays my device in Off state, just as expected. But if I go and click on Off (yes, from Off to Off, not ON) - icon changed to On!