Skip to content
  • 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
B

BastienVH

@BastienVH
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store
About
Posts
38
Topics
4
Shares
0
Groups
0
Followers
1
Following
0

Posts

Recent Best Controversial

  • Easy/Newbie PCB for MySensors
    B BastienVH

    @sundberg84
    About D2: you mean I shouldn't solder the IRQ of the radio to the board?
    I will try that next time.

    I've been testing the PIR with a nano and the 3.3V it supplies and that works fine.
    If I take VCC or ground (or both) from the board with booster, the PIR starts acting up.
    I guess I'll have to try some more if I want to get to the bottom of things.

    Hardware

  • Easy/Newbie PCB for MySensors
    B BastienVH

    @sundberg84
    Hey, I've been having a bit of trouble lately.
    I've been trying to setup a node with your board which supports a PIR and a temp sensor (ds18b20).
    Since there is a spot for a resistor on D3 on your board, I attached the temp sensor to that pin.
    The PIR needs a pin that supports interrupts, so I connected that to D2.
    Here is where the confusion starts.
    If I read this page correctly, D2 is already in use for the radio.
    I only checked it after I soldered everything together and found out my PIR doesn't work (it always sends a 1-signal).

    Any thoughts on this?
    Is D2 really free for use on the board?

    Thanks!

    Hardware

  • ๐Ÿ’ฌ Easy/Newbie PCB for MySensors
    B BastienVH

    @sundberg84 said:

    If you use the FTDI connector, make sure its the 3.3v and connect it to Gnd/Pwr on the PCB and not Arduino FDTI connector.
    You could just exclude those pins and connect a battery directly and use that as power and the FDTI as programmer/serial debug only

    Bat or Reg is nessecary!
    See this picture for battery use: https://www.openhardware.io/view/4/EasyNewbie-PCB-for-MySensors
    https://www.openhardware.io/uploads/568ed84b60aa3f8965fbf095/image/3.jpg
    All components in the image is needed (except battery measurment).
    If you dont want to use booster you need to bypass that one with a wire/jumper (or set the jumper on REG instead of BAT but that kills the logic).

    The battery doesnt "need" the 0,1uF but see here:https://www.mysensors.org/build/battery
    "The tap point could be bypassed with a 0.1 uF capacitor to keep the noise level low, at this otherwise high impedance point. "

    OpenHardware.io mysensors battery easy newbie pcb mysx

  • openHAB binding
    B BastienVH

    After reinstalling OpenHAB, the binding works fine, thank you!
    Just a question, don't know if you can help.

    I mapped my serial gateway to /dev/MSgw because ttyUSBx tends to change when unplugging / replugging multiple USB devices into the computer (raspberry pi in my case).
    I've also got a 433MHz gateway attached and when debugging have to unplug it sometimes.
    When trying to start OpenHAB with /dev/MSgw as gateway address I get this:

    2016-02-14 10:58:33.418 [DEBUG] [.b.m.internal.MySensorsBinding] - activate
    RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyUSB1
    2016-02-14 10:58:34.048 [ERROR] [.o.b.m.internal.gateway.Serial] - Unable to find Serial port '/dev/MSgw'
    

    Do you know how/if I can still you my own custom paths to the gateway?
    Now I changed it to ttyUSB1, but that port might change after rebooting.

    OpenHAB

  • openHAB binding
    B BastienVH

    @bkl
    Thanks for your response.
    After adding the line of code to the logback, my debug output remains the same.
    No message that new items have been added based on the configuration, nor parse-errors.

    It's just the same as before: the messages are received, but not interpreted correctly, just the raw data like below:
    2016-02-13 15:05:55.551 [INFO ] [.b.m.internal.MySensorsBinding] - Unknown: MySensors message: node-id=20, child-sensor-id=0, message-type=set, ack=false, sub-type=V_HUM, payload=48.0

    I will start over again from scratch tomorrow, reinstall openhab and your binding to see if it helped.

    OpenHAB

  • openHAB binding
    B BastienVH

    Hi,

    I've tried out you binding on OpenHAB 1.8.1.
    It appears OpenHAB can connect to my serial gateway and receives the messages from my node, but doesn't know what to do with it.

    This is en excerpt of my log:

    2016-02-13 15:05:52.548 [INFO ] [.b.m.internal.MySensorsBinding] - New MySensor node found: node-id=20
     * Example item: 20;255;I_BATTERY_LEVEL      - Use this to report the battery level 0-100 (%)
     * Example item: 20;255;I_SKETCH_NAME        - Sketch name that can be used to identify sensor
     * Example item: 20;255;I_SKETCH_VERSION     - Sketch version that can be reported to keep track of the version of sensor
    2016-02-13 15:05:54.479 [INFO ] [.b.m.internal.MySensorsBinding] - Unknown: MySensors message: node-id=20, child-sensor-id=255, message-type=internal, ack=false, sub-type=I_SKETCH_NAME, payload=Temp/Hum/Motion
    2016-02-13 15:05:54.486 [INFO ] [.b.m.internal.MySensorsBinding] - Unknown: MySensors message: node-id=20, child-sensor-id=255, message-type=internal, ack=false, sub-type=I_SKETCH_VERSION, payload=1.0
    2016-02-13 15:05:54.498 [INFO ] [.b.m.internal.MySensorsBinding] - New MySensor sensor found (Humidity sensor): node-id=20, sensor-id=0 with type S_HUM
     * Example item: 20;0;V_HUM                - Humidity
    2016-02-13 15:05:54.521 [INFO ] [.b.m.internal.MySensorsBinding] - New MySensor sensor found (Temperature sensor): node-id=20, sensor-id=1 with type S_TEMP
     * Example item: 20;1;V_TEMP               - Temperature
     * Example item: 20;1;V_ID                 - Optional unique sensor id (e.g. OneWire DS1820b ids)
    2016-02-13 15:05:54.545 [INFO ] [.b.m.internal.MySensorsBinding] - New MySensor sensor found (Motion sensor): node-id=20, sensor-id=2 with type S_MOTION
     * Example item: 20;2;V_TRIPPED            - Tripped status of a security sensor. (Tripped/Untripped)
     * Example item: 20;2;V_ARMED              - Armed status of a security sensor. (Armed/Bypassed)
    2016-02-13 15:05:54.567 [INFO ] [.b.m.internal.MySensorsBinding] - Unknown: MySensors message: node-id=20, child-sensor-id=2, message-type=set, ack=false, sub-type=V_TRIPPED, payload=1
    2016-02-13 15:05:55.537 [INFO ] [.b.m.internal.MySensorsBinding] - Unknown: MySensors message: node-id=20, child-sensor-id=1, message-type=set, ack=false, sub-type=V_TEMP, payload=19.0
    2016-02-13 15:05:55.551 [INFO ] [.b.m.internal.MySensorsBinding] - Unknown: MySensors message: node-id=20, child-sensor-id=0, message-type=set, ack=false, sub-type=V_HUM, payload=48.0
    

    All the sensors get declared and recognized as their type, but the messages are not being interpreted correctly.

    This is my .items-file:

    Number Humidity "Livingsensor [%s %%Rh]" <water> (GF_Living) {mysensors="20;0;V_HUM"}
    Number Temperature "Livingsensor [%s ยฐC]" <temperature> (GF_Living) {mysensors="20;1;V_TEMP"}
    Switch Motion "Livingsensor [%s]" <motion> (GF_Living) {mysensors="20;2;V_TRIPPED"}
    

    And the sitemap (which of course doesn't update anything yet):

    sitemap default label="Main Menu"
    {
    	Frame label="Systeem"{
    	Group item=System	label="Systeeminfo"	icon="computer" {
    				Text	item=uptime	icon="computer"
    				Text	item=Raspi_CPU	icon="computer"
    				Switch	item=wakingup
    	}
    	}
    	Frame label="MySensors" {
    	Switch item=Motion
    	Text item=Humidity
    	Text item=Temperature
    }
    }
    

    It's been a while since I used OpenHAB and went looking for something more lightweight that had better integration for MySensors, but with your binding, I could revert to include everything I've built for OpenHAB in the past.

    Thanks for your initial work and I hope you can help me out.

    OpenHAB

  • ๐Ÿ’ฌ Easy/Newbie PCB for MySensors
    B BastienVH

    @sundberg84
    When I get the caps, I'll place them on the board.
    I did notice alot of noise when I was reading battery state on a breadboard in an earlier build, so I will get that sorted.
    Only problem is I can't find them locally, so have to get them from China.
    Will take a while...

    OpenHardware.io mysensors battery easy newbie pcb mysx

  • ๐Ÿ’ฌ Easy/Newbie PCB for MySensors
    B BastienVH

    @BastienVH
    Replying to myself to follow up on my assembly-issues.
    I have been able to get the board to work.
    I don't have my 0.1ยตF caps yet, so I just put a little blob of solder in the holes so the current could run through.
    Now I've got myself 2 working board. I just have to find a good way to attach my PIR, dallas temp, ... to them.

    Thanks for the work and help!

    OpenHardware.io mysensors battery easy newbie pcb mysx

  • Buttons that send different signals to the same sensor
    B BastienVH

    @mwild95
    Could you share your sketch?
    I'm planning to mysensor-ize my 433 wall plugs and it might be a good starting point :-)

    MyController.org

  • ๐Ÿ’ฌ Easy/Newbie PCB for MySensors
    B BastienVH

    @sundberg84
    Thanks for the explanation!
    I think I've got it now.
    Will test and get back with the results when I've gotten my hands on some more solder wire!

    OpenHardware.io mysensors battery easy newbie pcb mysx

  • ๐Ÿ’ฌ Easy/Newbie PCB for MySensors
    B BastienVH

    I have a 3.3v arduino.
    At the moment it's powered the FTDI232 connected to my computer.
    I will transfer to battery once I'm done.
    Do you mean the "BAT" / "REG"?
    I haven't soldered that. I'm guessing that's necessary?

    Also, while I have you hear ;-) , if I want to use the battery measuring, do I have to add the 0.1uF capacitor?
    What advantage does it provide?

    Thanks for your help!

    OpenHardware.io mysensors battery easy newbie pcb mysx

  • ๐Ÿ’ฌ Easy/Newbie PCB for MySensors
    B BastienVH

    @sundberg84
    Hey, I've been trying to get my boards to work, but without succes so far.
    They are revision 7 and have mounted 2 boards with a pro mini and the radio but they're not working.
    For the second one I actually checked both the arduino and radio beforehand to see if they functional, which they were.
    Now with them mounted, I still get the "radio init fail" message in the arduino serial monitor.
    The first board, I mounted with the cap, the second one not yet (I ran out of solder wire).

    Any ideas how to troubleshoot this?
    Should I upload some pictures so you can check the solderjob?

    OpenHardware.io mysensors battery easy newbie pcb mysx

  • Error using Home Assistant with a serial gateway
    B BastienVH

    @martinhjelmare
    Thanks for the heads up!
    After following the steps there, I get my node up and running.
    Thanks for the help!

    Home Assistant

  • Can't get motion interrupt to work in my (combined temp, battery and motion) sketch
    B BastienVH

    @martinhjelmare
    Great, thanks.

    The sketch now works as it should.
    Below is the finished sketch.
    I also added a counter so that after 10 consecutive interrupts from the motion sensor, the temp and hum get read and transmited. (motion-on generates an interrupt and motion-off generates an interrupt, so it's actually 5 motion triggers)
    Otherwise if there is a lot of movement during a certain timeframe (mornings), hum and temp won't be measured.

    Later I will edit the sketch to have all transmits together to save more battery power.

    Here's the sketch:

    /**
     * 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 - Henrik EKblad
     *
     * DESCRIPTION
     * This sketch provides an example how to implement a humidity/temperature
     * sensor using DHT11/DHT-22
     * http://www.mysensors.org/build/humidity
     */
    
    #include <SPI.h>
    #include <MySensor.h>
    #include <DHT.h>
    
    #define DIGITAL_INPUT_MOTION 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
    #define INTERRUPT DIGITAL_INPUT_MOTION-2 // Usually the interrupt = pin -2 (on uno/nano anyway)
    #define CHILD_ID_HUM 0
    #define CHILD_ID_TEMP 1
    #define CHILD_ID_MOT 2
    #define HUMIDITY_SENSOR_DIGITAL_PIN 4
    unsigned long SLEEP_TIME = 150000; // Sleep time between reads (in milliseconds)
    
    MySensor gw;
    DHT dht;
    float lastTemp;
    float lastHum;
    boolean metric = true;
    MyMessage msgHum(CHILD_ID_HUM, V_HUM);
    MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
    MyMessage msgMot(CHILD_ID_MOT, V_TRIPPED);
    int node_id = 20;
    boolean lastTripped = false ;
    int wake = 0;
    int motionCount = 0;
    
    void setup()
    {
      gw.begin();
      dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN);
    
      // Send the Sketch Version Information to the Gateway
      gw.sendSketchInfo("Humidity and motion", "1.1");
    
      pinMode(DIGITAL_INPUT_MOTION, INPUT);      // sets the motion sensor digital pin as input
    
      // Register all sensors to gw (they will be created as child devices)
      gw.present(CHILD_ID_HUM, S_HUM);
      gw.present(CHILD_ID_TEMP, S_TEMP);
      gw.present(CHILD_ID_MOT, S_MOTION);
      metric = gw.getConfig().isMetric;
    }
    
    void loop()
    {
      Serial.println(wake);
      if (wake == 1 && motionCount <= 10) {
        Serial.println("wake by motion");
        Serial.println("reading motion");
        motion();
        motionCount = motionCount + 1;
        Serial.println(motionCount);
      }
      else {
        Serial.println("wake by timer");
        Serial.println("reading motion");
        motion();
        Serial.println("reading temp/hum");
        humTemp();
        motionCount = 0;
        Serial.println("motionCount is reset");
      }
      Serial.println("going to sleep now.");
      wake = gw.sleep(INTERRUPT, CHANGE, SLEEP_TIME);
    }
    
    void motion() {
      // Read digital motion value
      boolean tripped = digitalRead(DIGITAL_INPUT_MOTION);
      Serial.println(tripped);
      if (lastTripped != tripped) {
        gw.send(msgMot.set(tripped ? "1" : "0")); // Send tripped value to gw
        lastTripped = tripped;
      }
    }
    
    void humTemp() {
      gw.wait(dht.getMinimumSamplingPeriod());
    
      float temperature = dht.getTemperature();
      if (isnan(temperature)) {
        Serial.println("Failed reading temperature from DHT");
      } else if (temperature != lastTemp) {
        lastTemp = temperature;
        if (!metric) {
          temperature = dht.toFahrenheit(temperature);
        }
        gw.send(msgTemp.set(temperature, 1));
        Serial.print("T: ");
        Serial.println(temperature);
      }
    
      float humidity = dht.getHumidity();
      if (isnan(humidity)) {
        Serial.println("Failed reading humidity from DHT");
      } else if (humidity != lastHum) {
        lastHum = humidity;
        gw.send(msgHum.set(humidity, 1));
        Serial.print("H: ");
        Serial.println(humidity);
      }
    }
    
    Troubleshooting

  • Error using Home Assistant with a serial gateway
    B BastienVH

    @dels said:

    You have to reboot your individual sensors so HA can see their Presentation message. Your output seems to be good for the gateway itself, but the gateway is not an actual "item" in HA, when it detects the sensors though, you should see their status.

    It seems I did in fact forget to reboot my node when trying to include it in HA. (long day messing around with code...)
    Here is a console log from today in which I start up HA and reboot my node.
    HA receives the messages, but the node never shows up in the web interface:

    pi@raspberrypi ~ $ hass
    Config directory: /home/pi/.homeassistant
    WARNING:homeassistant.bootstrap:Colorlog package not found, console coloring disabled
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=homeassistant, service=turn_off>
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=homeassistant, service=turn_on>
    INFO:homeassistant.bootstrap:Home Assistant core initialized
    INFO:homeassistant.loader:Loaded discovery from homeassistant.components.discovery
    INFO:homeassistant.loader:Loaded introduction from homeassistant.components.introduction
    INFO:homeassistant.loader:Loaded logbook from homeassistant.components.logbook
    INFO:homeassistant.loader:Loaded recorder from homeassistant.components.recorder
    INFO:homeassistant.loader:Loaded http from homeassistant.components.http
    INFO:homeassistant.loader:Loaded conversation from homeassistant.components.conversation
    INFO:homeassistant.loader:Loaded sun from homeassistant.components.sun
    INFO:homeassistant.loader:Loaded mysensors from homeassistant.components.mysensors
    INFO:homeassistant.loader:Loaded history from homeassistant.components.history
    INFO:homeassistant.loader:Loaded frontend from homeassistant.components.frontend
    INFO:homeassistant.loader:Loaded api from homeassistant.components.api
    INFO:homeassistant.loader:Loaded updater from homeassistant.components.updater
    INFO:homeassistant.components.introduction:
    
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
            Hello, and welcome to Home Assistant!
    
            We'll hope that we can make all your dreams come true.
    
            Here are some resources to get started:
    
             - Configuring Home Assistant:
               https://home-assistant.io/getting-started/configuration/
    
             - Available components:
               https://home-assistant.io/components/
    
             - Troubleshooting your configuration:
               https://home-assistant.io/getting-started/troubleshooting-configuration/
    
             - Getting help:
               https://home-assistant.io/help/
    
            This message is generated by the introduction component. You can
            disable it in configuration.yaml.
    
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=introduction>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=recorder>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=discovery>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=http>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=logbook>
    /home/pi/.homeassistant/lib/fuzzywuzzy/fuzz.py:33: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
      warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=conversation, service=process>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=conversation>
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): maps.googleapis.com
    INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sun.sun, new_state=<state sun.sun=above_horizon; next_rising=07:28:30 26-01-2016, friendly_name=Sun, next_setting=16:19:22 25-01-2016, elevation=1.59 @ 08:45:51 25-01-2016>>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=sun>
    INFO:homeassistant.loader:Loaded sensor from homeassistant.components.sensor
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=sensor>
    INFO:homeassistant.core:Bus:Handling <Event platform_discovered[L]: service=mysensors.sensors, discovered=>
    INFO:homeassistant.loader:Loaded sensor.mysensors from homeassistant.components.sensor.mysensors
    INFO:homeassistant.loader:Loaded switch from homeassistant.components.switch
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=switch, service=turn_off>
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=switch, service=turn_on>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=switch>
    INFO:homeassistant.core:Bus:Handling <Event platform_discovered[L]: service=mysensors.switches, discovered=>
    INFO:homeassistant.loader:Loaded switch.mysensors from homeassistant.components.switch.mysensors
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=mysensors>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=history>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=api>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=frontend>
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): pypi.python.org
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=updater>
    INFO:homeassistant.core:Starting Home Assistant (16 threads)
    INFO:homeassistant.core:Bus:Handling <Event homeassistant_start[L]>
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=homeassistant, service=stop>
    INFO:homeassistant.components.http:Starting web interface at http://0.0.0.0:8123
    INFO:mysensors.mysensors:Trying to connect to /dev/MSgw
    INFO:homeassistant.core:Timer:starting
    INFO:homeassistant.components.http:"GET /api/stream?api_password=no_password_set&restrict=state_changed,component_loaded,service_registered HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /api/stream?api_password=no_password_set&restrict=state_changed,component_loaded,service_registered HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /api/bootstrap HTTP/1.1" 200 -
    INFO:netdisco.service:Scanning
    INFO:homeassistant.components.http:"GET /api/bootstrap HTTP/1.1" 200 -
    INFO:mysensors.mysensors:/dev/MSgw is open...
    INFO:mysensors.mysensors:Connected to /dev/MSgw
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:gateway started, id=0, parent=0, distance=0
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.70
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.70
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.1
    INFO:homeassistant.components.discovery:Found new service: DLNA http://192.168.1.70:1972/DeviceDescription.xml
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=255,c=3,t=15,pt=2,l=2,sg=0:0
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=255,c=0,t=17,pt=0,l=5,sg=0:1.5.3
    INFO:homeassistant.components.mysensors:update sensor_update: node 20
    INFO:homeassistant.components.mysensors:No sketch_name: node 20
    INFO:homeassistant.components.mysensors:No sketch_name: node 20
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:send: 0-0-20-20 s=255,c=3,t=6,pt=0,l=1,sg=0,st=ok:M
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=255,c=3,t=11,pt=0,l=19,sg=0:Humidity and mo
    INFO:homeassistant.components.mysensors:update sensor_update: node 20
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.1
    INFO:homeassistant.components.mysensors:update sensor_update: node 20
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=0,c=0,t=7,pt=0,l=0,sg=0:
    INFO:homeassistant.components.mysensors:update sensor_update: node 20
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=1,c=0,t=6,pt=0,l=0,sg=0:
    INFO:homeassistant.components.mysensors:update sensor_update: node 20
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=2,c=0,t=1,pt=0,l=0,sg=0:
    INFO:homeassistant.components.mysensors:update sensor_update: node 20
    INFO:homeassistant.components.http:"GET /states HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /static/frontend-1003c31441ec44b3db84b49980f736a7.html HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /static/favicon-192x192.png HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /static/favicon.ico HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /api/bootstrap HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /api/stream?api_password=no_password_set&restrict=state_changed,component_loaded,service_registered HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /api/logbook/2016-1-25 HTTP/1.1" 200 -
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.0
    INFO:homeassistant.components.mysensors:update sensor_update: node 20
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=0,c=1,t=1,pt=7,l=5,sg=0:51.0
    INFO:homeassistant.components.mysensors:update sensor_update: node 20
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=2,c=1,t=16,pt=0,l=1,sg=0:1
    INFO:homeassistant.components.mysensors:update sensor_update: node 20
    INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sun.sun, new_state=<state sun.sun=above_horizon; next_rising=07:28:30 26-01-2016, friendly_name=Sun, next_setting=16:19:22 25-01-2016, elevation=1.67 @ 08:45:51 25-01-2016>, old_state=<state sun.sun=above_horizon; next_rising=07:28:30 26-01-2016, friendly_name=Sun, next_setting=16:19:22 25-01-2016, elevation=1.59 @ 08:45:51 25-01-2016>>
    ^CINFO:homeassistant.core:Stopping
    INFO:homeassistant.core:Bus:Handling <Event homeassistant_stop[L]>
    INFO:mysensors.mysensors:Disconnecting from /dev/MSgw
    INFO:mysensors.mysensors:Stopping thread
    INFO:homeassistant.components.recorder:Closing database
    

    This is the line when I start my node:
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=255,c=3,t=15,pt=2,l=2,sg=0:0

    Your thoughts?

    Home Assistant

  • Can't get motion interrupt to work in my (combined temp, battery and motion) sketch
    B BastienVH

    @martinhjelmare
    Ok, I didn't know that declaring the int wake as the reply from gw.sleep would actually make the node go to sleep again.
    I've now setup my loop like this and it appears to work:

    void loop()
    {
      int wake = gw.sleep(INTERRUPT, CHANGE, SLEEP_TIME);
      Serial.println(wake);
      if (wake > 0) {
        Serial.println("wake by motion");
        Serial.println("reading motion");
        motion();
      }
      else {
        Serial.println("wake by timer");
        Serial.println("reading motion");
        motion();
        Serial.println("reading temp/hum");
        humTemp();
      }
      Serial.println("going to sleep now.");
    }
    

    Only thing is, I only get my first temp/hum/motion data AFTER the node has been in sleeping for SLEEPTIME.
    Could I put a command to read motion and temp/hum in my setup or is that bad coding ettiquette?

    PS: Thanks martin for being such a helpful member!
    I feel like your everyones personal debugger!

    Troubleshooting

  • Can't get motion interrupt to work in my (combined temp, battery and motion) sketch
    B BastienVH

    Hi everyone,

    It's been a while but now I've received some more arduinos, I'm back in action with developing my sketches.
    After the last problem (everytime motion is detected, temp also gets updated and sent), I've been tinkering with my sketch and if-statements.

    At the moment, I've got this (migrated from dallas to DHT for testing purposes):

    /**
    #include <SPI.h>
    #include <MySensor.h>
    #include <DHT.h>
    
    #define DIGITAL_INPUT_MOTION 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
    #define INTERRUPT DIGITAL_INPUT_MOTION-2 // Usually the interrupt = pin -2 (on uno/nano anyway)
    #define CHILD_ID_HUM 0
    #define CHILD_ID_TEMP 1
    #define CHILD_ID_MOT 2
    #define HUMIDITY_SENSOR_DIGITAL_PIN 4
    unsigned long SLEEP_TIME = 15000; // Sleep time between reads (in milliseconds) - low for testing purposes
    
    MySensor gw;
    DHT dht;
    float lastTemp;
    float lastHum;
    boolean metric = true;
    MyMessage msgHum(CHILD_ID_HUM, V_HUM);
    MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
    MyMessage msgMot(CHILD_ID_MOT, V_TRIPPED);
    int node_id = 20;
    boolean lastTripped = false ;
    
    void setup()
    {
      gw.begin(NULL, node_id);
      dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN);
    
      // Send the Sketch Version Information to the Gateway
      gw.sendSketchInfo("Humidity and motion", "1.0");
    
      pinMode(DIGITAL_INPUT_MOTION, INPUT);      // sets the motion sensor digital pin as input
    
      // Register all sensors to gw (they will be created as child devices)
      gw.present(CHILD_ID_HUM, S_HUM);
      gw.present(CHILD_ID_TEMP, S_TEMP);
      gw.present(CHILD_ID_MOT, S_MOTION);
      metric = gw.getConfig().isMetric;
    }
    
    void loop()
    {
    // OPTION 1: work with if statement
       int wake;
      wake = gw.sleep(INTERRUPT, CHANGE, SLEEP_TIME);
    
       if (wake > 0) {
         Serial.println("wake by motion");
         Serial.println("reading motion");
         motion();
       }
    
       else {
         Serial.println("wake by timer");
         Serial.println("reading motion");
         motion();
         Serial.println("reading temp/hum");
         humTemp();
       }
    
    //OPTION 2: NO IF-STATEMENT (commented out at the moment)
      /*
      motion();
      Serial.println("read temp / hum");
      humTemp();
    */
      Serial.println("going to sleep now.");
      gw.sleep(INTERRUPT, CHANGE, SLEEP_TIME); //sleep a bit
    }
    
    void motion() {
      // Read digital motion value
      boolean tripped = digitalRead(DIGITAL_INPUT_MOTION);
      Serial.println(tripped);
      if (lastTripped != tripped) {
        gw.send(msgMot.set(tripped ? "1" : "0")); // Send tripped value to gw
        lastTripped = tripped;
      }
    }
    
    void humTemp() {
      gw.wait(dht.getMinimumSamplingPeriod());
    
      float temperature = dht.getTemperature();
      if (isnan(temperature)) {
        Serial.println("Failed reading temperature from DHT");
      } else if (temperature != lastTemp) {
        lastTemp = temperature;
        if (!metric) {
          temperature = dht.toFahrenheit(temperature);
        }
        gw.send(msgTemp.set(temperature, 1));
        Serial.print("T: ");
        Serial.println(temperature);
      }
    
      float humidity = dht.getHumidity();
      if (isnan(humidity)) {
        Serial.println("Failed reading humidity from DHT");
      } else if (humidity != lastHum) {
        lastHum = humidity;
        gw.send(msgHum.set(humidity, 1));
        Serial.print("H: ");
        Serial.println(humidity);
      }
    }
    

    Strange things are happening...

    If I use OPTION 2, without if, so temp is always checked, interrupt get triggered instantly as shown here and sends a 'deactivate'-message 0 when the sensors sets back to 0 after +- 8 sec:

    1
    send: 20-20-0-0 s=2,c=1,t=16,pt=0,l=1,sg=0,st=ok:1
    read temp / hum
    going to sleep now.
    0
    send: 20-20-0-0 s=2,c=1,t=16,pt=0,l=1,sg=0,st=ok:0
    read temp / hum
    going to sleep now.
    

    If I use OPTION 1 (preferred because no unnecessary temp measurement), the interrupt seems to only occur when the motion signal goes back to 0 (low), which is late and doesn't provide me with a 1-signal (meaning it will not communicate presence, but only when the built-in timer of =- 8 seconds has passed).

    wake by motion
    reading motion
    0
    going to sleep now.
    

    The use of wake comes from this topic and the API.
    Any suggestions or does someone see what I missed?

    Thanks alot!

    Troubleshooting

  • Error using Home Assistant with a serial gateway
    B BastienVH

    @martinhjelmare

    Sorry, I was away from the computer for a little while.
    I did reuse an old node id, that could have been the problem.
    Assigned a new node ID and this is where I stand now:

    Firts up: the node sketch:

    /**
     * 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 - Henrik EKblad
     *
     * DESCRIPTION
     * This sketch provides an example how to implement a humidity/temperature
     * sensor using DHT11/DHT-22
     * http://www.mysensors.org/build/humidity
     */
    
    #include <SPI.h>
    #include <MySensor.h>
    #include <DHT.h>
    
    #define DIGITAL_INPUT_MOTION 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
    #define INTERRUPT DIGITAL_INPUT_MOTION-2 // Usually the interrupt = pin -2 (on uno/nano anyway)
    #define CHILD_ID_HUM 0
    #define CHILD_ID_TEMP 1
    #define CHILD_ID_MOT 2
    #define HUMIDITY_SENSOR_DIGITAL_PIN 4
    unsigned long SLEEP_TIME = 15000; // Sleep time between reads (in milliseconds)
    
    MySensor gw;
    DHT dht;
    float lastTemp;
    float lastHum;
    boolean metric = true;
    MyMessage msgHum(CHILD_ID_HUM, V_HUM);
    MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
    MyMessage msgMot(CHILD_ID_MOT, V_TRIPPED);
    int node_id = 20;
    boolean lastTripped = false ;
    
    void setup()
    {
      gw.begin(NULL, node_id);
      dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN);
    
      // Send the Sketch Version Information to the Gateway
      gw.sendSketchInfo("Humidity and motion", "1.0");
    
      pinMode(DIGITAL_INPUT_MOTION, INPUT);      // sets the motion sensor digital pin as input
    
      // Register all sensors to gw (they will be created as child devices)
      gw.present(CHILD_ID_HUM, S_HUM);
      gw.present(CHILD_ID_TEMP, S_TEMP);
      gw.present(CHILD_ID_MOT, S_MOTION);
      metric = gw.getConfig().isMetric;
    }
    
    void loop()
    {
      /* int wake;
      wake = gw.sleep(INTERRUPT, CHANGE, SLEEP_TIME);
    
       if (wake == 1) {
         Serial.println("wake by motion");
         Serial.println("reading motion");
         motion();
       }
    
       else {
         Serial.println("wake by timer");
         Serial.println("reading motion");
         motion();
         Serial.println("reading temp/hum");
         humTemp();
       }
      */
      motion();
      
      Serial.println("read temp / hum");
      humTemp();
    
      Serial.println("going to sleep now.");
      gw.sleep(INTERRUPT, CHANGE, SLEEP_TIME); //sleep a bit
    }
    
    void motion() {
      // Read digital motion value
      boolean tripped = digitalRead(DIGITAL_INPUT_MOTION);
      Serial.println(tripped);
      if (lastTripped != tripped) {
        gw.send(msgMot.set(tripped ? "1" : "0")); // Send tripped value to gw
        lastTripped = tripped;
      }
    }
    
    void humTemp() {
      gw.wait(dht.getMinimumSamplingPeriod());
    
      float temperature = dht.getTemperature();
      if (isnan(temperature)) {
        Serial.println("Failed reading temperature from DHT");
      } else if (temperature != lastTemp) {
        lastTemp = temperature;
        if (!metric) {
          temperature = dht.toFahrenheit(temperature);
        }
        gw.send(msgTemp.set(temperature, 1));
        Serial.print("T: ");
        Serial.println(temperature);
      }
    
      float humidity = dht.getHumidity();
      if (isnan(humidity)) {
        Serial.println("Failed reading humidity from DHT");
      } else if (humidity != lastHum) {
        lastHum = humidity;
        gw.send(msgHum.set(humidity, 1));
        Serial.print("H: ");
        Serial.println(humidity);
      }
    }
    

    Now, my HA config:

    homeassistant:
      # Name of the location where Home Assistant is running
      name: Home
      # Location required to calculate the time the sun rises and sets
      latitude: xxxxxxxx
      longitude: xxxxxxxxxxxxxx
      # C for Celcius, F for Fahrenheit
      temperature_unit: C
      # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      time_zone: Europe/Brussels
    
    # View all events in a logbook
    logbook:
    
    # Checks for available updates
    updater:
    
    # Discover some devices automatically
    discovery:
    
    # Track the sun
    sun:
    
    # Allows you to issue voice commands from the frontend
    conversation:
    
    # Enables support for tracking state changes over time.
    history:
    
    # Enables the frontend
    frontend:
    
    # Show links to resources in log and frontend
    introduction:
    
    mysensors:
      gateways:
        - port: '/dev/MSgw'
      debug: true
      persistence: false
    

    and the output when starting hass:

    
    Config directory: /home/pi/.homeassistant
    WARNING:homeassistant.bootstrap:Colorlog package not found, console coloring disabled
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=homeassistant, service=turn_off>
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=homeassistant, service=turn_on>
    INFO:homeassistant.bootstrap:Home Assistant core initialized
    INFO:homeassistant.loader:Loaded logbook from homeassistant.components.logbook
    INFO:homeassistant.loader:Loaded recorder from homeassistant.components.recorder
    INFO:homeassistant.loader:Loaded http from homeassistant.components.http
    INFO:homeassistant.loader:Loaded history from homeassistant.components.history
    INFO:homeassistant.loader:Loaded introduction from homeassistant.components.introduction
    INFO:homeassistant.loader:Loaded updater from homeassistant.components.updater
    INFO:homeassistant.loader:Loaded conversation from homeassistant.components.conversation
    INFO:homeassistant.loader:Loaded discovery from homeassistant.components.discovery
    INFO:homeassistant.loader:Loaded mysensors from homeassistant.components.mysensors
    INFO:homeassistant.loader:Loaded frontend from homeassistant.components.frontend
    INFO:homeassistant.loader:Loaded api from homeassistant.components.api
    INFO:homeassistant.loader:Loaded sun from homeassistant.components.sun
    INFO:homeassistant.components.introduction:
    
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
            Hello, and welcome to Home Assistant!
    
            We'll hope that we can make all your dreams come true.
    
            Here are some resources to get started:
    
             - Configuring Home Assistant:
               https://home-assistant.io/getting-started/configuration/
    
             - Available components:
               https://home-assistant.io/components/
    
             - Troubleshooting your configuration:
               https://home-assistant.io/getting-started/troubleshooting-configuration/
    
             - Getting help:
               https://home-assistant.io/help/
    
            This message is generated by the introduction component. You can
            disable it in configuration.yaml.
    
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=introduction>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=recorder>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=http>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=logbook>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=history>
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): pypi.python.org
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=updater>
    /home/pi/.homeassistant/lib/fuzzywuzzy/fuzz.py:33: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
      warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=conversation, service=process>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=conversation>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=discovery>
    INFO:homeassistant.loader:Loaded sensor from homeassistant.components.sensor
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=sensor>
    INFO:homeassistant.core:Bus:Handling <Event platform_discovered[L]: discovered=, service=mysensors.sensors>
    INFO:homeassistant.loader:Loaded sensor.mysensors from homeassistant.components.sensor.mysensors
    INFO:homeassistant.loader:Loaded switch from homeassistant.components.switch
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=switch, service=turn_off>
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=switch, service=turn_on>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=switch>
    INFO:homeassistant.core:Bus:Handling <Event platform_discovered[L]: discovered=, service=mysensors.switches>
    INFO:homeassistant.loader:Loaded switch.mysensors from homeassistant.components.switch.mysensors
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=mysensors>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=api>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=frontend>
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): maps.googleapis.com
    INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=below_horizon; next_setting=16:19:22 25-01-2016, friendly_name=Sun, next_rising=07:29:47 25-01-2016, elevation=-33.1 @ 20:51:46 24-01-2016>, entity_id=sun.sun>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=sun>
    INFO:homeassistant.core:Starting Home Assistant (16 threads)
    INFO:homeassistant.core:Bus:Handling <Event homeassistant_start[L]>
    INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=homeassistant, service=stop>
    INFO:homeassistant.components.http:Starting web interface at http://0.0.0.0:8123
    INFO:homeassistant.core:Timer:starting
    INFO:mysensors.mysensors:Trying to connect to /dev/MSgw
    INFO:homeassistant.components.http:"GET /api/stream?api_password=no_password_set&restrict=state_changed,component_loaded,service_registered HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /api/stream?api_password=no_password_set&restrict=state_changed,component_loaded,service_registered HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /api/bootstrap HTTP/1.1" 200 -
    INFO:netdisco.service:Scanning
    INFO:homeassistant.components.http:"GET /api/bootstrap HTTP/1.1" 200 -
    INFO:mysensors.mysensors:/dev/MSgw is open...
    INFO:mysensors.mysensors:Connected to /dev/MSgw
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:gateway started, id=0, parent=0, distance=0
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=0,c=1,t=1,pt=7,l=5,sg=0:54.0
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.70
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.70
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.1
    INFO:homeassistant.components.discovery:Found new service: DLNA http://192.168.1.70:1972/DeviceDescription.xml
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=0,c=1,t=1,pt=7,l=5,sg=0:53.0
    INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=below_horizon; next_setting=16:19:22 25-01-2016, friendly_name=Sun, next_rising=07:29:47 25-01-2016, elevation=-33.21 @ 20:51:46 24-01-2016>, entity_id=sun.sun, old_state=<state sun.sun=below_horizon; next_setting=16:19:22 25-01-2016, friendly_name=Sun, next_rising=07:29:47 25-01-2016, elevation=-33.1 @ 20:51:46 24-01-2016>>
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=0,c=1,t=1,pt=7,l=5,sg=0:54.0
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=0,c=1,t=1,pt=7,l=5,sg=0:53.0
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=0,c=1,t=1,pt=7,l=5,sg=0:54.0
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=0,c=1,t=1,pt=7,l=5,sg=0:53.0
    INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=below_horizon; next_setting=16:19:22 25-01-2016, friendly_name=Sun, next_rising=07:29:47 25-01-2016, elevation=-33.36 @ 20:51:46 24-01-2016>, entity_id=sun.sun, old_state=<state sun.sun=below_horizon; next_setting=16:19:22 25-01-2016, friendly_name=Sun, next_rising=07:29:47 25-01-2016, elevation=-33.21 @ 20:51:46 24-01-2016>>
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 20-20-0 s=0,c=1,t=1,pt=7,l=5,sg=0:54.0
    INFO:homeassistant.components.http:"GET /states HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /static/frontend-1003c31441ec44b3db84b49980f736a7.html HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /static/favicon-192x192.png HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /static/favicon.ico HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /api/bootstrap HTTP/1.1" 200 -
    INFO:homeassistant.components.http:"GET /api/stream?api_password=no_password_set&restrict=state_changed,component_loaded,service_registered HTTP/1.1" 200 -
    

    I don't get errors anymore, but nothing shows up in the web interface.
    I think the messages aren't being interpreted?

    Home Assistant

  • Error using Home Assistant with a serial gateway
    B BastienVH

    @martinhjelmare
    Yeah, I was also trying to get my motion sketch working, so that log message may have been something left over from that.

    This is everything in my terminal

    INFO:mysensors.mysensors:/dev/MSgw is open...
    INFO:mysensors.mysensors:Connected to /dev/MSgw
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:gateway started, id=0, parent=0, distance=0
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.1
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.70
    INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.70
    INFO:homeassistant.components.discovery:Found new service: DLNA http://192.168.1.70:1972/DeviceDescription.xml
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 10-10-0 s=255,c=3,t=15,pt=2,l=2,sg=0:0
    INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 10-10-0 s=255,c=0,t=17,pt=0,l=5,sg=0:1.5.3
    INFO:homeassistant.components.mysensors:update sensor_update: node 10
    INFO:homeassistant.components.sensor.mysensors:Motion Sensor 10.1: value_type 16, value = 0
    Exception in thread Thread-6:
    Traceback (most recent call last):
      File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
        self.run()
      File "/home/pi/.homeassistant/lib/mysensors/mysensors.py", line 312, in run
        response = self.handle_queue()
      File "/home/pi/.homeassistant/lib/mysensors/mysensors.py", line 222, in handle_queue
        reply = func(*args, **kwargs)
      File "/home/pi/.homeassistant/lib/mysensors/mysensors.py", line 108, in logic
        self._handle_presentation(msg)
      File "/home/pi/.homeassistant/lib/mysensors/mysensors.py", line 51, in _handle_presentation
        self.alert(msg.node_id)
      File "/home/pi/.homeassistant/lib/mysensors/mysensors.py", line 175, in alert
        self.event_callback("sensor_update", nid)
      File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/mysensors.py", line 226, in node_update
        callback(self, node_id)
      File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/mysensors.py", line 149, in mysensors_callback
        entity.update_ha_state(True)
      File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 108, in update_ha_state
        self.unit_of_measurement is not None:
      File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/mysensors.py", line 137, in unit_of_measurement
        self.value_type == self.gateway.const.SetReq.V_PERCENTAGE or \
      File "/usr/lib/python3.4/enum.py", line 255, in __getattr__
        raise AttributeError(name) from None
    AttributeError: V_PERCENTAGE
    

    I hope you can find something there...

    Home Assistant
  • Login

  • Don't have an account? Register

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