Thank you for your very clear answer.
I will test by getting a MOSFET.
Have a good day.
Posts made by miclane
-
RE: Gateway MQTT with RFM69
-
RE: Gateway MQTT with RFM69
- Yes, there is of course the RJ45 plug on the shield which fits directly by the arduino UNO. The only indications are HanRun HR911105A 15/10.
- What has changed is that I have always used NRF24 +. The gateway that I use in operation at home is also in version MySensors 2.3.1 with NRF24+
- I use the basic sketch on the site :
#define MY_DEBUG
#define MY_TRANSPORT_WAIT_READY_MS 10000
#define MY_RADIO_RFM69
#define MY_RF69_SPI_CS 9
#define MY_GATEWAY_W5100
#define MY_GATEWAY_MQTT_CLIENT
#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mhs-pub-1"
#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mhs-sub-1"
#define MY_MQTT_CLIENT_ID "MHS_GW_02"
#define MY_MQTT_USER "xxxxxx"
#define MY_MQTT_PASSWORD "yyyyyyyy"#define MY_IP_ADDRESS 12,9,0,101
#define MY_IP_GATEWAY_ADDRESS 12,9,0,1
#define MY_IP_SUBNET_ADDRESS 255,255,255,0
#define MY_CONTROLLER_IP_ADDRESS 12,9,0,8
#define MY_PORT 1883
#define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED#define MY_DEFAULT_LED_BLINK_PERIOD 300
#include <SPI.h>
#include <Ethernet.h>
#include <MySensors.h>void setup() {}
void presentation() {}
void loop() {}
Thank you.
-
RE: Gateway MQTT with RFM69
Thank you for your reply.
But I do not see anything on the page indicated which corresponds to the pinning for an RFM69.
I tried to compose with this page and the RFM69 pinouts but I get the same results.
Either the ethernet part works but not the radio part.
Either the radio part works but not the ethernet part.
Is this configuration really operational?
Because a lot of post does not seem to have managed to make it work.
Cordially. -
Gateway MQTT with RFM69
Hello,
I'm trying to make an MQTT gateway with an arduino uno, a HanRun HR911105A shield and an RFM69.
I am in version 2.3.1 of MySensors.
I realized for several years this type of gateway with NRF24 + which works without problem.
With the RFM69, if I put the MISO cable at 12, the MQTT connection tries to wait for incomprehensible IP addresses but the RFM69 starts up well.
If I remove the MISO, the MQTT connection is at the correct address and works but of course the RFM69 does not start.
I tried cabling the RST on the GND of the shield but always the same.
I looked a lot of post but I did not find anything to deal with the problem.
Any ideas ? an advice ? an experiment ?
Thanks in advance. -
Gateway MQTT Ethernet with the 2.3.0 library
Hello,
I just tried version 2.3.0 with an MQTT ethernet gateway.
The gateway connects well to the broker MQTT but when the nodes send information the gateway does not return anything to the broker.
With version 2.2.0 it worked without problems.
An idea ?
Thank you.Gateway-side traces :
320 GWT:TPC:IP=12.9.0.100
1323 MCO:BGN:STP
1324 MCO:BGN:INIT OK,TSP=1
1627 GWT:TPC:IP=12.9.0.100
2629 GWT:RMQ:MQTT RECONNECT
2838 GWT:RMQ:MQTT CONNECTED
2841 GWT:TPS:TOPIC=mhs-pub-0/0/255/0/0/18,MSG SENT
2889 GWT:TPS:TOPIC=mhs-pub-0/0/255/3/0/11,MSG SENT
2900 GWT:TPS:TOPIC=mhs-pub-0/0/255/3/0/12,MSG SENT
.......
6603 TSF:MSG:READ,24-24-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
6608 TSF:MSG:BC
6610 TSF:MSG:FPAR REQ,ID=24
6612 TSF:CKU:OK,FCTRL
6615 TSF:MSG:GWL OK
7126 !TSF:MSG:SEND,0-0-24-24,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0 -
RE: Gateway MQTT first launch
Thank you for the idea.
I try and I will do a report.But is there a way to start the sketch after a delay even if the gateway does not find the broker.
I understand that this is not very interesting .... except for my library.
With a node, it is possible to start the sketch after a delay with the parameter MY_TRANSPORT_WAIT_READY_MS.Thank you.
-
Gateway MQTT first launch
Hello,
I developed a library that allows you to modify and store the parameters of the #define sketches in eeprom when launching a module. Thus no need for IDE, compilation and upload.
It works well with all nodes but with an MQTT gateway it is waiting to find the MQTT broker to start the program.
But the first time, the parameters are, of course, not entered.
An idea to work around this problem?
Thank you. -
RE: relay type node : I_DISCOVER_RESPONSE
It's just !
I had forgotten this subtlety that the gateway is number 0.
In MQTT what interests me is the topic of publication and subscription of the gateway.
Thank you. -
RE: relay type node : I_DISCOVER_RESPONSE
Thank you for your reply.
I understand the objective but there is one point that does not seem to me to be appropriate: in my case, the indicated payload is 0 but the node number that emits is 205.
mhs4-out0/205/255/3/0/21 - payload : 0 -
relay type node : I_DISCOVER_RESPONSE
Hello,
I have an MQTT ethernet gateway and a relay type node. Both are powered on mains.
The relay type node is registered in the controller and it is working properly.
But sometimes the relay type node sends an internal message type I_DISCOVER_RESPONSE with a payload of 0.
I do not see what this message is for and if the controller has to answer.
Can you explain to me ?
Thank you. -
RE: The gateway mqtt restarts when the node is absent
The 2.2.0-rc.1 version in development seems to solve the problem.
See also the message : https://forum.mysensors.org/topic/6684/serial-gateway-restarting/30
Can you explain the change in the new version?
Thank you. -
RE: The gateway mqtt restarts when the node is absent
Arduino AVR Boards Built-In by Arduino version 1.6.18
-
RE: The gateway mqtt restarts when the node is absent
Board def :
BN: Carte inconnue
VID: 1A86
PID: 7523
SN: Envoyez un croquis pour l'obtenir -
RE: The gateway mqtt restarts when the node is absent
Maybe that's the explanation ...
My gateway is mains powered with 9V and 500mA power.Nobody found this problem?
It is true that a node relay type should normally be always powered if you want to control ...
I will see if I can test with a more powerful diet.
Thank you. -
RE: The gateway mqtt restarts when the node is absent
Arduino IDE : 1.8.2
API MySensors : 2. 1. 1I rephrase my question:
When the remote node is powered on, the gateway receives the MQTT message and transmits it to the node. It's OK.
When the remote node is not powered on, the gateway receives the message MQTT but reboots immediately.
It would seem that the remote node not powered up disturbs the gateway.Thank you.
-
RE: The gateway mqtt restarts when the node is absent
Arduino UNO R3 + Ethernet shield W5100 + NRF24L01+
Thank you.
-
The gateway mqtt restarts when the node is absent
Hello,
I have a malfunction on an MQTT ethernet gateway.
When I publish from the controller to activate a relay type node, if the node is not powered on, the gateway restarts.
Below the gateway trace :
0;255;3;0;9;Message arrived on topic: mhs4-in0/205/1/1/0/2
0;255;3;0;9;!TSF:MSG:SEND,0-0-205-205,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=NACK:1
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 OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDEDIf the node is powered on, the gateway does not rebel and the message is sent to the node.
Is there an explanation? a fix?
Thank you. -
RE: Send message from gateway MQTT to controller
I tested the solution proposed above.
It works very well.
I can send to the controller the subscription topic of the gateway, its IP address, etc. during the presentation phase of the gateway.
Thanks again. -
RE: Send message from gateway MQTT to controller
Thank you for this quick response.
I test this solution which seems to me a bypass and I will make a return.
Perhaps consider an evolution to allow directly the sending of information by the gateway like the nodes ...
For other sensors I already use V_variables.
Thank you. -
RE: Send message from gateway MQTT to controller
On the same publish topic as mysensors gateway.
Just when the gateway is on the network.During the presentation phase of the gateway mqtt, there is little information sent and I would like to complete it.
Thank you. -
Send message from gateway MQTT to controller
Hello,
I have an MQTT gateway that dialogs with a controller that I developed.
This works very well.
I would like the gateway to give additional information to the controller when it connects to the network.
For example, its IP address on the local network or its subscription topic.
Is it possible to send information from an MQTT gateway to the controller during a presentation phase?Thank you.
-
RE: Gateway Address EEPROM
I solved my need.
I get the bytes from the EEPROM as well.
#define MY_IP_ADDRESS_B0 EEPROM.read(xxxx)
....
#define MY_IP_ADDRESS_B3 EEPROM.read(yyyy)Then I define the address of the gateway like this:
#define MY_IP_ADDRESS ((uint32_t)(MY_IP_ADDRESS_B3) << 24) | ((uint32_t)(MY_IP_ADDRESS_B2) << 16) | ((uint32_t)(MY_IP_ADDRESS_B1) << | (uint32_t)(MY_IP_ADDRESS_B0)This applies to the other addresses required for the operation of an MQTT gateway.
Hopefully this sharing is useful.
Thank you -
RE: Gateway Address EEPROM
I am not going to use a DHCP address but a static address that I define in EEPROM.
It's easy to define in the sketch directly but it's not my need.With a small interface, I define the address in EEPROM and when the sketch type my gateway starts, I would like the #define MY_IP_ADDRESS to include the address in eeprom.
Thank you. -
Gateway Address EEPROM
Hello,
I save the ip address of my gateway to eeprom. At reboot, I would like to read the eeprom address and assign it to define MY_IP_ADDRESS. Is it possible ?
Thank you. -
Easily configure settings
Hello,
Sorry for my English.
I used MySensors and it works fine .
I would also make it more friendly setting for new users . For example, possible to define an IP address in the gateway without using the Arduino IDE . Just having a small interface with a few parameters and then compile and upload in the background.
Has anyone worked on it?
Thanks -
RE: Wifi gateway : NodeMCU & NRF24L01 - Radio does not work
Thank you for your answer. I read a post indicating to change the speed of 1MB for L01 .
I'll order L01 + .
Congratulations on your achievement . -
RE: Wifi gateway : NodeMCU & NRF24L01 - Radio does not work
@miclane said:
Hi,
Sorry for my English.
I try to run the wifi gateway with a NodeMCU ESP12-E and a NRF24L01 (not 24L01+).
Arduino ide is 1.6.7.
Library sensors is Arduino-development. I tried before with the master library.
radio power is independent of nodemcu and grounds are interconnected.
The wires are checked and connected as on documentation.
I also changed several radio components.
First : in the sketch esp8266, i declare ssid, password, static ip address, everything works well. I can successfully ping the ip address.
Second : Now, I enable #define MY_RADIO_NRF24 and #define MY_RF24_DATARATE RF24_1MBPS in addition to the sketch. Then I get DHCP address - and not static like above - and debug give :
Radio init failed - Check wiring.
The radio connection is not working and disrupts the wifi connection.Have you an idea of the problem ?
Thanks for your help.
-
Wifi gateway : NodeMCU & NRF24L01 - Radio does not work
Hi,
Sorry for my English.
I try to run the wifi gateway with a NodeMCU ESP12-E and a NRF24L01 (not 24L01+).
Arduino ide is 1.6.7.
Library sensors is Arduino-development. I tried before with the master library.
radio power is independent of nodemcu.
The wires are checked and connected as on documentation.
First : in the sketch esp8266, i declare ssid, password, static ip address, everything works well.
Second : I enable #define MY_RADIO_NRF24 and #define MY_RF24_DATARATE RF24_1MBPS. Then I get DHCP address (not static like above) and debug give :tail 0 chksum 0x42 csum 0x42 0;0;3;0;9;Starting gateway (RNNGE-, 1.6.0-beta) write_register(0x04,0x5F) write_register(0x06,0x27) write_register(0x06,0x07) write_register(0x00,0x0E) write_register(0x07,0scandone x70) write_register(0x05,0x4C) write_register(0x00,0x0E) STATUS 0x0E RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0 RX_ADDR_P0-1 0x0E0E0E0E0E 0303030303 RX_ADDR_P2-5 0xC3 C4 C5 C6 TX_ADDR 0x0E0E0E0E0E RX_PW_P0-6 0x00 00 00 00 00 00 EN_AA 0x3Fstate: 0 -> 2 (b0) tate: 2 -> 0 (0) f 0, scandone state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 1 cnt
Have you an idea of the problem?
Thanks for your help.