Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
A

alex_9419

@alex_9419
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Home Assistant - Receiving IR code at trigger
    A alex_9419

    @martinhjelmare

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

    Home Assistant

  • Home Assistant - Receiving IR code at trigger
    A alex_9419

    Thanks!

    I didn't knew it was part of S_IR!

    Home Assistant

  • Home Assistant - Receiving IR code at trigger
    A alex_9419

    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);
      }
    }
    
    Home Assistant
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular