actually it was longer than that
Posts made by keithJ
-
RE: MY_GATEWAY_MQTT_CLIENT
OMG!!! i feel such a fool!
Spent a good hour searching - and immediately after posting the above - realised the ethernet cable was unplugged!!!!
facepalm!
-
MY_GATEWAY_MQTT_CLIENT
Hi,
I am trying to setup a MQTT (client) ethernet gateway using an UNO R3, W5100 ethernet shield, and Adafruit RFM69HCW.
The nodes are communicating well with gateway using #define MY_GATEWAY_W5100; but I am having no luck when i change it to #define MY_GATEWAY_MQTT_CLIENT, and am getting the following error :
34779 GWT:TPC:IP=192.168.1.177 35781 GWT:RMQ:CONNECTING... 37785 !GWT:RMQ:FAIL
// Enable gateway ethernet module type //#define MY_GATEWAY_W5100 #define MY_GATEWAY_MQTT_CLIENT // Set this node's subscribe and publish topic prefix #define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out" #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in" // Set MQTT client id #define MY_MQTT_CLIENT_ID "mysensors-1" #define SD_SS_PIN (4) // chip-select for SD card (normally unused, pull high!, see code!) // Enable these if your MQTT broker requires username/password //#define MY_MQTT_USER "username" //#define MY_MQTT_PASSWORD "password" // Enable MY_IP_ADDRESS here if you want a static p address (no DHCP) #define MY_IP_ADDRESS 192,168,1,177 // If this is disabled, DHCP is used to retrieve address #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED // If using static ip you can define Gateway and Subnet address as well #define MY_IP_GATEWAY_ADDRESS 192,168,1,1 //#define MY_IP_SUBNET_ADDRESS 255,255,255,0 // MQTT broker ip address or url. Define one or the other. //#define MY_CONTROLLER_URL_ADDRESS "m20.cloudmqtt.com" #define MY_CONTROLLER_IP_ADDRESS 192, 168, 1, 225 // The MQTT broker port to to open //#define MY_PORT 1883
I can connect to the MQTT broker (which is my openhab instance on 192.168.1.225)
without username and password)I have read lots but become even more confused
In addition to #define MY_GATEWAY_MQTT_CLIENT, what else should be set? How can i see if there is even an attempt to contact the broker?
many thanks
-
RE: Adafruit RFM69HCW and Arduino Nano
@scalz said in Adafruit RFM69HCW and Arduino Nano:
MY_RFM69_IRQ_PIN
I changed the IRQ define and its now working!
i really appreciate the help, thank you.
-
RE: Adafruit RFM69HCW and Arduino Nano
Yes, its good to see TSP OK
I've separated them to around 4m and unfortunately its made no difference, and they work fine using the RadioHead example when they are only 100mm apart.
One thing... if i connect the rst pin of the radio to pin2 of the arduino - and set #MY_RFM69_RST_PIN 2 - the RSSI values are 0.
If i change the rst pin to another pin, for example pin 5 on the arduino and set #MY_RFM69_RST_PIN 5 - the RSSI values are -32.
The RSSI value on the gateway is in the -90's.
Im struggling to understand why they communicate immediately, reliably, and within close proximity when i use the RH code, but fail when i include mysensors?
-
RE: Adafruit RFM69HCW and Arduino Nano
I cant recall why i had the manual reset now, but know it was from a post with related issues with the RFM69.
I have removed it and also tried moving it to before() but no luck.My current GW Code is :
#define MY_DEBUG #define MY_RADIO_RFM69 #define MY_IS_RFM69HW #define MY_RFM69_NEW_DRIVER #define MY_RFM69_FREQUENCY RFM69_433MHZ #define RFM69_INT 3 #define MY_RFM69_CS_PIN 4 #define MY_RFM69_RST_PIN 2 #define LED 13 #define MY_GATEWAY_SERIAL #include <MySensors.h> void setup() { } void loop() { }
And the repeater node is:
// Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_RFM69 #define MY_IS_RFM69HW #define MY_RFM69_NEW_DRIVER #define MY_RFM69_FREQUENCY RFM69_433MHZ #define RFM69_INT 3 #define MY_RFM69_CS_PIN 4 #define MY_RFM69_RST_PIN 2 #define LED 13 // Enabled repeater feature for this node #define MY_REPEATER_FEATURE #include <MySensors.h> void setup() { } void loop() { }
The result is that the GW outputs the following (and then does nothing else) :
10:50:48.729 -> 0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RPNGA---,FQ=16,REL=255,VER=2.3.2 10:50:48.729 -> 0;255;3;0;9;5 MCO:BGN:BFR 10:50:48.729 -> 0;255;3;0;9;27 TSM:INIT 10:50:48.729 -> 0;255;3;0;9;29 TSF:WUR:MS=0 10:50:48.763 -> 0;255;3;0;9;38 TSM:INIT:TSP OK 10:50:48.763 -> 0;255;3;0;9;40 TSM:INIT:GW MODE 10:50:48.763 -> 0;255;3;0;9;44 TSM:READY:ID=0,PAR=0,DIS=0 10:50:48.763 -> 0;255;3;0;9;48 MCO:REG:NOT NEEDED 10:50:48.763 -> 0;255;3;0;14;Gateway startup complete. 10:50:48.763 -> 0;255;0;0;18;2.3.2 10:50:48.763 -> 0;255;3;0;9;52 MCO:BGN:STP 10:50:48.763 -> 0;255;3;0;9;58 MCO:BGN:INIT OK,TSP=0 10:50:48.763 -> 0;255;3;0;9;62 TSM:READY:NWD REQ 10:50:51.288 -> 0;255;3;0;9;2565 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
and the repeater node gives:
10:51:36.661 -> 10:51:36.661 -> __ __ ____ 10:51:36.661 -> | \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___ 10:51:36.661 -> | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __| 10:51:36.661 -> | | | | |_| |___| | __/ | | \__ \ _ | | \__ \ 10:51:36.696 -> |_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/ 10:51:36.696 -> |___/ 2.3.2 10:51:36.696 -> 10:51:36.696 -> 16 MCO:BGN:INIT REPEATER,CP=RPNRA---,FQ=16,REL=255,VER=2.3.2 10:51:36.696 -> 27 MCO:BGN:BFR 10:51:36.731 -> 49 TSM:INIT 10:51:36.731 -> 50 TSF:WUR:MS=0 10:51:36.731 -> 57 TSM:INIT:TSP OK 10:51:36.731 -> 59 TSM:FPAR 10:51:37.239 -> 561 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 10:51:39.230 -> 2568 !TSM:FPAR:NO REPLY 10:51:39.230 -> 2570 TSM:FPAR 10:51:41.764 -> 5072 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 10:51:43.783 -> 7080 !TSM:FPAR:NO REPLY 10:51:43.783 -> 7083 TSM:FPAR 10:51:46.286 -> 9585 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 10:51:48.302 -> 11592 !TSM:FPAR:NO REPLY 10:51:48.302 -> 11594 TSM:FPAR 10:51:50.829 -> 14096 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 10:51:52.822 -> 16103 !TSM:FPAR:FAIL 10:51:52.822 -> 16104 TSM:FAIL:CNT=1 10:51:52.822 -> 16106 TSM:FAIL:DIS 10:51:52.822 -> 16108 TSF:TDI:TSL 10:52:02.876 -> 26112 TSM:FAIL:RE-INIT 10:52:02.876 -> 26114 TSM:INIT 10:52:02.876 -> 26121 TSM:INIT:TSP OK 10:52:02.876 -> 26123 TSM:FPAR 10:52:03.387 -> 26625 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 10:52:05.404 -> 28633 !TSM:FPAR:NO REPLY 10:52:05.404 -> 28635 TSM:FPAR 10:52:07.934 -> 31137 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 10:52:09.942 -> 33144 !TSM:FPAR:NO REPLY 10:52:09.942 -> 33146 TSM:FPAR 10:52:12.432 -> 35648 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 10:52:14.449 -> 37655 !TSM:FPAR:NO REPLY 10:52:14.449 -> 37657 TSM:FPAR 10:52:16.984 -> 40159 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 10:52:19.000 -> 42166 !TSM:FPAR:FAIL 10:52:19.000 -> 42167 TSM:FAIL:CNT=2 10:52:19.000 -> 42169 TSM:FAIL:DIS 10:52:19.000 -> 42171 TSF:TDI:TSL
Using the log parser this would suggest that the transport is ready and the gateway is running, but that the repeater node cant find the parent?
The radios are sitting on the same desk, and i see 0;255;3;0;9;807 RFM69:CSMA:RSSI=0 repeatedly when #define MY_DEBUG_VERBOSE_RFM69 is set.
So this must be a power issue?
-
RE: Adafruit RFM69HCW and Arduino Nano
I assume the wiring is ok because the radios work with the RadioHead example?
The mysensors configure file has defaults for rf24 and an Ethernet gateway etc, but doesn't the gateway code i'm using override this?
-
Adafruit RFM69HCW and Arduino Nano
Hi,
I have two Adafruit RFM69HCW breakout boards connected to 5V Nano's and they are communicating well using the Radiohead examples shown here . However they do not work with mysensors.
I am trying to setup a serial gateway with the following:
#define MY_DEBUG #define MY_RADIO_RFM69 #define MY_IS_RFM69HW #define MY_RFM69_NEW_DRIVER #define MY_RFM69_FREQUENCY RFM69_433MHZ #define RFM69_INT 3 #define MY_RFM69_CS_PIN 4 #define MY_RFM69_RST_PIN 2 #define LED 13 #define MY_DEBUG_VERBOSE_RFM69 #define MY_DEBUG_VERBOSE_RFM69_REGISTERS #define MY_GATEWAY_SERIAL #include <MySensors.h> void setup() // Setup locally attached sensors { Serial.println("Adafruit RFM69HWC Gateway v1.0 : setup"); // manual reset digitalWrite(MY_RFM69_RST_PIN, HIGH); delay(10); digitalWrite(MY_RFM69_RST_PIN, LOW); delay(10); } void presentation() { sendSketchInfo("Holly House Adafruit RFM69HWC Gateway", "1.0"); } void loop() { }
The serial log for the above results in this.
And if i comment out the #define MY_RFM69_NEW_DRIVER i get the following:
14:18:16.049 -> 0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RRNGA---,FQ=16,REL=255,VER=2.3.2 14:18:16.286 -> 0;255;3;0;9;205 TSM:INIT 14:18:16.286 -> 0;255;3;0;9;207 TSF:WUR:MS=0 14:18:16.320 -> 0;255;3;0;9;259 !TSM:INIT:TSP FAIL 14:18:16.320 -> 0;255;3;0;9;262 TSM:FAIL:CNT=1 14:18:16.320 -> 0;255;3;0;9;265 TSM:FAIL:DIS 14:18:16.320 -> 0;255;3;0;9;267 TSF:TDI:TSL 14:18:26.327 -> 0;255;3;0;9;10270 TSM:FAIL:RE-INIT 14:18:26.533 -> 0;255;3;0;9;10473 TSM:INIT 14:18:26.601 -> 0;255;3;0;9;10525 !TSM:INIT:TSP FAIL 14:18:26.601 -> 0;255;3;0;9;10528 TSM:FAIL:CNT=2 14:18:26.601 -> 0;255;3;0;9;10531 TSM:FAIL:DIS 14:18:26.601 -> 0;255;3;0;9;10534 TSF:TDI:TSL 14:18:36.599 -> 0;255;3;0;9;20537 TSM:FAIL:RE-INIT 14:18:36.802 -> 0;255;3;0;9;20740 TSM:INIT 14:18:36.837 -> 0;255;3;0;9;20792 !TSM:INIT:TSP FAIL 14:18:36.837 -> 0;255;3;0;9;20795 TSM:FAIL:CNT=3 14:18:36.837 -> 0;255;3;0;9;20798 TSM:FAIL:DIS 14:18:36.871 -> 0;255;3;0;9;20801 TSF:TDI:TSL 14:18:46.854 -> 0;255;3;0;9;30804 TSM:FAIL:RE-INIT 14:18:47.060 -> 0;255;3;0;9;31007 TSM:INIT 14:18:47.094 -> 0;255;3;0;9;31059 !TSM:INIT:TSP FAIL 14:18:47.128 -> 0;255;3;0;9;31063 TSM:FAIL:CNT=4 14:18:47.128 -> 0;255;3;0;9;31066 TSM:FAIL:DIS 14:18:47.128 -> 0;255;3;0;9;31069 TSF:TDI:TSL
Where should i start in troubleshooting why the radios don't work with mysensors?
thanks
-
RE: MySensors 2.3.2 released
hi, i upgraded to 2.3.2 and my serial gateway stopped working in openhab, so i had to revert back to 2.3.1.
I can only think this is because the mysensors binding also has to be upgraded?
-
Are the Arduino Pro Micro and RFM69 compatible?
Hi,
I was hoping to use a Pro Micro board with RFM69, but the pin numbers are different to the Pro Mini - i have searched for a guide but cant find anything to explain how to connect the radio to the Pro micro - is this possible?
Thanks