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 $
-
@mimaret said in Gateway on Raspberry pi 1:
stropts.h
stropts.h is part of the Posix STREAMS extension, which Linux never supported. (Since 2008, it has also been marked as obsolescent by Posix, so it may be removed in some future standard revision.) In Debian, it was removed in the bullseye release.
Get the development branch of MySensors, there it's not used anymore.HTH, Edi
-
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.
-
@mimaret said in Gateway on Raspberry pi 1:
I thought about MQTT, but in the options I don't see User and Password for MQTT.
It's
MY_MQTT_USER
andMY_MQTT_PASSWORD
, check out here.EDIT: sorry, for the raspberry configure script, this is relevant:
--my-mqtt-client-id=<ID> MQTT client id. --my-mqtt-user=<UID> MQTT user id. --my-mqtt-password=<PASS> MQTT password.
-
@mimaret Here are my options for an MQTT gateway:
./configure --spi-driver=SPIDEV --my-gateway=mqtt --my-controller-ip-address=192.168.sss.sss --my-port=1883 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-transport=rf24 --my-rf24-channel=ccc --my-rf24-pa-level=RF24_PA_MAX
I see that you don't have the SPI driver nor the pubilsh and subscribe topics. Check to see to what they default. I do not use the default channel for my production system (the one that actually runs the house). I don't use the IRQ and have seen no problems not having it.
You have a lot of warnings. I'd ignore those for now. The issue appears to b the library stropts.h
Try this: In the file
~/MySensors/hal/architecture/Linux/drivers/core/interrupt.cpp
comment out the line#include stropts.h
I think that's what I had to do.
Let susknow if that works.
OSD
-
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
-
@mimaret said in Gateway on Raspberry pi 1:
I still have a little problem with the relays that I don't see in HA.
That's might be the problem I also had when I started with HA: In the first run of the loop, you have to send the state of every sensor you got. Else, HA will not see the sensor which did not send their state. It's not very obvious in the documentation, check 2. in this link.
Post your sketch if you need help.
-
@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.
-
@mimaret It was a pleasure. Thank you for your feedback!
Suggested Topics
-
Update RF24 library to latest version
Bug Reports • 23 Mar 2014, 23:37 • andriej 24 Mar 2014, 22:52 -
Running out of nodeId's
General Discussion • 3 Sept 2024, 07:33 • NielBierman 12 Oct 2024, 19:11 -
single-click, double-click, long-press button possible with MySensors?
General Discussion • 4 Feb 2024, 08:28 • dirkc 4 Feb 2024, 11:18 -
GatawayESP8266 - Compile error
General Discussion • 18 May 2021, 11:50 • skom 5 Jun 2024, 15:55 -
Old hardware migration
General Discussion • 29 Feb 2024, 03:43 • dbemowsk 1 Mar 2024, 23:03 -
Anybody got one / a few spare minimalist rfm69hw shields for wemos d1 mini?
General Discussion • 20 Sept 2024, 08:45 • kiesel 11 Oct 2024, 15:32