Navigation

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

    mimaret

    @mimaret

    2
    Reputation
    17
    Posts
    477
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    mimaret Follow

    Best posts made by mimaret

    • RE: Repeater node crashes

      A big thank you for your contribution. I modified the program according to your proposals. Everything is working. I am attaching you the pieces of code relating to the door contact.
      My problem is solved.

      .
      .
      .
        attachInterrupt(digitalPinToInterrupt(DOOR_PIN), DoorMoving, CHANGE);
        DoorChange = 1;
        LastDoor = 0;
      }
      void DoorMoving() {
          DoorChange = 1;
      }
      
      void readDoor() {
        if (DoorChange) {
          boolean Door = (digitalRead(DOOR_PIN));
          if (Door != LastDoor) {
            send(msgDoor.set((Door) == HIGH ? 1 : 0));
            LastDoor = Door;
            DoorChange = 0;
          }
        }
      }
      .
      .
      .
      void loop() {
        unsigned long currentMillis = millis();
        readDoor();
        if (currentMillis - previousMillis >= UPDATE_INTERVAL) {
          previousMillis = currentMillis;
          readDHT();
          read1Wire();
        }
      }
      posted in Troubleshooting
      mimaret
      mimaret
    • RE: Gateway on Raspberry pi 1

      @eiten
      This is actually what I read while searching the docs. I will modify the sketches. In fact I have to modify 2 modules with DHT22 + 3 1-wire probes + 2 relays + 2 door contacts + pusher on an arduino nano RF. No problem and thanks again for your help.

      posted in General Discussion
      mimaret
      mimaret

    Latest posts made by mimaret

    • gateway MQTT

      Hello,
      I'm trying to rebuild my Mysensors MQTT Gateway on an RPI and I'm getting compilation errors. I've searched the forums and found nothing. I've tried --branch master and --branch development without success. I don't know how to resolve this. Thanks.

      mm@gatewayx:~/MySensors $ sudo ./configure --my-controller-ip-address=192.168.0.30 --my-transport=rf24 --my-rf24-irq-pin=15 --my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=gwmysensors --my-mqtt-user=mqtt --my-mqtt-password=x
      [SECTION] Detecting target machine.
        [OK] machine detected: SoC=BCM2835, Type=rpi1, CPU=armv6l.
      [SECTION] Detecting SPI driver.
        [OK] SPI driver detected:BCM.
      [SECTION] Gateway configuration.
        [OK] Type: mqtt.
        [OK] Transport: rf24.
        [OK] Signing: Disabled.
        [OK] Encryption: Disabled.
        [OK] CPPFLAGS: -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_MQTT_PASSWORD="x" -DMY_MQTT_USER="mqtt" -DMY_MQTT_CLIENT_ID="gwmysensors" -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX="mysensors-in" -DMY_MQTT_PUBLISH_TOPIC_PREFIX="mysensors-out" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_CONTROLLER_IP_ADDRESS=192,168,0,30
        [OK] CXXFLAGS:  -std=c++11
      [SECTION] Detecting init system.
        [OK] Init system detected: systemd.
      [SECTION] Saving configuration.
        [OK] Saved.
      [SECTION] Cleaning previous builds.
        [OK] Finished.
      mm@gatewayx:~/MySensors $ make
      gcc -MT build/hal/architecture/Linux/drivers/core/config.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_MQTT_PASSWORD=\"x\" -DMY_MQTT_USER=\"mqtt\" -DMY_MQTT_CLIENT_ID=\"gwmysensors\" -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mysensors-in\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mysensors-out\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_CONTROLLER_IP_ADDRESS=192,168,0,30  -Ofast -g -Wall -Wextra  -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/config.c -o build/hal/architecture/Linux/drivers/core/config.o
      gcc: internal compiler error: Illegal instruction signal terminated program cc1
      Please submit a full bug report,
      with preprocessed source if appropriate.
      See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
      make: *** [Makefile:103: build/hal/architecture/Linux/drivers/core/config.o] Error 4
      mm@gatewayx:~/MySensors $ uname -a
      Linux gatewayx 6.1.21+ #1642 Mon Apr  3 17:19:14 BST 2023 armv6l GNU/Linux
      mm@gatewayx:~/MySensors $ uname -r
      6.1.21+
      mm@gatewayx:~/MySensors $ lsb_release -a
      No LSB modules are available.
      Distributor ID: Raspbian
      Description:    Raspbian GNU/Linux 11 (bullseye)
      Release:        11
      Codename:       bullseye
      
      posted in General Discussion
      mimaret
      mimaret
    • RE: Gateway on Raspberry pi 1

      @eiten
      This is actually what I read while searching the docs. I will modify the sketches. In fact I have to modify 2 modules with DHT22 + 3 1-wire probes + 2 relays + 2 door contacts + pusher on an arduino nano RF. No problem and thanks again for your help.

      posted in General Discussion
      mimaret
      mimaret
    • RE: Gateway on Raspberry pi 1

      Good morning,

      @eiten Thanks for your help .
      The Mysensors MQTT gateway works well with Home Assistant. I still have a little problem with the relays that I don't see in HA.
      I'll dig some more and I'll find it.
      Thank you again and see you soon.

      @OldSurferDude Thank you for your information.
      I just had a problem with the user-password

      posted in General Discussion
      mimaret
      mimaret
    • RE: Gateway on Raspberry pi 1

      Good morning,

      I'm back. Thank you for your reply.
      I recompiled with branch development. I have warnings and when launching I have connection refused errors. I use home Assistant which cannot connect (port 5003 not open). I think the gateway cannot connect to HA (port 8123).
      What solution do you see to resolve this problem. I thought about MQTT, but in the options I don't see User and Password for MQTT.

      Thank you in advance and see you soon.

      posted in General Discussion
      mimaret
      mimaret
    • Gateway on Raspberry pi 1

      Good morning,

      I have a Raspberry 1 on which Domoticz and the Gayteway MySensors have been running for 4 years.
      I installed a new version of Linux (Raspberry Pi OS (Legacy) Lite Debian version: 11 (bullseye) and I redo a gateway config without Domoticz (I change controller). I find myself with a lot of errors when make. I tested both versions (--branch master and development)
      Do you think the Rpi is too old?

      Thank you for your answers

      mm@gateway:~/MySensors $ sudo ./configure --my-controller-ip-address=192.168.1.99 --my-transport=rf24 --my-rf24-irq-pin=15
      [SECTION] Detecting target machine.
        [OK] machine detected: SoC=BCM2835, Type=rpi1, CPU=armv6l.
      [SECTION] Detecting SPI driver.
        [OK] SPI driver detected:BCM.
      [SECTION] Gateway configuration.
        [OK] Type: ethernet.
        [OK] Transport: rf24.
        [OK] Signing: Disabled.
        [OK] Encryption: Disabled.
        [OK] CPPFLAGS: -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_CONTROLLER_IP_ADDRESS=192,168,1,99
        [OK] CXXFLAGS:  -std=c++11
      [SECTION] Detecting init system.
        [OK] Init system detected: systemd.
      [SECTION] Saving configuration.
        [OK] Saved.
      [SECTION] Cleaning previous builds.
        [OK] Finished.
      mm@gateway:~/MySensors $ make
      gcc -MT build/hal/architecture/Linux/drivers/core/config.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_CONTROLLER_IP_ADDRESS=192,168,1,99  -Ofast -g -Wall -Wextra  -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/config.c -o build/hal/architecture/Linux/drivers/core/config.o
      gcc -MT build/hal/architecture/Linux/drivers/core/log.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_CONTROLLER_IP_ADDRESS=192,168,1,99  -Ofast -g -Wall -Wextra  -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/log.c -o build/hal/architecture/Linux/drivers/core/log.o
      g++ -MT build/hal/architecture/Linux/drivers/core/compatibility.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_CONTROLLER_IP_ADDRESS=192,168,1,99  -Ofast -g -Wall -Wextra -std=c++11 -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/compatibility.cpp -o build/hal/architecture/Linux/drivers/core/compatibility.o
      g++ -MT build/hal/architecture/Linux/drivers/core/EthernetClient.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_CONTROLLER_IP_ADDRESS=192,168,1,99  -Ofast -g -Wall -Wextra -std=c++11 -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/EthernetClient.cpp -o build/hal/architecture/Linux/drivers/core/EthernetClient.o
      g++ -MT build/hal/architecture/Linux/drivers/core/EthernetServer.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_CONTROLLER_IP_ADDRESS=192,168,1,99  -Ofast -g -Wall -Wextra -std=c++11 -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/EthernetServer.cpp -o build/hal/architecture/Linux/drivers/core/EthernetServer.o
      g++ -MT build/hal/architecture/Linux/drivers/core/GPIO.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_CONTROLLER_IP_ADDRESS=192,168,1,99  -Ofast -g -Wall -Wextra -std=c++11 -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/GPIO.cpp -o build/hal/architecture/Linux/drivers/core/GPIO.o
      hal/architecture/Linux/drivers/core/GPIO.cpp: In constructor ‘GPIOClass::GPIOClass()’:
      hal/architecture/Linux/drivers/core/GPIO.cpp:53:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 48 [-Wformat-truncation=]
         53 |    snprintf(file, sizeof(file), "/sys/class/gpio/%s/base", de->d_name);
            |                                                  ^~
      hal/architecture/Linux/drivers/core/GPIO.cpp:53:12: note: ‘snprintf’ output between 22 and 277 bytes into a destination of size 64
         53 |    snprintf(file, sizeof(file), "/sys/class/gpio/%s/base", de->d_name);
            |    ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      hal/architecture/Linux/drivers/core/GPIO.cpp:62:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 48 [-Wformat-truncation=]
         62 |    snprintf(file, sizeof(file), "/sys/class/gpio/%s/ngpio", de->d_name);
            |                                                  ^~
      hal/architecture/Linux/drivers/core/GPIO.cpp:62:12: note: ‘snprintf’ output between 23 and 278 bytes into a destination of size 64
         62 |    snprintf(file, sizeof(file), "/sys/class/gpio/%s/ngpio", de->d_name);
            |    ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      g++ -MT build/hal/architecture/Linux/drivers/core/interrupt.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_CONTROLLER_IP_ADDRESS=192,168,1,99  -Ofast -g -Wall -Wextra -std=c++11 -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/interrupt.cpp -o build/hal/architecture/Linux/drivers/core/interrupt.o
      hal/architecture/Linux/drivers/core/interrupt.cpp:33:10: fatal error: stropts.h: No such file or directory
         33 | #include <stropts.h>
            |          ^~~~~~~~~~~
      compilation terminated.
      make: *** [Makefile:99: build/hal/architecture/Linux/drivers/core/interrupt.o] Error 1
      mm@gateway:~/MySensors $
      
      
      posted in General Discussion
      mimaret
      mimaret
    • RE: Repeater node crashes

      A big thank you for your contribution. I modified the program according to your proposals. Everything is working. I am attaching you the pieces of code relating to the door contact.
      My problem is solved.

      .
      .
      .
        attachInterrupt(digitalPinToInterrupt(DOOR_PIN), DoorMoving, CHANGE);
        DoorChange = 1;
        LastDoor = 0;
      }
      void DoorMoving() {
          DoorChange = 1;
      }
      
      void readDoor() {
        if (DoorChange) {
          boolean Door = (digitalRead(DOOR_PIN));
          if (Door != LastDoor) {
            send(msgDoor.set((Door) == HIGH ? 1 : 0));
            LastDoor = Door;
            DoorChange = 0;
          }
        }
      }
      .
      .
      .
      void loop() {
        unsigned long currentMillis = millis();
        readDoor();
        if (currentMillis - previousMillis >= UPDATE_INTERVAL) {
          previousMillis = currentMillis;
          readDHT();
          read1Wire();
        }
      }
      posted in Troubleshooting
      mimaret
      mimaret
    • RE: Repeater node crashes

      There is no restart. Only the interrupt executes when I open the door contact. The Loop () does not continue. I did not cut anything, I just added the crash line as soon as the program stopped.

      posted in Troubleshooting
      mimaret
      mimaret
    • RE: Repeater node crashes

      In fact, the node no longer executes the program and the only solution is to restart it with a reset or switch off the power supply.

      posted in Troubleshooting
      mimaret
      mimaret
    • RE: Repeater node crashes

      OOPS :

      19820560 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
      ------> Door
      19820560 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
      ------> Door
      19825700 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1
      ------> Door
      19826745 !TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=NACK:0
      ------> Door
      19826745 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=1,st=OK:0
      19826747 TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0
      19826755 !TSF:MSG:LEN,7!=32
      ------> readDHT
      20105310 TSF:MSG:SEND,111-111-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:42.4
      H: 42.40
      ------> read1Wire
      20105426
      ------> readDHT
      20405309 TSF:MSG:SEND,111-111-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:21.8
      T: 21.80
      20405323 TSF:MSG:SEND,111-111-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:42.1
      H: 42.10
      ------> read1Wire
      20405440
      20700045 TSF:SAN:OK
      ------> readDHT
      20705310 TSF:MSG:SEND,111-111-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:41.9
      H: 41.90
      ------> read1Wire
      20705427
      ------> Door
      20707352 !TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=NACK:1
      ------> Door
      20707352 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=1,st=OK:0
      ------> Door
      20723965 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1
      ------> Door
      20725862 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
      ------> Door
      20725862 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
      <------------------------------------CRASH-----------------
      ------> Door
      20729143 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1
      ------> Door
      20730232 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
      ------> Door
      20730232 TSF:MSG:SEND,111-111-0-0,s=2,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
      
      posted in Troubleshooting
      mimaret
      mimaret
    • RE: Repeater node crashes

      @mfalkvidd Thank you for your reply.
      I do not think about power problem. The power supply can deliver 1A and I mounted a capacitor of 470 uF on the 3.3v and a 47 uF close to the radio module. I had doubts about hardware and I set up a second repeater.
      On the first repeater, radio module nrf24L01 + PA + LNA. On the second repeater, radio module nrf24L01 +. Same problem.
      When the repeater crashes, the interrupt is executed again. The led pin 13 that I do not manage is ON during normal operation and goes OFF when the repeater crashes.
      I noticed that by disabling the interrupt (// attachInterrupt (....), the repeater does not crash.
      I will look how to check the state of memory, stack, etc.
      I also include the debug output and I do not see anything particular.

      posted in Troubleshooting
      mimaret
      mimaret