Loading ...
Sorry, an error occurred while loading the content.

46941Re: [mh] Question on xPL-perl

Expand Messages
  • Eloy Paris
    Mar 5 1:13 PM
    • 0 Attachment
      I'm in the same boat as George -- I am writing xPL support for my own
      platform (running on ATmega328 but without using the Arduino libraries;
      just plain AVR libc) and started by modifying Lieven's xpl-perl code. I
      have it running right now in basic form (as in "remote sensor sends a
      periodic message that makes it to MisterHouse via xPL"). It's looking
      promising, and I like the architecture, but I have not had much time to
      work on the project and finish it. I'll contribute back my code when I'm
      further along, of course.

      For the gateway I was using a board that I made but the serial
      connection to the PC was very improvised (basically I didn't think about
      adding an FTDI header to my board) so last week I migrated to a Moteino
      USB. Very nice platform.

      George, as Lieven says, all you have to do is to update the MANIFEST
      file to include the new files and then, if I remember correctly, you
      have to re-run "perl Makefile.PL" and "make install".

      Cheers,

      Eloy Paris.-

      On 03/05/2014 04:54 AM, Lieven Hollevoet wrote:

      > Hey George,
      >
      > you need to perform a ‘make install’ so that the library is updated on you system with the new file you added and so that Client.pm can find the updated code.
      > You will beed to update the MANIFEST file too.
      >
      > The support for developing new code in xpl-perl is not very developer friendly right now. I plan to migrate to Dist::Zille one day, but that will not be for the next weeks/months I’m afraid.
      >
      > Hope this helps you further.
      >
      > Kind regards,
      > Lieven.
      >
      > Op 4-mrt.-2014, om 23:32 heeft George Clark <gac@...> het volgende geschreven:
      >
      >> Hi Lieven,
      >>
      >> I'm trying to create a xpl-perl plugin / dock for managing my arduino,
      >> and as you suggested earlier, I'm trying to start with your jeenodes code.
      >>
      >> I must be missing something really fundamental, but I cannot figure out
      >> the steps to create a new plugin. It's making me feel like an idiot at
      >> this point. This should be so simple, and I'm stumped.
      >>
      >> Copy bin/xpl-jeenodes.pl to bin/xpl-jeenodes2.pl
      >> :%s/eenodes/eenodes2/g
      >>
      >> Copy lib/xPL/Dock/Jeenodes.pm to lib/xPL/Dock/Jeenodes2.pm
      >> :%s/eenodes/eenodes2/g
      >>
      >> No other changes, just a basic renaming for now, and some edits to keep
      >> the internal module/package names consistent. I lose access to the
      >> options strings. No usage help or anything. The fail happens down
      >> in ./lib/xPL/Client.pm, subroutine new().
      >>
      >> It's almost as though I'm missing some sort of registration. I can
      >> get the same failure just by renaming bin/xpl-jeenodes to
      >> bin/xpl-jeenodes2, without any other edits. The getopts seem to be
      >> ignored.
      >>
      >> I know I'm going to feel like an idiot eventually ... but can you
      >> suggest where I'm going wrong?
      >>
      >> Thanks,
      >> George
      >>
      >> gac@cardinal: ~/automation/xpl-perl (mh-arduino)$ perl bin/xpl-jeenodes2
      >> --device /dev/ttyACM0
      >> xPL::Dock->new: device_id invalid
      >> at bin/xpl-jeenodes2 line 34.
      >>
      >> These are the diff's from your jeenodes code.
      >>
      >> diff -Naur bin/xpl-jeenodes bin/xpl-jeenodes2
      >> --- bin/xpl-jeenodes 2014-03-04 15:55:05.410781892 -0500
      >> +++ bin/xpl-jeenodes2 2014-03-04 16:40:50.437285421 -0500
      >> @@ -2,7 +2,7 @@
      >>
      >> =head1 NAME
      >>
      >> -xpl-jeenodes - Perl script for an xPL Jeenodes interface
      >> +xpl-jeenodes2 - Perl script for an xPL Jeenodes2 interface
      >>
      >> =head1 SYNOPSIS
      >>
      >> @@ -29,7 +29,7 @@
      >>
      >> use strict;
      >> use warnings;
      >> -use xPL::Dock qw/Jeenodes/;
      >> +use xPL::Dock qw/Jeenodes2/;
      >> $|=1; # autoflush helps debugging
      >> my $xpl = xPL::Dock->new;
      >> $xpl->main_loop;
      >>
      >>
      >> --- lib/xPL/Dock/Jeenodes.pm 2014-02-17 10:51:34.314101463 -0500
      >> +++ lib/xPL/Dock/Jeenodes2.pm 2014-03-04 16:41:17.026989935 -0500
      >> @@ -1,18 +1,18 @@
      >> -package xPL::Dock::Jeenodes;
      >> +package xPL::Dock::Jeenodes2;
      >>
      >> =head1 NAME
      >>
      >> -xPL::Dock::Jeenodes - xPL::Dock plugin for a Jeelabs Jeenodes
      >> +xPL::Dock::Jeenodes2 - xPL::Dock plugin for a Jeelabs Jeenodes2
      >>
      >> =head1 SYNOPSIS
      >>
      >> - use xPL::Dock qw/Jeenodes/;
      >> + use xPL::Dock qw/Jeenodes2/;
      >> my $xpl = xPL::Dock->new();
      >> $xpl->main_loop();
      >>
      >> @@ -92,7 +92,7 @@
      >> # Init the buffer that will be used for serial data reception
      >> $self->{_uart_rx_buffer} = "";
      >>
      >> - $self->{_jeenodes}->{connected} = 0;
      >> + $self->{_jeenodes2}->{connected} = 0;
      >>
      >> # Init
      >> $self->stick_init();
      >>
      >
      >
      >
      > ------------------------------------------------------------------------------
      > Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
      > With Perforce, you get hassle-free workflows. Merge that actually works.
      > Faster operations. Version large binaries. Built-in WAN optimization and the
      > freedom to use Git, Perforce or both. Make the move to Perforce.
      > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
      >
      >
      >
      > ________________________________________________________
      > To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
      >


      ------------------------------------------------------------------------------
      Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
      With Perforce, you get hassle-free workflows. Merge that actually works.
      Faster operations. Version large binaries. Built-in WAN optimization and the
      freedom to use Git, Perforce or both. Make the move to Perforce.
      http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
      ________________________________________________________
      To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
    • Show all 7 messages in this topic