Closed swaner closed 9 years ago
hi @swaner, this still seems to be a bit unclean. I'll try to apply your modifications manually on my local copy whenever I'll get a chance to do it.
Hi @swaner , latest HG is now supporting loadable interface drivers. So these can be packed into a zip file (with all required depndencies) an then imported from HomeGenie Configure->Interface Settings page. You can reuse the code without changing anything. See an example here: https://github.com/genielabs/MIG-WeecoBoard Basically all you have to do is move your files into a stand-alone project with MIG.dll referenced and few files to add. One in particular is the "configlet" which is the html code that is displayed in the settings page for enabling/disabling the interface or changing options (if any). Feel free to ask for support if you decide to go ahead with this. I'll also add a link to the driver in HomeGenie site, so people can download and import it.
Hi @genielabs , great news. I tried but failed :(. But when I copied the files manually I got it to work! It was only one minor problem that caused it to fail. I got the following error when debugging: Zip file could not be unzipped with the error message (line 369 in Utility.cs): A first chance exception of type 'System.ArgumentException' occurred in WindowsBase.dll Additional information: An item with the same key has already been added.
You can download the zip file at: http://1drv.ms/1Hj8k3J
hi @swaner try surrounding this line with a try..catch
https://github.com/genielabs/HomeGenie/blob/master/HomeGenie/Service/Utility.cs#L394
anyway, the zip file should also contain all dependecies (eg. .dll/.so library files needed for this to work). You can so create different zip packages for the various platforms (eg. windows, linux64, raspbery...). All files must be present in the root of the archive, no subfolders allowed.
g.
Here is my new pull request. I checked out the latest code and did the changes line by line. When looking at the diff on _systemsettings.js inside VS 2013 everything looks nice (two changes). But in github it replaces a lot of lines. Maybe the line-endings? If you like I can send you the changes for _systemsettings.js and you can just paste it in on two different locations? Or just go with this one?