Author Topic: OK lets make a list of Australian PLCBUS stuff we want?  (Read 26616 times)

rthorntn

  • Regular Poster
  • **
  • Posts: 25
    • View Profile
OK lets make a list of Australian PLCBUS stuff we want?
« on: February 17, 2008, 11:22:07 am »
Hi,

Below is a thread I started in Users, basically, I would like to know is it possible to poll a device (phidget) using http, parse the results and feed this in to LMCE?

For instance i have three sensors (temp, light, motion) linked to a small wireless computer, I use http and can retrieve the data from the sensors, can I then get this to be useful to LMCE, so for instance I can use the temperature reading to switch on a fan using PLCBUS?

Also does anyone know where we can get Aussie PLCBUS?

Thanks for your time.

Kind Regards
Richard


Phidgets.com compatibility
« on: February 03, 2008, 10:12:16 pm »
   
Hi,

I like the idea of the PhidgetInterfaceKit 8/8/8 for use in home automation, if I buy the following:

PhidgetInterfaceKit 8/8/8
Light Sensor
Motion Sensor
Temperature Sensor

Is there a way I can have Linux Media Centre Edition, read the values for light, motion and temperature?

Linux MCE supports a "Generic Serial Device" and states "For most external devices that are controlled by RS232, USB or Ethernet, you can use GSD (Generic Serial Device)"

And DCE looks like a way to get at data also.

Is it possible to use PhidgetWebService to expose the light, motion and temperature values to telnet for instance?

Any thoughts?

Thanks for your time.

Kind Regards
Richard

caederus Newbie   
Re: Phidgets.com compatibility
« Reply #1 on: February 14, 2008, 05:51:31 am »

I have been using phidgets successfully for many things and I'd love to see them supported by linuxmce.  The most useful and easily adopted in by linuxmce would seem to be the mains relay outputs for lights and the analogue inputs for reading temperature or motion sense, but there are many other possibilities---I've used the RFID tag reader and a relay to unlock my front door and a light sensor and servo motor to control blinds.

I've been making my own control programs with the phidgets.com C library, so if someone could just show me an example of what commands to put in the GSD boxes to read and write values using command-line tools, I'm sure I'd be able to take it from there.  Alternatively, as Richard says, the phidgets.com library also includes a web-based remote API, so if someone could show me an example of how to get GSD to do HTTP GET and POST, I'm sure I'd be able to get that working too.

Thanks,

Robin.


colinjones
Guru
Re: Phidgets.com compatibility
« Reply #2 on: February 14, 2008, 12:46:58 pm »
   Reply with quoteQuote
You can probably get it to work, but will need a driver developed that hooks into the Pluto database and talks to the DCERouter - this is the element that routes all command and event messages around the system. Go to the developers forum and you will see lots of development going on for HA products, they will be very happy to see you if you are prepared to help add another product. You should see lots of code snipets of what they are doing, and the wiki has plenty of info as well.
« Last Edit: February 24, 2008, 08:58:48 am by rthorntn »

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: using http to take a measurement, possible?
« Reply #1 on: February 17, 2008, 06:35:49 pm »
Yes, you can use a GSD. I suggest you look at the Panasonic IP Camera device template. It's a good example for getting stuff with http.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: using http to take a measurement, possible?
« Reply #2 on: February 17, 2008, 11:49:28 pm »
Robin,

Yes, by all means, GSD & the EXTREMELY powerful embedded Ruby programming language can do that.
If you can post a 'sample' message and response, I can get you started...

regards,

Dan

The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: using http to take a measurement, possible?
« Reply #3 on: February 18, 2008, 08:41:48 am »
Robin/Richard, (which is it?)

it is *VERY* easy to implement that.  it's almost a cut & past operation.  I suggest you visit us in the Chat room, and I'll be happy to help.  If you have your lmce up and running, we can even get 'rudimentary' up probably within a couple hours!

Hari's PLCBUS Lights (he's in Germany, I'm in Canada) are a perfect example of that.

from the time I first remote accessed his machine, we had basic 1-way communication within 3 hours.
Bidirectional took a bit longer (couple of weeks), but it's done.
Probably the most hardest part is the Ruby Language.  I, by no means am an expert, but I've now done 2 Home Automation systems (both bidirectional) in linuxmce, and both are working great.

95% of the time, you'll find me in the IRC channel, which you can now access directly from here: http://forum.linuxmce.org/index.php?action=chat
HTH, look forward to meeting you in the IRC.

All the Best,

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

rthorntn

  • Regular Poster
  • **
  • Posts: 25
    • View Profile
Re: using http to take a measurement, possible?
« Reply #4 on: February 18, 2008, 09:56:14 am »
Hari, thanks for the information.

Dan, great stuff thanks for that, I will go ahead and order the following:

PhidgetInterfaceKit 8/8/8
Temperature, Motion and Light Sensors
Force Sensor (to use as a clicker)
Slider (possibly to control volume or light levels)

So the plan would be to use the www.phidgets.com/documentation/Tutorials/PhidgetWebService.pdf to provide temp, motion and light data to LMCE which it could use to dim lights or start a fan in a particular zone through PLCBUS.

I will buy a small wireless system with USB (maybe from pcengines), this will have the sensors attached and the PhidgetWebService running on it, this will be my telemetry box, I may add a webcam that is compatible with http://linux-uvc.berlios.de/.

Phidgets.com are canadian, so I will have to wait a bit until it gets delivered to me in Sydney.

I will come over to the chat when it arrives, thanks again.

Cheers
Richard

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: using http to take a measurement, possible?
« Reply #5 on: February 18, 2008, 08:14:32 pm »
Hey, Richard,

I'm Canadian!

Just looked at their site, looks like LEGO for GEEKS! LMAO
should be no problem to do as you request.. it's just HTTP GET..

See you in the forums!

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

rthorntn

  • Regular Poster
  • **
  • Posts: 25
    • View Profile
Re: using http to take a measurement, possible?
« Reply #6 on: February 18, 2008, 10:31:34 pm »
Hi Dan,

Aye LEGO for geeks :-)

I found some more info:

http://www.phidgets.com/documentation/Tutorials/Phidget_Networking.pdf

and

http://www.phidgets.com/phpBB2/viewtopic.php?p=6843&sid=6536f0d3cab2396efa85b245d4eb5df3

Looking forward to getting my hands on this.

Cheers
Richard

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: using http to take a measurement, possible?
« Reply #7 on: February 18, 2008, 10:49:21 pm »
Richard,

LinuxMCE takes care of the communication for you.
You set up the settings in the device template, specific settings in the device (like serial numbers, etc), and tell lmce if it's a socket connection, serial, USB, whatever.
then, to send information, you call conn_.Send(data). 

When the device sends you data back, lmce fires the CMD350 Process Incoming Data.
You grab the data (be it a web page, socket message, serial stream, doesn't matter), process it, and tell linuxmce what it needs to know with a Command object.

ie cmd = Command.new(from, to, priority, type, id)
to set parameters, you do:
cmd.params_
  • = 'y'

and when your ready to send the command, you do:
SendCommand(cmd)
That fires the command off to DCERouter.

Done.
:)
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: using http to take a measurement, possible?
« Reply #8 on: February 18, 2008, 11:46:27 pm »
Richard,

Sorry to hijack the thread a bit but.....

You mentioned that you are going to control stuff with PLCBUS. Have you got any PLCBUS hardware yet? If so where from? I have been tempted to get some but can't find an Aussie distributor and some of the sites offerring them look a bit dodgy.

I know that there is Australian distributors for the phidgets gear though.

Don't have a link but I am sure that I saw it....

regards
Darren

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: using http to take a measurement, possible?
« Reply #9 on: February 18, 2008, 11:49:54 pm »

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: using http to take a measurement, possible?
« Reply #10 on: February 19, 2008, 12:44:31 am »
The distributer that the contact Hari had, for Australia, was Mox - I contacted them asking about PLCBUS stuff, and they tried to push their entire branded HA solution on me. I told them I was just looking for devices as I had my own system (and explained LMCE) - then they just lost interest, never heard back from them!

rthorntn

  • Regular Poster
  • **
  • Posts: 25
    • View Profile
Re: using http to take a measurement, possible?
« Reply #11 on: February 19, 2008, 07:34:10 am »
Hi Darren, thanks for the link, I have ordered it, worked out $30 AU more locally.

Hi Colin, I was just thinking of ordering the PLCBUS-1141 from http://x10-hk.com/ and something like the PLCBUS-2026U with an aussie plug to hack a demo together initially.

Hi Dan, looks all good.

Anybody any idea where we can get an PLCBUS aussie plugin module?

Thanks everybody for your help.

Cheers
Richard

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: using http to take a measurement, possible?
« Reply #12 on: February 19, 2008, 07:38:37 am »
Sorry Richard, :( I'm in Canada...
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Aussie PLCBUS and using http to take a measurement?
« Reply #13 on: February 19, 2008, 12:59:01 pm »
Hari - are you out there? Could you put Richard in contact with the Chinese distributer, as I know they are making devices for the AU market as well....

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Aussie PLCBUS and using http to take a measurement?
« Reply #14 on: February 19, 2008, 02:17:26 pm »
Hari - are you out there? Could you put Richard in contact with the Chinese distributer, as I know they are making devices for the AU market as well....

ask this guy:
coco_lee2004@hotmail.com

best regards,
Hari
rock your home - http://www.agocontrol.com home automation