Navigation

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

    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
    • MySensors power consumption

      Hi,

      I have a nano clone running a motion sensor and Dallas DS18S20 temperature sensor and want to get the consumption low enough to run on batteries long term.

      I am using the mysensor sleep interrupt setting and have cut the traces for unused LEDs but am still seeing a power consumption of around 3mA. I have seen consumption of less than 1mA quoted on other sites so was wondering what other peoples experiences have been.

      I know the best way would be to create a basic duino running from 3v, but am stuck with the clones for the moment. By my reckoning 3mA would last around a month with a 4AA 3200mAh batteries. Does that sound about right?

      Thanks,
      Jon

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

      Awesome, that sorted it! Thanks. Think I was leaving to long a time (or to short) between restarting the node. Really enjoying the Server interface, the macros and automation rules are really powerful (just need to get some more nodes to really have a play).

      I saw on one of your posts that battery monitoring is a to do, has that happened or is it still in the pipeline. Also is there a way to trigger an email as I don't have a SMS dongle (thinking I could do it with a sensor set as RelayActuator on a GPIO pin on the pi that would trigger a PHP mail function but there's probably a more efficient way to do it).

      Sorry for all the questions...

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

      Hi,

      Thanks for the reply. I have checked the settings and changed the Group ID to 1 and the Data field ID to V_TRIPPED, using the Boolean option.

      The problem I have is that when I click 'Add sensor node' I get the message 'Done (no choice of device)' and nothing is added in devices and the error log shows the following:

      10-10-2014 21:59:53 0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=1,st=fail:1
      10-10-2014 21:57:50 Trying assigning address '1' to a new node

      Thanks, Jon

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

      Hi, looking for some advice on connecting sensor to PiDome. Think I've followed the instructions correctly but when connecting sensor under 'Devices' I get this message 'New device: Possible new address: 1 if not occupied before adding (Restart node after assigning).' and nothing to choose.

      forum1.png

      My custom device settings are as follows with the Arduino CHILD_ID set to 1. Is there something obvious I've missed or is S_MOTION not included yet?
      Thanks, Jon

      forum1a.png forum2.png

      posted in PiDome
      jonnyfishman
      jonnyfishman