Thanks for the answer. I meant that Mysensors has ESP32 support but only in terms of WIFI. It supports e.g. stm32 with ENC or W5500 modules - and the question is whether and how to add ESP32 support with LAN8720 module. I am not considering using ESPHOME or MQTT - I want to have native communication with the controller that implements my control schemes on its side. I try to program KC868-A16 but it does not matter - the question is whether such support can be added in a simple way.
@OldSurferDude well, the ESP8266 is limited to 4 TCP clients in arduino IDE. This can't be really increased. I did som experiments and you can set it up to 15, but after the 5th client on my web server, I got a freeze.
Maybe you got something wrong. #define MY_GATEWAY_MAX_CLIENTS 2 defines how many controllers (eg Home Assistant) can connect to the gateway, not how many sensors/MySensors devices.
And yes, you can have multiple TCP gateways in HomeAssistant. I got an NRF24, an RFM95 long range and a RFM95 short range gateway (all based on ESP32) on the same Home Assistant.
Regards, Edi
easiest way would be to add thermostat "sensor2 to youd node and adjust that to desired temperature. But since your node is sleeping you will have to request the set value when it wakes up.
Here is an example of how my power meter was getting last KWH from controller after power cut, I removed irrevelant code for clarity:
loop(){
if (!daySet) {
request(dayID, V_KWH);
wait(3333, C_SET, V_KWH);
}
if(!nightSet){
request(nightID, V_KWH);
wait(3333, C_SET, V_KWH);
}
}
void receive(const MyMessage &message) {
if(message.getCommand() == C_SET){
if (message.type == V_KWH) {
if(message.sensor == dayID){
dayCount = MeterRatio * message.getFloat();
dayCountOld = dayCount;
dayCountWatt =dayCount;
daySet = true;
}
else if (message.sensor == nightID){
nightCount = MeterRatio * message.getFloat();
nightCountOld = nightCount;
nightCountWatt = nightCount;
nightSet = true;
}
}
}
}
It was taking approx 2 seconds wits domoticz(2019 version) to reply to my requests.
You may run into errors with this method as your sleeping node won't send back ACK when you set new offset though.
Some controllers can disable requirement for ACK, i think.
More advanced way would be creating dummy thermostat to set new value(so you would have live and dummy thermostats) and using controller scripts to update the live thermostat on receipt of a temperature, you would have to wait after sending temperature or humidity.
Over 4 years on, and my node ran continuously sending 4 messages every 5 minutes.
It's 700mAh LiFePo4 battery voltage dropped from initial 3.45V to 3.24V, according to LiFePo4 voltge/SoC tables It's just under 40% left.
700*60% = 420mAh. 100 mAH per year. using library 2.40 and blob message I could cut usage to ~25mAh/year, not bad
Thanks, I'll keep this in mind if I decide to debug it. I realized that I am also tired of patching the gateway through to the doctor container inside an LXC so now I am looking at creating an esp gateway.
Just need to check if I can find a pcb on here.
Thanks again!