Embedded Automation Forum  

Go Back   Embedded Automation Forum > mHome Products > mControl Software Integration > Other mControl Drivers
Forums FAQ Members List Calendar Search Today's Posts Mark Forums Read

Other mControl Drivers Drivers developed by Embedded Automation but not provided with core mControl installation

Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2009, 04:53 PM
martijn martijn is offline
Junior Member
 
Join Date: Nov 2008
Posts: 22
Lightbulb DRIVER: Twitter.com integration.

This morning I was thinking of a new mControl driver feature that would be able to send mControl updates via twitter. (and possibly in the future accept twitter messages to switch devices on and off)

Ideally this functionality would have to be built into mControl but think implementing it as a driver is the best way. Activating this feature would only require activation of the driver and a twitter username / password field in the settings tab of the mControl Add-In.

Control wise I think it would be best if there is a list of all devices and macros with a check-box next to them. All status changes to checked devices are then sent to twitter as status updates.

I think the only one that can add this type of functionality to mControl is Ted but it should also be possible to implement this functionality as a 3rd party driver but will need some help programming.

I have included the current code snippet I use for sending twitter updates via an ASP page on my server. If someone (or something) hits the URL for this web page a message is sent to the twitter account specified in the script. As you can see, it is only a simple http POST request so (that is the beauty of Twitter btw) modifying this .asp vbscript to a mControl driver should not be to complicated to do for a skilled programmer?

Anyway, let me know. mControl is one of the few home automation add-ins available but could really benefit from twitter integration. I am sure there will be countless of other WHS owners that will want use use mControl once they find out they can get twitter updates on their computer, phone, pda, retro style GSM, etc.

The .asp code is here. Could some skilled brain have a look at this and see if this functionality can be added to mControl in one way or the other? I would be most grateful.

<%
'
' UPDATE TWITTER
' **************
'
' Author: Martijn Wismeijer
' Date: 2009-01
' twitter: www.twitter.com/twiet
'
'
Dim xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")

twitter_user = "twitterusername"
twitter_pass = "twitterpassword"

new_status = "mControl: Hello world!"

xml.Open "POST", "http://" & twitter_username & ":" & twitter_password & "@twitter.com/statuses/update.xml?status=" & server.URLencode

(new_status), False
xml.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
xml.Send

Set xml = Nothing

%>

Thanks!
Reply With Quote
  #2  
Old 02-27-2009, 07:54 PM
katrash katrash is offline
mControl Dev. Team
Site Admin
 
Join Date: Dec 2005
Location: Langley, BC, Canada
Posts: 568
Default

This is best achieved by a driver. You can tweak the weather driver (from scruzfreak) and enable it to communicate with twitter webservice instead of the weatherunderground then handle the response as you like.
Reply With Quote
  #3  
Old 03-01-2009, 02:06 PM
martijn martijn is offline
Junior Member
 
Join Date: Nov 2008
Posts: 22
Default

I have converted this script to.vbs and will run it through a macro. This will be enough for my current project but ideally it should be a driver.

I'm having some problems with running the script because it requires network access and is run under the system context.
Reply With Quote
  #4  
Old 03-18-2009, 11:01 PM
scruzphreak scruzphreak is offline
Senior Member
 
Join Date: Jun 2006
Posts: 318
Default

Martijn,

This is really interesting.

Does your driver send messages via twitter, or monitor messages via twitter? If it sends messages, how will you send messages to the new driver?

If it monitors twitter and does things, how do you imagine that security would work?

-ms
Reply With Quote
  #5  
Old 04-14-2009, 10:35 PM
Ted Singh's Avatar
Ted Singh Ted Singh is offline
Senior Member
Site Admin
 
Join Date: Nov 2005
Posts: 1,108
Default

martijn,

I really like this idea - give me some time and let's see if I can't write a small driver for this. At first, my goal is to send messages to Twitter (e.g., as a macro action).

Ted
Reply With Quote
  #6  
Old 04-15-2009, 05:08 AM
scruzphreak scruzphreak is offline
Senior Member
 
Join Date: Jun 2006
Posts: 318
Default

Ted,

How would you send a message to the driver from a macro? Or would you have a set of pre-programmed messages and the macro could pick one?

-ms
Reply With Quote
  #7  
Old 01-18-2012, 06:37 AM
gjniewenhuijse's Avatar
gjniewenhuijse gjniewenhuijse is offline
Senior Member
 
Join Date: Jan 2008
Posts: 177
Default

old topic, but now i'm working on a basic mcontrol driver to post messages to twitter.
Reply With Quote
  #8  
Old 01-18-2012, 07:49 AM
scruzphreak scruzphreak is offline
Senior Member
 
Join Date: Jun 2006
Posts: 318
Default

Let's collaborate on this!
Reply With Quote
  #9  
Old 01-18-2012, 09:40 AM
gjniewenhuijse's Avatar
gjniewenhuijse gjniewenhuijse is offline
Senior Member
 
Join Date: Jan 2008
Posts: 177
Default

Quote:
Originally Posted by scruzphreak View Post
Let's collaborate on this!
good idea

i have a working example now in c#, only thing todo is to set it in a mControl driver and we can post updates. I think the best way is that i make a very basic driver post it on the forum, then we can look for extra functionality.
Reply With Quote
  #10  
Old 01-20-2012, 07:54 PM
gjniewenhuijse's Avatar
gjniewenhuijse gjniewenhuijse is offline
Senior Member
 
Join Date: Jan 2008
Posts: 177
Default

So i have a working version for mControl v3 but there is a limitation in mControl that all post to twitter are in uppercase.

I'm waiting on support how i can get input that is not automatically converted to uppercase.

I have also a pre pre pre alpha version of a facebook driver. After posting the twitter driver i can work on the facebook driver.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:48 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.