Navigation

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

    alex_9419

    @alex_9419

    1
    Reputation
    3
    Posts
    350
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    alex_9419 Follow

    Best posts made by alex_9419

    • RE: Home Assistant - Receiving IR code at trigger

      @martinhjelmare

      Thanks for the help, it works!! I'm sorry for the late respons, I was busy

      posted in Home Assistant
      alex_9419
      alex_9419

    Latest posts made by alex_9419

    • RE: Home Assistant - Receiving IR code at trigger

      @martinhjelmare

      Thanks for the help, it works!! I'm sorry for the late respons, I was busy

      posted in Home Assistant
      alex_9419
      alex_9419
    • RE: Home Assistant - Receiving IR code at trigger

      Thanks!

      I didn't knew it was part of S_IR!

      posted in Home Assistant
      alex_9419
      alex_9419
    • Home Assistant - Receiving IR code at trigger

      Hi everyone,

      I'm trying to receive data to my sensor from my controller (Home assistant ) with the mysensors library.
      I'm using a RFM69 to communicate with the controller.
      I'd like to receive a certain code to a IR switch to control my heatpump.

      I made a test sketch and uploaded it to my sensor. The sensor is succesfully added to the controller.
      I also made a automation part to test it with a switch, every time the switch is off, (press of a button) a test code is send. The YAML file didn't gave an error.

      I don't receive the code to my sensor, and a also have an error on HA:


      17-02-01 11:33:39 homeassistant.components.switch.mysensors: missing value_type: V_STATUS at node: 6, child: 1

      I don't know why I should also send a V_STATUS message?
      Can anyone help me?
      YAML file, and ino file is added:

      - alias: 'turn HVAC on'
        trigger:
          - platform: state
            entity_id: binary_sensor.motion_sensor_1_1
            state: 'on'
        action:
          service: switch.mysensors_send_ir_code
          entity_id: switch.ir_switch_sensor_6_16
          data:
            V_IR_SEND: '0x26c6'
      
      
      #define MY_RADIO_RFM69
      #define MY_DEBUG
      
      #include <MyConfig.h>
      #include <MySensors.h>
      #include <SPI.h>
      
      #define CHILD_ID 16
      #define CHILD_ID_TEXT 17
      
      char code[10] = "abcd01234";
      MyMessage msgCode(CHILD_ID, V_IR_SEND);
      MyMessage textMsg(CHILD_ID_TEXT, V_TEXT);
      
      void setup() {
        send(textMsg.setSensor(CHILD_ID_TEXT).set("00000000"));
        send(msgCode.setSensor(CHILD_ID).set(code));
      }
      
      void loop() {
        
      }
      
      void presentation() {
        sendSketchInfo("IR Switch sensor","V1.0");
        present(CHILD_ID, S_IR,"IR Sender");
        present(CHILD_ID_TEXT, S_INFO, "IR data");
        
      }
      
      
      void receive(const MyMessage &message) {
        if(message.type == V_IR_SEND) {
          Serial.println("V_IR_SEND command received");
          int Ir_Code = message.getInt();
          Serial.println(Ir_Code);
        }
      }
      
      posted in Home Assistant
      alex_9419
      alex_9419