What is the MQTT message to switch MQTT client gateway into inclusion mode?
ruslan
@ruslan
Best posts made by ruslan
Latest posts made by ruslan
-
RE: MQTT Client gateway
-
RE: MQTT Client gateway
Hi, Hek!
You are correct. except I also had to add these 2 lines and then radio worked:#define MY_RF24_CE_PIN 5 #define MY_RF24_CS_PIN 6
Pls fix the repo. Looking forward to seeing mqtt client in the master branch.
-
RE: MQTT Client gateway
To developers of the MQTT client:
I just tried the GatewayW5100MQTTClient in the latest development branch - it gives me "0;0;3;0;9;Radio init fail" error, while GatewayW5100 sketch works fine. What could be the reason? I noticed that the declarations parts in these sketches are rather different.
My setup: ARduino nano clone + W5100 module + NRF24L01 radio. All wired as in the MySensors ethernet gateway guide ([http://www.mysensors.org/build/ethernet_gateway]) -
RE: MQTT Client gateway
Many thanks to @tomkhy!
I built my MQTT client with his code. No modifications were needed.BTW, Will this or any other code get included into the official MySensors library?
-
RE: MQTT Client gateway
to tomkhy: your gateway sketch compiles, but Arduino runs out of memory (I use Nano with W5100 ethernet module, SOFTSPI enabled). It does fit with MY_SIGNING_FEATURE and DEBUG disabled, but I need debug - somehow it is not registering with MQTT server. Please tell me how to reduce memory footprint.
-
RE: MQTT Client gateway
Please help! This MQTT client gateway fails to compile. I use 1.6.5. IDE, 1.5 library. Applied patches as suggested by ntruchsess and still get this error:
MyMQTTClient.cpp: In constructor 'MyMQTTClient::MyMQTTClient(PubSubClient, uint8_t, uint8_t)': MyMQTTClient.cpp:108: error: no matching function for call to 'MySensor::MySensor(uint8_t&, uint8_t&)' MySensor(_cepin, _cspin), buffsize(0) ^ MyMQTTClient.cpp:108:41: note: candidates are: In file included from MyMQTTClient.h:16:0, from MyMQTTClient.cpp:14: R:\Arduino\libraries\MySensors/MySensor.h:153:2: note: MySensor::MySensor(MyTransport&, MyHw&) MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver() ^ R:\Arduino\libraries\MySensors/MySensor.h:153:2: note: no known conversion for argument 1 from 'uint8_t {aka unsigned char}' to 'MyTransport&' R:\Arduino\libraries\MySensors/MySensor.h:144:7: note: MySensor::MySensor(const MySensor&) class MySensor ^ R:\Arduino\libraries\MySensors/MySensor.h:144:7: note: candidate expects 1 argument, 2 provided MyMQTTClient.cpp: In member function 'void MyMQTTClient::begin(rf24_pa_dbm_e, uint8_t, rf24_datarate_e, uint8_t, uint8_t, uint8_t)': MyMQTTClient.cpp:148: error: 'setupRepeaterMode' was not declared in this scope setupRepeaterMode(); ^ MyMQTTClient.cpp:154: error: 'setupRadio' was not declared in this scope setupRadio(paLevel, channel, dataRate); ^ MyMQTTClient.cpp:155: error: 'BASE_RADIO_ID' was not declared in this scope RF24::openReadingPipe(WRITE_PIPE, BASE_RADIO_ID); ^ MyMQTTClient.cpp:157: error: cannot call member function 'void RF24::startListening()' without object RF24::startListening(); ^ no matching function for call to 'MySensor::MySensor(uint8_t&, uint8_t&)'
-
RE: Adding a light switch to Openhab/MQTT gateway
The statements from jmmorgan and Xander both look OK to me.
mine is:Switch node1_sw1 "sw1" {mqtt=">[mysensors:MyMQTT/1/1/V_LIGHT:command:ON:1],>[mysensors:MyMQTT/1/1/V_LIGHT:command:OFF:0],<[mysensors:MyMQTT/1/1/V_LIGHT:command:MAP(1on0off.map)]"}
-
RE: Adding a light switch to Openhab/MQTT gateway
-
I noticed that MQTT server can only accept 1 client connection at a time. So when testing - do not use another client to "listen" when Openhab talks to Mysensors.
-
Try testing Openhab and MQTT Mysensors gateways separately, by connecting to them with outside clients and checking if the right commands come out and if these command cause right kind of reaction at MQTT Mysensors gateway.
-
-
RE: Controlling mysensors actuators via MQTT - need help
Problem solved. The right command would be
topic: MyMQTT/1/1/V_LIGHT
message: 1 -
Controlling mysensors actuators via MQTT - need help
Hi,
I just built MQTT gateway. It works fine delivering data from the sensors, but I can not figure out, how to send commands to actuators, like relays. What command, for instance, shall I send to MQTT gateway to switch on relay on node 1?Also, when I connect to gateway MQTT server via mosquitto_pub (publishing client) and try to publish something - it does not show in the MQTT reading client. Is this normal, or I have some problem with MQTT server?