Navigation

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

    reza

    @Reza

    19
    Reputation
    584
    Posts
    1794
    Profile views
    2
    Followers
    9
    Following
    Joined Last Online
    Age 34

    Reza Follow

    Best posts made by Reza

    • RE: 💬 Building an Ethernet Gateway

      i have this problem:

      0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
      0;255;3;0;9;TSM:INIT
      0;255;3;0;9;!TSM:RADIO:FAIL
      0;255;3;0;9;!TSM:FAILURE
      0;255;3;0;9;TSM:PDT
      0;255;3;0;9;TSM:INIT
      0;255;3;0;9;!TSM:RADIO:FAIL
      0;255;3;0;9;!TSM:FAILURE
      0;255;3;0;9;TSM:PDT
      0;255;3;0;9;TSM:INIT
      0;255;3;0;9;!TSM:RADIO:FAIL
      0;255;3;0;9;!TSM:FAILURE
      0;255;3;0;9;TSM:PDT
      

      i use ENC28J60 module . arduino nano + nrf24 + 4.7uf
      this code:

      #define MY_DEBUG 
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      // When ENC28J60 is connected we have to move CE/CSN pins for NRF radio
      #define MY_RF24_CE_PIN 5
      #define MY_RF24_CS_PIN 6
      
      // Enable gateway ethernet module type 
      #define MY_GATEWAY_ENC28J60
      
      // Gateway IP address
      #define MY_IP_ADDRESS 192,168,0,110
      
      // The port to keep open on node server mode / or port to contact in client mode
      #define MY_PORT 5003   
      
      // 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, 178, 254   
      
      // The MAC address can be anything you want but should be unique on your network.
      // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
      // Note that most of the Ardunio examples use  "DEAD BEEF FEED" for the MAC address.
      #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
      
      // Flash leds on rx/tx/err
      #define MY_LEDS_BLINKING_FEATURE
      // Set blinking period
      #define MY_DEFAULT_LED_BLINK_PERIOD 300
      
      // Enable inclusion mode
      #define MY_INCLUSION_MODE_FEATURE
      // Enable Inclusion mode button on gateway
      #define MY_INCLUSION_BUTTON_FEATURE
      // Set inclusion mode duration (in seconds)
      #define MY_INCLUSION_MODE_DURATION 60 
      // Digital pin used for inclusion mode button
      #define MY_INCLUSION_MODE_BUTTON_PIN  3 
      
      #define MY_DEFAULT_ERR_LED_PIN 7  // Error led pin
      #define MY_DEFAULT_RX_LED_PIN  8  // Receive led pin
      #define MY_DEFAULT_TX_LED_PIN  9  // the PCB, on board LED
      
      #include <SPI.h>
      #include <UIPEthernet.h>
      #include <MySensors.h>
      
      
      void setup()
      {
      }
      
      void loop() {
      }```
      posted in Announcements
      Reza
      Reza
    • RE: what is policy of mysensors?

      @mfalkvidd thank you my dear friend ❤

      posted in General Discussion
      Reza
      Reza
    • roller shutter

      hi
      this is a roller shutter sketch that i wrote 🙂 a simple sketch 🙂

      #define MY_DEBUG
      #define MY_RADIO_NRF24
      #define MY_RF24_CHANNEL 0
      #define MY_REPEATER_FEATURE
      #include MY_NODE_ID 20
      
      #include <SPI.h>
      #include <MySensors.h>
      
      #define RELAY_1  3
      #define RELAY_2  4
      
      
      
      void before() {
        int sensor = 1;
        pinMode(RELAY_1, OUTPUT);
        pinMode(RELAY_2, OUTPUT);
        digitalWrite(RELAY_1,HIGH);
        digitalWrite(RELAY_2,HIGH);
      
      }
      
      
      
      void setup() {
      }
      void presentation()
      {
        sendSketchInfo("Roller shutter", "1.0");
        int sensor = 1 ;
        present(sensor, S_COVER);
      }
      
      void loop() {
      }
      void receive(const MyMessage &message) {
        if (message.type == V_UP) {
          digitalWrite(RELAY_1, HIGH);
          delay(500);
          digitalWrite(RELAY_2, LOW);
        }
        if (message.type == V_STOP ) {
          digitalWrite(RELAY_1, HIGH);
          delay(500);
          digitalWrite(RELAY_2, HIGH);
        }
        if (message.type == V_DOWN) {
          digitalWrite(RELAY_2, HIGH);
          delay(500);
          digitalWrite(RELAY_1, LOW);
        }
      }
      
      posted in My Project
      Reza
      Reza
    • RE: some problem in sensor + repeater !

      @scalz
      so i test with wait 🙂 thank you my friend

      posted in Development
      Reza
      Reza
    • RE: Has anyone made a 2 or 4 channel relay , and is that worked correct ?

      @mfalkvidd
      thank you

      posted in Troubleshooting
      Reza
      Reza
    • RE: why mysensors is based on nrf24?

      @scalz
      thank you friend , this is good 🙏

      posted in General Discussion
      Reza
      Reza
    • RE: how add watchdog to my sensors?

      @Hermann-Kaiser
      hi thank you .
      for this sketch , where put your code?

      #define MY_DEBUG 
      #define MY_RADIO_NRF24
      #define MY_REPEATER_FEATURE
      
      #include <SPI.h>
      #include <MySensors.h>  
      
      #define CHILD_ID_LIGHT 0
      #define LIGHT_SENSOR_ANALOG_PIN 0
      
      unsigned long SLEEP_TIME = 30000; 
      MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
      int lastLightLevel;
      
      
      void presentation()  {
        sendSketchInfo("Light Sensor", "1.0");
        present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
      }
      
      void loop()      
      {     
        int lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; 
        Serial.println(lightLevel);
        if (lightLevel != lastLightLevel) {
            send(msg.set(lightLevel));
            lastLightLevel = lightLevel;
        }
        wait(SLEEP_TIME);
      }
      

      also this is for radio , but for arduino and sensor , how add watchdog ?

      posted in Development
      Reza
      Reza
    • RE: What is the difference between arduino nano (FT232 chip) and arduino nano CH340 chip ?

      thank you, I have a vera edge controller .

      posted in Troubleshooting
      Reza
      Reza
    • have not mysensors team any plans for add esp8266 ?

      hi friends
      thank you my sensors team.
      esp8266 is very good in connection. i test it with espeasy. i have very error in connection with nrf and have not rfm69. now i test espeasy with nodemcu and this is very good in connection, have not mysensors team any plans for add esp8266 similar to nrf and rfm ? i think this is very better for devices that dont use battery...

      posted in General Discussion
      Reza
      Reza

    Latest posts made by Reza

    • RE: problem in compile gateway for raspberry

      sorry i found . spi was disable in now raspbian.
      but now i have problem in domoticz:
      0_1505122164459_Untitled.jpg

      posted in Troubleshooting
      Reza
      Reza
    • RE: problem in compile gateway for raspberry

      before there was a setting for SPIDEV but now this is not ! how setting spidev

      posted in Troubleshooting
      Reza
      Reza
    • problem in compile gateway for raspberry

      hi friend
      i want use lastest version mysensors gateway . but i have problem.
      i setup this :

      git clone https://github.com/mysensors/MySensors.git --branch development
      cd MySensors
      ./configure --my-transport=nrf24 --my-rf24-channel=0 --my-rf24-pa-level=RF24_PA_MAX --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020
      make
      

      but this is result:

      gcc -MT build/drivers/Linux/log.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/log.c -o build/drivers/Linux/log.o
      g++ -MT build/drivers/Linux/IPAddress.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/IPAddress.cpp -o build/drivers/Linux/IPAddress.o
      g++ -MT build/drivers/Linux/noniso.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
      g++ -MT build/drivers/Linux/GPIO.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/GPIO.cpp -o build/drivers/Linux/GPIO.o
      g++ -MT build/drivers/Linux/Print.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
      g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
      g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
      g++ -MT build/drivers/Linux/Stream.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
      g++ -MT build/drivers/Linux/compatibility.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/compatibility.cpp -o build/drivers/Linux/compatibility.o
      g++ -MT build/drivers/Linux/interrupt.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/interrupt.cpp -o build/drivers/Linux/interrupt.o
      g++ -MT build/drivers/Linux/SerialSimulator.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/SerialSimulator.cpp -o build/drivers/Linux/SerialSimulator.o
      g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/SoftEeprom.cpp -o build/drivers/Linux/SoftEeprom.o
      g++ -MT build/drivers/Linux/EthernetServer.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c drivers/Linux/EthernetServer.cpp -o build/drivers/Linux/EthernetServer.o
      g++ -MT build/examples_linux/mysgw.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DMY_LINUX_SERIAL_PTY=\"/dev/ttyUSB020\" -DMY_LINUX_IS_SERIAL_PTY -DMY_RF24_PA_LEVEL=RF24_PA_MAX -DMY_RF24_CHANNEL=0  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
      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
      
      
      posted in Troubleshooting
      Reza
      Reza
    • RE: I have great problem with raspberry and domoticz and mysensors gateway !

      ok thank you. but i have a new problem...
      i think just move domoticz.log to ram driver. but report of sensors in mysensors... where these is save?:/
      i think report of mysensors can not write... now in domoticz log i can not see report.. also i chack var/log memory after 1 day.when i send command for turn on light (alot command) memory of var/log increase.but 1 day i dont send any command and i wait for increase memory with report sensors but dont increase.what is problem? when i change your setting to defult work and i see report of sensors.
      0_1505027201982_lklklklk.jpg
      and this is memory of log after one day. sensors was sending report to controller for 1 deys but before memory was 1304 and now is 1304...
      0_1505027249721_jkjkj.jpg

      posted in Troubleshooting
      Reza
      Reza
    • RE: I have great problem with raspberry and domoticz and mysensors gateway !

      @tbowmo i found this script.but becuase i am beginner in script i can not know this.
      can we use this for clean tmpfs after 2day each week ? can you edit this for our use exactly ? i build a tmpfs in /var/log . and i move domoticz.log to this folder... now what change i need in this script for clean /var/log every 2 days and how to use this automatic for always when power off/on , reboot and...
      thank you for help

      #!/bin/bash
      # Diskclean-Linux.sh - Remove unused files from /tmp directories
      # @author: Crunchify.com
       
      # ------------- Here are Default Configuration --------------------
      # CRUNCHIFY_TMP_DIRS - List of directories to search
      # DEFAULT_FILE_AGE - # days ago (rounded up) that file was last accessed
      # DEFAULT_LINK_AGE - # days ago (rounded up) that symlink was last accessed
      # DEFAULT_SOCK_AGE - # days ago (rounded up) that socket was last accessed
       
      CRUNCHIFY_TMP_DIRS="/tmp /var/tmp /usr/src/tmp /mnt/tmp"
      DEFAULT_FILE_AGE=+2
      DEFAULT_LINK_AGE=+2
      DEFAULT_SOCK_AGE=+2
       
      # Make EMPTYFILES true to delete zero-length files
      EMPTYFILES=false
      #EMPTYFILES=true
       
      cd
      /tmp/log "cleantmp.sh[$$] - Begin cleaning tmp directories"
       
      echo ""
      echo "delete any tmp files that are more than 2 days old"
      /usr/bin/find $CRUNCHIFY_TMP_DIRS                               \
           -depth                                                     \
           -type f -a -ctime $DEFAULT_FILE_AGE                        \
           -print -delete
      echo ""
       
      echo "delete any old tmp symlinks"
      /usr/bin/find $CRUNCHIFY_TMP_DIRS                               \
           -depth                                                     \
           -type l -a -ctime $DEFAULT_LINK_AGE                        \
           -print -delete
      echo ""
       
      if /usr/bin/$EMPTYFILES ;
      then
      echo "delete any empty files"
      /usr/bin/find $CRUNCHIFY_TMP_DIRS                               \
           -depth                                                     \
           -type f -a -empty                                          \
           -print -delete
      fi
       
      echo "Delete any old Unix sockets"
      /usr/bin/find $CRUNCHIFY_TMP_DIRS                               \
           -depth                                                     \
           -type s -a -ctime $DEFAULT_SOCK_AGE -a -size 0             \
           -print -delete
      echo""
       
      echo "delete any empty directories (other than lost+found)"
      /usr/bin/find $CRUNCHIFY_TMP_DIRS                               \
           -depth -mindepth 1                                         \
           -type d -a -empty -a ! -name 'lost+found'                  \
           -print -delete
      echo ""
       
      /usr/bin/logger "cleantmp.sh[$$] - Done cleaning tmp directories"
       
      # send out an email about diskcleanup action
      mail -s "Disk cleanup has been performed successfully." you@email.com
       
      echo ""
      echo "Diskcleanup Script Successfully Executed"
      exit 0
      
      posted in Troubleshooting
      Reza
      Reza
    • RE: I have great problem with raspberry and domoticz and mysensors gateway !

      @tbowmo
      every night !! 😮 you do with hand or auto with a program? if you have a program for this can you share this ?
      i test with 1mb memory, i see after full , domoticz dont work and have some problem. so we must clear ...
      can you help me for build a program for this ? for example when this is 90% memory (tmpfs) so clear this...

      posted in Troubleshooting
      Reza
      Reza
    • RE: I have great problem with raspberry and domoticz and mysensors gateway !

      @tbowmo thanks for all guide. i could do it. thank you
      My friend just one question . i want know if i choose for example 20mb for ram driver (tmpfs). after full this memory (if i dont clear this), so what happen ? raspberry will be crash ? or not happen and I dont have any new log and report ? or again write on ago log ? thank you for all help

      posted in Troubleshooting
      Reza
      Reza
    • RE: I have great problem with raspberry and domoticz and mysensors gateway !

      @tbowmo thank you . i will search about this issue

      posted in Troubleshooting
      Reza
      Reza
    • RE: I have great problem with raspberry and domoticz and mysensors gateway !

      @gohan because i wanted change some things. for example font , theme , icons and etc...

      posted in Troubleshooting
      Reza
      Reza
    • RE: I have great problem with raspberry and domoticz and mysensors gateway !

      @sundberg84
      thank you friend. domoticz now is working for me.but when run ps i dont see domoticz:

      
      pi@raspberrypi:~ $ ps
        PID TTY          TIME CMD
       1000 pts/0    00:00:00 bash
       1026 pts/0    00:00:00 Xtightvnc
       1031 pts/0    00:00:00 xstartup
       1034 pts/0    00:00:00 lxsession
       1066 pts/0    00:00:00 dbus-launch
       1084 pts/0    00:00:00 openbox
       1086 pts/0    00:00:00 lxpolkit
       1088 pts/0    00:00:00 lxpanel
       1090 pts/0    00:00:01 pcmanfm
       1134 pts/0    00:00:00 start-pulseaudi
       1135 pts/0    00:00:00 xprop
       1585 pts/0    00:00:01 Xtightvnc
       1589 pts/0    00:00:00 xstartup
       1592 pts/0    00:00:00 lxsession
       1624 pts/0    00:00:00 dbus-launch
       1643 pts/0    00:00:00 openbox
       1645 pts/0    00:00:00 lxpolkit
       1647 pts/0    00:00:00 lxpanel
       1649 pts/0    00:00:02 pcmanfm
       1693 pts/0    00:00:00 start-pulseaudi
       1694 pts/0    00:00:00 xprop
       2546 pts/0    00:00:00 ps
      

      this is files after compile . and i put "/home/pi/rayan/domoticz" to "rc.local" for up after startup.
      0_1504776551528_0000000.jpg

      posted in Troubleshooting
      Reza
      Reza