If you want to use library functions outside the main sketch, you can also just include the core header, e.g.
#include "core/MySensorsCore.h"
If you want to use library functions outside the main sketch, you can also just include the core header, e.g.
#include "core/MySensorsCore.h"
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
I haven't tested it, but this one seems to fit what you need
https://github.com/mycontroller-org/serial2mqtt/blob/master/README.adoc
@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
You should move the define for the node ID before you include mysensors.h
Exactly. Better to ask then waste many hours
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.
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
}
There are many examples...
https://forum.mysensors.org/topic/3764/p1-smart-meter-nta8130-readout-using-mysensors/7
Or on GitHub, needs some tinkering to integrate in mysensors
https://github.com/search?l=C%2B%2B&q=P1+meter&type=Repositories
Edit
There is also a library available
https://github.com/matthijskooijman/arduino-dsmr
@skywatch still if you use wait(), the rest of the code in the loop is not executed during the waiting time. Only the mysensors core is executed
Yes, comment
#define MY_DEBUG
and in setup() add
Serial.begin(115200);
I would recommend to switch to a nrf24l01 or rfm69/95, where you will have bidirectional communication and you can use the mysensors framework
The target is set in the platformio.ini file
upload_port = COM6
I'm not sure about the define your talking about, maybe that isn't needed and the pins are defined in the boards directory. What happens if you define this MYBOARDNRF5?
I've placed the test code here: https://github.com/rikki78/NRF5_test
I hope this helps you!
Have you connected the interrupt pin on the node?
And perhaps tried without the new driver? I don't know how that works with a RPI, does it have an old driver also?
@Stig all right I will have a look but I'm pretty sure I've used the same example, so that should work for you also
This post might help:
https://forum.mysensors.org/topic/9266/guide-nrf5-nrf51-nrf52-for-beginners/54?_=1672252297493&lang=nl
If it doesn't, let me know and I will dig for the exact example
MyBoardNRF5.h/.cpp need to be in src
There is another folder where you have to place the board definitions. I think if you Google on MyBoardNRF5 platformio you will find what you need.
Also checkout this topic https://forum.mysensors.org/topic/9266/guide-nrf5-nrf51-nrf52-for-beginners
@Stig try mqtt-explorer to see what is happening on the mqtt network
@briseis I would just switch back to 2.3.2
I also believe 2.4 on the gateway should work with nodes on 2.3.2. what kind of errors did you get when doing this?