Navigation

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

    Posts made by arraWX

    • RE: ๐Ÿ’ฌ Relay

      Thank you @gohan! Retail solution is not the keyword here. What I am searching for is an authorized/lawful (safe) solution.

      I decided to do my own node (mysensors) with a cheap relay module for the arduino. Once I achieve the desired functionality I will change to some more robust hardware. Following your suggestion this could be a z wave roller shutter (e.g. fibaro or qubino).

      posted in Announcements
      arraWX
      arraWX
    • How to stop execution of code if message is received during wait()...?

      I am trying to do a very simple node with two relays for control of my venetian blinds.

      When the node receives an ON signal from the controller a relay is going to turn on for x seconds (line 115 in the below sketch). The mysensors function wait() is used to control the time (line 117). If a new message is received from the controller before wait is finished (e.g. OFF), then wait() should stop and the remaining lines of code (lines 118 to 123) should not be executed. How is that achieved? Hope someone can help. Thanks.

      1      // Enable debug prints
      2      // #define MY_DEBUG
      3  
      4      // Enable and select radio type attached
      5      #define MY_RADIO_NRF24
      6  
      7      #include <MySensors.h>
      8  
      9      #define CHILD_ID_BLIND 1
      10 
      11     #define EPROM_BLIND_STATE 1
      12     #define EPROM_SLAT_ANGLE 2
      13 
      14     #define LED_PIN 4
      15 
      16     #define BLIND_OFF 0
      17     #define BLIND_ON 1
      18 
      19     #define SN "Venetian Blind"
      20     #define SV "1.0"
      21 
      22     int16_t LastBlindState = BLIND_OFF;
      23     int16_t LastSlatAngle = 50;
      24 
      25     void setup()
      26     {
      27       // Retreive our last blind state from the eprom
      28       int BlindState = loadState(EPROM_BLIND_STATE);
      29       if (BlindState <= 1) {
      30         LastBlindState = BlindState;
      31         int SlatAngle = loadState(EPROM_SLAT_ANGLE);
      32         if ((SlatAngle >= 0) && (SlatAngle <= 100)) {
      33           LastSlatAngle = SlatAngle;
      34         }
      35         Serial.print("State and angle at setup: ");
      36         Serial.print(LastBlindState);
      37         Serial.print(", ");
      38         Serial.println(LastSlatAngle);
      39 
      40         pinMode(LED_PIN, OUTPUT); // LED for testing purposes
      41       }
      42 
      43       //Here you actualy switch on/off the blinds with the last known slat level
      44       SetCurrentState2Hardware();
      45 
      46       Serial.println( "Node ready to receive messages..." );
      47     }
      48 
      49     void presentation()
      50     {
      51       // Send the Sketch Version Information to the Gateway
      52       sendSketchInfo(SN, SV);
      53 
      54       present(CHILD_ID_BLIND, S_DIMMER );
      55     }
      56 
      57     void loop()
      58     {
      59     }
      60 
      61     void receive(const MyMessage &message)
      62     {
      63       if (message.type == V_STATUS) {
      64         Serial.print( "V_STATUS command received...: " );
      65 
      66         int bstate = atoi( message.data ); // atoi(): Convert string to integer
      67         if ((bstate < 0) || (bstate > 1)) {
      68           Serial.println( "V_STATUS data invalid (should be 0/1)" );
      69           return;
      70         }
      71         LastBlindState = bstate;
      72         Serial.println(LastBlindState);
      73         saveState(EPROM_BLIND_STATE, LastBlindState);
      74 
      75       } else if (message.type == V_PERCENTAGE) {
      76         Serial.print( "V_PERCENTAGE command received...: " );
      77         int slatvalue = atoi( message.data );
      78         if ((slatvalue < 0) || (slatvalue > 100)) {
      79           Serial.println( "V_PERCENTAGE data invalid (should be 0..100)" );
      80           return;
      81         }
      82 
      83         LastBlindState = BLIND_ON;
      84         LastSlatAngle = slatvalue;
      85         Serial.println(LastSlatAngle);
      86         saveState(EPROM_SLAT_ANGLE, LastSlatAngle);
      87         saveState(EPROM_BLIND_STATE, LastBlindState);
      88       }
      89       else {
      90         Serial.println( "Invalid command received..." );
      91         return;
      92       }
      93 
      94       //Here you set the actual light state/level
      95       SetCurrentState2Hardware();
      96     }
      97 
      98     void SetCurrentState2Hardware()
      99     {
      100      digitalWrite(LED_PIN, LOW); // Relays = off
      101      wait(1000);
      102
      103      if (LastBlindState == BLIND_OFF) {
      104        Serial.println( "Light state: OFF" );
      105
      106        digitalWrite(LED_PIN, HIGH); // up-relay on
      107        Serial.println("Going all the way up");
      108        wait(7500); // time to move blind all the way up
      109        digitalWrite(LED_PIN, LOW);  // up-relay off
      110      }
      111      else {
      112        Serial.print( "Light state: ON, Level: " );
      113        Serial.println( LastSlatAngle );
      114
      115        digitalWrite(LED_PIN, HIGH); // down-relay on
      116        Serial.println("Going all the way down");
      117        wait(7500); // time to move blind all the way down
      118        digitalWrite(LED_PIN, LOW);  // down-relay off
      119        wait(1000);
      120        digitalWrite(LED_PIN, HIGH); // up-relay on
      121        Serial.println("Adjusting slat angle");
      122        wait(100 * LastSlatAngle);
      123        digitalWrite(LED_PIN, LOW);  // up-relay off
      124      }
      125    }
      
      posted in Development
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ Relay

      Hi!

      I would like to control some 230VAC equipment (for now roller shutters), based on inputs from my mysensors sensors (temperature and light). For controller I use domoticz.

      I would like a safe, robust and preferably authorized/lawful solution (I'm in EU/Denmark).

      I came across the following solutions:

      https://aeotec.com/z-wave-plug-in-switch
      https://sonoff.itead.cc/en/products/sonoff/sonoff-basic
      https://dlidirect.com/products/iot-power-relay

      I think the first one and maybe the second one will be authorized/lawful...? However, I have experience only with mysensors and neither z wave nor sonoff...

      Anyone has some experience/thoughts/suggestions to share?

      Thanks.

      posted in Announcements
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ FOTA (Wireless Programming)

      @gohan I recently had some problems with fota and the sensebender sketch you refer to. In this thread @tekka suggested me to enable smart sleep. I used

      smartSleep(MEASURE_INTERVAL);
      

      It seems that the smartSleep function has a "built in" MY_SMART_SLEEP_WAIT_DURATION_MS (which defaults to 500 ms). This makes the OTA_WAIT_PERIOD in the sensebender sketch redundant. I deleted it from the sketch.

      FOTA now works successfully with my sensebender boards.

      posted in Announcements
      arraWX
      arraWX
    • RE: FOTA with MYSController does not work with sleeping Sensebender Micro

      @tekka Thank you. However, it turned out that your advice was only part of the solution.

      In order to solve the problem I had to also change the sensebender from 2.1.1 to development branch.

      My rpi gateway uses development branch (due to reasons discussed here). Does the version mismatch between node and gateway explain why FOTA was not working?

      posted in Troubleshooting
      arraWX
      arraWX
    • FOTA with MYSController does not work with sleeping Sensebender Micro

      I use the "official" sketch for the Sensebender Micro. However, with "MEASURE_INTERVAL = 6000" and "FORCE_TRANSMIT_INTERVAL = 1" in order to transmit every 6 seconds.

      Gateway is rpi ethernet.

      MYSController 1.0.0beta (build 3316), "Sensebender board = TRUE", "Battery-powered / sleeping = TRUE" gives the following message but nothing more happens.

      0_1513461114537_Udklip.PNG

      If I replace sleep by wait in the sketch and set "Battery-powered / sleeping = FALSE" in MYSController then FOTA works flawlessly. But then node is not sleeping.

      Anyone knows how to get it working with a sleeping node?

      posted in Troubleshooting
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ FOTA (Wireless Programming)

      Using FOTA in myscontroller works only occasionally for me. Sometimes it works fine. But most often I get the following messages and nothing more happens.

      0_1512991929867_Udklip.PNG

      The node is a sensebender micro. Gateway is rpi ethernet.

      Has anyone experienced something similar? Anyone knows how to solve the problem?

      EDIT: Problem solved. Reading this post I now understand that in order to get new fw into the node one has to update the sketch, refresh the repo in MysController and assign it the node.

      posted in Announcements
      arraWX
      arraWX
    • RE: Alternatives for nRF24L01+ ?

      @NeverDie Thank you!

      To me it seems as if it is not an option to order an antenna from CDEbyte through aliexpress.

      Can I use any 2.4 GHz SMA antenna? Anything to be particularly aware of? Any suggestions?

      posted in General Discussion
      arraWX
      arraWX
    • RE: Alternatives for nRF24L01+ ?

      @NeverDie This one: https://www.aliexpress.com/item/E01-ML01DP5-Ebyte-2-4GHz-20dBm-2100m-nRF24L01-SPI-Wireless-transceiver-module/32638720689.html

      posted in General Discussion
      arraWX
      arraWX
    • RE: Alternatives for nRF24L01+ ?

      @Nca78 I am about to order a few of the suggested modules (PA/LNA module from CDEbyte) from aliexpress. My first deal ever on aliexpress. What about antenna? Will I have to order it separately?

      posted in General Discussion
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ Building a Raspberry Pi Gateway

      A little hint in the tutorial would have saved me a lot of time too.

      posted in Announcements
      arraWX
      arraWX
    • RE: How to tell if mysensors library starts up successfully?

      @Boots33 Thank you!

      Those posts provide lots of useful information.

      posted in Development
      arraWX
      arraWX
    • RE: How to tell if mysensors library starts up successfully?

      @gohan Thank you!

      The node is a sensebender micro. I would like to use the built-in LED.

      I never made a node with the 3 status LEDs. It might be worthwhile for me to look more into that.

      posted in Development
      arraWX
      arraWX
    • How to tell if mysensors library starts up successfully?

      I would like to turn on a LED if a node cannot find the gateway (e.g. if the distance is too large) when the node is powered up. How can that be done?

      I understand that the send command returns a Boolean that tells whether a message reached the gateway. However, if the node cannot find the gateway on power up the sketch never proceeds beyond #include <MySensors.h>. Is it possible to derive some status from this command?

      posted in Development
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ Building a Raspberry Pi Gateway

      Do not know if it is of any help, but mine says: gcc version 4.9.2 (Raspbian 4.9.2-10)

      posted in Announcements
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ Building a Raspberry Pi Gateway

      @ricorico94 Yesterday I managed to make a working rpi gateway. I am on rpi3, use a socket adapter board for the radio and use domoticz. I posted all the details here: https://forum.mysensors.org/topic/7793/nrf24l01-problems-in-2-1-1-and-2-2-0-beta/24

      posted in Announcements
      arraWX
      arraWX
    • RE: NRF24L01+ problems in 2.1.1 and 2.2.0 Beta

      With 2.1.1 I have the exact same problems.

      However, everything seems to be fine with 2.2.0 Beta:

      git clone https://github.com/mysensors/MySensors.git --branch development
      cd MySensors
      ./configure --my-transport=nrf24 --my-gateway=ethernet --my-port=5003 --my-rf24-pa-level=RF24_PA_MAX
      make
      

      In domoticz:
      0_1508010294046_Udklip.PNG

      The result:

      pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
      mysgw: Starting gateway...
      mysgw: Protocol version - 2.2.0-beta
      mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0
      mysgw: TSM:INIT:TSP OK
      mysgw: TSM:INIT:GW MODE
      mysgw: TSM:READY:ID=0,PAR=0,DIS=0
      mysgw: MCO:REG:NOT NEEDED
      mysgw: Listening for connections on 0.0.0.0:5003
      mysgw: MCO:BGN:STP
      mysgw: MCO:BGN:INIT OK,TSP=1
      mysgw: TSF:MSG:READ,2-2-0,s=1,c=1,t=0,pt=7,l=5,sg=0:24.0
      mysgw: TSF:MSG:READ,2-2-0,s=2,c=1,t=1,pt=2,l=2,sg=0:58
      

      After success with 2.2.0 Beta I tried to go back to 2.1.1. However, it still does not work.

      I am on rpi3 and use a socket adapter board for the radio.

      posted in Bug Reports
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ Building a Raspberry Pi Gateway

      @skywatch Thank you! That solved my problem.

      posted in Announcements
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ Building a Raspberry Pi Gateway

      I followed the instructions carefully. However I get an error. Can someone help?

      git clone https://github.com/mysensors/MySensors.git --branch master
      cd MySensors
      ./configure --my-transport=nrf24 --my-gateway=ethernet
      

      This results in a warning:

      [SECTION] Detecting SPI driver.
        [WARNING] No supported SPI driver detected.
      

      When I run make I get the follwing error:

      In file included from examples_linux/mysgw.cpp:74:0:
      ./MySensors.h:254:2: error: #error No support for nRF24 radio on this platform
       #error No support for nRF24 radio on this platform
        ^
      In file included from ./drivers/RF24/RF24.cpp:23:0,
                       from ./MySensors.h:290,
                       from examples_linux/mysgw.cpp:74:
      ./drivers/RF24/RF24.h:52:17: fatal error: SPI.h: No such file or directory
       #include <SPI.h>
                       ^
      compilation terminated.
      Makefile:114: recipe for target 'build/examples_linux/mysgw.o' failed
      make: *** [build/examples_linux/mysgw.o] Error 1
      

      Hope someone can help. Thanks.

      posted in Announcements
      arraWX
      arraWX
    • RE: Raspberry Pi SD Card wear out?

      I run domoticz and use influxdb to collect sensor data on a rpi 3. After 2 - 3 months I see SD card corruption and have to restore the SD card from a backup image. This approach is starting to become annoying.

      Did anyone find a good and stable way to run rpi 24/7 with influxdb (or other database) collecting sensor data?

      @tbowmo Do you use the tmpfs for storage of influxdb data also? Did you add an external disk? If so what is your experience with that approach?

      posted in Hardware
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ FOTA (Wireless Programming)

      @Viciousman Thank you!

      How do I create a Ethernet gateway?

      Will I have to build this: https://www.mysensors.org/build/ethernet_gateway

      or

      Will I have to do some kind of configuration on the rpi and continue using my serial gateway?

      posted in Announcements
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ FOTA (Wireless Programming)

      Is it possible to do FOTA from my raspberry pi (serial gateway + domoticz)?

      As it is now I move the gateway from the rpi to a windows pc running MYSController. It would be nice to avoid this step.

      posted in Announcements
      arraWX
      arraWX
    • RE: ARDUINO UNO

      Arduino UNO can be perfectly well used. I use Arduino Uno for some of my mysensors. Connect VCC of the radio (NRF24L01+) to 3V3. Other pin numbers are the same.

      posted in General Discussion
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ Domoticz

      @breimann
      I use remot3.it to provide remote access to domoticz running on a rpi3. It is very simple to set up.
      It works great with a web browser on a pc. I did not test it with the domoticz android app yet.

      posted in Announcements
      arraWX
      arraWX
    • RE: MODBUS master sensor node

      What @Redguy describes is very close to what I wish to accomplish with my HVAC system.

      If I start out with modbuspoll and a moxa converter as suggested by @Redguy a few questions arise to me:

      • Is this moxa model the right one? http://www.moxa.com/product/uport_1110.htm
      • How do I connect my HVAC and the moxa? Simply connecting GND, TxD and RxD of the HVAC to the corresponding pins of the moxa (see pictures below)? What about 5VDC?
      • Any helpful people here see any problems in what I am trying to do?

      HVAC MODBUS adapter:
      0_1493294240973_modbus_adapter.PNG

      MOXA pin assignments:
      0_1493294297520_moxa_uport_1100.PNG

      HVAC system:
      https://www.drexel-weiss.at/produkte-und-loesungen/einfamilienhaus/x2-geraeteserie/

      MODBUS documentation:
      https://github.com/diresi/drexel-und-weiss/blob/master/900.6660_01_TI_Modbus_RTU_DE.pdf
      https://github.com/diresi/drexel-und-weiss/blob/master/900.6667_00_TI_Modbus_Parameter_V4.01_DE.pdf

      posted in Hardware
      arraWX
      arraWX
    • RE: How to find out if message was successfully delivered?

      @Mark-Swift In the sensebender sketch I replaced

      gw.send(msgTemp.set(temperature,1));
      

      with

          if(gw.send(msgTemp.set(temperature,1)))
          {
            digitalWrite(LED_PIN,LOW);
          }
          else
          {
            digitalWrite(LED_PIN,HIGH);
          }
      

      LED is OFF if meassages are successfully delivered. LED turns ON if meassage delivery fails and stays ON until a new meassage is successfully delivered.

      Note that I use mysensors 1.5 as I did not yet update to mysensors 2.0. In 2.0 gw. is not needed

      posted in Development
      arraWX
      arraWX
    • RE: ๐Ÿ’ฌ Connecting the Radio

      @carmelo42 Any size between 4.7ยต any 47ยต will be fine.

      posted in Announcements
      arraWX
      arraWX
    • RE: Laptop recommendation

      Thank you all for your comments!

      We ended up discarding the acer and bought an asus gaming laptop at a similar price.

      So far my son is very satisfied.

      posted in General Discussion
      arraWX
      arraWX
    • Laptop recommendation

      Hi,

      My son has saved up some money for his first laptop. It will primarily be used for minecraft.

      I consider to recommend him to buy one of these two, which are within his budget. However I cannot decide which (if any). Any suggestions?

      https://www.komplett.dk/product/874795/pcer/pc-baerbar/alle-baerbare/acer-aspire-e5-573g-156-fhd-mat

      http://www.elgiganten.dk/product/pc-tablets/barbar-computer/ACNXGAFED002/acer-aspire-f5-572g-15-6-barbar-pc-sort-iron-grey

      posted in General Discussion
      arraWX
      arraWX
    • RE: Which are the *best* NRF24L01+ modules?

      @loralg I successfully use a nRF24L01+PA+LNA on the gateway and regular nRF24L01+ on the sensors.

      There is a lot of information and hints available in the forum regarding the nRF24L01+PA+LNA . See e.g. here:
      https://forum.mysensors.org/topic/3719/nrf24l01-vs-nrf24l01-pa-lna/2

      In my case, however, the nRF24L01+PA+LNA works fine without any fix or special attention.

      posted in Hardware
      arraWX
      arraWX
    • RE: How to find out if message was successfully delivered?

      A big thanks to all of you! I learned a lot from your answers.

      For now I think that hardware ack is sufficient. I can now place a sensor in different locations and tell from its LED wether or not messages are recieved by the gateway (I have no repeater nodes yet).

      posted in Development
      arraWX
      arraWX
    • How to find out if message was successfully delivered?

      I did successfully build the Power Meter Pulse Sensor and use it with Domoticz.

      Next, I would like to have a LED on the sensor indicate whether messages are successfully delivered (e.g one blink) or not (e.g. three blinks).

      As far as I understand the ack should be set true while sending. E.g.

      gw.send(kwhMsg.set(kwh, 4)),true)
      

      However, I cannot figure out how to evaluate the result. I.e. if the destination node send ack back.

      posted in Development
      arraWX
      arraWX
    • RE: Arduino UNO R3 , Help Me

      There is a lot of useful info here:
      https://forum.mysensors.org/topic/2147/office-plant-monitoring

      Look also at the three links in the first post.

      posted in General Discussion
      arraWX
      arraWX
    • RE: How to connect 5V sensor to battery powered device?

      Thanks @AWI! A level converter is exactely what is needed.

      posted in Hardware
      arraWX
      arraWX
    • How to connect 5V sensor to battery powered device?

      On the battery powered sensor build page it is suggested to power 5V sensors using a step up converter. I guess that most 5V sensors use 5V logic levels for their digital output. Furthermore, as far as I understand the ATmega328P digital inputs do not accept voltages higher than Vcc + 0.5V (see datasheet p. 299). Consider as an example a sensebender operating at low battery level, say 2V. Wouldnโ€™t the sensebender be harmed by a 5V digital signal from an attached sensor?

      I hope someone in here can help explain how to properly connect a 5V sensor to battery powered device.

      posted in Hardware
      arraWX
      arraWX
    • RE: Gas (Co2) sensors on batteries

      The circuit diagram that I posted above did not show communication lines between the K-30 and the sensebender. These are included here:

      0_1457164201458_DSC00565.JPG

      However, I now realise that the K-30 and the sensebender cannot be connected this way because the sensebender (ATmega328P) digital inputs do not accept voltages higher than Vcc + 0.5V.

      Does anyone have a suggestion how this problem can be solved?

      @alexsh1 As you can see my experiments with powering the K-30 from batteries are not going that well...

      posted in Hardware
      arraWX
      arraWX
    • RE: Gas (Co2) sensors on batteries

      I'm very interested in this too!

      I have two Senseair K-30 CO2 sensor modules (http://www.co2meter.com/collections/co2-sensors/products/k-30-co2-sensor-module, http://www.senseair.com/products/oem-modules/k30), which use the non-dispersive infrared (NDIR) principle. The same principle is used in MH-Z14 as far as I understand.

      The K-30 consumes quite some current and is not ideal for operation from batteries. However, my thougth is to connect it to batteries using a MOSFET, making it possible to switch on/off the sensor using an arduino output. Something like this:

      0_1453989654529_DSC00565.JPG

      In order to save battery the strategy is to:

      • power up the sensor
      • warm up for a few seconds
      • take a measurement
      • power down
      • wait for some time (e.g. 10 minutes)
      • start over again

      The required warm-up time given in the datasheet is about 1 minute. However, a comparison of two K-30s - one powering up/down and the other powered on constantly - showed that a satisfactory measurement is obtained less than 10 seconds after powering up.

      0_1453989676442_DSC00564.JPG

      Any thougths on this issue will be very much appreciated.

      posted in Hardware
      arraWX
      arraWX
    • Will itead FTDI programmer work with sensebender micro?

      Hello!

      I decided to soon buy a couple of sensebender micros. However, until now I have only experience with arduino uno and nano. I understand a FTDI a progammer is needed to program the sensebender. Is the itead FTDI programmer found here https://www.itead.cc/foca.html a suitable choice?

      posted in General Discussion
      arraWX
      arraWX