Difference between revisions of "XMPPHWFS"

From Fixme.ch
Jump to: navigation, search
m (Sample session: removed useless crap)
m (added image for architecture)
Line 19: Line 19:
 
* GUI can also be implementd as a bot. Simple and clean.  
 
* GUI can also be implementd as a bot. Simple and clean.  
 
* Debugging new hardware is simply done through communication with a human client.
 
* Debugging new hardware is simply done through communication with a human client.
 +
 +
[[Image:Xmpphwfs arch.svg|thumb|XMPPHWFS architecture]]
  
 
XMPPHWFS is meant to replace [http://david.lutolf.net/dt/locmon locmon], which in my opinion was a good idea but is too buggy and impractical. from a recent copy of ''20 minutes'', it seems the industry is also heading towards something alike, only for home robots and social networking. WTF, tell me why your vacuum cleaner should tell all your facebook friends there's a plant in its way.
 
XMPPHWFS is meant to replace [http://david.lutolf.net/dt/locmon locmon], which in my opinion was a good idea but is too buggy and impractical. from a recent copy of ''20 minutes'', it seems the industry is also heading towards something alike, only for home robots and social networking. WTF, tell me why your vacuum cleaner should tell all your facebook friends there's a plant in its way.

Revision as of 22:55, 11 January 2012


Under the barbarian name of XMPPHWFS stands the following idea:

hardware IOs made available on a fuse filesystem through xml messaging protocol

and imagine doing stuff like

garage_temp = myHome/garage/temperature
garage_heat = myHome/heating/pump1

if (( $garage_temp < 2 ))
then
 echo 1 > $garage_heat
fi

the above example is crappy, because it would be better done with the event-driven interface that must be included. I propose sending all events to a bot, maybe event-master by default. This bot should then do what is needed with the event. For large systems, devices can communicate with specialized bots.

  • The Fuse inteface should also be implemented as a bot. Simply specify where to mount the filesystem, connect your bot, you're done. No need to have a modified jabberd.
  • GUI can also be implementd as a bot. Simple and clean.
  • Debugging new hardware is simply done through communication with a human client.
XMPPHWFS architecture

XMPPHWFS is meant to replace locmon, which in my opinion was a good idea but is too buggy and impractical. from a recent copy of 20 minutes, it seems the industry is also heading towards something alike, only for home robots and social networking. WTF, tell me why your vacuum cleaner should tell all your facebook friends there's a plant in its way.

it was suggested to use IRC for communication, but device description is be greatly improved through use of XML and XMPP is just that.

Device description

Since XMPPWHFS is aimed towards real-world I/Os, for each variable we need info such as:

  • variable name
  • ro/rw flag
  • unit (meters, seconds, °C..)
  • update delay in seconds
  • last update timestamp
  • variable type and allowed values (int, float, enum..)
  • I/O type (door, temperature, humidity...)
  • location (GPS coordinates and/or description)
  • text/blob, possibly containing icon
  • min/max trigger values

Sample session

To HAL

Here, it should be a good thing to have flags such as update_all_values, used_cached_values

<describe />
From HAL
<hal name='HalName' target='event_main' backup_target='event_backup'>
 <description>This device is a sample that does many things and actually nothing</description>
 <location lat='47°00N' long='8°00E' elevation=495>Main door of building on route de Genève</location>
 <devices>
  <device 
    name='rfid_reader' 
    attrs='ro' type='rfid' 
    last_update_timestamp=1326310608 
    value='00EFC0B554' />
  <device 
    name='door_lock' 
    attrs='rw' 
    type='enum'
   value='closed'>
   <value>open</value>
   <value>closed</value>
   <value>locked</value>
   <value>unlocked</value>
  </device>
  <device
    name='lock_delay'
    attrs='rw'
    type='int'
    last_update_timestamp=1326310915
    value=4
    unit='s' />
  <device
    name='temperature'
    attrs='ro'
    type='float'
    last_update_timestamp=1326312490
    value=23.5
    unit='°C'
    alarm_high=28.0
    warn_low=12.0/>
 </devices>
</hal>
To HAL
<set device='door_lock' value='open' />
From HAL
<hal name='HalName'>
 <devices>
  <device name='door_lock' value='open' />
 </devices>
</hal>
To HAL
<get device='temperature' />
From HAL
<hal name='HalName'>
 <devices>
  <device name='temperature' value=23.5 />
 </devices>
</hal>

Hardware

to make XMPPHWFS as useful as possible, some hardware should be designed and the necessary firmware written

Software extensions

  • communicate with Asterisk to send voice commands
  • have some fun with XMMS2 / MPD