Jump to content

Vera Home Automation Plugin (Emby Vera)


Recommended Posts

Posted

Ops! It looks like visual studio went ahead and references "Visual Basic" namespace again...

 

I'll be in touch.

  • Like 1
Posted

Hi

I've been following vaguely ;)  - but does seem strange not sure relates to dependencies?

I notice that RottenTomatos also running as Plugin on the Mono system - does this work?

 

 

using System;   using System.Collections.Generic;   using System.Globalization;   using System.IO;   using System.Linq;   using System.Threading;   using System.Threading.Tasks;

 

Above are the using from the RottenTomatoes Code - if it works think can rule some of those dependencies as issue?

 

?Vb.net issue

 

@fantaxp7

Could you try the following dll Plugin (which is my one for FrontView+ in c# and creates a few new APIendpoints) but also uses quite a few dependencies.

Should get Plugin settings page, select client and should generate Xml.

If this one works may be useful at narrowing down issues - may be specific vb.net issue?

 

Glenn

 

MediaBrowser.Plugins.FrontView.zip

  • Like 1
Posted

I think you are right, it is Visual Basic. There is no reference in the code, but the dll must somehow compile using the dependency because that is the language.

 

I wonder if I can convert the whole plugin to c#...

Posted

Its a compiled language (so isn't needed) - would have thought that is possible to turn off.

Checking now...

  • Like 1
Posted

Good find. I'll try the commandline options and see if it helps when building the dll.

 

Luckily I went through and removed all of the vb6 style code so there shouldn't be any errors in the compile.

Posted

I wonder if every class has to have the "NoVBRuntime" property in it?

 

This is super interesting stuff.

 

Going to have to test a bunch of possibilities.

  • Like 1
Posted (edited)

Okay this is kind of wierd.

 

I am using visual studio 2012, with resharper installed.

It is running on Windows 8.1.

 

The namespace "NoVBRuntimeReference" doesnt exsist in MIcrosoft.Build or in any sub class.

 

Upon further investigation I found out that you can manually add the property to the vbproj file as a node in the XML. Then reload the project with that node enabled.

 

somethinh else popped up in my solution. There are Global VisualBasic references in the setting portion of the solution... Hopefully that doesn't create any problems because I am not using the settings in visual studio; instead we use the emby configuration file to save information.

 

Blah, blah coding... Technical jargon... Lol.

Edited by chef
Posted (edited)

Totally OT - but every time I read this thread title, the following lyrics play in my head:

 

Vera, Vera...

Edited by AdrianW
Posted (edited)

And upon even more testing, I can confirm that adding the "NoVBRuntimeReference" is a bad idea. It completely disables the compiler.

 

But if @@fantaxp7 would try this version, which removes any global references to "VisualBasic"  which show up in resources in the compiler:

 

https://dl.dropboxusercontent.com/u/46151346/SampleProject/SampleProject/bin/Debug/Vera%20Smart%20Home%20Automation.zip

Edited by chef
Posted (edited)

I am starting to hate VisualBasic. The Compiler will always grab the reference when building the DLL. Even If I use a Command Line with MSBUILD.

 

I'm afraid that we might have to accept that this plugin won't be cross platform in the state it is in. VB.net wasn't a good choice of languages to use.

Edited by chef
Posted

And upon even more testing, I can confirm that adding the "NoVBRuntimeReference" is a bad idea. It completely disables the compiler.

 

But if @@fantaxp7 would try this version, which removes any global references to "VisualBasic"  which show up in resources in the compiler:

 

https://dl.dropboxusercontent.com/u/46151346/SampleProject/SampleProject/bin/Debug/Vera%20Smart%20Home%20Automation.zip

No luck 

Posted

I started to convert this plugin to c#. I started about three hours ago. I have fixed 35 of the 96 errors which didn't convert properly.

 

Luckily it is the weekend and I can hopefully have it built.

Posted (edited)

I did it! @@fantaxp7 ! it took me all day to learn C#. But i did it. Slayed the mighty beast!

 

Here is a version which is built in C#.

 

It will create a configuration XML and fill in the data. There is no HTML configuration yet, but that is easy because I have become good enough at this stuff.

 

Please test this CS version of the plugin and report back!

 

https://dl.dropboxusercontent.com/u/46151346/MiOSEmbyZWaveControllerCS/MiOSEmbyZWaveControllerCS/bin/Debug/MiOSEmbyZWaveControllerCS.zip

Edited by chef
Posted (edited)

This one has a fully functioning Configuration UI attached to the C# code which is nice.

 

However I am not sure how the event arguments working out. I gotta check those next.

 

@@fantaxp7 I would love to know if this works for you.

 

The only HTML problem is that the Device List doesn't populate you have to press the "Refresh Devices" Button.

 

https://dl.dropboxusercontent.com/u/46151346/MiOSEmbyZWaveControllerCS/MiOSEmbyZWaveControllerCS/bin/Debug/MiOSEmbyZWaveControllerCS.zip

Edited by chef
Posted

This one has a fully functioning Configuration UI attached to the C# code which is nice.

 

However I am not sure how the event arguments working out. I gotta check those next.

 

@@fantaxp7 I would love to know if this works for you.

 

The only HTML problem is that the Device List doesn't populate you have to press the "Refresh Devices" Button.

 

https://dl.dropboxusercontent.com/u/46151346/MiOSEmbyZWaveControllerCS/MiOSEmbyZWaveControllerCS/bin/Debug/MiOSEmbyZWaveControllerCS.zip

:)

  • Like 1
Posted

Just to clarify that smile is a "we're back in business smile" 

 

So glad you were able to figure it out. 

 

Thanks for not giving up! 

  • Like 1
Posted

A few notes, @@chef

 

1. I selected a device, set up the scenes I wanted, then when I went to hit save I noticed that the save bar was completely gray.

2. After hitting save and coming back later to I don't see the device as setup and saved. 

 

Thanks

Posted (edited)

A few notes, @@chef

 

1. I selected a device, set up the scenes I wanted, then when I went to hit save I noticed that the save bar was completely gray.

2. After hitting save and coming back later to I don't see the device as setup and saved.

 

Thanks

Okay, I may have to look at the save button, because I ran into trouble with it as well and did a quick re-code which wasn't completely tested.

 

Does the configuration xml get written and saved too?

 

 

C# is better, I am glad this has worked out. If anything, it has forced me to catch up with the rest of the coders out there.

 

This is just the begining.

 

We need to change the plugin name as well.

 

"MiosZwavecontroller" will leave any doubt from the last plugin behind it.

 

This is great, we have a Cross platform utility, with "pause/unpause" events working (thanks to @@GlennNZ ).

Edited by chef
Posted

Okay, I may have to look at the save button, because I ran into trouble with it as well and did a quick re-code which wasn't completely tested.

 

Does the configuration xml get written and saved too?

 

 

C# is better, I am glad this has worked out. If anything, it has forced me to catch up with the rest of the coders out there.

 

This is just the begining.

 

We need to change the plugin name as well.

 

"MiosZwavecontroller" will leave any doubt from the last plugin behind it.

 

This is great, we have a Cross platform utility, with "pause/unpause" events working (thanks to @@GlennNZ ).

Yes it did get written. Or at least written too by looking at the date, it has the old name not MiosZwavecontroller it so it could have been left over?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...