Navigation

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

    C.r.a.z.y.

    @C.r.a.z.y.

    2
    Reputation
    90
    Posts
    1291
    Profile views
    0
    Followers
    2
    Following
    Joined Last Online
    Location malta

    C.r.a.z.y. Follow

    Best posts made by 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: 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.

    Latest 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.