Externally updating MLServer Variables

Place to post your ideas and questions on how to integrate Cinemar's software in a Home Automation System (lighting, security, hvac, etc.)
jeffdoo
Intermediate
Intermediate
Posts: 329
Joined: Sat Aug 25, 2007 9:19 pm
Location: Huntersville, NC
Contact:

Externally updating MLServer Variables

Postby jeffdoo » Sun Mar 09, 2014 5:45 pm

Hopefully this is the right location.....

I would like to "read" a text file on a periodic basis and update the variables in MLServer. Right now for one solution I have a hack in place where I convert the XML into HTTP calls and push the file through CURL to update the weather forecast every hour via Weather Underground. I don't think this solution is working and I know Dave commented there are better ways a long time ago. The other file is a simple CSV file where I could like to read either the first/last line and again update MLServer.

So what is the best method to update MLServer?

Thanks!

- Jeff

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Externally updating MLServer Variables

Postby CinemarDave » Sun Mar 09, 2014 6:49 pm

For my info what weather information is the Weather Underground giving you that is not in the Intellicast feed?

Options:

1) You could write a native V4 device driver. We can provide a sample.

2) Have your software launch MLServer.exe and pass a valid MLServer command as a parameter. e.g. "c:\program files (x86)\Cinemar\MLServer\MLServer.exe" "SetVariable|Hello~World"

3) Send the command in through the system web interface e.g. http://<<serverip>>:6246/command?SetVariable|Hello~World

4) Open a Telnet connection to the server and pump in MLServer commands directly.

jeffdoo
Intermediate
Intermediate
Posts: 329
Joined: Sat Aug 25, 2007 9:19 pm
Location: Huntersville, NC
Contact:

Re: Externally updating MLServer Variables

Postby jeffdoo » Tue Mar 11, 2014 9:18 pm

CinemarDave wrote:For my info what weather information is the Weather Underground giving you that is not in the Intellicast feed?


I have a weather station registered with Weather Underground so I get the feeds for free. Are they better than Intellicast, no idea, but I know it is some what tailored to my location and I've had a solution in place for years. Plus I pull the XML and do some string transformations with XSL so the text-to-speech is a little more human when delivering the weather forecast (ie; "MPH" is "miles per hour", "SW" is "southwest", etc). Not having this working right now is probably the biggest complaint from the family.

Options:

1) You could write a native V4 device driver. We can provide a sample.

2) Have your software launch MLServer.exe and pass a valid MLServer command as a parameter. e.g. "c:\program files (x86)\Cinemar\MLServer\MLServer.exe" "SetVariable|Hello~World"

3) Send the command in through the system web interface e.g. http://<<serverip>>:6246/command?SetVariable|Hello~World

4) Open a Telnet connection to the server and pump in MLServer commands directly.


I will have to go back in look at the http statements again. I know right now I was pushing it through the web interface but something is not happening properly, here is a statement as an example, pushed through CURL on the windows 7 machine:

Code: Select all

"http://localhost:2080/MLCMD?SetVariable|my_weather_forecast_0_detail_day~Tuesday"
"http://localhost:2080/MLCMD?SetVariable|my_weather_forecast_0_detail_text~Clear. High of 82. Winds from the southwest at 5 to 10 miles per hour."
"http://localhost:2080/MLCMD?SetVariable|my_weather_forecast_0_detail_icon~clear"
"http://localhost:2080/MLCMD?SetVariable|my_weather_forecast_1_detail_day~Tuesday Night"
"http://localhost:2080/MLCMD?SetVariable|my_weather_forecast_1_detail_text~Partly cloudy in the evening, then overcast with a chance of rain. Low of 57. Winds from the south southwest at 5 to 10 miles per hour."
"http://localhost:2080/MLCMD?SetVariable|my_weather_forecast_1_detail_icon~partlycloudy"


But, I am thinking I would prefer the telnet interface or (maybe) native v4 device driver.... With the telnet interface I could whip it up in Java although I am a bit rusty at the moment

Thanks!

- Jeff

shakey
Intermediate
Intermediate
Posts: 285
Joined: Sat Jun 28, 2008 9:55 pm
Contact:

Re: Externally updating MLServer Variables

Postby shakey » Fri Jun 06, 2014 3:06 pm

Just remember the telnet interface also sends every variable change out also. Traffic load can be high.


Return to “Home Automation”

Who is online

Users browsing this forum: No registered users and 2 guests