Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. jonnyfishman
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    jonnyfishman

    @jonnyfishman

    0
    Reputation
    14
    Posts
    830
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    jonnyfishman Follow

    Best posts made by jonnyfishman

    This user hasn't posted anything yet.

    Latest posts made by jonnyfishman

    • RE: PiDome Domotica/Home Automation

      Happy new year to you,

      I've attached the appLog. Relevant lines appear to be 2495 and 1555.
      I recreated the error several times to make it show up. At 2495 the variable is listed as null, whereas at 1555 the variable is passing what it should.

      appLog.txt

      Thanks,
      Jon

      posted in PiDome
      jonnyfishman
      jonnyfishman
    • RE: PiDome Domotica/Home Automation

      Hi John,

      Checked the appLog.txt and the request was going through (it received a HTTP 200 code). The problem was the automation rule. It was no longer happy with having a variable as a parameter, I had to change it back to a string for it to work [examples below]?
      **ricardot **- This might also work for you. I'm using the 'URL hits' under 'miscellaneous' to email myself using the code below. Essentially it sends out a form to a waiting page on my website that automatically emails me when it receives the correct data, using the PHP mail function.

      fourm1.png
      This works.

      forum2.png
      This doesn't

      posted in PiDome
      jonnyfishman
      jonnyfishman
    • RE: PiDome Domotica/Home Automation

      Hi John,

      Happy Xmas and enjoying the new updates.

      I can't seem to get the 'Send data to an url' tab to work in automation anymore. Is this a bug or do I need to change the way it functions (it was working in an earlier version with the same settings).

      Jon

      posted in PiDome
      jonnyfishman
      jonnyfishman
    • RE: Interrupt on recieve radio data

      Hi Hek,

      Solved the ack problem, just moved the sensor closer to the GW. I'm now getting a response but its not consistent.

       //Setup completed
       RF24 initialized and GW contacted
       //GW present from other sensors
       Battery Voltage: send: 2-2-0-0 s=3,c=1,t=38,pt=7,l=5,st=ok:0.1
       Temperature: send: 2-2-0-0 s=1,c=1,t=0,pt=7,l=5,st=ok:24.7
       
       //Triggering the button sends gw.request, the following is output 
       send: 2-2-0-0 s=2,c=2,t=36,pt=0,l=3,st=ok:1.4
       
       //Triggering the button again gets this response
       read: 0-0-2 s=2,c=1,t=36,pt=0,l=1:0
       Incoming Radio
       Alarm Disabled
       Incoming lock status from GW:0
       send: 2-2-0-0 s=2,c=2,t=36,pt=0,l=1,st=ok:0
       
       //Triggering again
       read: 0-0-2 s=2,c=1,t=36,pt=0,l=1:0
       Incoming Radio
       Alarm Disabled
       Incoming lock status from GW:0
       send: 2-2-0-0 s=2,c=2,t=36,pt=0,l=1,st=ok:0
      

      I don't understand why the first one always fails, would it be better to trigger the callback manually to pick up a response?
      Also is it possible to introduce a wait or while loop to prevent the rest of the loop being processed until the GW replies?

      Thanks,
      Jon

      posted in Hardware
      jonnyfishman
      jonnyfishman
    • RE: Interrupt on recieve radio data

      Hi Hek,

      Thanks for the response. I've set the following (full code is attached but is still quite messy RFID.ino 😞

      gw.begin(incomingMessage);
      gw.request(CHILD_ID_TEMP, V_TEMP); 
      

      and

      // Manage incoming messages from Gateway 
      void incomingMessage(const MyMessage &message) {
      Serial.println("incoming");
       // We only expect one type of message from controller. But we better check anyway.
           if (message.type==V_TEMP) {    
      // Change relay state
      if (lockStatus != message.getBool() )
      setLockState(message.getBool(), false); 
      
      // Write some debug info
      Serial.print("Incoming lock status from GW:");
      Serial.println(message.getBool());
      } 
      }//end incomingMessage
      

      I'm using Pidome and can see the response being sent back to the node as:

      05-12-2014 20:10:46: 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=0,pt=0,l=4,st=fail:19.1
      05-12-2014 20:10:45: 0;0;3;0;9;read: 2-2-0 s=1,c=2,t=0,pt=0,l=0:
      05-12-2014 20:09:28: 0;0;3;0;9;send: 0-0-2-2 s=1,c=1,t=0,pt=0,l=4,st=fail:19.1
      05-12-2014 20:09:27: 0;0;3;0;9;read: 2-2-0 s=1,c=2,t=0,pt=0,l=0:
      

      But in terminal I never see the response (no incoming message displayed). Is there a problem with st failing or is it something wrong with the server response?

      Thanks,
      Jon

      posted in Hardware
      jonnyfishman
      jonnyfishman
    • RE: Interrupt on recieve radio data

      Hi guys, thanks, for the replies and ideas.

      'axillent', your quite right. I realised this morning that of course I can send a request to the controller for the current values when the user presses the button to turn on the RFID module. This way I can leave the sensor in the sleep setting until it is actually needed.

      Presumably this is as simple as sending the command:

      gw.request(CHILD_ID, V_VAR1); - copied from 'EnergyMeterPulseSensor'

      One thing I'm not sure about is whether the following function is called by gw.request or does it get called from somewhere else (I can't test it at the moment to find out)?

      void incomingMessage(const MyMessage &message) {
      if (message.type==V_VAR1) {
      state = message.getLong();
      Serial.print("Received state from gw:");
      Serial.println(state);
      }
      }

      posted in Hardware
      jonnyfishman
      jonnyfishman
    • Disable external module to preserve battery life

      Second question for the evening. I have tried several versions of the circuit below to disable an external RFID module when it is not needed (it is triggered by a button press).

      forum_bb.png

      The left circuit it the standard one for an RFID module but I have tried to disable it using a BC548 NPN transistor and D4 pin set to LOW when not in use (right circuit), but I can't get it to stop being powered. The LED responds as expected and turns on an off depending on D4's state but the RFID module always seems to be powered. Is this likely to be because of its other pins MISO etc, or because D4 isn't setup properly.

      N.b. I have tried without the transistor and the module remains powered regardless of D4's state.

      Thanks in advance,
      Jon

      posted in Hardware
      jonnyfishman
      jonnyfishman
    • Interrupt on recieve radio data

      Just a quick question, and I'm guessing the answer is a 'No', but is it possible to set the sensor to receive data when using the:

      gw.sleep(INTERRUPT, CHANGE, SLEEP_TIME)

      function ?

      I have a battery powered RFID lock that I would like to trigger remotely as well. I am using gw.sleep to try and increase battery life, but am guessing that to receive data the sensor must be in a constant ready state and not in sleep mode. Is this correct?

      Thanks,
      Jon

      posted in Hardware
      jonnyfishman
      jonnyfishman
    • RE: MySensors power consumption

      Wow 6uA. That's were I'm hoping to get to.

      Running higher with everything disconnected as its not going into sleep mode (no transciever detected). I don't know whether it's a nano clone that's causing the higher consumption and don't want to have to pull apart my Gravitech nano gateway atm.

      Will reducing the clock speed have an effect on consumption and how is this best done through the Arduino software.

      I've attached my sketch, don't think there's anything in it that would obviously contribute to the load.
      MTB.ino

      Thanks.

      posted in Hardware
      jonnyfishman
      jonnyfishman
    • RE: MySensors power consumption

      Thanks for the replies,

      Great idea 'dopustko', I now have the Dallas only powered on the 5 minute cycle set through the MySensors sleep function and turning on through a DigitalWrite to pin 5. Unfortunately this hasn't reduced the amount on power consumption.

      @m26872 said:

      Is 3mA the total sleep mode consumption with (not tripping) motion sensor? I imagine that you drain the batteries sooner if you have a lot of motion (and send update to controller every time)?

      Yes 3mA is the sleep consumption. It rises to around 30mA on trip and on start but settles down to 3.5mA in between. I had been testing it using a PP3 and a LM7805 but this was very inefficient and even with only one or two triggers per hour lasted less than 24hrs.

      'dzairo', couldn't get Fritzing to work for me so no schematic but I am using the basic wiring and coding supplied on the MySensors main site, so most of the system is stock. I would be interested to play with the MCU and dropping the chip frequency but haven't found enough about how to do this and whether it is worth it. Any ideas would be great.

      Thanks,
      Jon

      posted in Hardware
      jonnyfishman
      jonnyfishman