Navigation

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

    kiesel

    @kiesel

    14
    Reputation
    88
    Posts
    124
    Profile views
    1
    Followers
    0
    Following
    Joined Last Online

    kiesel Follow

    Best posts made by kiesel

    • RE: IR Node resending last signal ca every 15 minutes

      I had a look at the Home Assistant logs and I think I have been blaming the wrong beast, my code seems to be innocent.

      I use appdaemon to execute actions in/from Home Assistant. There I can see exactly when a "ghost"-update was received.

      Matching those timestamps with timestamps from the Home Assistant log was spot on:

      Appdaemon log:

      2020-03-11 09:38:23.092076 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 09:39:48.834817 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 09:48:03.398937 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 09:49:19.742706 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 10:05:24.735442 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 10:06:58.973448 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 10:38:26.141511 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 10:39:42.890820 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 10:47:59.874830 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 10:49:16.437996 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 11:15:23.592502 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 11:16:40.138025 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 11:18:05.195990 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 11:19:39.443632 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 12:27:05.469657 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 12:28:22.691106 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 12:35:15.985303 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 12:36:33.073911 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 12:40:29.881660 INFO Living_Room_IR: ir_value: 551505585
      2020-03-11 12:42:01.804079 INFO Living_Room_IR: ir_value: 551505585
      

      Here is the corresponding part of the home assistant log:

      {"log":"2020-03-11 09:38:22 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T08:38:22.931537407Z"}
      {"log":"2020-03-11 09:39:48 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T08:39:48.650792534Z"}
      {"log":"2020-03-11 09:48:03 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T08:48:03.210220912Z"}
      {"log":"2020-03-11 09:49:19 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T08:49:19.579932619Z"}
      {"log":"2020-03-11 10:05:24 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T09:05:24.564205929Z"}
      {"log":"2020-03-11 10:06:58 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T09:06:58.804235809Z"}
      {"log":"2020-03-11 10:38:25 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T09:38:25.95710773Z"}
      {"log":"2020-03-11 10:39:42 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T09:39:42.703318764Z"}
      {"log":"2020-03-11 10:47:59 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T09:47:59.694853604Z"}
      {"log":"2020-03-11 10:49:16 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T09:49:16.294815751Z"}
      {"log":"2020-03-11 11:15:23 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T10:15:23.452517606Z"}
      {"log":"2020-03-11 11:16:39 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T10:16:39.957885612Z"}
      {"log":"2020-03-11 11:18:05 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T10:18:05.045447402Z"}
      {"log":"2020-03-11 11:19:39 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T10:19:39.270413469Z"}
      {"log":"2020-03-11 12:27:05 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T11:27:05.326243334Z"}
      {"log":"2020-03-11 12:28:22 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T11:28:22.519338238Z"}
      {"log":"2020-03-11 12:35:15 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T11:35:15.805191381Z"}
      {"log":"2020-03-11 12:36:32 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T11:36:32.903939567Z"}
      {"log":"2020-03-11 12:40:29 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T11:40:29.720752968Z"}
      {"log":"2020-03-11 12:42:01 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T11:42:01.635196016Z"}
      

      So it seems that every time a Node update was triggered Home Assistant was told that there was a new value received from the IR-sensor.

      Here is the whole log from Home Assistant:

      {"log":"2020-03-11 12:42:00 DEBUG (MainThread) [mysensors.handler] n:0 c:255 t:3 s:9 p:11494641 TSF:MSG:RE
      AD,3-3-0,s=0,c=1,t=1,pt=7,l=5,sg=0:38.4\n","stream":"stderr","time":"2020-03-11T11:42:00.295978262Z"}
      {"log":"2020-03-11 12:42:00 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 0\n","stream":"stderr","time":"2020-03-11T11:42:00.311538101Z"}
      {"log":"2020-03-11 12:42:00 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update:
      mysensors_wohnzimmer_main 3 0: value_type 1, value = 38.4\n","stream":"stderr","time":"2020-03-11T11:42:00
      .415847867Z"}
      {"log":"2020-03-11 12:42:00 DEBUG (MainThread) [mysensors.handler] n:0 c:255 t:3 s:9 p:11495280 TSF:MSG:RE
      AD,3-3-0,s=2,c=1,t=37,pt=7,l=5,sg=0:45.0\n","stream":"stderr","time":"2020-03-11T11:42:00.93325235Z"}
      {"log":"2020-03-11 12:42:00 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 2\n","stream":"stderr","time":"2020-03-11T11:42:00.950559479Z"}
      {"log":"2020-03-11 12:42:01 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update:
      mysensors_wohnzimmer_main 3 2: value_type 37, value = 45.0\n","stream":"stderr","time":"2020-03-11T11:42:0
      1.058505324Z"}
      {"log":"2020-03-11 12:42:01 DEBUG (MainThread) [mysensors.handler] n:0 c:255 t:3 s:9 p:11495962 TSF:MSG:RE
      AD,3-3-0,s=255,c=3,t=0,pt=1,l=1,sg=0:22\n","stream":"stderr","time":"2020-03-11T11:42:01.618936799Z"}
      {"log":"2020-03-11 12:42:01 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: n
      ode 3 child 255\n","stream":"stderr","time":"2020-03-11T11:42:01.635196016Z"}
      {"log":"2020-03-11 12:42:01 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update:
      mysensors_wohnzimmer_main 3 0: value_type 1, value = 38.4\n","stream":"stderr","time":"2020-03-11T11:42:01
      .738527926Z"}
      {"log":"2020-03-11 12:42:01 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update:
      mysensors_wohnzimmer_main 3 1: value_type 0, value = 22.4\n","stream":"stderr","time":"2020-03-11T11:42:01
      .743098362Z"}
      {"log":"2020-03-11 12:42:01 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update:
      mysensors_wohnzimmer_main 3 3: value_type 50, value = 624502100\n","stream":"stderr","time":"2020-03-11T11
      :42:01.747319859Z"}
      {"log":"2020-03-11 12:42:01 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update:
      mysensors_wohnzimmer_main 3 3: value_type 33, value = 551505585\n","stream":"stderr","time":"2020-03-11T11
      :42:01.748432047Z"}
      {"log":"2020-03-11 12:42:01 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update:
      mysensors_wohnzimmer_main 3 2: value_type 37, value = 45.0\n","stream":"stderr","time":"2020-03-11T11:42:0
      1.752559045Z"}
      {"log":"2020-03-11 12:42:02 DEBUG (SyncWorker_3) [mysensors.persistence] Saving sensors to persistence fil
      e /config/mysensorsserial.json\n","stream":"stderr","time":"2020-03-11T11:42:02.441267303Z"}
      

      Does anybody have an idea how I can prevent these updates? Or should I continue this thread in the Home Assistant forum of mysensors?

      posted in Home Assistant
      kiesel
      kiesel
    • RE: [SOLVED] Dropped node: arduino blinks only once

      Seems you where both right. A short drained the battery (which I didn't notice) and getting rid of the short and using a new set of rechargeables solved the problem.

      Thank you very much!

      posted in Troubleshooting
      kiesel
      kiesel
    • RE: 💬 Building a Raspberry Pi Gateway

      @mfalkvidd @phildefer

      I can confirm that the code compiles and runs on my rasbperry pi 4 model b. I am using a rfm69 radio and that seems to be working too. I couldn't test it yet though since I haven't wired any rfm69 nodes up yet.

      posted in Announcements
      kiesel
      kiesel
    • RE: IR Node resending last signal ca every 15 minutes

      @mfalkvidd

      I am a bit embarrassed that I didn't post them straight away. I'll collect a bit of data during the night and send the logs tomorrow. Thanks!

      posted in Home Assistant
      kiesel
      kiesel
    • RE: [SOLVED] rfm69-node <-> rpi 4 gateway: !TSM:FPAR:NO REPLY

      @mfalkvidd

      Good catch, I didn't do that. Before I saw your message I checked the wiring and I introduced a new bug apparently because now the MQTT-gateway doesn't start anymore either, so I'll have to rewire.

      I'll write again after I did that. Thanks for the help!

      posted in Troubleshooting
      kiesel
      kiesel
    • RE: 💬 Easy/Newbie PCB for MySensors

      @sundberg84 I did, thanks, I discovered ISRs. Thanks for the support.

      posted in OpenHardware.io
      kiesel
      kiesel
    • RE: Which battery measurement to use?

      @mfalkvidd

      I am planning on using a booster, so that's very good to know, thanks!

      posted in Development
      kiesel
      kiesel
    • RE: [SOLVED] rfm69-node <-> rpi 4 gateway: !TSM:FPAR:NO REPLY

      So this was either a faulty module or bad soldering. I soldered a new module and now everything works as expected. Thanks for the help!

      posted in Troubleshooting
      kiesel
      kiesel
    • RE: script to convert serial to mqtt?

      @electrik perfect, thank you both!

      posted in Development
      kiesel
      kiesel
    • RE: rfm69 gateway freezing on rpi 4

      I think this was solved by soldering a wire to the reset pin of the rfm69 and pin 29 of the raspberry pi and reconfiguring the gateway with

      --extra-cxxflags="-DMY_RFM69_RST_PIN=29"
      

      Now the connection is instant (before it was about 10-20 seconds IF it worked at all.

      But since this is my first gig with electronics it might just be that I had a bad connection and moving the wires around fixed it....

      posted in Troubleshooting
      kiesel
      kiesel

    Latest posts made by kiesel

    • RE: Starting my PC with a 3.3v arduino pro mini?

      So, I finally got this done and it works just like I want it to. I used my initial schematics (plus radio, of course) and this code:

      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0: Yveaux
       * 
       * DESCRIPTION
       * This sketch provides an example of how to implement a humidity/temperature
       * sensor using a Si7021 sensor.
       *  
       * For more information, please visit:
       * http://www.mysensors.org/build/humiditySi7021
       * 
       */
      
      // Enable debug prints
      #define MY_DEBUG
      
      #define MY_OWN_DEBUG
      
      #ifndef MY_OWN_DEBUG //disable serial in production compile, potentially saves few uA in sleep mode
           #define MY_DISABLED_SERIAL
      #endif
      
      
      // Enable and select radio type attached
      #define MY_RADIO_RFM69
      #define MY_IS_RFM69HW
      #define MY_RFM69_NEW_DRIVER
      
      
      #define MY_NODE_ID 5
      #define CHILD_ID_TXT 0
      #define OUTPIN 8
      #include <MySensors.h>
      
      
      #define SKETCH_NAME "media_pc_switch"
      #define SKETCH_MAJOR_VER "1"
      #define SKETCH_MINOR_VER "0"
      
      static bool metric = true;
      
      MyMessage msgTxt(CHILD_ID_TXT, V_TEXT);
      void presentation()
      {
         // Send the sketch version information to the gateway and Controller
        sendSketchInfo(SKETCH_NAME, SKETCH_MAJOR_VER "." SKETCH_MINOR_VER);
        present(CHILD_ID_TXT, S_INFO);
      }
      void setup()
      { 
         pinMode(OUTPIN, OUTPUT);    //
         digitalWrite(OUTPIN, LOW);
         #ifdef MY_OWN_DEBUG
            Serial.print("Starting: ");
        #endif
        send(msgTxt.set("Ready"));
      }
      
      void receive(const MyMessage &msg)
      {
        uint16_t ms;
        Serial.print("Received a message: ");
        Serial.println(msg.getString());
        send(msgTxt.set(msg.getString()));
        ms = msg.getUInt();
        if (ms > 10000 || ms < 1){return;}
        send(msgTxt.set("Received"));
        Serial.println("Pulling pin high");
        digitalWrite(OUTPIN, HIGH);
        Serial.print("Waiting for "); Serial.println(ms);
        delay(ms);
        Serial.println("Switching off");
        digitalWrite(OUTPIN, LOW);
        Serial.println("Delaying a few seconds to ignore message resends.");
        send(msgTxt.set("Sleeping"));
        delay(10000);
        send(msgTxt.set("Ready"));
        
        
      }
      

      Now I can use this sequence in HA to start my PC even when the power was cut:

      wzimmer_ms_start_htpc:
        alias: Use mysensors node 5 to start the mediapc in the living room
        sequence:
          repeat:
            sequence:
              #don't run if htpc already running
                - condition: not
                  conditions:
                  - condition: state
                    entity_id: binary_sensor.htpc
                    state: 'on'
              #send start signal to mysensors
                - service: notify.mysensors
                  data:
                    target: "media_pc_switch 5 0"
                    message: 1000
              #wait for timeout seconds whether a message has been received
                - wait_for_trigger:
                  - platform: state
                    entity_id: sensor.media_pc_switch_5_0
                    to: "Received"
                  timeout: '00:00:04'
            until:
                # Did it work?
                - condition: state
                  entity_id: sensor.media_pc_switch_5_0
                  state: Received
      

      Thank you, @cabat for your help and your patience!!! 🙂

      posted in Development
      kiesel
      kiesel
    • RE: Starting my PC with a 3.3v arduino pro mini?

      @cabat

      If I wanted this protection where would I put it in my schematic? 🙂

      Between ground an 3.3v?

      /edit: no between the arduino and 3.3v from the Mainboard, right?

      posted in Development
      kiesel
      kiesel
    • RE: Starting my PC with a 3.3v arduino pro mini?

      @cabat

      Ah, ok, I get it now. The diode protects me from wiring this up with POWER and GND switched. So I would use it like this

      2f1f33db-fcc8-4a8e-8519-f2de7ef351d3-image.png

      But I guess I can't because of the voltage drop. I think that's out of specs for the PC817. And anyway there is a very low chance that I will wiring this side of the schematic up wrong.

      I guess I was just confused by the lower part of your drawing.

      Thank you VERY much for your patience! I'll supply pictures when I have this hooked up in the hopes they will help others.

      Have a nice weekend!

      posted in Development
      kiesel
      kiesel
    • RE: Starting my PC with a 3.3v arduino pro mini?

      @cabat

      To protect from polarity reversing, like you did in your sketch. Sorry if that's a stupid question!

      posted in Development
      kiesel
      kiesel
    • RE: Starting my PC with a 3.3v arduino pro mini?

      @cabat

      Cool, thank you for your help!

      Should I use a diode between 3.3v and GND too? And do I need a resistor in the mainboard-side of the schematic? Some people used them to protect the optocoupler from high current but I guess there isn't a high current when the power button is pressed?

      posted in Development
      kiesel
      kiesel
    • RE: Starting my PC with a 3.3v arduino pro mini?

      So I think I understand the main part of your drawing: The optocoupler keeps the Arduino circuit separate from the mainboard circuit to prevent a short. The resistor is for the diode inside the optocoupler.

      There are a few things about your drawing that I don't understand:

      1. Why is there a 5V powerline with a diode?
      2. What does the MB stand for? Mainboard
      3. Why are there two connection points from the Mainboard? Is one reset?

      I tried my first Fritzing to make sense of this and to show how I would design the connections (doesn't mean it's right).

      fritzing1.png

      PW+ and PW- are the pins from the schematic in the first post. , 3,3V and GND are available on another set of pins on the mainboard. Would this work?

      posted in Development
      kiesel
      kiesel
    • RE: Starting my PC with a 3.3v arduino pro mini?

      Thank you. It seems I have some groundwork to do and learn how to read the schematics 😄 That hasn't been necessary until now. I'll do that and come back here when I understand enough

      posted in Development
      kiesel
      kiesel
    • Starting my PC with a 3.3v arduino pro mini?

      Hi,

      I'd like to start my PC using an Arduino Pro Mini (3.3v) but I am not sure how to hook it up.

      There are a lot of tutorials (if you include esp8266 devices) but I am not sure which parts I exactly need. In essence I need to pull the power pin high that is connected to the power button (if I understood correctly).

      7464c810-3489-48e6-ac30-4d043fbe3aa6-image.png

      So on my mainboard (Gigabyte Aorus B450M) that means I connect RES+ to a pin on my arduino and RES- to GND, right?

      There is a 3.3v pin on the mainboard (schematic), can I connect the arduino to that pin to power it?

      And the most important question: Do I need any other parts? Is the voltage higher on RES+? Does that mean it can fry my arduino?

      And in case the question comes up: I can't use wol because I disconnect the PC from power when off. That is apparently against the wol specs and only works in a few cases (of which my mainboard apparently isn't one).

      Thanks for any help!

      posted in Development
      kiesel
      kiesel
    • RE: [SOLVED] Dropped node: arduino blinks only once

      Seems you where both right. A short drained the battery (which I didn't notice) and getting rid of the short and using a new set of rechargeables solved the problem.

      Thank you very much!

      posted in Troubleshooting
      kiesel
      kiesel
    • [SOLVED] Dropped node: arduino blinks only once

      Hi,

      sorry for the cryptic topic-name, I'll try to elaborate.

      I have build a node with an arduino pro mini 3.3, an rfm69, a temp sensor, a lux sensor and a door sensor using the easypcb. The node worked flawlessly and I mounted it above the door I wanted to monitor. Unfortunately I mounted it rather badly and it came down after two weeks.

      It didn't turn on again and I saw that a part of the step up booster came loose, so I replaced the step up booster.

      When I now attach my batteries to it (2 AA rechargables, 1.6V in total, measured with my multimeter) the status-led (not the power led, I desoldered that one) blinks shortly once but then stays silent and I am not receiving any messages on the gateway.

      It all works as expected if I power the arduino with the FTDI-serial-adapter so I think the arduino is ok?

      Two things I noticed: When I switch battery power on the status led blinks once, as I said. When I then turn the power off and immediately back on again it doesn't blink. I have to wait some time before it blinks again.

      I measured the voltage at the screw terminal and there it is only 0.4V instead of the 1.6V I see when I measure it at the cables of the battery holder directly. I don't know whether that's expected or not, but I wanted to mention it.

      Here are pictures of the node:

      IMG_20200622_231818.png.jpg
      IMG_20200622_232020.jpg IMG_20200622_232007.jpg

      Thanks for any help!

      posted in Troubleshooting
      kiesel
      kiesel