@gohan Yes it depends on the time lag or reaction time one can live with. I could live with 10-20 seconds for most of my things. And in this mode the node can stay for years on battery. Not actually tested but calculated
strangeoptics
@strangeoptics
Best posts made by strangeoptics
-
RE: Raspberry PI OpenHab and gateway
-
Is there a logging function in the Raspberry Pi Gateway?
Hi,
I am looking for a log to have the posibillity to look up error messages if something goes wrong in the gateway.
-
RE: SmartSleep a feature of the Gateway
Nice. Didn't know that.
But still it would be a great feature for the gateway to give every one the feature of smartSleep despite the controller.
Latest posts made by strangeoptics
-
RE: Linker error with new class for gateway
Ok now I have found the proper place to include the missing .cpp files to generate the .o files.
In the MySensor.h are all necessary .cpp files from the /core folder
#if defined(MY_GATEWAY_LINUX) #include "drivers/Linux/EthernetClient.h" #include "drivers/Linux/EthernetServer.h" #include "drivers/Linux/IPAddress.h" #endif #include "drivers/PubSubClient/PubSubClient.cpp" #include "core/MyGatewayTransportMQTTClient.cpp" #include "core/MySmartSleep.cpp" #include "core/MySleepNode.cpp
-
RE: Linker error with new class for gateway
Problem solved with a not so nice hack
I moved my additional .h and .cpp files into one of the library folders MySensors\drivers\BCM\ and now the .o file gets compiled and the linker can find the method implementation.
But why does it not work in the /core folder?
-
Linker error with new class for gateway
Hi,
I try to extend the gateway with some functionallity. For that I have written some c++ classes that are tested and working and put them in the /core folder.
But when I compile them in the context of MySensors project I get an linker error:./core/MyGatewayTransportMQTTClient.cpp:136: undefined reference to `SmartSleep::init(std::string)'
Is there anything I have to consider when I introduce new classes that consist of a SmartSleep.h and SmartSleep.cpp file?
I extend the Class MyGatewayTransportMQTTClient the following way:
#include "SmartSleep.h" ... static SmartSleep ss; ... bool gatewayTransportInit(void) { ss.init("nodes_smartsleep.cfg");
The classes look like:
SmartSleep.h class SmartSleep { public: void init(string); SmartSleep.cpp void SmartSleep::init(string filename) { ... }
-
RE: Raspberry PI OpenHab and gateway
@gohan Yes it depends on the time lag or reaction time one can live with. I could live with 10-20 seconds for most of my things. And in this mode the node can stay for years on battery. Not actually tested but calculated
-
RE: Raspberry PI OpenHab and gateway
@rozpruwacz Sorry for my somehow confusing post.
Smart sleep is important if you not only want to get some sensor reading once in a while but want to actively control a device like lights or a power plug. To receive commands in your node you have to be always online or use smart sleep.
MQTT is good for decoupling. If you channel alle your communication through mqtt the rest of your smart things that speak mqtt could directly act on them. Or you can log the data and other stuff. It is just more flexible and more open.But like gohan said the Ethernet is simpler for a start.
-
RE: Raspberry PI OpenHab and gateway
To answer the second Point.
MQTT is in the IOT world a defaco standard and should get used as much as it can be.
Unfortunately at the moment the OpenHAB binding for MySensors doesn't Support MQTT. But I read it is on the way.
You can use OpenHAB with MQTT and without the binding but than you can't use smart sleep which enables your nodes to sleep most of the time and save lots of energy. -
RE: MQTT- and Ethernet-Gateway at the same time
@Yveaux Yes you are right, didn't thought about the ack's.
Another question. I would like to intercept the message flow in both directions in the gateway to put my logic in (smart sleep). Could you pinpoint me the method where this happens?
-
RE: 💬 NodeManager
@user2684 If I understand it correct, NodeManager is basically using the smartSleep method of the MySensors library and extended it with a default delay of 500ms after the heart beat message.
The logic for queuing the messages inbetween the wakeup periods is not implementet from NodeManager and has to come from the controller. In my case OpenHAB hasn't got the logic and smartSleep wouldn't work -
RE: 💬 NodeManager
Hi, I would like to have smartSleep for my nodes. I read that NodeManager can do that. But I couldn't find an explanation how it is doing it. I use OpenHAB as the controller and MQTT to communicate to the MySensors-Gateway. Is smartSleep working for this scenario? Did you extend the Gateway?