@alowhum V_ARMED indicates whether the alarm system is on or off.
V_TRIPPED indicates whether the alarm has been tripped (an intruder has been detected)
Usage: when you are home the security system is not ARMED so if you receive a TRIPPED message from, say, a movement sensor you would not sound the alarm.
Posts made by mljbr4
-
RE: A few random questions (V_tripped vs V_armed)
-
RE: Best practice for sending data from sensors.....?
@mfalkvidd I would think ‘best practice’ for a temperature (and humidity) sensor is to “send only if changed”.
I have many Dallas 1-wire temperature sensors on one Arduino and I have an array to store last value sent
I also sleep for a second after a polling loop. And every minute I send the temperatures regardless of whether they have changed or not.
I have not done this but for truly best practice I would add ‘anti-flapping’ logic to prevent constant updates when a thermometer is reading ‘between’ two values. -
RE: How can I have a test environment separate from production
I have in mind to use a DIP switch on my sensors to switch between production and test. If the DIP switch is set to TEST I want to transmit on the Test Channel.
Is it possible to set the MY_RF24_CHANNEL at run time, rather than at compile time?
-
RE: Can't get past first base (Arduino Serial Gateway)
@mljbr4 well I don't know if this is the right solution or not but to solve the PRIu64 issue I added the following lines to the top of drivers/BCM/bcm2835.c and I managed to get a clean compile and now mysgw on my RaspberrryPi is working:
#define __STDC_FORMAT_MACROS #include <inttypes.h>
-
RE: Can't get past first base (Arduino Serial Gateway)
@mfalkvidd Unfortunately I can't get a clean compile of the development branch at the moment. I did the following:
rm -R ~/MySensors git clone https://github.com/mysensors/MySensors.git --branch development cd MySensors ./configure --my-transport=nrf24 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=home-network --my-mqtt-subscribe-topic-prefix=home-network-in --my-mqtt-client-id=home-network --my-rf24-channel=76 --DMY_RF24_DATARATE=RF24_250KBPS --my-debug=enable make
and I got the following result:
gcc -MT build/drivers/BCM/bcm2835.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_CHANNEL=76 -DMY_MQTT_CLIENT_ID=\"home-network\" -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"home-network-in\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"home-network\" -DMY_CONTROLLER_IP_ADDRESS=127,0,0,1 -DMY_RF24_CS_PIN=24 -DMY_RF24_CE_PIN=22 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/BCM/bcm2835.c -o build/drivers/BCM/bcm2835.o drivers/BCM/bcm2835.c: In function ‘bcm2835_delayMicroseconds’: drivers/BCM/bcm2835.c:441:40: error: expected ‘)’ before ‘PRIu64’ printf("bcm2835_delayMicroseconds %" PRIu64 "\n", micros); ^ drivers/BCM/bcm2835.c:441:40: warning: spurious trailing ‘%’ in format [-Wformat=] Makefile:102: recipe for target 'build/drivers/BCM/bcm2835.o' failed make: *** [build/drivers/BCM/bcm2835.o] Error 1
I might try fixing the code myself and see what happens but I'd be interested to know if this is a common problem.
-
RE: Can't get past first base (Arduino Serial Gateway)
@mfalkvidd said in Can't get past first base (Arduino Serial Gateway):
It's a miracle. Works perfectly now! I knew it had to be something obvious but I had tried so many things I lost track. Turns out it was a simple CE / CSN Pin issue. You are right, the NRF24 library defaults to Pins 7 and 8, but MySensors defaults to 9 and 10. Thanks for your help. Hopefully now I can march on with my real solution which is a RaspberryPi Gateway and MQTT running on one RPi, and OpenHAB running on another.
-
RE: Can't get past first base (Arduino Serial Gateway)
@dbemowsk No controller - I was using a RPi and MQTT but because I could not get that to work I have stripped everything back to the simplest solution I could think of. So now I just have two Arduinos, one running the Arduino Serial Gateway. I assume it just writes to the Serial port which I can monitor via the Serial Monitor?
-
Can't get past first base (Arduino Serial Gateway)
Hello. I cannot get even the simplest MySensors example working. I am sure I must be missing something simple but I have run out of ideas.
THIS WORKS:
I have two Arduino Uno, each with an NRF24L01 connected, and each Arduino is connected to (and powered by) a laptop computer via USB and running Arduino 1.8.6 software so I can use the Serial Monitor.Via the Sketch>>Include Library>>Manage Libraries I have added RF24 by TMRh20 version 1.3.0, and I have added MySensors by The MySensors Team version 2.1.1.
If I use the RF24 Example Sketch “pingpair_ack” the only change I have to make is to add “#define MY_BAUD_RATE 9600”. Apart from that I can upload the sketch to each Arduino and monitor them via Serial Monitor and they work perfectly.
I can even swap the two Arduino’s between the two laptops and they still both work.
So I have proven that fundamentally I have two working RF / Arduino devices powered via laptop USB connections.
THIS DOES NOT WORK:
Same setup as above, but using MySensors Examples does not work. For example Sketch “GatewaySerial” gives me the following:0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSF:WUR:MS=0 0;255;3;0;9;!TSM:INIT:TSP FAIL 0;255;3;0;9;TSM:FAIL:CNT=1 0;255;3;0;9;TSM:FAIL:PDT 0;255;3;0;9;TSM:FAIL:RE-INIT 0;255;3;0;9;TSM:INIT 0;255;3;0;9;!TSM:INIT:TSP FAIL 0;255;3;0;9;TSM:FAIL:CNT=2```