Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. C.r.a.z.y.
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by C.r.a.z.y.

    • RE: [Tutorial] openHAB with serial gateway

      @TimO

      Hi

      Please check this http://forum.mysensors.org/topic/1543/universal-gateway-for-315-433mhz-devices/2

      Is there anyway to use directly 433 with openhab --- serial gateway will be 433 receiver and transmitter (without mysensors lib and devices)

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Universal gateway for 315/433Mhz devices

      Is there anyway to use directly 433 with openhab --- serial gateway will be 433 receiver and transmitter (without mysensors lib and devices)

      @static418 Thank you for your idea.

      Create 2 maps, if one is null then get other map.

      I removed ";" things because i dont need them.

      var HashMap<String, String> CodeToItemsMapOn = newLinkedHashMap(
          "14013452"->"SOKET_1",
          "SOKET_1"->"14013452" 
          )
          var HashMap<String, String> CodeToItemsMapOff = newLinkedHashMap(
      	"14013443"->"SOKET_1",
          "SOKET_1"->"14013443"
          )			
      var HashMap<String, String> CodeToActionMap = newLinkedHashMap( //nothing important because there is no duplicate
          "14013452"->"ON",
          "ON"->"14013452",
          "14013443"->"OFF",
          "OFF"->"14013443"
          )  
      //remember hashmaps must be out of the rule
      rule "Arduino sends to Openhab"
          when
              Item Arduino received update
          then
      .........
      	if(subType==V_VAR1){
      		var myOrder=CodeToItemsMapOn.get(msg) //1.map
      		if(myOrder==null){myOrder=CodeToItemsMapOff.get(msg)} //2.map
      		
      		postUpdate(myOrder,CodeToActionMap.get(msg)) //make you job
      	}
      .......
      end
      

      This code is only for updating the openhab screen (receiving), i will work for transmit.

      You can find more on https://github.com/openhab/openhab/wiki/Taking-Rules-to-New-Heights

      There is another problem with CodeToActionMap; If i got a lot of outlets this means many on and off commands ..

      rule "MY ON"
      	when
      		Item SOKET_1 received command ON
      	then
      				sendCommand(Arduino, "105;105;1;0;24;" + 14013452  + "\n")
      	end
      	
      rule "MY OFF"
      	when
      		Item SOKET_1 received command OFF
      	then
      				sendCommand(Arduino, "105;0;1;0;24;" + 14013443 + "\n")
      	end`
      

      These rules for TRANSMIT didnt work any idea???

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: [Tutorial] openHAB with serial gateway

      @TimO ok 2.0 alpha...

      An idea for 1.x; Ready-Discovery ?
      We write 250 mysensors items like ID=1-30 for switches, 31-50 for contacts, 51-70 for motion etc... if item is available then sitemap will show them.

      Is there anyway to create rules on frontend? Maybe IFTTT + MySensors goes well..

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: [Tutorial] openHAB with serial gateway

      @TimO Hi do you work with Openhab 2.0? I tried to install it and couldnt create a binding, its very hard for me. I need auto Discovery of mysensors with 2.0

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: AC Dimmer with OpenHab

      @quocanhcgd Can you share the A/C dimmer design?

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Openhab serial gateway and mysensors device discovery - tutorial

      Awesome work!
      @l154 How can user give item name? Where is discovered device in the UI?

      Detailed information about discovered device on single node are in SITEMAP_mysensors_nodeId.html location OPENHAB_WEBAPPS ---- not implemented yet

      When will you put this file?

      Maybe some screenshots explain better..

      2015-04-16 12:06:00.214 [WARN ] [m.r.i.engine.RuleContextHelper] - Variable 'itemsAll' on rule file 'default.rules' cannot be initialized with value '.toString': An error occured during the script execution: The name 'all' cannot be resolved to an item or type.
      2015-04-16 12:06:05.746 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 51-51-0 s=1,c=1,t=2,pt=2,l=2:0
      51;1;1;0;2;0

      2015-04-16 12:06:06.263 [ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule 'Arduino sends to Openhab': The name '.get()' cannot be resolved to an item or type.

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      @tim @hek
      Hek adviced me to download current 1.4 v in a topic and i did. I was using 1.4 which downloaded 2 months ago.
      After that;
      My old node's sketch(or api) was not the same with my new serial controller sketch 1.4
      I reupload sketches to every node and gateway still I am not sure with this solution but today my nodes worked fine.

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Multi Button Relay switch

      How do you seperate relay power?

      What is your solution to drop 220v AC to 5v DC?

      posted in Hardware
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: [security] Introducing signing support to MySensors

      @hek do you have any plan to use this logic in new version api?
      @Anticimex awesome work!

      posted in Development
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      @TimO I think so maybe rpi usb problem...

      Is there a newer file for org.openhab.binding.serial_1.6.0.201411271703

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: MQTT Broker gateway

      @celonunes @hek
      I installed this https://github.com/lurch/rpi-serial-console
      pi@raspberrypi ~ $ rpi-serial-console status
      Serial console on /dev/ttyAMA0 is disabled

      Now my nodes are working perfect when i use manual button or ui but my logs are not correct

      My config:

      add on : org.openhab.binding.serial_1.6.0.201411271703.jar
      String Arduino "Arduino" { serial="/dev/ttyUSB0" }

      As you see there are "fails" but nodes are working.

      015-03-09 12:37:51.725 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

      2015-03-09 12:37:56.726 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 52-52-0 s=255,c=0,t=18,pt=0,l=5:1.4.1
      52;255;0;0;18;1.4.1
      0;0;3;0;9;read: 52-52-0 s=255,c=3,t=6,pt=1,l=1:0
      52;255;3;0;6;0

      2015-03-09 12:37:58.768 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 52-52-0 s=255,c=3,t=11,pt=0,l=14:Relay & Button
      52;255;3;0;11;Relay & Button
      0;0;3;0;9;read: 52-52-0 s=255,c=3,t=12,pt=0,l=3:1.0
      52;255;3;0;12;1.0
      0;0;3;0;9;read: 52-52-0 s=1,c=0,t=3,pt=0,l=5:1.4.1
      52;1;0;0;3;1.4.1
      0;0;3;0;9;read: 52-52-0 s=2,c=0,t=3,pt=0,l=5:1.4.1
      52;2;0;0;3;1.4.1

      2015-03-09 12:37:59.700 [INFO ] [runtime.busevents ] - S2 received command ON
      2015-03-09 12:37:59.822 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

      2015-03-09 12:38:00.106 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:0

      2015-03-09 12:38:00.546 [INFO ] [runtime.busevents ] - S2 received command OFF
      2015-03-09 12:38:00.661 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;1

      2015-03-09 12:38:00.967 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

      2015-03-09 12:38:01.161 [INFO ] [runtime.busevents ] - S2 received command ON
      2015-03-09 12:38:01.339 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

      2015-03-09 12:38:01.649 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:0

      2015-03-09 12:38:01.782 [INFO ] [runtime.busevents ] - S2 received command OFF
      2015-03-09 12:38:01.894 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;1

      2015-03-09 12:38:02.076 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

      posted in Controllers
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      @TimO

      I installed this https://github.com/lurch/rpi-serial-console
      pi@raspberrypi ~ $ rpi-serial-console status
      Serial console on /dev/ttyAMA0 is disabled

      Now my nodes are working perfect when i use manual button or ui but my logs are not correct

      My config:

      add on : org.openhab.binding.serial_1.6.0.201411271703.jar
      String Arduino "Arduino" { serial="/dev/ttyUSB0" }

      As you see there are "fails" but nodes are working.

      015-03-09 12:37:51.725 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

      2015-03-09 12:37:56.726 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 52-52-0 s=255,c=0,t=18,pt=0,l=5:1.4.1
      52;255;0;0;18;1.4.1
      0;0;3;0;9;read: 52-52-0 s=255,c=3,t=6,pt=1,l=1:0
      52;255;3;0;6;0

      2015-03-09 12:37:58.768 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 52-52-0 s=255,c=3,t=11,pt=0,l=14:Relay & Button
      52;255;3;0;11;Relay & Button
      0;0;3;0;9;read: 52-52-0 s=255,c=3,t=12,pt=0,l=3:1.0
      52;255;3;0;12;1.0
      0;0;3;0;9;read: 52-52-0 s=1,c=0,t=3,pt=0,l=5:1.4.1
      52;1;0;0;3;1.4.1
      0;0;3;0;9;read: 52-52-0 s=2,c=0,t=3,pt=0,l=5:1.4.1
      52;2;0;0;3;1.4.1

      2015-03-09 12:37:59.700 [INFO ] [runtime.busevents ] - S2 received command ON
      2015-03-09 12:37:59.822 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

      2015-03-09 12:38:00.106 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:0

      2015-03-09 12:38:00.546 [INFO ] [runtime.busevents ] - S2 received command OFF
      2015-03-09 12:38:00.661 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;1

      2015-03-09 12:38:00.967 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

      2015-03-09 12:38:01.161 [INFO ] [runtime.busevents ] - S2 received command ON
      2015-03-09 12:38:01.339 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

      2015-03-09 12:38:01.649 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:0

      2015-03-09 12:38:01.782 [INFO ] [runtime.busevents ] - S2 received command OFF
      2015-03-09 12:38:01.894 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;1

      2015-03-09 12:38:02.076 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Stabile Controller

      @celonunes generally raspberry pi with serial usb but also you can see some mqtt logs. Same problem with mac os with serial usb.

      I also tried rpi uart pins for serial bu there is no logs for it.

      Maybe someone gives his Openhab dir i can understand better problem isnt related with hardware

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: MQTT Broker gateway

      Restarting the modem and checking wires of arduino solved my problem before.
      I am sure mqtt have to be in dhcp list.

      posted in Controllers
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: MQTT Broker gateway

      @hooraysimpsons unplug the power and restart your modem, check your dhcp menu if it has ip for Ardiuno.

      Check your mqtt from serial monitor, you must see "gateway started..."

      posted in Controllers
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: MQTT Broker gateway

      @hek My relay powered from nano icp headers maybe this makes trouble for wifi , i will change this and give update.

      My button is not normal button , its an ir distance sensor which trigers the relay.

      posted in Controllers
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      @TimO please can you share Openhab files?
      +My relay powered from nano icp headers maybe this makes trouble for wifi , i will change this and give update.

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      @Jan-Gatzke said:

      ttyAMA0
      πŸ‘

      What version openhab runtime and add ons do you use?
      How many nodes do you have and how long time they are working fine without restart rpi?
      Please can you upload your config files?

      1.6.2 or 1.7.0 didn't switch on-off my relays but logs seems ok:

      I connected nano pins VIN+GND+TX+RX to RPI 5V+GND+TX+RX , (TX->TX , RX->RX)

      osgi> 2015-03-07 15:49:24.409 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.7.0).
      2015-03-07 15:49:50.387 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
      2015-03-07 15:49:51.200 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
      2015-03-07 15:50:01.540 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.items'
      2015-03-07 15:50:15.506 [WARN ] [cpr.DefaultAnnotationProcessor] - Unable to detect annotations. Application may fail to deploy.
      2015-03-07 15:50:17.567 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.sitemap'
      2015-03-07 15:50:32.786 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
      2015-03-07 15:50:38.947 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /openhab.app
      2015-03-07 15:50:51.918 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.rules'
      RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyAMA0
      2015-03-07 15:51:01.398 [INFO ] [.service.AbstractActiveService] - NTP Refresh Service has been started

      2015-03-07 15:51:57.516 [INFO ] [runtime.busevents ] - S2 received command ON
      2015-03-07 15:52:08.006 [INFO ] [runtime.busevents ] - S2 received command OFF
      2015-03-07 15:52:11.408 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

      2015-03-07 15:52:11.722 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;1

      2015-03-07 15:52:19.544 [INFO ] [runtime.busevents ] - S1 received command ON
      2015-03-07 15:52:21.200 [INFO ] [runtime.busevents ] - Arduino received command 51;1;1;0;2;0

      2015-03-07 15:52:22.143 [INFO ] [runtime.busevents ] - S2 received command ON
      2015-03-07 15:52:22.259 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

      2015-03-07 15:52:23.131 [INFO ] [runtime.busevents ] - AP3 received command ON
      2015-03-07 15:52:24.142 [INFO ] [runtime.busevents ] - Arduino received command 100;3;1;0;0;1

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: MQTT Broker gateway

      @celonunes You can find MQTT and serial logs in the zip files openhab 1.6.2 and 1.7.0 logs-1.7.0.zip logs-1.6.2.zip

      @hek My nodes are working perfect when i only plug serial usb to any usb socket of a computer-printer-usb hub even a mobile phone charger πŸ™‚ they are good without server/controller

      posted in Controllers
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: MQTT ethernet gateway Works great for 3+ hours then stops

      @GuyP
      You can find MQTT and serial logs in the zip files openhab 1.6.2 and 1.7.0 logs-1.7.0.zip logs-1.6.2.zip

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Stabile Controller

      @John Hi John, custom UI will be awesome!

      Do you have raspberry image file i want to start quickly:)

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Stabile Controller

      @Francois I tried it but didn't like UI, not too hard to install and plugin dev-John is very helpful. I didn't use piDome long time to test all nodes. How many devices do you have in your system?

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: MQTT ethernet gateway Works great for 3+ hours then stops

      @GuyP You are lucky my mqtt worked only 3 minutes πŸ™‚

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • Stabile Controller

      I waste my weeks with openhab

      **My main problem is losing connections with nodes. I tried serial / mqtt binding but same result (Openhab 1.6.2 / 1.7.0).
      **

      Please can anyone advice a Stabile Software which really works with MySensors?

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: MQTT Broker gateway

      I can't change on-off manually for button with relay sketch, if i try, connection is lost, switching from screen never works again until restart everything.

      2015-03-05 15:51:29.200 [INFO ] [runtime.busevents ] - node2_sw2 received command OFF
      2015-03-05 15:51:32.624 [INFO ] [runtime.busevents ] - node2_sw2 received command ON

      Openhab 1.6.2 or 1.7.0 same result.

      **My main problem is losing connections with nodes. I also tried serial binding and same result.
      **
      Mysensors+Openhab useless with mqtt and also serial binding

      posted in Controllers
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      When i unplug and plug again the serial USB from raspberry :

      2015-03-04 20:27:56.413 [INFO ] [runtime.busevents ] - AP4 received command ON
      2015-03-04 20:27:56.564 [INFO ] [runtime.busevents ] - Arduino received command 100;1;1;0;0;1

      Write action failed! Input/output error2015-03-04 20:27:56.610 [ERROR] [b.serial.internal.SerialDevice] - Error writing '100;1;1;0;0;1
      ' to serial port /dev/ttyUSB0: Input/output error in writeArray

      How can fix this?

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      Hi

      I have the same problem with Matt and tried USB01 but didn't work.
      When i unplug the usb, server error : Write action failed! Input/output error2015-03-03 19:25:23.682 [ERROR] [b.serial.internal.SerialDevice] - Error writing '100;3;1;0;0;1
      ' to serial port /dev/ttyUSB0: Input/output error in writeArray

      Only solution for me stop server, unplug serial usb and plug it. I think ---Kill the lock file (something like: "/var/lock/LCK..ttyUSB0")--- will give the same solution like unplug the usb?

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Get string data

      @funky81 Hek can make better but he didnt understand as you see πŸ‘Ž

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Get string data

      Maybe one day someone will use this;

      **When sketch fails second push will work without gateway and it will restart
      **

      void loop()
      {
      gw.process();
      debouncer.update();
      value = debouncer.read();

      if (value != oldValue && value==0) {
      if (re!="1")
      {
      int oku=digitalRead(RELAY_PIN);
      if(oku==1)
      {
      digitalWrite(RELAY_PIN,0);
      }
      else
      {
      digitalWrite(RELAY_PIN,1);
      }
      asm volatile (" jmp 0"); //reboot
      }
      gw.send(msg.set(state?false:true),true); // Send new state and request ack back
      re="";
      }
      oldValue = value;
      }

      void incomingMessage(const MyMessage &message) {
      state = message.getBool();
      digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
      gw.saveState(CHILD_ID, state);
      Serial.print("Incoming change for sensor:");
      Serial.print(message.sensor);
      Serial.print(", New status: ");
      Serial.println(message.getBool());
      re=String(message.sensor);
      }

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Get string data

      Maybe i am asking wrong;
      If there is "fail"

      send: 51-51-0-0 s=1,c=1,t=2,pt=2,l=2,st=fail:0

      it will reboot

      if (re.indexOf("fail") >=0)
      {
      asm volatile (" jmp 0"); //reboot
      }

      Why i need this; because i cant turn on or off my lights when sketch failed.

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Get string data

      @BulldogLowell Yes πŸ‘

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Get string data

      Is it impossible?

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • Get string data

      String sentData = ""
      send: 51-51-0-0 s=1,c=1,t=2,pt=2,l=2,st=ok:1

      How can i put this serial monitor print to sentData ?

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Comminucation without controller

      New master file didn't make difference. When i see "fail" i can't change the state with original RelayWithButtonActuator sketch.

      Ok id is not "0" now.

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Comminucation without controller

      This Sketch works 1 on and 1 off when there is no controller;

      repeater started, id 0
      send: 0-0-0-0 s=255,c=0,t=18,pt=0,l=5,st=fail:1.4.1
      send: 0-0-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0
      send: 0-0-0-0 s=255,c=3,t=11,pt=0,l=5,st=fail:Relay
      send: 0-0-0-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0
      send: 0-0-0-0 s=1,c=0,t=3,pt=0,l=5,st=fail:1.4.1
      **send: 0-0-0-0 s=1,c=1,t=2,pt=2,l=2,st=fail:0
      send: 0-0-0-0 s=1,c=1,t=2,pt=2,l=2,st=fail:0
      **


      "#include <MySensor.h>
      "#include <SPI.h>
      "#include <Bounce2.h>

      "#define RELAY_1 3 // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
      "#define NUMBER_OF_RELAYS 1 // Total number of attached relays
      "#define RELAY_ON 1 // GPIO value to write to turn on attached relay
      "#define RELAY_OFF 0 // GPIO value to write to turn off attached relay
      "#define CHILD_ID 1

      "#define TRIGGER_PIN 7 // Arduino pin tied to trigger pin on the ultrasonic sensor.
      unsigned long SLEEP_TIME = 700; // Sleep time between reads (in milliseconds)

      MySensor gw;
      //int hey =50;

      int dist;
      int kac;
      int value;
      int oldValue=0;
      bool state;
      Bounce debouncer = Bounce();
      Bounce debouncer2 = Bounce();
      MyMessage msg(CHILD_ID, V_LIGHT);

      void setup()
      {
      gw.begin(incomingMessage, AUTO, true);
      gw.sendSketchInfo("Relay", "1.0");
      for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
      gw.present(sensor, S_LIGHT);
      pinMode(pin, OUTPUT);
      state = gw.loadState(CHILD_ID);
      digitalWrite(pin, state?RELAY_ON:RELAY_OFF);
      }
      debouncer.attach(TRIGGER_PIN);
      debouncer2.attach(RELAY_1);
      debouncer.interval(5); debouncer2.interval(5);
      }

      void loop()
      {
      gw.process();
      debouncer.update();
      dist = debouncer.read();
      debouncer2.update();
      kac = debouncer2.read();

      if (dist == 0) 
       {
          if(kac==0  ) //MANUAL ON-OFF
           {   
           digitalWrite(RELAY_1, HIGH );  // gw.send(msg.set(1));   
           delay(1000); //  gw.sleep(SLEEP_TIME); 
           }
          else  //MANUAL ON-OFF
           {  
            digitalWrite(RELAY_1, LOW );   // gw.send(msg.set(0));   
             delay(1000);//  gw.sleep(SLEEP_TIME); 
           }
       }
       
       //NORMAL PROCESS FOR MYSENSORS.h
        if (dist != oldValue && dist==0) {
      
         gw.send(msg.set(state?false:true), true); // Send new state and request ack back
         } 
      
         oldValue = dist;
        }
      

      void incomingMessage(const MyMessage &message) {
      if (message.type==V_LIGHT) {
      // digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
      gw.saveState(message.sensor, message.getBool());
      Serial.print("Incoming change for sensor:");
      Serial.print(message.sensor);
      Serial.print(", New status: ");
      Serial.println(message.getBool());
      }

      }

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Comminucation without controller

      @hek I am using Relay with Button sketch. When there is no controller-no hw-ack, my lights work 2-3 more times and i got "fail" then i can't change the lights state manually.

      When i see "fail" i have to restart the nano.

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Comminucation without controller

      @hek Thank you but my goal is to keep it working when there is no controller. My light will not be on or off if there is no controller so i want to add a some code like this;
      "
      re = String(message.sensor);
      if (re.indexOf("fail") >=0)
      {
      asm volatile (" jmp 0"); //reboot
      }
      "

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Comminucation without controller

      How can i get "fail" to a String from serial monitor?

      send: 51-51-0-0 s=1,c=1,t=2,pt=2,l=2,st=fail:0

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • Comminucation without controller

      Sometimes i forgot to plug usb serial and my sensors, relays stoped after 2-3 times what they do normaly. Is there any way if these nodes stop working than reboot itself? Or any idea to keep working?

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: How to get relay state?

      @BulldogLowell That's it! Thank you πŸ‘

      if (message.sensor==1 && message.getBool()==true)
      {....

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: How to get relay state?

      @daulagari Thank you. i am trying to learn "message.xxxxx" but it is hard for me.

      How can i get 1-2-3 variables from "message.xxxxx"? So i can find which relay get a command.

      send: 100-100-0-0 s=1,c=0,t=3,pt=0,l=5,st=ok:1.4.1
      send: 100-100-0-0 s=2,c=0,t=3,pt=0,l=5,st=ok:1.4.1
      send: 100-100-0-0 s=3,c=0,t=3,pt=0,l=5,st=ok:1.4.1

      http://www.mysensors.org/build/sensor_api#the-full-api this link is very useful but very hard for me...

      +++ i have some trouble with your link ; http://forum.mysensors.org/topic/738/relaywithbuttonactuator-example-with-touch-sensor/7

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • How to get relay state?

      repeater started, id 100
      send: 100-100-0-0 s=255,c=0,t=18,pt=0,l=5,st=ok:1.4.1
      send: 100-100-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
      send: 100-100-0-0 s=255,c=3,t=11,pt=0,l=5,st=ok:Relay
      send: 100-100-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
      send: 100-100-0-0 s=1,c=0,t=3,pt=0,l=5,st=ok:1.4.1
      send: 100-100-0-0 s=2,c=0,t=3,pt=0,l=5,st=ok:1.4.1
      send: 100-100-0-0 s=3,c=0,t=3,pt=0,l=5,st=ok:1.4.1

      I have 3 relays and i want to make a logic something like this; if 3.relay is on than 1. relay is off

      How can i get relay status in orginal sketch?

      "
      void incomingMessage(const MyMessage &message) {
      // We only expect one type of message from controller. But we better check anyway.
      if (message.type==V_LIGHT) {
      // Change relay state
      digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
      // Store state in eeprom
      gw.saveState(message.sensor, message.getBool());
      // Write some debug info
      Serial.print("Incoming change for sensor:");
      Serial.print(message.sensor);
      Serial.print(", New status: ");
      Serial.println(message.getBool());
      }
      "

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: RelayWithButtonActuator Example with touch sensor

      @BulldogLowell http://www.dx.com/p/catalex-digital-capacitive-touch-sensor-switch-module-for-arduino-blue-black-230867#.VJWV4sgM

      catalex

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Controlling Blinds.com RF Dooya Motors with Arduino and Vera

      @petewill Comparing is great idea thanks i will try this!

      posted in My Project
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: RelayWithButtonActuator Example with touch sensor

      @BulldogLowell I am using original sketch didnt make any change.

      @hek Only touch sensor was powered separately.

      Same power source for touch and relay result;
      It stopped working after getting 2 touch at the end of 2 rows print.

      repeater started, id 0
      send: 0-0-0-0 s=255,c=0,t=18,pt=0,l=5,st=fail:1.4.1
      send: 0-0-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0
      send: 0-0-0-0 s=255,c=3,t=11,pt=0,l=14,st=fail:Relay & Button
      send: 0-0-0-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0
      send: 0-0-0-0 s=1,c=0,t=3,pt=0,l=5,st=fail:1.4.1
      send: 0-0-0-0 s=1,c=1,t=2,pt=2,l=2,st=fail:1
      send: 0-0-0-0 s=1,c=1,t=2,pt=2,l=2,st=fail:1

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RelayWithButtonActuator Example with touch sensor

      I tried RelayWithButtonActuator Example with touch sensor but didnt work.
      When i touch serial prints 111111111.... but relay state doesnt change.
      After 3-5 secs touching it stops printing like this;

      1
      1
      1
      1
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      0
      send: 0-0-0-0 s=1,c=1,t=2,pt=2,l=2,st=fail:1

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: No Auto node id

      Hi hek,

      Orginal Relay sketch;

      repeater started, id 0
      send: 0-0-0-0 s=255,c=0,t=18,pt=0,l=5,st=fail:1.4.1
      send: 0-0-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0
      send: 0-0-0-0 s=255,c=3,t=11,pt=0,l=5,st=fail:Relay
      send: 0-0-0-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0
      send: 0-0-0-0 s=1,c=0,t=3,pt=0,l=5,st=fail:1.4.1

      I used orginal motion sensor sketch only change is define CHILD_ID 90

      sensor started, id 0
      send: 0-0-0-0 s=255,c=0,t=17,pt=0,l=5,st=fail:1.4.1
      send: 0-0-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0
      send: 0-0-0-0 s=255,c=3,t=11,pt=0,l=13,st=fail:Motion Sensor
      send: 0-0-0-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0
      send: 0-0-0-0 s=90,c=0,t=1,pt=0,l=5,st=fail:1.4.1
      0
      send: 0-0-0-0 s=90,c=1,t=16,pt=0,l=1,st=fail:0
      1
      send: 0-0-0-0 s=90,c=1,t=16,pt=0,l=1,st=fail:1

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: No Auto node id

      Thank you i am using serial so this is why i dont get auto node id.

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: 433mhz outlet

      @axillent Thank you i know you are very helpful. I tried to copy my remote to an universal remote learner(which has no name chipset) but it didnt copy. It is hard to understand and solve for a newbie.

      I simply tried to send 10101010codes with this sketch https://code.google.com/p/rc-switch/wiki/HowTo_Send?tm=6 and didnt work.

      Something interesting i found while tranmitting,
      If i remove the delay () than signal is always sent. I made a jammer! πŸ™‚ Any of my 433 remotes didnt work!

      I want to learn if any universal remote learner with EV1527 Chipset works with RCSwitch?
      My plan is to copy some remote codes to EV1527 universal remote and read the code from serial with RCSwitch-rfSniffer.

      Now i will try IR SENDER-RECEIVER http://www.mysensors.org/build/ir maybe i can get new ideas for 433mhz things..

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Controlling Blinds.com RF Dooya Motors with Arduino and Vera

      @petewill Thank you i know you are very helpful. I tried to copy my remote to an universal remote learner(which has no name chipset) but it didnt copy. It is hard to understand and solve for a newbie.

      I simply tried to send 10101010codes with this sketch https://code.google.com/p/rc-switch/wiki/HowTo_Send?tm=6 and didnt work.

      Something interesting i found while tranmitting,
      If i remove the delay () than signal is always sent. I made a jammer! πŸ™‚ Any of my 433 remotes didnt work!

      I want to learn if any universal remote learner with EV1527 Chipset works with RCSwitch?
      My plan is to copy some remote codes to EV1527 universal remote and read the code from serial with RCSwitch-rfSniffer.

      Now i will try IR SENDER-RECEIVER http://www.mysensors.org/build/ir maybe i can get new ideas for 433mhz things..

      posted in My Project
      C.r.a.z.y.
      C.r.a.z.y.
    • No Auto node id

      All of my devices don't get AUTO node id in Vera or openHab.Everytime i write it manually

      in the skech. Is this normal? I couldn't find a solution in the forum.

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: 433mhz outlet

      @axillent OK i understand fixed codes are fine with RCSwitch.

      How can i transmit this data ?

      1100 0011 0010 0010 0011 0000 1100 1000 1000
      1100 0011 0001 0010 0011 0000 1100 0100 1000

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: 433mhz outlet

      @axillent Thank you. Do you have dip switches in your sensors?

      I found a comparasion table maybe this could help people like me;

      http://www.hkvstar.com/technology-news/the-difference-between-fixed-code-pt2262-and-learning-code-ev1527.html

      If my remote is not a fixed code, how can i read and transmit it?

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Controlling Blinds.com RF Dooya Motors with Arduino and Vera

      I think these are not the same with youtube video?

      define SEND_DATA 3 //Data pin for RF Transmitter
      define ZERO_HIGH 270 //Delay for the high part of a 0 in microseconds
      define ZERO_LOW 950 //Delay for the low part of a 0 in microseconds
      define ONE_HIGH 910 //Delay for the high part of a 1 in microseconds
      define ONE_LOW 300//Delay for the low part of a 1 in microseconds

      I read one of my remote with RC-Switch but other remote didnt work with RC-Switch.

      Your method is more general because RC-Switch only reads some kind of chipsets... SC5262 / SC5272, HX2262 / HX2272, PT2262 / PT2272, EV1527, RT1527, FP1527 or HS1527

      How can i convert this data to 32bit?
      1101 0101 0101 1100 0000 0011 0

      first 4 bits 0000 in your sketch + 25 bits from my remote = 29 bits

      posted in My Project
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: 433mhz outlet

      @axillent Motion sensor ; brand, model, which chip in it?

      I have an remote like this (attached) and it didnt work with RC-Switch. (RC-Switch works with SC5262 / SC5272, HX2262 / HX2272, PT2262 / PT2272, EV1527, RT1527, FP1527 or HS1527 chipsets)

      If my remote is working with other chipset, how can i read and transmit it?

      How can i find this remote's chipset?
      ----PIC16F630 ---update http://ww1.microchip.com/downloads/en/devicedoc/40039f.pdf

      image1.JPG

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: 433mhz outlet

      @axillent Please can you share link of 433 motion sensor?

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Openhab MQTT Example

      @John There was a problem with serial....1.6.1.jar it doesnt show this correctly;

      ArduinoUpdate -> 0;0;3;0;9;read: 14-14-0 s=1,c=1,t=16,pt=0,l=1:0
      14;1;1;0;16;0

      i think its related with baud rate for jar file because i saw  these kind of things in terminal οΏ½οΏ½οΏ½οΏ½BOοΏ½"UοΏ½οΏ½Β²eοΏ½οΏ½B&οΏ½οΏ½iοΏ½

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Openhab MQTT Example

      @Marcus Try Tim's files and JAR file for serial openHab http://forum.mysensors.org/topic/655/serial-gateway-connection-to-openhab/2
      I added a motion sensor and its fine.

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      @TimO said:

      @CARSTEN I've compiled a modified version of the OpenHab Serial binding with a baud rate of 115200 as this is standard in mysensors.

      Download: org.openhab.binding.serial_1.6.0.201411271703.jar

      As @tboha suggested you currently have to manage all commands by yourself.

      I've attached my modified serial binding here. Please be aware, that all other configurations that depend on serial binding won't work with the modified version, because of the changed baud rate.

      I'm currently testing with this Serial Gateway:

      Serial Gateway

      And a litte sensor/relay combination (switch LED on/off and read DHT22):

      RelayActuator

      Here is my OpenHab configuration for simple testing:

      demo.items: demo.items
      demo.rules: demo.rules
      demo.sitemap: demo.sitemap

      Tim did you modify this jar file? Where can i follow updates?
      1.6.1.jar version have arduino update problems

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Controlling Blinds.com RF Dooya Motors with Arduino and Vera

      @petewill thank you Pete. I will try to modify at least i will sent rf code. Yes audocity file pressed 3 times on + 3 times off..

      posted in My Project
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Vera Edge

      @ServiceXp Serial

      posted in Vera
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Controlling Blinds.com RF Dooya Motors with Arduino and Vera

      @petewill Thank you Pete. I tried this code and found 9 devices. I changed 433 codes but didnt work.

      Before mySensors how can i test the 433 code if it works or not?

      Are these settings correct?
      1101010101011100000000110
      1101010101011100000011000

      define SEND_DATA 3 //Data pin for RF Transmitter
      define ZERO_HIGH 270 //Delay for the high part of a 0 in microseconds
      define ZERO_LOW 950 //Delay for the low part of a 0 in microseconds
      define ONE_HIGH 910 //Delay for the high part of a 1 in microseconds
      define ONE_LOW 300//Delay for the low part of a 1 in microseconds

      Audocity file : http://1drv.ms/1wmgh2e

      https://codebender.cc/sketch:67840

      posted in My Project
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Sometimes nodes NOT created???

      Dear admin whats is your suggestion? Is this a bug?

      posted in Vera
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Controlling Blinds.com RF Dooya Motors with Arduino and Vera

      433mhz-outlet
      please check this ;

      http://forum.mysensors.org/topic/713/433mhz-outlet

      posted in My Project
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Vera Edge

      @hek i tried it 2-3 weeks ago but didn't work for me with ui7. Did you make an update in this period? UI5 itself is from stone age:s

      posted in Vera
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Openhab MQTT Example

      @Marcus serial is working fine with piDome, openHab and Vera. No need for mosquito which i never installed and used before.

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • 433mhz outlet

      I am trying to convert this code for outlet ; http://forum.mysensors.org/topic/7/controlling-blinds-com-rf-dooya-motors-with-arduino-and-vera/10 (note its using old lib)

      +vera doesn't give auto id (all other sensor like motion etc) so i made it int hey = 14; in this way i can get sketch name etc...

      my 433 on code : 1101010101011100000000110
      my 433 off code : 1101010101011100000011000

      on-off-433.png
      code txt : outlet433

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Openhab MQTT Example

      @Marcus it works fine for me

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Openhab MQTT Example

      I am also using openHab πŸ˜‰ but serial way

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: servo on arduino uno works , but not with nano

      @Corvl be careful i lost 4 nanos with servo πŸ‘
      dont give power from nano to servo

      • try clear eeprom before uploding a sketch
      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      @tboha Thank you for your detailed answer. πŸ‘

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      @tboha thank you!

      I tried motion sensor sketch (without any change) and it works. I also added motion to ui and i can see "motion" -"no motion" notifications.
      I will try relay again and give info.
      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      **How can i add new devices automatically to UI OR add new device button in UI? - No touch to sitemap-items-rules etc files..

      More deeper : i have a "sensors" frame (like first floor in demo) and all sensors will be added to under this location OR how can i select which device will be added under x frame in UI? **

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Openhab Puzzle Rule Programmer

      @abalazs thank you!

      Install info is not clear in github.

      copy all files under Macintosh HD β–Έ opt β–Έ openhab β–Έ webapps β–Έ habmin

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Controlling Blinds.com RF Dooya Motors with Arduino and Vera

      Awesome work!

      Is three anyway to copy a ROLLING code?

      posted in My Project
      C.r.a.z.y.
      C.r.a.z.y.
    • Openhab Puzzle Rule Programmer

      Where can i find this puzzle rule creation? It is not openHab designer;

      http://www.mysensors.org/controller/openhab_rules.png

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • Items in the store

      Dear admins please can you add a link for each items in the store where we can use them?

      posted in Hardware
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Serial Gateway connection to Openhab

      @TimO Thank you Tim!

      I think i am on the right way but i couldnt change relay state. Please help me.

      Orginal sketch didnt worked for me (i dont have any temp-hum sensor and 2 relays yet) so i changed it to 1 relay without temp-hum

      here is my code;

      include <MySensor.h>
      include <SPI.h>

      define RELAY_1 3 // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
      define NUMBER_OF_RELAYS 1 // Total number of attached relays
      define RELAY_ON 1 // GPIO value to write to turn on attached relay
      define RELAY_OFF 0 // GPIO value to write to turn off attached relay

      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)

      MySensor gw(100);

      unsigned long lastCheckTime = millis();

      void setup()
      {
      // Initialize library and add callback for incoming messages
      gw.begin(incomingMessage, AUTO, true);
      // Send the sketch version information to the gateway and Controller
      gw.sendSketchInfo("Relay", "1.0");

      // Fetch relay status
      for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
      // Register all sensors to gw (they will be created as child devices)
      gw.present(sensor, S_LIGHT);
      // Then set relay pins in output mode
      pinMode(pin, OUTPUT);
      // Set relay to last known state (using eeprom storage)
      //digitalWrite(pin, gw.loadState(sensor)?RELAY_ON:RELAY_OFF);
      digitalWrite(pin, RELAY_OFF);
      }

      //metric = gw.getConfig().isMetric;
      }

      void loop()
      {
      // Alway process incoming messages whenever possible
      gw.process();

      //gw.sleep(SLEEP_TIME); //sleep a bit
      }

      void incomingMessage(const MyMessage &message) {
      // We only expect one type of message from controller. But we better check anyway.
      if (message.type==V_LIGHT) {
      // Change relay state
      digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
      // Store state in eeprom
      gw.saveState(message.sensor, message.getBool());
      // Write some debug info
      Serial.print("Incoming change for sensor:");
      Serial.print(message.sensor);
      Serial.print(", New status: ");
      Serial.println(message.getBool());
      }
      }

      and openhab;

      Launching the openHAB runtime...
      osgi> 2014-12-06 21:00:22.323 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.6.1).
      2014-12-06 21:00:23.266 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
      2014-12-06 21:00:23.301 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
      2014-12-06 21:00:25.171 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
      2014-12-06 21:00:32.963 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model '1.sitemap'
      2014-12-06 21:00:33.121 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'db4o.persist'
      2014-12-06 21:00:33.144 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'exec.persist'
      2014-12-06 21:00:33.150 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'logging.persist'
      2014-12-06 21:00:33.161 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'
      2014-12-06 21:00:33.187 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model '1.items'
      2014-12-06 21:00:33.809 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /openhab.app
      2014-12-06 21:00:37.412 [INFO ] [.service.AbstractActiveService] - HTTP Refresh Service has been started
      2014-12-06 21:00:37.466 [INFO ] [.service.AbstractActiveService] - NTP Refresh Service has been started
      2014-12-06 21:00:38.892 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;14;Gateway startup complete.

      2014-12-06 21:00:43.265 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model '1.rules'
      2014-12-06 21:01:02.305 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 0-0-0 s=255,c=0,t=18,pt=0,l=5:1.4.1
      0;255;0;0;18;1.4.1
      0;0;3;0;9;read: 0-0-0 s=255,c=3,t=6,pt=1,l=1:0

      ArduinoUpdate -> 0;0;3;0;9;read: 0-0-0 s=255,c=0,t=18,pt=0,l=5:1.4.1
      0;255;0;0;18;1.4.1
      0;0;3;0;9;read: 0-0-0 s=255,c=3,t=6,pt=1,l=1:0
      2014-12-06 21:01:04.304 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 0-0-0 s=255,c=3,t=11,pt=0,l=5:Relay
      0;0;3;0;9;read: 0-0-0 s=255,c=3,t=12,pt=0,l=3:1.0
      0;0;3;0;9;read: 0-0-0 s=1,c=0,t=3,pt=0,l=5:1.4.1
      0;1;0;0;3;1.4.1

      ArduinoUpdate -> 0;0;3;0;9;read: 0-0-0 s=255,c=3,t=11,pt=0,l=5:Relay
      0;0;3;0;9;read: 0-0-0 s=255,c=3,t=12,pt=0,l=3:1.0
      0;0;3;0;9;read: 0-0-0 s=1,c=0,t=3,pt=0,l=5:1.4.1
      0;1;0;0;3;1.4.1
      2014-12-06 21:01:23.048 [INFO ] [runtime.busevents ] - RED_LED received command ON
      2014-12-06 21:01:23.130 [INFO ] [runtime.busevents ] - Arduino received command 100;1;1;0;2;1

      ArduinoUpdate -> 100;1;1;0;2;1
      2014-12-06 21:01:35.421 [INFO ] [runtime.busevents ] - RED_LED received command OFF
      2014-12-06 21:01:35.429 [INFO ] [runtime.busevents ] - Arduino received command 100;1;1;0;2;0

      ArduinoUpdate -> 100;1;1;0;2;0
      2014-12-06 21:02:02.885 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 0-0-0 s=255,c=0,t=18,pt=0,l=5:1.4.1
      0;255;0;0;18;1.4.1
      0;0;3;0;9;read: 0-0-0 s=255,c=3,t=6,pt=1,l=1:0

      ArduinoUpdate -> 0;0;3;0;9;read: 0-0-0 s=255,c=0,t=18,pt=0,l=5:1.4.1
      0;255;0;0;18;1.4.1
      0;0;3;0;9;read: 0-0-0 s=255,c=3,t=6,pt=1,l=1:0
      2014-12-06 21:02:04.991 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 0-0-0 s=255,c=3,t=11,pt=0,l=5:Relay
      0;0;3;0;9;read: 0-0-0 s=255,c=3,t=12,pt=0,l=3:1.0
      0;0;3;0;9;read: 0-0-0 s=1,c=0,t=3,pt=0,l=5:1.4.1
      0;1;0;0;3;1.4.1

      ArduinoUpdate -> 0;0;3;0;9;read: 0-0-0 s=255,c=3,t=11,pt=0,l=5:Relay
      0;0;3;0;9;read: 0-0-0 s=255,c=3,t=12,pt=0,l=3:1.0
      0;0;3;0;9;read: 0-0-0 s=1,c=0,t=3,pt=0,l=5:1.4.1
      0;1;0;0;3;1.4.1
      2014-12-06 21:03:31.097 [INFO ] [runtime.busevents ] - RED_LED received command ON
      2014-12-06 21:03:31.103 [INFO ] [runtime.busevents ] - Arduino received command 100;1;1;0;2;1

      ArduinoUpdate -> 100;1;1;0;2;1

      posted in OpenHAB
      C.r.a.z.y.
      C.r.a.z.y.
    • Test with battery

      I will try to use 5v mini pro and motion sensor and 2 varta 3v lithium batteries with serial connection (3vx2=6v) I will not use a step up because i have 6v.

      http://www.ebay.com/itm/Varta-Professional-Lithium-Photo-3V-CR2-Battery-NEW-1-pack-Dated-2022-/201229376331?pt=US_Single_Use_Batteries&hash=item2eda349b4b

      Is it safe to run mini pro and motion sensor above 5v?

      Battery life is not important for now untill i get a 3.3V mini pro...

      posted in General Discussion
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: No Serial port with nano

      Thank you all.

      I tried to use vcc ang gnd for 5v servo with two nanos.
      When i couldn't see serial port i opened a new one and followed this : http://sysexit.wordpress.com/2013/02/07/burning-a-bootloader-to-an-arduino-nano-using-another-arduino/
      also http://www.instructables.com/id/How-To-Burn-a-Bootloader-to-Clone-Arduino-Nano-30/3/?lang=es

      My new opened nano also died after bootload.
      After this i tried with uno as programmer, it installed ISP and 2 of nano is blinking like new one but no serial.
      Other 2 nano didn't burn;

      avrdude: Device signature = 0xffff00
      avrdude: Expected signature for ATmega328P is 1E 95 0F
      Double check chip, or use -F to override this check.
      avrdude: Send: Q [51] [20]
      avrdude: Recv: . [14]
      avrdude: Recv: . [10]
      avrdude done. Thank you.
      Error while burning boot loader.

      4.nano was in vera. I don't remember how i loose it πŸ™‚

      Now i will go and get 2 more nano. I have to use one of it with vera. Also i will buy 2 raspberry b+ and cameras and a clone yΓΌn to try some intercom action.

      I want to use other raspberry with openhab or pidome...

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • No Serial port with nano

      I was using my 4 original nano well. Today suddenly i lost serial port. There are only bluetooth ports.. Uno has no problem but my nano serial port is nowhere.

      I followed this http://arduino.stackexchange.com/questions/5119/arduino-nano-no-serial-port-for-macbook-air-2013
      but didn't work.

      All my day passed with this problem:(

      mac 10.10.1 Yosemite

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: MySensors and Vera UI7

      New version Vera have 1 USB and 1 ethernet and wifi, it will be on sale in a few weeks with ui7.
      I dont know why some plugins work with ui5 but not compatiable with ui7.

      Do you have any plan to make an update for mysensors plugin?

      posted in Vera
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Using an UNO for Sensor With Negative Results

      I added a servo and i have only Lib Version 1.4.1. others are blank.
      1 day passed no change.
      ui5 and nano mg995

      I cant control windows covering -up-down- no function

      Any idea?

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • Servo-Window covering

      I added servo to vera but i cant control it.

      Restarted a few times but only Lib Version changed.

      Arduino Node 0
      Sketch Name:
      Sketch Version:
      Lib Version:1.4.1
      Parent node:
      Last Update:

      sensor started, id 0
      send: 0-0-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
      send: 0-0-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
      send: 0-0-0-0 s=255,c=3,t=11,pt=0,l=5,st=ok:Servo
      send: 0-0-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
      send: 0-0-0-0 s=10,c=0,t=5,pt=0,l=5,st=ok:1.4.1
      send: 0-0-0-0 s=10,c=2,t=3,pt=0,l=5,st=ok:1.4.1

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Stoping at MySensors Plugin[43] : Running Lua Startup

      I changed imp file to I_ArduinoNode1.xml because it was blank than i saw same problem : stopping MySensors Plugin[43] : Running Lua Startup. Now its blank again and no problem with Lua

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • Stoping at MySensors Plugin[43] : Running Lua Startup

      Yesterday Nano with ui6 was working with a motion sensor but today i made a few restart, there is only

      MySensors Plugin[43] : Running Lua Startup

      When i click Start i got "device not ready" error.

      Serial monitor: Gateway start ok...

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • Raspberry Pi and MQTT-OpenHAB

      I am a newbei and some stupid questions like cookies:p
      Do i have to use Raspberry Pi for OpenHAB or PiDome?

      My hardware : ENC28J60 Ethernet module + UNO + NRF24L01 Radio so I made connections following http://www.mysensors.org/build/ethernet_gateway and using sketch : http://www.mysensors.org/build/mqtt_gateway without changing any code i got this:

      Started!
      0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
      0;0;3;0;9;version mismatch
      0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
      0;0;3;0;9;version mismatch

      Is it ok?

      I tried everything to install OpenHAB server with Mac but "start.sh" didnt work, i cant open this file, do you have any idea? (Yes i installed Java)


      When Uno is connected with the same network

      • Win8 cmd is running this:****

      Launching the openHAB runtime...

      osgi> 2014-11-27 19:21:06.004 [INFO ] [.o.core.internal.CoreActivator] - openHAB

      runtime has been started (v1.6.0).

      2014-11-27 19:21:06.619 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service

      has been started

      2014-11-27 19:21:06.734 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Disco

      very initialization completed.

      2014-11-27 19:21:06.739 [INFO ] [.io.transport.mqtt.MqttService] - MQTT Service

      initialization completed.

      2014-11-27 19:21:06.739 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT

      broker connection 'mysensor'

      2014-11-27 19:21:07.990 [INFO ] [penhab.io.rest.RESTApplication] - Started REST

      API at /rest

      2014-11-27 19:21:16.926 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Class

      ic UI at /openhab.app

      2014-11-27 19:21:27.769 [ERROR] [.io.transport.mqtt.MqttService] - Error startin

      g broker connection

      org.eclipse.paho.client.mqttv3.MqttException: Unable to connect to server

          at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNet
      

      workModule.java:75) ~[na:na]

          at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(Cli
      

      entComms.java:538) ~[na:na]

          at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_25]
      

      Caused by: java.net.ConnectException: Connection timed out: connect

          at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[na:
      

      1.8.0_25]

          at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[na:
      

      1.8.0_25]

          at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:1.8.0
      

      _25]

          at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[n
      

      a:1.8.0_25]

          at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_2
      

      5]

          at java.net.PlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_25]
      
          at java.net.SocksSocketImpl.connect(Unknown Source) ~[na:1.8.0_25]
      
          at java.net.Socket.connect(Unknown Source) ~[na:1.8.0_25]
      
          at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNet
      

      workModule.java:66) ~[na:na]

          ... 2 common frames omitted
      posted in General Discussion
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: 2 systems in same location

      Thank you Hek.

      #define RF24_CHANNEL 76 //RF channel for the sensor net, 0-127

      If i change** 76 to 77** it will be a different freq?

      #ifndef MyConfig_h
      #define MyConfig_h

      /***

      • Configure Sensor Network
        */
        #define RF24_CHANNEL 76 //RF channel for the sensor net, 0-127
        #define RF24_DATARATE RF24_250KBPS //RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS for 2Mbps
        #define RF24_PA_LEVEL RF24_PA_MAX //Sensor PA Level == RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_HIGH=-6dBM, and RF24_PA_MAX=0dBm
        #define RF24_PA_LEVEL_GW RF24_PA_LOW //Gateway PA Level, defaults to Sensor net PA Level. Tune here if using an amplified nRF2401+ in your gateway.
        #define BASE_RADIO_ID ((uint64_t)0xA8A8E1FC00LL) // This is also act as base value for sensor nodeId addresses. Change this (or channel) if you have more than one sensor network.

      // MySensors online examples defaults
      #define DEFAULT_CE_PIN 9
      #define DEFAULT_CS_PIN 10

      /***

      • Enable/Disable debug logging
        */
        #define DEBUG

      #endif

      posted in General Discussion
      C.r.a.z.y.
      C.r.a.z.y.
    • 2 systems in same location

      If i want to use 2 or more systems in the same location; sensors will be mixed? How can i ban other system to see my already working sensor? (For vera gateway)

      posted in General Discussion
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Using an UNO for Sensor With Negative Results

      @m26872 Thank you very much! This worked for me πŸ‘ πŸ’―
      I have another vera lite (ui6 no problem i switch to ui5) and my motion sensor is working.

      Ekran Resmi 2014-11-24 17.58.15.png

      Do you have any idea why Sketch name, version parent node is blank?

      • imp_file was also blank i added it manually "I_MotionSensor1.xml" than restarted.
      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Using an UNO for Sensor With Negative Results

      I am using veralite and ui7. Same problem with Adam Mikolajczyk.

      send: 11-11-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
      sensor started, id 11
      send: 11-11-255-0 s=255,c=0,t=17,pt=0,l=5,st=fail:1.4.1
      send: 11-11-255-0 s=255,c=3,t=6,pt=1,l=1,st=fail:255
      send: 11-11-255-0 s=255,c=3,t=11,pt=0,l=13,st=fail:Motion Sensor
      send: 11-11-255-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0
      send: 11-11-255-0 s=1,c=0,t=1,pt=0,l=5,st=fail:1.4.1
      0
      send: 11-11-255-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
      1
      send: 11-11-255-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
      send: 11-11-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
      0
      send: 11-11-255-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
      1
      send: 11-11-255-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
      0

      This is my first sensor what is wrong?

      Plugin Version:1.4 Lib Version: 1.4.1 Press start for inclusion 0 devices found

      I am using Nano serial with vera., tried pro mini and uno for motion sensor..

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.