![]() |
|
|||||||
| Other mControl Drivers Drivers developed by Embedded Automation but not provided with core mControl installation |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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! |
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
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 |
|
#6
|
|||
|
|||
|
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 |
|
#7
|
||||
|
||||
|
old topic, but now i'm working on a basic mcontrol driver to post messages to twitter.
|
|
#8
|
|||
|
|||
|
Let's collaborate on this!
|
|
#9
|
||||
|
||||
|
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. |
|
#10
|
||||
|
||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|