Navigation

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

    Sasquatch

    @Sasquatch

    19
    Reputation
    47
    Posts
    128
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Sasquatch Follow

    Best posts made by Sasquatch

    • RE: Issues when upgrading EnergyMeterPulseSensor from 1.5.x to 2.3.2

      V_Var1 is variable(your total pulses) stored in the controller - HomeAssistant, Domoticz etc....
      Assuming you have controller shut down you have to send that value from MYSController.

      This request will be fulfilled by controller after you configure it to use node's 7 child 1

      posted in Development
      Sasquatch
      Sasquatch
    • RE: Suggestions for my setup? Very new here.

      Imagine thermostat relying on IFTTT/cloud to work on schedule and your internet fails(winter, someone crashes car into ISP cabinet)... πŸ˜‰

      posted in General Discussion
      Sasquatch
      Sasquatch
    • RE: NodeManager sensors with multiple interrupt pins

      @j54n1n said in NodeManager sensors with multiple interrupt pins:

      So can somebody confirm that pin change interrupts can wake up a sleeping node loaded with a NodeManager template sketch?

      I have got the impression by reading here in the forum that the ATmega328p microcontroller has problems waking up from pin change interrupts. Maybe I am wrong?

      You are wrong, i have one sitting on my bench right now sleeping and waking up on A5 pin change.
      it's bare 328p test bead drawing mere 1uA in sleep...
      Use sleep(0);
      All the code you need to set things up:(tested on nano and mini boards)

      void pciSetup(byte pin)// enables pin change for given pin
      {
      	*digitalPinToPCMSK(pin) |= bit (digitalPinToPCMSKbit(pin));  // enable pin
      	PCIFR  |= bit (digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
      	PCICR  |= bit (digitalPinToPCICRbit(pin)); // enable interrupt for the group
      }
      void pciClear(byte pin)// disables pin change for given pin
      {
      	*digitalPinToPCMSK(pin) &= ~(bit (digitalPinToPCMSKbit(pin)));  // disable pin
      	PCIFR  |= bit (digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
      	PCICR  &= ~(bit (digitalPinToPCICRbit(pin))); // disable interrupt for the group
      }
      
      
      ISR (PCINT0_vect)//pins d8-d13
      {
      	
      }
      ISR (PCINT1_vect)// pins a0-a7
      {
      	
      }
      ISR (PCINT2_vect)//pins d0-d7
      {
      	
      }
      
      

      If you want to get several readings and then send them to gateway(power meter pulse counting) it's better to write your own sleep function. Built in sleep(); wakes radio on every wake up.
      :work in progress:

      void PowerDown(void)
      {
        ADCSRA &= ~(1<<ADEN);//disable ADC - 120uA
        sleep_bod_disable();//disable bod  - 15uA
        set_sleep_mode(SLEEP_MODE_PWR_DOWN);
        wdt_disable();
        sleep_enable();
        sleep_cpu();
        sleep_disable();
       ADCSRA |= (1<<ADEN);//enable ADC
       }
      

      then call transportDisable(); before powering down
      and transportReInitialise(); before sending your data.

      posted in NodeManager
      Sasquatch
      Sasquatch
    • RE: Arduino pro mini, rfm69 with 2 Reed switches on interrupts?

      @kiesel

      Found on here:
      Quote:

      Commented by Manoraj Gnanadhas (Atmel)
      2015-01-20 06:23:36 GMT
      [Recipients: Nick Gammon]

      Hello Nick,

      Our design team has confirmed that β€œNote-3 mentioned under Table 10-1” is a datasheet bug. So you can use any type of interrupt (Rising edge/ Falling edge / Low level / Any logical change) to wake up from sleep mode. Sorry for the inconvenience caused.

      Best Regards,
      Manoraj Gnanadhas

      Not responding to reed relay:
      PRIMARY_BUTTON_PIN interrupt is active only in sleep. if you're (un)lucky enough to move magnet when cpu is awake it will ignore it.

      More likely is that relay bounce longer than wake up time + 5ms in your loop.
      Do away with pin reading, serial print and delay, shorter your loop, longer battery life.
      In ISR (PCINT0_vect) set flag, then in a loop check for that flag.
      If it's set it's secondary buttton pin that avoke your cpu,
      if it's not set it's primary button .

      I'm reusing your variables:

      #include <avr/sleep.h>
      #define DEBUG  // coment out when ready to go into the box 
      #ifndef DEBUG //disable serial in production compile, potentially saves few uA in sleep mode
           #define MY_DISABLED_SERIAL
      #endif
      ISR (PCINT0_vect) // handle pin change interrupt for D8 to D13 here
       {    
          //delayMicroseconds(2);
          valueSecondary = true; // ISRs need to finish very fast or the arduino crashes. 
      void loop()
      {
         // Sleep until something happens with the sensor
        //sleep(PRIMARY_BUTTON_PIN-2, CHANGE, SECONDARY_BUTTON_PIN-2, CHANGE, 0);
        sleep_bod_disable();//disable BOD  - saves~ 15uA
        sleep(PRIMARY_BUTTON_PIN-2, CHANGE, 0);
      
        #ifdef DEBUG   //get rid of unnecessary slow downs when ready    
        Serial.println("Woken up");
        #endif
        
      
        if (valueSecondary == true){
               valueSecondary = false;
               #ifdef DEBUG     //get rid of unnecessary slow downs when ready    
               Serial.print("Secondary:");
               #endif
               send(msg2.set(1)); //box emptied/mail in the box
        }
        else{
            #ifdef DEBUG   //get rid of unnecessary slow downs when ready    
             Serial.print("Primary:");
            #endif
            send(msg.set(1));//mail in the box/box emptied
        }
      }
      

      Unless you really need to know if box was opened then closed, then check pin states in my if/else after 10-50ms delay, experiment until you get no bounce errors. BUT it will increase battery drain SIGNIFICANTLY.
      You will have 2 messages sent per event, one per door opening and one per door closing.

      posted in Development
      Sasquatch
      Sasquatch
    • RE: Suggestions for my setup? Very new here.

      @Smart-Projects-ABC
      1- not really. HA can use any sensor with Google Assistant(not sure if alexa was added since I last used it)
      2-flash requried? - going back to 2005 is IMHO not the way forward, what kind of advanced automation cannot be done in, say Domoticz or HomeAssistant?
      3-as little different protocols as practicable is a good idea
      4- I would add: avoid cloud based sensors at all cost for security and future proofing reasons. Cloud based sensor can be rendered useless by vendor deciding it's time to sell you a new one. Having local controller talking to sensors/actuators over WIFI/ZIGBEE/RFM69/NRF24/MagicBeam and allowing remote control over GA/Aexa/an app is more robust solution than every sensor talking to a server in china over different open port and ten talking trough outdated website(ittt.com) to talk to controller over yet another open port....

      And yes, with a bit of creativity and couple seeedstudio.com orders you can get every sensor you want on MySensors transport πŸ˜‰

      posted in General Discussion
      Sasquatch
      Sasquatch
    • RE: Domoticz/Mysensors

      @alco plenty people here ready to help

      posted in Domoticz
      Sasquatch
      Sasquatch
    • RE: [SOLVED] Go to loop(); when parent/gateway can't be found.

      @mfalkvidd Thank You!!!
      @skywatch just search forums, plenty of use examples, knowing what to search for was a key problem ;).

      posted in Development
      Sasquatch
      Sasquatch
    • RE: Generic pressure sensors -SOLVED

      It is most likely OP amp output you are seeing,
      connect 5v, resistors as needed and multimeter to resistor output, check if works satisfactory, simple....

      posted in Hardware
      Sasquatch
      Sasquatch
    • RE: BATERY CHARGER CONNECTION ?

      In Proteus you click on terminal end to draw a wire connection πŸ˜‰

      But on serious note - with copper with help from soldering alloy on PCB πŸ˜‚ .

      If you are asking for exact schematics then do your own homework and look in TP4056 datasheet. You are looking for typical application drawing.

      Tp4056 is linear regulator, very inefficient, look at spv1040 or spv1050 instead - MPPT tracking propper solar chargers.

      posted in General Discussion
      Sasquatch
      Sasquatch
    • RE: [SOLVED] Go to loop(); when parent/gateway can't be found.

      @BearWithBeard my bad, looked at wrong post and understood your answer wrong, bloody small text on phones ;~)

      posted in Development
      Sasquatch
      Sasquatch

    Latest posts made by Sasquatch

    • RE: Best password manager?

      @NeverDie Linux and antivirus... I say no since only one I can recommend is only available for windows and mac.

      @mfalkvidd said in Best password manager?:

      @NeverDie for travel, I would say the largest risk is a border search. US does it, so I would suspect Russia does as well. Good guide: https://www.eff.org/document/eff-border-search-pocket-guide

      Say whaat? Border officials in US can confiscate my laptop willy nilly? I'm glad I have no plans to travel there, and if I do I'll encrypt the hell out of everything I carry, even my wrist watch will need password to show time πŸ˜‰

      posted in General Discussion
      Sasquatch
      Sasquatch
    • RE: Best password manager?

      @NeverDie said in Best password manager?:

      Here's a case study that examined how 1Password, Dashlane, KeePass and LastPass could leak data: https://www.ise.io/casestudies/password-manager-hacking.

      As I said before no password manager is safe on machine crawling with viruses and/or malware
      That's where antivirus software comes to play if you skip that there is no escape from being eventually "hacked".

      Main advantage of password manager is not reusing passwords for different services. When one gets compromised it's that. One password leaked, one account compromised, rest is safe. Alternative would be pen and paper notepad, reusing one password, or using memorable password combinations all bearing much greater risks than any decent password manager.

      IMHO you are getting a bit paranoid, I do agree with BearWithBeard, use as few extensions as practical.
      Firefox+adblockplus+kepassxc+cookiecleaner is my "daily driver"
      For weird side of internet I use TOR browser.
      For testing downloads use VM.
      Plus good paid antivirus, so far so good.

      posted in General Discussion
      Sasquatch
      Sasquatch
    • RE: Best password manager?

      @NeverDie

      The keylogers I mentioned are either usb plug extensions(hard-ish to spot) or Bluetooth dongles that listen to wireless keyboards, some of them use very weak or no keyboard<->dongle authentication.

      Intercepting passwords between browser and website/server is possible but requires:
      a: MITM attack => access to local network easy peasy on cafΓ© WIFI
      or
      b: DNS poisoning => admin access to ISP infrastructure or local network router.

      On top of that stupid/not paying attention user who will ignore lack of SSL/https connection or add exception to accept website certificate signed by ROOT CA not trusted by os/browser.
      Or physical access to victim's computer to add own ROOT CA to trusted CA's database, malware can do it too.
      Only way to rule user error, malware or physical access out it to fake ROOT CA and sign certificate to dodgy server, but it's not possible without access to some serious brute forcing compute power - we are talking exascale supercomputer for couple of years here.
      It is very personal attack, and unless you are VIP you can forget about it anyway. I'm not so sure about forgetting...

      No password manger is safe on a machine crawling with malware, Antivirus/antimalware are a must!!!
      Although there is a plugin for original keepass that auto-types password out of order to fool potential malware keyloggers. It's called floating panel.

      AFAIK all browser password managers use windows user password to encrypt them, and changing password automatically changes encryption key too SIC!!
      Considering that one can overwrite windows password or disable it temporarily for covert hack!! in 30 seconds with simple bootable usb stick(windows password unlocker) such form of encryption is more than useless in stolen laptop scenario. And Mac's have passwords reset feature baked into o/s so resetting it is even easier.

      From time to time there is malware/loophole in browser that leaks passwords, last one was opera on the news.
      NEVER USE BROWSER SAVE PASSWORD FEATURE!

      posted in General Discussion
      Sasquatch
      Sasquatch
    • RE: Best password manager?

      +1 to keepass, store your database on Google drive/Dropbox/nextcloud and secure it with password+ yubikey and you have bulletproof solution. Just remember to have clone youbikey in a safe.
      Keepassxc on windows/Linux, keepas2android and keepasium on Android and iPhone respectively.

      @mfalkvidd ever heard of hardware keyloggers? You can buy ones that log every keystroke on any wireless keyboard(wired too).

      That's why I'm using yibikey and keepass. Even if my master pass leaks out it's useless without youbikey. And stolen/lost yubikey without pass is just a piece of plastic.

      posted in General Discussion
      Sasquatch
      Sasquatch
    • RE: How to properly handle variable requests

      I see it this way:
      NodeA sends C_REQ of Var1 to NodeB
      NodeB processes C_REQ message in receive();
      NodeB replies with C_SET of Var1 to NodeA just as controller would
      NodeA processes C_SET message in receive();

      You can use echo/ACK functionality or not, it doesn't matter.

      If you want both nodes to synchronise their variables, then it seems best to:
      a)request values on boot
      b)On variable change send values without prompt

      That way you cut traffic by half compared to request-reply approach.

      posted in Development
      Sasquatch
      Sasquatch
    • RE: House renovation, how to a good electrical system oriented to MySensors?

      @alowhum said in House renovation, how to a good electrical system oriented to MySensors?:

      What do you mean with running it in a loop? Where could I learn more about that?

      wires in the loop:
      PSU-----GW----Node1----node2
      |____________________________|

      Use switching regulators to keep current down.

      posted in Hardware
      Sasquatch
      Sasquatch
    • RE: Solar Energy Harvesting for wireless motes

      I made pcb for it it's on the roof of my flat, will dig trough my archives to see if i have kicad project for it.

      posted in Hardware
      Sasquatch
      Sasquatch
    • RE: Solar Energy Harvesting for wireless motes

      cough cough , so much dust here in the archives... πŸ˜‰

      @NeverDie SPV1050 is what you are looking for, only Maximum Power Point Tracking IC from all IC's you mentioned/tested in both your topics. And trust me, it makes a whole world of a difference. ST even have online component calculator for matching it to solar panel and battery used. My usage scenario was outdoor rechargeable coin cell battery and calculator solar cell. Only drawback: you have to determine maximum power point of your solar cell.

      posted in Hardware
      Sasquatch
      Sasquatch
    • RE: ESP8266 Gateway (RFM69) Soft WDT reset every 5 - 10 min

      just a thought, since resets are happening under heavy trafffic:
      What is your serial speed? 9600 could lead to buffer overflows under heavy traffic

      posted in Troubleshooting
      Sasquatch
      Sasquatch
    • RE: The "new" Arduino Pro IDE

      @BearWithBeard said in The "new" Arduino Pro IDE:

      When I first heard about the Pro IDE, I was curious if they would manage to implement an open hardware debugger for AVRs, because as of yet, this is AFAIK still only possible with proprietary Atmel / Microchip hard- and software. But I doubt that this is going to happen.

      AFAIK only IAR uses atmel(sadly Microchip now) hardware for debugging, no other IDE i tried can use dragon or ICE for more than just programming. Expecting Arduino to support hardware debuggers was insanely optimistic.

      posted in Development
      Sasquatch
      Sasquatch