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
pgoP

pgo

@pgo
About
Posts
14
Topics
0
Shares
0
Groups
0
Followers
1
Following
0

Posts

Recent Best Controversial

  • Minimal design thoughts
    pgoP pgo

    @hek, @tbowmo and rest: ho ho guys, first think WAF, ie Wife Acceptance Factor

    This variable has to be VERY high. Like: Darling, this whole fidling of mine would optimize our home and save on energy bills big time, so You can spend more on shopping craze. etc :)

    Probably when I finish with testing, I start selling it to friends and we will have problem spending all of the money which suddenly comes our way. (Try here not to laugh :) )

    Hardware

  • implementing multiple sensors
    pgoP pgo

    @niccodemi Check:
    gw.send(msgTemp.set(temperature, 1));
    gw.send(msgHum.set(humidity, 1));
    gw.send(msg.set(lux)); I miss here ",1"

    Development

  • Communication problem (maybe)
    pgoP pgo

    @Hausner I send the temp changes only if change is > 1 deg C and light changes only > +/- 40 lux, have this in main loop:

    void loop()     
    {     
      // Process incoming messages (like config from server)
      gw.process(); 
    
      // Fetch temperatures from Dallas sensors
      sensors.requestTemperatures(); 
    
      // Read temperatures and send them to controller 
      for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
    
        // Fetch and round temperature to one decimal
        float temperature = static_cast<float>(static_cast<int>((gw.getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
    
        // Only send data if temperature has changed more then 1 degC and no error
        if (int(lastTemperature[i]) != int(temperature) && temperature != -127.00) { //added integer
    
          // Send in the new temperature
          gw.send(msg.setSensor(i).set(temperature,1));
          lastTemperature[i]=temperature;
        }
      }
      // Read lux from TEMT6000
      float lightLevel = analogRead(LIGHT_SENSOR_ANALOG_PIN) * 9.765625;  // 1000/1024
      if (int(lightLevel - lastLightLevel) > 40 || int(lastLightLevel - lightLevel) > 40) {
          gw.send(msg.setSensor(CHILD_ID_LIGHT).set(int(lightLevel),1));
          lastLightLevel = lightLevel;
      }
      //gw.sleep(SLEEP_TIME); //no sleep for relays!!!!
    }
    

    Hope this helps, Pego

    Troubleshooting

  • Communication problem (maybe)
    pgoP pgo

    Do you use sleep in some of the nodes? I found with sleep(xxx) the messages get dropped across the mesh... I found that by making multiple sensors in one node - http://forum.mysensors.org/topic/115/implementing-multiple-sensors/59 and it gets worse with going through repeaters. For example the lux sensor could be very active and then the Relay ON/OFF messages get dropped... Interesting I did never see a temp or lux node message got dropped through the mesh.
    EDIT I am using MQTT broker gateway and open HAB, but will probably switch to MQTT client gateway<->mosquitto<->openHAB to check whether the message delivery gets more stable.

    Troubleshooting

  • Vera Device Quit Recording "Last Updated"
    pgoP pgo

    Hi, happens to me w/MQTT gateway and OpenHAB too w/1.4 Mostly at midnight, but sometimes through the day too. After restaring the GW and/or sensors, the Sketch names/last updates are there.

    Vera

  • Improved Ethernet-gateway
    pgoP pgo

    @ntruchsess Good job, I had to do this to WIZ5200 too, although it has bigger buffers/supports more client connections. Same situation for Iboard PRO (with onboard NET, I think 5100)

    Development

  • implementing multiple sensors
    pgoP pgo

    @Dany said:

    @pgo The RGB Colorpicker works already in openhab.
    I have some problem in arduino side...i tried update the sample DimmerActuator code, but didn't work. I tried korttoma's code, but it didn't works for me, too.

    (e.g. message.header.childId -didn't work)

    Can you post the HW connections you use on arduino and the items/sitemap of the dimmer in openHAB? I can then check on my install.

    Development

  • implementing multiple sensors
    pgoP pgo

    @Dany said:

    I would like to use with a RGB colorpicker in openhab.

    I would do that soon too. Would you like to have a node only as rgbw dimmer or maybe with a lux sensor as I like to do to also adjust for constant light/lux in the room?

    In my menu you can see the setpoint for lux under the light sensor.

    Development

  • implementing multiple sensors
    pgoP pgo

    @aquapro said:

    I could not decide yet on a platform. OpenHAB should be my next test.

    It runs quit stable on my old WinXP64Pro Quadcore w/many virtual machines on it.
    Have still some problems with the syntax of the openHAB settings, but else nice controller ;)

    Development

  • implementing multiple sensors
    pgoP pgo

    test1.items
    test1.sitemap
    test1.rules
    webcam.png
    webcam.png -icon for webcam - put in openhab/webapps/images

    My Current openHAB items/sitemap. 1 multisensor with Temp/Lux/Humidity sensor, 1 ethernet/MQTT gateway.

    Also weather forcast from yr.no and Samsung TV remote controls (Mute working, rest not so much)

    • openHAB v 1.5.1
    • Addons :
      \openhab\addons>
      org.openhab.binding.http-1.5.1.jar
      org.openhab.binding.mqtt-1.6.0-SNAPSHOT.jar
      org.openhab.binding.ntp-1.5.1.jar
      org.openhab.binding.samsungtv-1.6.0-SNAPSHOT.jar
      org.openhab.binding.zwave-1.6.0-SNAPSHOT.jar
      org.openhab.io.habmin-1.6.0-SNAPSHOT.jar
      org.openhab.persistence.exec-1.5.1.jar
      org.openhab.persistence.logging-1.5.1.jar
      org.openhab.persistence.mqtt-1.6.0-SNAPSHOT.jar
      org.openhab.persistence.rrd4j-1.5.1.jar

    HABmin conf with graphs:
    charts.xml -put in openhab/etc/habmin

    In habmin.cfg specify the IP of your MQTT arduino and port>
    '#'mqtt:<broker>.clientId=<clientId>
    mqtt:mysensor.url=tcp://192.168.1.234:1883
    mqtt:mysensor.clientId=MQTT
    mqtt:mysensor.qos=0
    mqtt:mysensor.retain=true
    mqtt:mysensor.async=true

    Here some screenshots:
    Menu.PNG
    Light.PNG
    Temp-Hum.PNG
    Temp-chart.PNG
    TV.PNG
    These (Direct channel/Channel/Volume) does not work yet... Mute is OK and Volume displays only the current TV volume.

    Development

  • implementing multiple sensors
    pgoP pgo

    @aquapro said:

    Hi, I'm interested. :-)
    Or is this the latest version ?

    Yes :), for the sketches mentioned earlier.
    <Comment to myself: Have to switch to some versioning as now I am already deeper in the project including cameras, weather forcasts etc.>

    Development

  • OpenHAB/MQTT Tips & Hints
    pgoP pgo

    It is not rocket science to get the openHAB running w/MQTT gateway, see for example my post with DS/Light/Relay in http://forum.mysensors.org/topic/115/implementing-multiple-sensors/60

    But sure, it would be great to put a wiki with all sensor settings for openHAB together on one page. I needed to read/search for some days to put the knowledge together...

    Example of the openhab screenshots on mobile https://github.com/pgo-sk/mysensors/wiki/Home-automation-using-mysensors-and-openHAB
    There you see also the mapping of the sensor

    OpenHAB

  • implementing multiple sensors
    pgoP pgo

    https://github.com/pgo-sk/mysensors/blob/master/arduino/DS_Light_Relay

    • DS18B20 (up to 16 like in original temp sketch)
    • TEMT6000 reporting LUX light values
    • 2x Relays
      running and tested
      Sensor <-> MQTT gateway <-> openHAB/PC

    When interested can post the openHAB items/sitemap(s) settings

    Screenshots - over teamviewer, sorry for the quality.

    Here the TEMT6000 output - in a quite dark room and changing weather today>
    upload-42ac73c1-61cf-4b90-9ec5-14a994a3b50a
    Here the temperature and relays:
    upload-86825c33-2cc2-4018-9e08-2020007af3a9
    Menu:
    upload-adf5c382-2803-49b9-a461-eb25beb572c0

    Development

  • implementing multiple sensors
    pgoP pgo

    Hi guys,

    this is a one node with publishing DS temperatures and listening for relay commands I finished and tested yesterday>
    https://github.com/pgo-sk/mysensors/blob/master/arduino/DS_and_Relay.ino
    feel free to comment/use/publish...

    I combined the Dalas and Relay examples together - you have to deactivate the sleep for the relays to listen 100% of time.
    MQTT identification on openHAB:
    MyMQTT/20/0/V_TEMP - DS sensor(s)
    MyMQTT/20/1/V_LIGHT - relay 1
    MyMQTT/20/2/V_LIGHT - relay 2

    If somebody is interested I can post the maps/items files for openHAB

    Regards,
    Pego
    PS I am working on an home automation system with solar hot air panels control/solar hot water panels and all the common stuff like lights/temperatures/weather etc.. More here: https://github.com/pgo-sk/mysensors/wiki/Home-automation-using-mysensors-and-openHAB

    Development
  • Login

  • Don't have an account? Register

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