Navigation

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

    dirkc

    @dirkc

    2
    Reputation
    24
    Posts
    559
    Profile views
    0
    Followers
    1
    Following
    Joined Last Online
    Location Germany

    dirkc Follow

    Best posts made by dirkc

    • RE: Need advice on choosing software

      @iamtheghost have you checked this: https://www.mysensors.org/controller
      What about this
      http://mycontroller.org/

      posted in Troubleshooting
      dirkc
      dirkc
    • RE: Is there a logging function in the Raspberry Pi Gateway?

      @strangeoptics I've created a simple python file just to connect to an ethernet MySensors gateway and monitor all output:
      https://github.com/dirkclemens/myssniffer.py/blob/master/myssniffer.py
      If you want to use it with a serial gateway you have to make some changes in the main() routine to grab data from the usb port instead the ethernet port.

      posted in General Discussion
      dirkc
      dirkc

    Latest posts made by dirkc

    • RE: single-click, double-click, long-press button possible with MySensors?

      @ZenBlizzard , yes thanks, thats the point. How to deal with smartSleep() and battery lifetime.

      posted in General Discussion
      dirkc
      dirkc
    • single-click, double-click, long-press button possible with MySensors?

      Hi all,
      has anyone yet implemented some kind of multi tap button with MySensors?
      Such as single-click, double-click, long-press, ... ?

      I think, I cannot work with interrupts, as I can get a HIGH/LOW once only and cannot count for long-press? Correct? And a battery mode node cannot be used either (with smartSleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR_2),...) because I have to check for e.g. a long-press which might last some seconds ...

      Thanks in advance for any comment or code example?

      posted in General Discussion
      dirkc
      dirkc
    • RE: bootloaders

      @terence-faul any solution so far?

      I found this:

      create a file, e.g. mysensors_bootloader_130_8Mhz.json and save it to ~/.platformio/boards/

      {
        "build": {
          "core": "arduino",
          "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_PRO",
          "f_cpu": "8000000L",
          "mcu": "atmega328p",
          "variant": "standard"
        },
        "frameworks": [
          "arduino"
        ],
        "fuses": {
          "efuse": "0xFE",
          "hfuse": "0xD2",
          "lfuse": "0xE2",
          "lock": "0x0F",
          "unlock": "0x3F"
        },
        "name": "MySensorsBootloader 1.3.0 (Atmega328P@8M,3.3V)",
        "upload": {
          "maximum_ram_size": 2048,
          "maximum_size": 30720,
          "protocol": "arduino",
          "require_upload_port": true,
          "speed": 57600
        },
        "url": "http://www.mysensors.org",
        "vendor": "MySensors"
      }
      

      the platformio.ini should look like this:

      [env:mysensors_bootloader_130_8Mhz]
      platform = atmelavr
      framework = arduino
      board = MYSBootloader_8MHz.hex
      src_build_flags = -I/Users/dirk/Arduino/libraries/MySensors
      
      lib_deps =
        # Using a library name
      

      but I do not know where to store the MYSBootloader_8MHz.hex

      posted in General Discussion
      dirkc
      dirkc
    • RE: Atmega328 internal temperature sensor (yes it exists!)

      @mfalkvidd said in Atmega328 internal temperature sensor (yes it exists!):

      hwCPUTemperature()

      sorry, stupid question maybe, but with my 328p based sensors hwCPUTemperature() is not automatically callable using just
      #include <MySensors.h> --> neither with 2.2.0 nor with 2.3.0

      Do I have to include /hal/architecture/AVR/MyHwAVR.h ?
      Cannot compile it, what path should I use in the #include statement? ☹

      posted in Hardware
      dirkc
      dirkc
    • RE: 💬 simple MySensors MultiSensor Board

      @terxw all files from https://www.openhardware.io/view/562/simple-MySensors-MultiSensor-Board were sufficient, when I ordered my boards at allpcb. But you can create them with eagle on your own.

      posted in OpenHardware.io
      dirkc
      dirkc
    • RE: 💬 simple MySensors MultiSensor Board

      I always suggest to use caps wherever you power the board, because it "levels" or "balances" the current so it has more "stability". The resistor connected to reset is always needed as "pull-up", without that, the processor will either reboot or be unstable.

      posted in OpenHardware.io
      dirkc
      dirkc
    • RE: What did you build today (Pictures) ?

      @thucar what display do you use and where did you buy it? What library did you use?

      posted in General Discussion
      dirkc
      dirkc
    • RE: Multiple Relays + Motion sketch, fully customizable, optional timer, manual override

      @ostoja look at this video with an explanation of this topic and how to handle the IDs
      https://forum.mysensors.org/post/26597

      posted in Development
      dirkc
      dirkc
    • RE: Multiple Relays + Motion sketch, fully customizable, optional timer, manual override

      @ostoja said in Multiple Relays + Motion sketch, fully customizable, optional timer, manual override:

      // Present all sensors to controller
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {   
           present(i, S_TEMP);
        }
      
        // Register all sensors to gw (they will be created as child devices)
        for (int sensor = 1; sensor <= NUMBER_OF_RELAYS; sensor++) {
          present(sensor, S_BINARY, "Relay", ack);
        }
      

      With this two "for" loops you set present(n) multiple times. in the first for() you start with 0 until MAX_ATTACHED_DS18B20-1, in the second for() you start with 1 until NUMBER_OF_RELAYS-1, so this will assign the sensors with identical IDs as the relays.
      I have not checked the internal code of this method, but I would think that you should better user a different range in the second for() loop starting at least with MAX_ATTACHED_DS18B20+1.

      posted in Development
      dirkc
      dirkc
    • RE: MBSBootloader with different CSN/CE Pin problem

      Thanks, @tekka, but unfortunately I am still using the wrong code. I tried every combination, but as I am not sure what am doing here, I doubt to make progress.

      set MOSI,SCLK,CE,CSN to OUTPUT -> SPI_DDR = _BV(SPI_MOSI) | _BV(SPI_SCLK) | _BV(CE_PIN) | _BV(CSN_PIN)
      set PB2 to OUTPUT -> | _BV(PB2)
      set MISO to INPUT -> | ~_BV(SPI_MISO)
      and set CSN to output -> CSN_DDR = _BV(CSN_PIN);

      The controller still doesn't recognize the node, so I cannot use OTA. But when I flash the sketch (with the CE and CSN pin defined to 8 and 9) with a programmer to an atmega328p with a standard bootloader it works, so my PCB seems ok.

      #elif defined(SPI_PINS_CSN9_CE8)
      	// set pin mode: MOSI,SCLK,CE,CSN = OUTPUT, MISO = INPUT
      	// PB2 is SS pin has to be defined as OUTPUT, else SPI goes to slave mode
      	SPI_DDR = _BV(SPI_MOSI) | _BV(SPI_SCLK) | _BV(CE_PIN)  | _BV(CSN_PIN) | _BV(PB2) | ~_BV(SPI_MISO);
      	// set CSN = output
      	CSN_DDR = _BV(CSN_PIN);
      #endif
      

      Looking to other bootloaders was no success, e.g. optiboot.

      Thanks in advance for any hint or better some sample code.

      posted in Troubleshooting
      dirkc
      dirkc