Navigation

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

    carlyler

    @carlyler

    3
    Reputation
    25
    Posts
    736
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    carlyler Follow

    Best posts made by carlyler

    • RE: 💬 Building a Raspberry Pi Gateway

      @Teknor I tend to agree something is wrong, but I think it really on depends how many nodes and how often you're sending data.
      rpi3 + GPIO nrf24l01 + openhab2 + 8 nodes + packet received, on average 1 / 5s :

      top - 06:29:37 up 2 days, 22:33,  2 users,  load average: 0.26, 0.24, 0.19
      KiB Mem:    947732 total,   903420 used,    44312 free,   175364 buffers
      KiB Swap:   102396 total,     4496 used,    97900 free.   391360 cached Mem
      
        PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                               
        681 root      20   0  208840  56532  23684 S   8.9  6.0 214:23.60 Xorg                                                                  
        527 root      20   0   39448  21532  11264 S   4.3  2.3  69:34.28 vncserver-x11-c                                                       
       1154 pi        20   0   50548  17628  12196 S   3.0  1.9  64:05.96 lxterminal                                                            
      30426 openhab   20   0  441764 197592  14960 S   1.6 20.8 284:18.70 java                                                                  
       2467 root      20   0   20024   2456   2300 S   1.3  0.3  62:55.17 mysgw                                                                 
      25634 root      20   0       0      0      0 S   1.0  0.0   0:00.21 kworker/u8:0                                                          
        688 root      20   0   13720   9432   8828 S   0.7  1.0   2:04.96 vncagent                                                              
      25855 pi        20   0    5232   2584   2140 R   0.7  0.3   0:00.49 top                                                                   
          7 root      20   0       0      0      0 S   0.3  0.0   9:15.35 rcu_sched                                                             
         78 root     -51   0       0      0      0 S   0.3  0.0   5:16.50 irq/92-mmc1                                                           
        967 pi        20   0   95656  17716  12028 S   0.3  1.9   6:41.87 lxpanel                                                               
          1 root      20   0   24620   4688   2716 S   0.0  0.5   0:13.08 systemd                                                               
          2 root      20   0       0      0      0 S   0.0  0.0   0:00.27 kthreadd                                                              
      
      posted in Announcements
      carlyler
      carlyler
    • RE: ESP8266 Gateway with sensor attached

      Hi fahrettine. Good to hear I am not alone, however I felt kind of lonely in here so, even though I really liked the looks of MyNodes, I did a quick popularity survey based on posts and tried Domoticz and my gateway and sensors came right up! I noticed derwish is working on a new project so I am not sure sure of the status of .NET. Good luck, and please do post if you figure something out.

      posted in MyNodes.NET
      carlyler
      carlyler
    • RE: [SOLVED] Wifi gateway crashing ~20min

      Hi sundberg84. Thank you for the reply.
      Currently I just have the 1 ESP8266.
      I think I found the issue. There is a a lot written online about the error and what I got from it was the ESP8266 is being asked to do more than it has time to do. Given that I was only transmitting every 10sec I started looking at what might be tying things up. From the MySensors ESP8266 example I had, naively, changed the sleeps to delays, since I did not want it sleeping. I realized that might be killing the ESP8266. So I changed the loop function to run freely and the code to be executed on interval. I have not seen the error since.

      posted in Troubleshooting
      carlyler
      carlyler

    Latest posts made by carlyler

    • RE: openHAB 2.0 binding

      @matt-shepherd What works for me :
      items - just used 1 channel, V_VAR1, but you could keep them separate

      String neoPixelRgb           "RGB LED string"                           (grpLighting)  { channel="mysensors:rgbLight:ethGateway:rgb01:var1" }
      Color neoPixelColor         "RGB LED string"            <colorwheel>    (grpLighting)
      

      rule

      rule "Set RGB value NeoPixelStrip"
      when
          Item neoPixelColor changed
      then
          val hsbValue = neoPixelColor.state as HSBType
      
          val brightness = hsbValue.brightness.intValue
          val redValue = ((((hsbValue.red.intValue * 255) / 100) * brightness) / 100)
          val grnValue = ((((hsbValue.green.intValue * 255) / 100) * brightness) / 100)
          val bluValue = ((((hsbValue.blue.intValue * 255) / 100) * brightness) / 100)
      
          val rgbHexString = String::format("%02X%02X%02X", redValue, grnValue, bluValue)
          sendCommand(neoPixelRgb, rgbHexString)
      end
      
      

      parsed in node

        if (message.type == V_VAR1)
        {
          // Write some debug info
          Serial.print(", New status, V_RGB: ");
          Serial.println(message.getString());
      
          // starting to process the hex code
          String hexstring = message.getString(); //here goes the hex color code coming from through MySensors (like FF9A00)
          long number = (long) strtol( &hexstring[0], NULL, 16);
          RGB_values[0] = number >> 16;
          RGB_values[1] = number >> 8 & 0xFF;
          RGB_values[2] = number & 0xFF;
      
          colorWipe(strip.Color(RGB_values[0], RGB_values[1], RGB_values[2]), 50);
        }
      
      posted in OpenHAB
      carlyler
      carlyler
    • RE: openHAB 2.0 binding

      I am trying to make use of the customSensor using org.openhab.binding.mysensors-2.1.0-SNAPSHOT.jar I see the node 12 var4 message arrive but it is not being assigned to my item; am I doing something wrong? I have tried both string and number item types.

      10:37:37.879 [DEBUG] [rsAbstractConnection$MySensorsReader] - 12;0;1;0;27;1023
      10:37:37.880 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 12 found in gateway
      10:37:37.881 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 0 found in node 12
      10:37:37.882 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: var4(27) value to: 1023
      10:37:37.896 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 12/0 to 2017-06-03T10:37:37.000-0400
      10:37:37.901 [DEBUG] [rsAbstractConnection$MySensorsReader] - 12;255;3;0;22;63464
      10:37:37.912 [INFO ] [marthome.event.ItemStateChangedEvent] - Sensor12LastUpdate changed from 2017-06-03T10:37:26.000-0400 to 2017-06-03T10:37:37.000-0400
      10:37:37.925 [INFO ] [marthome.event.ItemStateChangedEvent] - mySMsg01 changed from 1;4;1;0;1;64.2 to 12;0;1;0;27;1023
      10:37:37.935 [INFO ] [marthome.event.ItemStateChangedEvent] - mySMsg01 changed from 12;0;1;0;27;1023 to 12;255;3;0;22;63464
      10:37:41.974 [DEBUG] [rsAbstractConnection$MySensorsReader] - 2;0;1;0;17;544
      10:37:41.975 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 2 found in gateway
      10:37:41.976 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 0 found in node 2
      10:37:41.976 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: watt(17) value to: 544
      10:37:41.984 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 2/0 to 2017-06-03T10:37:41.000-0400
      10:37:41.995 [INFO ] [marthome.event.ItemStateChangedEvent] - watt01 changed from 547 to 544
      10:37:42.005 [DEBUG] [rsAbstractConnection$MySensorsReader] - 2;0;1;0;24;1138982
      10:37:42.006 [INFO ] [marthome.event.ItemStateChangedEvent] - Sensor02LastUpdate changed from 2017-06-03T10:37:27.000-0400 to 2017-06-03
      

      Things

      Bridge mysensors:bridge-eth:ethGatewayPi [ ipAddress="127.0.0.1", tcpPort=5003, sendDelay=200 ]
      {
         /** define things connected to that bridge here */
         humidity         hum01       [ nodeId="1", childId="0" ]
         temperature      temp01      [ nodeId="1", childId="1" ]
         humidity         hum02       [ nodeId="1", childId="2" ]
         temperature      temp02      [ nodeId="1", childId="3" ]
         humidity         hum03       [ nodeId="1", childId="4" ]
         temperature      temp03      [ nodeId="1", childId="5" ]
         power            power01     [ nodeId="2", childId="0" ]
         rgbLight         rgb02       [ nodeId="6", childId="0", requestAck=true ]
         light            relay01     [ nodeId="7", childId="0", requestAck=true ]
         motion           motion01    [ nodeId="8", childId="0", requestAck=true ]
         motion           motion02    [ nodeId="9", childId="0", requestAck=true ]
         light            relay02     [ nodeId="9", childId="1", requestAck=true ]
         cover            cover03     [ nodeId="10", childId="0", requestAck=true, smartSleep=true ]
         cover            cover02     [ nodeId="11", childId="0", requestAck=true, smartSleep=true ]
         customSensor     blind01     [ nodeId="12", childId="0", requestAck=true, smartSleep=true ]
         mySensorsMessage mySMsg01    [ nodeId="999", childId="999" ]
      }
      

      items:

      String blind1BatReading	    "Blind#1 Battery A/D Reading"  	<battery>			{ channel="mysensors:customSensor:ethGatewayPi:blind01:var4" }										
      DateTime Sensor12LastUpdate "Last seen Nd12 [%1$ta %1$tT]"       <clock>    	{ channel="mysensors:customSensor:ethGatewayPi:blind01:lastupdate" }
      

      edit 6/7: I stand corrected, the variables are being updated. I was fooled by the log. For some reason the log does not show the change the way it did it binding 2.0.0. I placed debug messages in my rules and they're updating.

      posted in OpenHAB
      carlyler
      carlyler
    • RE: 💬 Building a Raspberry Pi Gateway

      @Teknor I tend to agree something is wrong, but I think it really on depends how many nodes and how often you're sending data.
      rpi3 + GPIO nrf24l01 + openhab2 + 8 nodes + packet received, on average 1 / 5s :

      top - 06:29:37 up 2 days, 22:33,  2 users,  load average: 0.26, 0.24, 0.19
      KiB Mem:    947732 total,   903420 used,    44312 free,   175364 buffers
      KiB Swap:   102396 total,     4496 used,    97900 free.   391360 cached Mem
      
        PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                               
        681 root      20   0  208840  56532  23684 S   8.9  6.0 214:23.60 Xorg                                                                  
        527 root      20   0   39448  21532  11264 S   4.3  2.3  69:34.28 vncserver-x11-c                                                       
       1154 pi        20   0   50548  17628  12196 S   3.0  1.9  64:05.96 lxterminal                                                            
      30426 openhab   20   0  441764 197592  14960 S   1.6 20.8 284:18.70 java                                                                  
       2467 root      20   0   20024   2456   2300 S   1.3  0.3  62:55.17 mysgw                                                                 
      25634 root      20   0       0      0      0 S   1.0  0.0   0:00.21 kworker/u8:0                                                          
        688 root      20   0   13720   9432   8828 S   0.7  1.0   2:04.96 vncagent                                                              
      25855 pi        20   0    5232   2584   2140 R   0.7  0.3   0:00.49 top                                                                   
          7 root      20   0       0      0      0 S   0.3  0.0   9:15.35 rcu_sched                                                             
         78 root     -51   0       0      0      0 S   0.3  0.0   5:16.50 irq/92-mmc1                                                           
        967 pi        20   0   95656  17716  12028 S   0.3  1.9   6:41.87 lxpanel                                                               
          1 root      20   0   24620   4688   2716 S   0.0  0.5   0:13.08 systemd                                                               
          2 root      20   0       0      0      0 S   0.0  0.0   0:00.27 kthreadd                                                              
      
      posted in Announcements
      carlyler
      carlyler
    • RE: 💬 Building a Raspberry Pi Gateway

      @Oli luizrocha's configuration seems interesting, but just in case your still wanting the serial, from above, has worked for me in the past, but I have since switched to OH2:

      @ysinh said:

      A tiny hint for the users of domoticz :
      ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB20
      make
      sudo ./examples_linux/mysGateway -d

      🙂 i hope this helps
      then in the hardware setup
      MySensors Gateway USB
      serial port: /dev/ttyUSB20

      posted in Announcements
      carlyler
      carlyler
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @jogant Thank you. I did not know about the binding restart so I will look into that.

      posted in OpenHAB
      carlyler
      carlyler
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @TimO Good news! I finally got it to work; I have been using the dev, 2.1.0, and decided to try master, 2.0.0 and it came right up! I did notice one thing though that you may be interested in: if I start the ethGateway after OH2 is up, or turn it off and back on, the binding does not reconnect. Not sure if there is anything you can do about that.
      One other change to mention (before changing to v2.0.0): I found a note from hek about the node id of gateway local sensors will always be 0; I changed that in my things file and in my sketch.

      16:34:59.286 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;1;1;0;0;12.5
      16:34:59.291 [DEBUG] [ternal.handler.MySensorsThingHandler] - Setting last update for node 0 to 2016-12-10T16:34:59.289-0500
      16:34:59.300 [DEBUG] [ternal.handler.MySensorsThingHandler] - Setting last update for node 0 to 2016-12-10T16:34:59.297-0500
      16:34:59.333 [INFO ] [marthome.event.ItemStateChangedEvent] - bTemp changed from 12.8 to 12.5
      16:34:59.354 [INFO ] [marthome.event.ItemStateChangedEvent] - bTempF changed from 55.04 to 54.50
      16:34:59.365 [INFO ] [marthome.event.ItemStateChangedEvent] - bTempC_F changed from 12.8 °C / 55.0 °F to 12.5 °C / 54.5 °F
      16:34:59.490 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
      16:34:59.583 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;0;1;0;1;34.1
      16:34:59.593 [INFO ] [marthome.event.ItemStateChangedEvent] - bHum changed from 34.2 to 34.1
      

      @hek I could be wrong, or maybe something has changed configuration wise but as you can see from above posts, dev branch v2.1.0, the radioless ethernet (ESP8266) gateway with local temp & hum sensors was not sending local sensor data. When I switched back to master v2.0.0 it started sending.

      posted in OpenHAB
      carlyler
      carlyler
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @TimO DHCP: yes, but it is actually static by way of reserved addresses via MAC in the router.
      IP: same
      ping: yes, works
      telnet, yes, all I see is:

      0;255;3;0;14;Gateway startup complete.
      

      Serial is OK? I do not see the send of the Temp and hum; it is printing it because there is code to do that, but I am expecting the MySensors send command; right? My thought was it is not transmitting them for some reason. This is an area I am not confident about and have yet to find a good explanation of it: how a GW handles local sensors. Thoughts?

      posted in OpenHAB
      carlyler
      carlyler
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @TimO thanks for the reply. I changed mysensors:bridge-eth:gateway to mysensors:bridge-eth:ethGateway in things and items, restarted OH2, reset ESP8266, several times, but no luck. If I read this right the GW is not trying to do much, ie get node id, present sensor, send data, etc. Any idea?

      GW serial:

      0;255;3;0;9;MCO:BGN:STP
      0;255;3;0;9;MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
      0;255;3;0;9;MCO:SLP:WUP=-2
      0;255;3;0;9;MCO:BGN:INIT OK,TSP=NA
      Getting temperature
      T: 20.00
      H: 34.70
      Getting temperature
      T: 20.10
      H: 33.90
      

      I am trying to set node id in sketch:

      // Set this to the pin you connected the DHT's data pin to
      #define DHT_DATA_PIN 2
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      #define MY_GATEWAY_ESP8266
      // ethernet settings
      #define MY_ESP8266_SSID "xxxxxx"
      #define MY_ESP8266_PASSWORD "xxxxxxxxxx"
      
      // Enable UDP communication
      //#define MY_USE_UDP
      
      // Set the hostname for the WiFi Client. This is the hostname
      // it will pass to the DHCP server if not static.
      #define MY_ESP8266_HOSTNAME "HuzzahGateway"
      
      // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
      //#define MY_IP_ADDRESS 192,168,213,113
      
      // If using static ip you need to define Gateway and Subnet address as well
      //#define MY_IP_GATEWAY_ADDRESS 192,168,213,1
      //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
      
      // The port to keep open on node server mode
      #define MY_PORT 5003
      // How many clients should be able to connect to this gateway (default 1)
      #define MY_GATEWAY_MAX_CLIENTS 1
      
      // Controller ip address. Enables client mode (default is "server" mode).
      // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
      //#define MY_CONTROLLER_IP_ADDRESS 192,168,213,116
      
      // Flash leds on rx/tx/err
      // Led pins used if blinking feature is enabled above
      #define MY_DEFAULT_ERR_LED_PIN 16  // Error led pin
      #define MY_DEFAULT_RX_LED_PIN  16  // Receive led pin
      #define MY_DEFAULT_TX_LED_PIN  16  // the PCB, on board LED
      #define MY_NODE_ID 3
      
      #include <SPI.h>
      #include <ESP8266WiFi.h>
      #include <MySensors.h>
      #include <DHT.h>
      
      
      posted in OpenHAB
      carlyler
      carlyler
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @TimO brief setup: controller and serial gateway on raspberryPi running OH2, serial working OK. Trying to add ESP8266 Huzzah gateway with only local sensor, DHT22 - no radio. It seems I have a similar situation as others, but before I post all my setup and logs a question for you: when using both a serial gateway and ethernet gateway can they be named the same, "gateway", in things file? What bothers me is the "channel" in the items file ends up looking like it is from the same source or am I missing something?

      Things file:

      Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyMySensorsGateway", sendDelay=200 ]
      {
         /** define things connected to that bridge here */
         humidity         hum01   [ nodeId="1", childId="0" ]
         temperature      temp01  [ nodeId="1", childId="1" ]
         humidity         hum02   [ nodeId="1", childId="2" ]
         temperature      temp02  [ nodeId="1", childId="3" ]
         humidity         hum03   [ nodeId="1", childId="4" ]
         temperature      temp03  [ nodeId="1", childId="5" ]
         power            power01 [ nodeId="2", childId="0" ]
         mySensorsMessage mySMsg01    [ nodeId="999", childId="999" ]
      }
      Bridge mysensors:bridge-eth:gateway [ ipAddress="192.168.1.113", tcpPort=5003, sendDelay=200 ]
      {
         /** define things connected to that bridge here */
         humidity         hum04   [ nodeId="3", childId="0" ]
         temperature      temp04  [ nodeId="3", childId="1" ]
      }
      

      Items file snippet (hum02/temp02 on serial GW and hum04/temp04 on eth GW)

      Number mHum                 "Master Humidity [%.0f %%]"             <humidity>      (grpChart,grpTemperatures)  { channel="mysensors:humidity:gateway:hum02:hum" }
      Number mTemp                "Master Temperature"                    <temperature>                               { channel="mysensors:temperature:gateway:temp02:temp" }
      Number bHum                 "Bean's Humidity [%.0f %%]"             <humidity>      (grpChart,grpTemperatures)  { channel="mysensors:humidity:gateway:hum04:hum" }
      Number bTemp                "Bean's Temperature"                    <temperature>                               { channel="mysensors:temperature:gateway:temp04:temp" }
      
      
      posted in OpenHAB
      carlyler
      carlyler
    • RE: 💬 Building a Raspberry Pi Gateway

      @ben999 if you have not already, read through the MySensors OH2 thread. I noticed a recent post by @TimO that talks about setting some permissions and that might be the issue. Otherwise, the manual install is not bad as he gives you step-by-step; I am a new to all this and managed to get it to work...

      posted in Announcements
      carlyler
      carlyler