Jump to content


Photo
- - - - -

Anyone have the .NET SDK for Premise?


  • Please log in to reply
5 replies to this topic

#1 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 2170 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 30 May 2008 - 12:08 PM

Several years ago, PFriedlander created XMLWeather, a .NET-based module that retrieves NOAA weather data. I'm unable to re-compile the source code because it refers to .NET assemblies I don't have:

Motorola.Premise.SYS.ObjectModel
Motorola.Premise.SYS.DriverLib

I have HSDK 2.1 and it comes with a wizard to install some sort of driver-building template in Visual Studio 2005. This wizard won't work for me because I'm using Visual Studio Express 2008 (C#) and it demands the presence of VS2005. I have no idea if this wizard installs the assemblies I need for XMLweather.

Does anyone have the .NET version of the Premise SDK? Or do you know where I can get the required .NET assemblies?

#2 premisesystems

premisesystems

    Newbie

  • Registered
  • Pip
  • 4 posts

Posted 30 May 2008 - 01:16 PM

The .NET SDK was a beta at the time. The code was never finished and never made it into the 2.1 Premise build officially. The .NET SDK also required core Premise code changes in order to function. During the .NET SDK beta, there was an additional core DLL replacement that needed to be done within Premise. The .NET SDK effort was dropped when Premise 3.0 plans were underway since 3.0 was going to be all .NET based. The 3.0 effort was cancelled however.

That being said, it is possible to create a .NET driver as long as you wrap it with COM Interop classes. I.e., on the outside, it appears as a COM DLL (with a GUID and required interface classes). On the inside, it is actually a .NET DLL.

#3 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 2170 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 30 May 2008 - 02:46 PM

Thank you for the quick and highly informative reply. A real shame things didn't go to plan.

I suspect that "wrap it with COM Interop classes" is not the solution to save the XMLweather module. It refers to assemblies that are no longer available. I guess parts of it could be salvaged to create something that communicates via the MiniBroker interface.

#4 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 2170 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 02 June 2008 - 02:40 PM

FWIW, John's XMLWeather Module gets the job done using VBScript. It draws its data from The Weather Channel's XML feed.

Although many sources of XML data are free and anonymous, some are not. For example, Google's Geocoding service requires that you register and acquire a developer account (free). The Weather Channel's XML service requires that you register; your Partner ID and Key must appear in the URL you use to request weather data.

For example:
xoap.weather.com/weather/local/CAXX0301?dayf=5&cc=*&prod=xoap&par=99999999&key=99999999&link=xoap&unit=m
This will get five-days of weather data, in metric units, for Montreal (if you supply a proper partner ID and key).

Although you could use the partner ID and key that are found in the Module's code, be nice to John and get your own. :)

FWIW, The Weather Channel does a decent job of creating a well-structured XML file. For example, you can get the current temperature from a single node in the XML tree. Many XML feeds are designed for RSS and tend to glob everything into one node. For example, Environment Canada's RSS feed puts all of the current conditions into one node titled "description". To get the currrent temperature you have to parse it out.

The Weather Network (another Canadian source for weather data) offers a user-designed Weather Button that provides basic info:
[url="http://btn.weather.ca/weatherbuttons/template7.php?placeCode=CAQC0363&category0=Cities&containerWidth=180&btnNo=&backgroundColor=blue&multipleCity=0&citySearch=0&celsius=C"%20align="top"%20frameborder="0"%20width="180"%20scrolling="no""]http://btn.weather.c...s/templ...="no"[/url]

They also offer an XML Data Feed service but I get the impression that it may not be for free.

You can also get XML weather data from Google Weather ... I believe they use Wunderground.com in North America.

Edited by 123, 02 June 2008 - 02:45 PM.


#5 John in VA

John in VA

    Dedicated Cocooner

  • -=Gold Supporter=-
  • 240 posts
  • Location:Reston, VA
  • Experience:average
  • Software:Premise
  • Tech:INSTEON
  • Audio:Nuvo
  • Video:Windows Media Center
  • CCTV:analog, ip, dvr
  • Phone:Vonage

Posted 03 June 2008 - 11:38 AM

Although you could use the partner ID and key that are found in the Module's code, be nice to John and get your own. :)



Interestingly enough, as long as you don't modify the module code to remove the Weather Channel icon and link, there's no problem using my partner code. TWC's rules basically say you need to display them on the GUI.

-John

#6 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 2170 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 05 June 2008 - 10:18 AM

John, you selfless sonavagun!

I've encountered applications, with embedded partner ID's for other services, that no longer work because the ID's "hit limit" had been exceeded. Too many people ran the app and maxed out the ID's counter. Google's Geocoding service imposes a limit on its partner ID's (albeit a high limit) ... I didn't see one mentioned for TWC's partner ID but I thought it might be a good idea to not ride your coat-tails. :(




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users