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

Re: [mh] OW Devices

Expand Messages
  • Jim Duda
    ... What device is this which uses dob and dia? Jim ... Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data.
    Message 1 of 12 , Apr 20 2:02 PM
    • 0 Attachment
      On 04/20/2013 03:01 PM, Eloy Paris wrote:
      > Hi Jim,
      >
      > On 04/20/2013 02:21 PM, Jim Duda wrote:
      >
      >> What types of One Wire devices are people using in Misterhouse?
      >>
      >> My Owfs_Item supports these devices:
      >>
      >> # This package specifically handles the DS18S20 Digital Thermometer.
      >> package Owfs_DS18S20;
      >>
      >> # This package specifically handles the DS2405 Relay / IO controller.
      >> package Owfs_DS2405;
      >>
      >> # This package specifically handles the DS2408 Relay / IO controller.
      >> package Owfs_DS2408;
      >>
      >> # This package specifically handles the DS2413 Dual Channel Addressable Switch.
      >> package Owfs_DS2413;
      >>
      >> # This package specifically handles the DS2450 A/D Converter.
      >> package Owfs_DS2450;
      >>
      >> I would like to add extensions for other devices which might be useful.
      >
      > I use Owfs_Item for a custom 1-Wire slave device that I built. Owfs_Item
      > is flexible enough for my use of it with this custom device. Here's how
      > I am using Owfs_Item in my user code:
      >
      > -----------------------------------------
      > # noloop=start
      >
      > use Owfs_Item;
      >
      > # Centurion multi-sensor in the garage
      > $garage_centurion = new Owfs_Item("99.000000000002", "Garage Centurion");

      What device is this which uses dob and dia?

      Jim



      ------------------------------------------------------------------------------
      Precog is a next-generation analytics platform capable of advanced
      analytics on semi-structured data. The platform includes APIs for building
      apps and a phenomenal toolset for data science. Developers can use
      our toolset for easy data analysis & visualization. Get a free account!
      http://www2.precog.com/precogplatform/slashdotnewsletter
      ________________________________________________________
      To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
    • Jim Duda
      ... The Owfs_Item will do discovery through any layer of hubs. ... You ll definitely want my new Owfs_Item to handle this. It will work great for you. It
      Message 2 of 12 , Apr 20 2:06 PM
      • 0 Attachment
        On 04/20/2013 04:15 PM, Rick Bolen(gm) wrote:
        >
        > On 04/20/2013 02:21 PM, Jim Duda wrote:
        >> What types of One Wire devices are people using in Misterhouse?
        >>
        >> # This package specifically handles the DS2408 Relay / IO controller.
        >> package Owfs_DS2408;
        >>
        >
        > I have Hobby Boards 6-channel hub and their 8-relay\IO DS2408 based
        > board. I also have one of the temp\humidity\light sensors and the HVAC
        > board. Also some DS18?20 temp sensors.
        >

        The Owfs_Item will do discovery through any layer of hubs.

        > The DS2408 relay\IO is vexxing me at the moment, because I want to use
        > some as relays, and a couple as door sensors (magnetic door switches).
        > Since the 1wire bus has to be polled for changes, and I need to be
        > checking those door sensors, I'm not sure where\how best to do this.

        You'll definitely want my new Owfs_Item to handle this. It will work
        great for you. It already supports DS2408 as PIO, Latch, or Sense.
        For latch, you can use $object->state_change, $object->said, etc.

        >
        > Since the door sensor state must be constantly checked for change,
        > should I take that task outside of MH and pipe it in thru xPL or something?
        >

        The new version can poll once a second, maybe faster. It doesn't cause
        any pausing in MH since it uses a Socket_Item and not OWNet directly.

        > I just install owserver and OWNet and am playing around with that. At
        > the moment I don't have owfs running, cause owserver can be queried
        > directly with OWNet, so I don't see the need for the virtual filesystem
        > overhead at this time.

        The new version used the OWNet like interface ot owserver. You don't need
        owfs running.


        >
        > Any suggestions?
        >
        > Rick
        >
        > ------------------------------------------------------------------------------
        > Precog is a next-generation analytics platform capable of advanced
        > analytics on semi-structured data. The platform includes APIs for building
        > apps and a phenomenal toolset for data science. Developers can use
        > our toolset for easy data analysis & visualization. Get a free account!
        > http://www2.precog.com/precogplatform/slashdotnewsletter
        > ________________________________________________________
        > To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
        >
        >



        ------------------------------------------------------------------------------
        Precog is a next-generation analytics platform capable of advanced
        analytics on semi-structured data. The platform includes APIs for building
        apps and a phenomenal toolset for data science. Developers can use
        our toolset for easy data analysis & visualization. Get a free account!
        http://www2.precog.com/precogplatform/slashdotnewsletter
        ________________________________________________________
        To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
      • Eloy Paris
        Hi Jim, ... It s a microcontroller-based (Atmega 328P) 1-Wire slave that I designed. DOB stands for digital output channel B and DIA for digital input
        Message 3 of 12 , Apr 20 8:20 PM
        • 0 Attachment
          Hi Jim,

          On 04/20/2013 05:02 PM, Jim Duda wrote:

          > What device is this which uses dob and dia?

          It's a microcontroller-based (Atmega 328P) 1-Wire slave that I designed.
          DOB stands for "digital output channel B" and DIA for "digital input
          channel A" (the board has two digital input bits and two digital output
          bits [channels A and B]).

          Cheers,

          Eloy Paris.-


          ------------------------------------------------------------------------------
          Precog is a next-generation analytics platform capable of advanced
          analytics on semi-structured data. The platform includes APIs for building
          apps and a phenomenal toolset for data science. Developers can use
          our toolset for easy data analysis & visualization. Get a free account!
          http://www2.precog.com/precogplatform/slashdotnewsletter
          ________________________________________________________
          To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
        • Jim Duda
          ... Arduino? Maybe a Owfs_Arduino might be useful. Jim ... Precog is a next-generation analytics platform capable of advanced analytics on semi-structured
          Message 4 of 12 , Apr 21 5:51 AM
          • 0 Attachment
            On 04/20/2013 11:20 PM, Eloy Paris wrote:
            > Hi Jim,
            >
            > On 04/20/2013 05:02 PM, Jim Duda wrote:
            >
            >> What device is this which uses dob and dia?
            >
            > It's a microcontroller-based (Atmega 328P) 1-Wire slave that I designed.
            > DOB stands for "digital output channel B" and DIA for "digital input
            > channel A" (the board has two digital input bits and two digital output
            > bits [channels A and B]).

            Arduino? Maybe a Owfs_Arduino might be useful.

            Jim



            ------------------------------------------------------------------------------
            Precog is a next-generation analytics platform capable of advanced
            analytics on semi-structured data. The platform includes APIs for building
            apps and a phenomenal toolset for data science. Developers can use
            our toolset for easy data analysis & visualization. Get a free account!
            http://www2.precog.com/precogplatform/slashdotnewsletter
            ________________________________________________________
            To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
          • Jim Duda
            ... Is the owfs_register_device your method? What does it do? I could/should keep a dynamic inventory of 1-wire devices which are discovered. ... The get is
            Message 5 of 12 , Apr 21 5:59 AM
            • 0 Attachment
              On 04/20/2013 03:01 PM, Eloy Paris wrote:
              >
              > # Centurion multi-sensor in the garage
              > $garage_centurion = new Owfs_Item("99.000000000002", "Garage Centurion");
              > &owfs_register_device($garage_centurion);
              >

              Is the owfs_register_device your method? What does it do? I could/should
              keep a dynamic inventory of 1-wire devices which are discovered.

              >
              > # Read Digital Input channel A (sensor on garage door)
              > if (new_second(30) ) {
              > set $garage_door ($garage_centurion->get("dia") == 0 ? "closed" :
              > "open");
              > }

              The get is not longer directly connected to the OW device. The get will
              trigger a read, but the read will be available in some later pass. You
              will need to replace with this.

              if (new_second(30) ) {
              $garage_centurion->get("dia");
              }

              if (my $state = state_now $garage_centurion) {
              set $garage_door ( $state == 0 ? "closed" : "open");
              }

              Will this work for you?

              You can also use the tie methods too, which I assume is very handy.

              If you extend the new Owfs_Item to Owfs_Arduino, you'll be able to
              do the "get" under the hood and simply use state_now in your user code.

              The new Owfs_Item is much more misterhouse centric. I should have done
              it this way first time around.

              Jim


              ------------------------------------------------------------------------------
              Precog is a next-generation analytics platform capable of advanced
              analytics on semi-structured data. The platform includes APIs for building
              apps and a phenomenal toolset for data science. Developers can use
              our toolset for easy data analysis & visualization. Get a free account!
              http://www2.precog.com/precogplatform/slashdotnewsletter
              ________________________________________________________
              To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
            • Eloy Paris
              Hi Jim, ... Whoops, sorry about that... owfs_register_device() was an attempt I made a while ago to serialize reads from the 1-Wire bus inside MisterHouse. The
              Message 6 of 12 , Apr 21 12:17 PM
              • 0 Attachment
                Hi Jim,

                On 04/21/2013 08:59 AM, Jim Duda wrote:

                > On 04/20/2013 03:01 PM, Eloy Paris wrote:
                >>
                >> # Centurion multi-sensor in the garage
                >> $garage_centurion = new Owfs_Item("99.000000000002", "Garage Centurion");
                >> &owfs_register_device($garage_centurion);
                >>
                >
                > Is the owfs_register_device your method? What does it do? I could/should
                > keep a dynamic inventory of 1-wire devices which are discovered.

                Whoops, sorry about that... owfs_register_device() was an attempt I made
                a while ago to serialize reads from the 1-Wire bus inside MisterHouse.
                The idea was to perform reads without worrying about simultaneous access
                to the bus. I was planning to cache the last values read and return the
                right one upon a call to a special function that I was going to write to
                read a sensor's value.

                But it never went anywhere and owfs_register_device() is just an empty
                function. This was about a year ago and I had to chase things down when
                you asked because I didn't remember anything.

                I'll be removing all this non-sense since owfs does its own caching, and
                I think your latest changes to Owfs_Item would also help.

                >> # Read Digital Input channel A (sensor on garage door)
                >> if (new_second(30) ) {
                >> set $garage_door ($garage_centurion->get("dia") == 0 ? "closed" :
                >> "open");
                >> }
                >
                > The get is not longer directly connected to the OW device. The get will
                > trigger a read, but the read will be available in some later pass. You
                > will need to replace with this.
                >
                > if (new_second(30) ) {
                > $garage_centurion->get("dia");
                > }
                >
                > if (my $state = state_now $garage_centurion) {
                > set $garage_door ( $state == 0 ? "closed" : "open");
                > }
                >
                > Will this work for you?

                Yes, I don't see why not.

                > You can also use the tie methods too, which I assume is very handy.
                >
                > If you extend the new Owfs_Item to Owfs_Arduino, you'll be able to
                > do the "get" under the hood and simply use state_now in your user code.

                I see. I'll play with it, though I am not a fan of "hiding" things under
                the hood, i.e. I normally prefer to see code like the above, which you
                can read and follow all in one place, as opposed to checking there and
                in the file that extends Owfs_Item to Owfs_Arduino.

                > The new Owfs_Item is much more misterhouse centric. I should have done
                > it this way first time around.

                Sounds good. I'll give it a try when you make it available.

                Cheers,

                Eloy Paris.-


                ------------------------------------------------------------------------------
                Precog is a next-generation analytics platform capable of advanced
                analytics on semi-structured data. The platform includes APIs for building
                apps and a phenomenal toolset for data science. Developers can use
                our toolset for easy data analysis & visualization. Get a free account!
                http://www2.precog.com/precogplatform/slashdotnewsletter
                ________________________________________________________
                To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
              • Eloy Paris
                Hi Jim, ... Well, it s not really Arduino, but my original idea was to make it compatible with it. Basically, I wanted an Arduino-like platform but with out of
                Message 7 of 12 , Apr 21 12:27 PM
                • 0 Attachment
                  Hi Jim,

                  On 04/21/2013 08:51 AM, Jim Duda wrote:

                  > On 04/20/2013 11:20 PM, Eloy Paris wrote:
                  >> Hi Jim,
                  >>
                  >> On 04/20/2013 05:02 PM, Jim Duda wrote:
                  >>
                  >>> What device is this which uses dob and dia?
                  >>
                  >> It's a microcontroller-based (Atmega 328P) 1-Wire slave that I designed.
                  >> DOB stands for "digital output channel B" and DIA for "digital input
                  >> channel A" (the board has two digital input bits and two digital output
                  >> bits [channels A and B]).
                  >
                  > Arduino? Maybe a Owfs_Arduino might be useful.

                  Well, it's not really Arduino, but my original idea was to make it
                  compatible with it.

                  Basically, I wanted an Arduino-like platform but with out of the box
                  hardware support for a few things -- a couple of I/O bits (outputs that
                  could control relays, opto-isolated inputs), a humidity/temperature
                  sensor, a photoresistor, etc. I didn't want an Arduino shield for these
                  sensors so I designed a PCB with the Atmega328p and room for the relays,
                  humidity sensor, etc and the Arduino form factor so I could use Arduino
                  shields if needed. I had 10 of these PCBs made and they have been great
                  because so far I have 3 of them in production in my house and am
                  planning to put 2 more in production very soon. So some cost savings
                  compared to buying real Arduinos.

                  The firmware is not compatible with Arduino; it's written in C and uses
                  avr-libc.

                  Cheers,

                  Eloy Paris.-


                  ------------------------------------------------------------------------------
                  Precog is a next-generation analytics platform capable of advanced
                  analytics on semi-structured data. The platform includes APIs for building
                  apps and a phenomenal toolset for data science. Developers can use
                  our toolset for easy data analysis & visualization. Get a free account!
                  http://www2.precog.com/precogplatform/slashdotnewsletter
                  ________________________________________________________
                  To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
                • Jim Duda
                  ... Very cool. Hard-core home automation going on there :-) Regards, Jim ... Precog is a next-generation analytics platform capable of advanced analytics on
                  Message 8 of 12 , Apr 21 2:50 PM
                  • 0 Attachment
                    On 04/21/2013 03:27 PM, Eloy Paris wrote:

                    >
                    > Basically, I wanted an Arduino-like platform but with out of the box
                    > hardware support for a few things -- a couple of I/O bits (outputs that
                    > could control relays, opto-isolated inputs), a humidity/temperature
                    > sensor, a photoresistor, etc. I didn't want an Arduino shield for these
                    > sensors so I designed a PCB with the Atmega328p and room for the relays,
                    > humidity sensor, etc and the Arduino form factor so I could use Arduino
                    > shields if needed. I had 10 of these PCBs made and they have been great
                    > because so far I have 3 of them in production in my house and am
                    > planning to put 2 more in production very soon. So some cost savings
                    > compared to buying real Arduinos.
                    >
                    > The firmware is not compatible with Arduino; it's written in C and uses
                    > avr-libc.
                    >

                    Very cool. Hard-core home automation going on there :-)

                    Regards,

                    Jim


                    ------------------------------------------------------------------------------
                    Precog is a next-generation analytics platform capable of advanced
                    analytics on semi-structured data. The platform includes APIs for building
                    apps and a phenomenal toolset for data science. Developers can use
                    our toolset for easy data analysis & visualization. Get a free account!
                    http://www2.precog.com/precogplatform/slashdotnewsletter
                    ________________________________________________________
                    To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
                  Your message has been successfully submitted and would be delivered to recipients shortly.