I haven't tested it, but this one seems to fit what you need
https://github.com/mycontroller-org/serial2mqtt/blob/master/README.adoc
electrik
@electrik
Best posts made by electrik
-
RE: script to convert serial to mqtt?
-
RE: Motion Sensor not presenting to RS485 Gateway / TSM:FPAR:NO REPLY
You should move the define for the node ID before you include mysensors.h
-
RE: Auto resend on NACK
@skywatch said in Auto resend on NACK:
@electrik & @Marek - Are you both sure about that? It seems to me that both those statements are doing what was intended.
Now that I see it again, I'm not so sure anymore actually.
In your code you used the variable msg. That should be one of msgFgeHum, msgFgeTemp, msgFzrHum, msgFzrTemp.
That is why the compiler complains msg is unknown.You also enabled the ack message, this is just a software acknowledge, while the send function returns the status of the hardware acknowledge. So if you check with
if (send(msgFgeHum.set(fgehum),true)) { // this is sent ok } else { // sending failed }
you check if the hardware acknowledge was successful. The software ack should be tested differently and some more logic is needed for it.
Hope this helps
-
RE: Nano minimum voltage
If you use an ISP programmer, you can reprogram the fuses and use it on lower voltages also. Upto 1.8v but also 3.3v
-
RE: MySensor Request Function
You can remove these lines, the declaration is already done in the MySensors framework. For presentation() it is needed because you write code there, that is in the function. Now you only call the function, and the code is already in the framework.
-
RE: Handling NACKs in the gateway
Exactly. Better to ask then waste many hours
-
RE: Use FreeRTOS?
I am using the Pinchange interrupts to wake up from sleeping.
Maybe this helps?
See code snippets below.#include <PinChangeInt.h> //include PinChange lib from MySensors utilities
in setup()
attachPinChangeInterrupt(BotLeft_PIN, BotLeft_ISR, CHANGE);
and in the ISR
void BotLeft_ISR() { _wokeUpByInterrupt = 0xFE; // work-around to force MS lib to handle this interrupt // more code here }
-
RE: MySensor Request Function
You should do the same for requestTime();
-
RE: [Solved] Beginner receive() question
Yes, the serial communication is bidirectional for sure. I wasn't sure how sharing of the serial port is done between the in and out node.
Since you receive data (right?) the sketch you have used should be all right.
I have two doubts. The wait statement, could it be this prevents the data from being received?
Second is there should be a newline at the end of the payload as send by the mysencode node.I'm using the node red also, though with a mqtt gateway.
Edit: how did you deactivate the node? The right way is to delete it.
Latest posts made by electrik
-
RE: Node can send I_FIND_PARENT_REQUEST but cannot receive I_FIND_PARENT_RESPONSE
If you have the wrong modules, it could give you problems yes. Check out the buying guide, there are recommendations for the modules to pick, for example the ebyte ones. The will work very reliable. Big advantage of NRF24 to RFM69 is the throughput and response time.
-
RE: Node can send I_FIND_PARENT_REQUEST but cannot receive I_FIND_PARENT_RESPONSE
Are you sure the INT pin is connected?
Sending will work, but it will never get an interrupt on recieving a message -
RE: Ebyte nRF24L01P Wireless rf Transceiver E01-2G4M27D 27dBm SPI 2.4GHz Transmitter
You will need to be a bit more specific on what is going on... What is exactly the emission issue you are referring to?
-
RE: Trying to setup a gateway on Orangepi Zero 2..
I don't have experience with a Linux gateway, but had a similar issue where the transport was initialised okay and could send, but receiving didn't work.
This was caused by a not connected/working interrupt input (IRQ).
Hope it helps you -
RE: Anyone using/tried the E28-2G4M27S 2.4Ghz LoRa SX1280 27dB module?
This is an interesting find, can you share the link? I can't find these low prices anywhere.
-
RE: 💬 RFM69(H)W Arduino Mini Pro Shield v2
Here the picture of the assembled board. The top board is a temperature sensor so not necessarily needed.
-
RE: 💬 RFM69(H)W Arduino Mini Pro Shield v2
I have tested this board and @salfare observation was right. I had to add a wire to VCC in order to make it work. Just to be sure, I have also cut the connection to DIO5.
The result is a very compact board. -
RE: How to pass #define value to library
I think I understand what is happening.
The compiler compiles all source files it finds in the folder. So when compiling the sketch itself everything goes fine I think. When the compiler comes across the MyTinySensors.cpp, it tries to compile that file also but can't find the define MY_NODE_ID.
So I think you should move these files to subfolders (like done in the MySensors structure), so they won't be compiled individually anymore. Sounds plausible right? -
RE: How to pass #define value to library
The only difference I see, is that MY_NODE_ID is not used in MysensorsCore, but only in MyTransport.
It looks like you are close indeed, but I don't get this neither.
I hope someone else can help and let us know if you succeeded... -
RE: How to pass #define value to library
@Rbonat said in How to pass #define value to library:
MY_NODE_ID
Where have you defined this value exactly?