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
D

diltech

@diltech
About
Posts
11
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Gateway on my PI when i run HA
    D diltech

    Hi,

    Thank for your reply. Yes, i run since many years with a serial Gateway connected with my PI.
    I thought it was possible to use the same machine to remove this extra element.
    If you had a stability issue, I would just stick with my current formula and not change everything for now.

    Regards,

    Home Assistant

  • Hi,
    D diltech

    How can update VAR_1 via HA for change data?

    thank

    Home Assistant

  • Gateway on my PI when i run HA
    D diltech

    @mfalkvidd said in Gateway on my PI when i run HA:

    Home Assistant Operating System

    Home Assistant Operating System

    Home Assistant

  • Gateway on my PI when i run HA
    D diltech

    Hi,

    Is it possible to put a gateway (Radio RF24) on my PI when i run my Home assistant on same machine ?

    Thanks

    Home Assistant

  • CHANGE STATE ATTRIBUTE (DATA) WITH NODE-RED
    D diltech

    HI,

    I NEED TO CHANGE ATTRIBUTE, V_VAR1 ON MY NODE (MYSENSORS) SERIAL. HOW CAN DO THAT WITH NODE-RED IN HA. I JUST WANT TO CHANGE VALUE BECAUSE I DON'T SEE ANY SERVICE CAN DO THAT.

    THANKS.

    Home Assistant

  • How can initialize relays first time.
    D diltech

    HI,

    I installed this firmware in HAAS and it works fine. It controls my 8 relays without problem and the status remains the same when I restart my nano, it takes the same status.
    I have problems only at the start to detect the relays in HASS. I have tried several things but I would like to know how to avoid it if the status has already been detected. In other words, the first initiation.

    #include <Arduino.h>
    /**
     *
     * REVISION HISTORY
     * Cette version est fonctionnel et est compatible avec Home Assistant (Sauf l'initialisation)
     * Utilise le composant 74HC595 pour réduire le nombre de fils.
     *
     * DESCRIPTION
     * Ce firmware utilise 8 sorties pour relais
     * V_STATUS sert seulement pour le statu de sortie
     * V_CUSTOM est pour activé les relais.
    */
    // Mettre le mode DEBUG ou l'enlever en commentaire
    #define MY_DEBUG
    // Enable and select radio type attached
    #define MY_RADIO_RF24
    //#define MY_RADIO_RFM69
    //#define MY_IS_RFM69HW
    //#define MY_RFM69_NEW_DRIVER				// Use new RFM69 Driver (include ATC)
    //#define MY_RFM69_FREQUENCY RFM69_868MHZ
    #define MY_REPEATER_FEATURE
    
    
    #include <SPI.h>
    #include <MySensors.h>
    
    #define SN "8_Relais"
    #define SV "1.2"
    
    
    #define NB_OUTPUTS 8
    #define OUTPUT_SER		7	// Serial data comes on this pin
    #define OUTPUT_RCLK		8	// This is the LATCH pin. Data is released when the pin goes HI
    #define OUTPUT_SRCLK	4	// Clock pin
    #define HEARTBEAT_DELAY 3600000
    #define pinEnable 6 // C'est dans la conception du board. La pin D6 doit être à 0 pour que le 74HC595 soit enable.
    
    
    
    byte outputStates;
    unsigned long lastHeartBeat=0;
    
    
    
    
    
    void changeOutputState(int i, boolean newState){
    	bitWrite(outputStates, i, newState);
    
    	// Lock latch
    	digitalWrite(OUTPUT_RCLK, LOW);
    	// Write bits
    	shiftOut(OUTPUT_SER, OUTPUT_SRCLK, MSBFIRST, outputStates);
    	// Unlock latch
    	digitalWrite(OUTPUT_RCLK, HIGH);
    }
    
    
    void setup() {
    
    	pinMode( OUTPUT_SER, OUTPUT);
    	pinMode( OUTPUT_RCLK, OUTPUT);
    	pinMode( OUTPUT_SRCLK, OUTPUT);
      pinMode( pinEnable, OUTPUT);
      digitalWrite(pinEnable, LOW);  // On met ici toujour la pin D6 à LOW
      
    
    }
    
    
    
    void presentation() {
    	// On envoie ici la version et le nom du Sketch
    	sendSketchInfo(SN, SV);
    
    	// On présente les relais selon le nombre établi au départ.
    	for (int i=0; i< NB_OUTPUTS; i++){
    		present(i, S_BINARY );
    	}
    }
    
    
    void loop(){
    
      
    
    	// Send a HeartBeat frequently so Domoticz see us as alive.
    	if (millis() > lastHeartBeat + HEARTBEAT_DELAY){
    		lastHeartBeat = millis();
    		sendHeartbeat();
        }
    }
    
    
    void receive(const MyMessage &message){
    
    	boolean currentStatus;
    
    	switch(message.type){
    		case V_CUSTOM:
    			// Revert output status :
    			currentStatus=bitRead(outputStates, message.sensor);
    			changeOutputState(message.sensor, !currentStatus);
    			break;
    		case V_STATUS:
    			changeOutputState(message.sensor, message.getBool());
    			break;
    	}
    
    
    	// Send new state :
    	currentStatus=bitRead(outputStates, message.sensor);
    	MyMessage msg(message.sensor, V_STATUS);
    	msg.set(currentStatus);
    	send(msg);
    
    }
    
    
    

    Thank if somebody known

    Home Assistant

  • Change variable value into Home Assistant
    D diltech

    Bien,

    J'ai trouvé la manière d'aller chercher ces variables depuis Home Assistant. Je pense qu'il ne faut pas le faire par le fichier même mais par les attributs de l'entité. Reste pour moi de trouver un moyen de modifié ces variables.

    {{ state_attr('switch.relaisboard_2_2', 'V_VAR1') }}  // result 1
    {{ state_attr('switch.relaisboard_2_2', 'V_VAR2') }}  // result 5
    

    Je continue mes investigations.

    Home Assistant

  • Re: [WaterMeterPulseSensor not showing up in HA UI]
    D diltech

    Hi,

    Re: WaterMeterPulseSensor not showing up in HA UI

    Just add manually VAR_1 into your persistence file or send message via firwware for create it.

    I don't know why Home Assistant can't create itself by only request command.

    View in firmware, if no VAR_1 exist, a loop is infinite ???? Weird thing.

    Regards,

    Home Assistant

  • Change variable value into Home Assistant
    D diltech

    Hi,

    Somebody know how can change value in the persistence file via a card on Home Assistant for specific sensor node/id ?

                "5": {
                    "id": 5,
                    "type": 3,
                    "description": "",
                    "values": {
                        "24": "1", // Need change this value
                        "25": "5", // Need change this value
                        "2": "0"```
    Home Assistant

  • mysprinkler for mysensor and home assistant not working together
    D diltech

    Hi,

    You can fix variable with sending data. In the firmware, you must add this function for place value in this V_VARx

    So, place this function into your setup firmware.

    Where in this case

    MyMessage var1valve(CHILD_ID_SPRINKLER, V_VAR1);
    MyMessage var2valve(CHILD_ID_SPRINKLER, V_VAR2);
    

    This loop repeat for each relay (i) and you can set any value at the end (1) for one minutes and (5) for five minutes.

    That's all.

    void goInitiateValveTime() {
      for (byte i = 0; i <= NUMBER_OF_VALVES; i++)
      {
        send(var1valve.setSensor(i).set(1));
        wait(50);
        send(var2valve.setSensor(i).set(5));
      }
      wait(50);
      lastValve = -1;
    }
    

    Refresh Home Assistant just after run one time your script and value appear in your persistence file.

    Regars,

    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