Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. strangeoptics
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    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
      
      posted in Development
      strangeoptics
      strangeoptics
    • 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?

      posted in Development
      strangeoptics
      strangeoptics
    • 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) {
         ...
      }
      
      posted in Development
      strangeoptics
      strangeoptics
    • 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 😉

      posted in OpenHAB
      strangeoptics
      strangeoptics
    • 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.

      posted in OpenHAB
      strangeoptics
      strangeoptics
    • 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.

      posted in OpenHAB
      strangeoptics
      strangeoptics
    • RE: 💬 NodeManager

      @user2684 so which controler are you using?

      posted in OpenHardware.io
      strangeoptics
      strangeoptics
    • 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?

      posted in Feature Requests
      strangeoptics
      strangeoptics
    • 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 😞

      posted in OpenHardware.io
      strangeoptics
      strangeoptics
    • 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?

      posted in OpenHardware.io
      strangeoptics
      strangeoptics
    • RE: MQTT- and Ethernet-Gateway at the same time

      @gohan 😉 aktually OTA is just an example. I like the MYSController with everything it can do and would like to switch it on and of whenever I would like to without any hassle.

      I thought multi-controller-mode is easy to do and would give the project more flexibility.

      posted in Feature Requests
      strangeoptics
      strangeoptics
    • RE: MQTT- and Ethernet-Gateway at the same time

      @Yveaux Do you now if "multiple concurrent controller connections" are on the list for future extensions?

      I am not a big C++ programmer but in my home language java it would be a quick thing to do.

      posted in Feature Requests
      strangeoptics
      strangeoptics
    • RE: MQTT- and Ethernet-Gateway at the same time

      @gohan yes but I had to switch to mycontroller and afterwards back to OpenHab every time I would like to use OTA

      posted in Feature Requests
      strangeoptics
      strangeoptics
    • 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.

      posted in Feature Requests
      strangeoptics
      strangeoptics
    • SmartSleep a feature of the Gateway

      Hi,
      I would like to use smartSleep but I found out that it is controller dependent. And in the controller overview table there is only one controller (Home Assistant) supporting this feature. I use OpenHab.
      Wouldn't it be great to have that feature in the gateway along with a config file to adjust it for different modi?

      posted in Feature Requests
      strangeoptics
      strangeoptics
    • RE: MQTT- and Ethernet-Gateway at the same time

      Too bad 🙂

      My target infrastructure is OpenHab with MQTT and that is set. But for some features, especially overview and OTA, the MYSControllor looks promissing. But
      haven't tested it so far.

      thx

      posted in Feature Requests
      strangeoptics
      strangeoptics
    • MQTT- and Ethernet-Gateway at the same time

      Is it possible to run the MQTT- and Ethernet-Gateway at the same time?

      This would open the possibility to run OpenHab and MYSController at the same time.

      posted in Feature Requests
      strangeoptics
      strangeoptics
    • Help with smartSleep()

      Hi,

      I would like to use smartSleep(). I saw that it is implemented with the method smartSleep(mils).
      But I can't get it to work with MQTT on my Raspberry.

      1. I have a Switch command and it is working without sleep() perfectly.
        I mean the mqtt message is received in my node.
        mysensors-in/11/2/1/0/command
      2. Next I set up the node with smartSleep and it is sending a heart beat message every 10 seconds.
        mysensors-out/11/255/3/0/22
        But no Switch command that occured while smartSleep() is received now or resend by the gateway after te heartbeat.

      Do I miss anything, do I have to activate something in the MQTT-Gateway on my Raspberry?

      Ahhh I read that the controller has to support it. That is in my case OpenHab 2. Does anyone has a solution for that?

      posted in General Discussion
      strangeoptics
      strangeoptics
    • RE: receive() a message while in low power mode?

      Ah yes I forgott to describe my setup first. I use the MQTT-Gateway and OpenHAB 2. And I would like to stick with it as far as I can.

      posted in General Discussion
      strangeoptics
      strangeoptics
    • receive() a message while in low power mode?

      Hi,

      is it possible to receive messages while in some kind of low power mode?

      I mean the controller is caching the request and the node is polling ever minute the controller for requests?

      posted in General Discussion
      strangeoptics
      strangeoptics
    • RE: Low Power?

      Ok is sleep using internally the lowpower.h?
      I am used to use the constants defined in period_t like SLEEP_8S.

      Is there a good description how to use the low power state and interrupts?

      thx

      posted in General Discussion
      strangeoptics
      strangeoptics
    • Low Power?

      Hi,

      I saw that the lowoower.h from RocketScream is somehow included in mysensors.
      How can I power down with mysensors to low power?
      Couldn't find an example.

      posted in General Discussion
      strangeoptics
      strangeoptics
    • RE: Is there a logging function in the Raspberry Pi Gateway?

      @gohan Where can I find the project myscontroller and the latest downloads?

      posted in General Discussion
      strangeoptics
      strangeoptics
    • RE: Is there a logging function in the Raspberry Pi Gateway?

      Ok I use the mqtt gw.
      But is there a special topic for errors, infos, debugs?

      Messages like
      Starting gateway...
      Protocol version - 2.2.0-beta
      TSM:INIT:TSP OK
      TSM:INIT:GW MODE
      and so on are for example not posted to a topic!

      posted in General Discussion
      strangeoptics
      strangeoptics
    • 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.

      posted in General Discussion
      strangeoptics
      strangeoptics