Navigation

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

    Posts made by tlustoch

    • RE: 💬 OpenTherm Adapter

      I am working on the analogous project.
      For several years I am using hw interface https://github.com/HynekBaran/OpenThermGWMini connecting the boiler and Arduino+NRF24L01 (which acts as a MySensors actuator).
      BUT: My boiler supports OpenTherm/Light (OT/-) protocol only. As far as I know, hw ("electric") specs of OT- are same as OT+ (2.0).
      So may be the simple OpenThermGWMini hw may be used, but there is missing MySensors sw part.

      See the original circuit diagram

      Maybe we may share?

      posted in OpenHardware.io
      tlustoch
      tlustoch
    • RE: [SOLVED] Multiple source files & including MySensors.h problem

      @user2684 Yes, that is the solution. Thanks a lot!

      posted in Troubleshooting
      tlustoch
      tlustoch
    • [SOLVED] Multiple source files & including MySensors.h problem

      Hi,
      I am trying to create a sketch with multiple source files (to keep my own classes definitions out of main sketch file), but I am not able to include MySensors.h.

      Lets consider the following GatewayESP8266 example (4 files) for NodeMCU 0.9 board:

      I have the main sketch file GatewayESP8266.ino

      // GatewayESP8266.ino
      ...
      #include "myownconfig.h"
      #include <MySensors.h>
      ...
      

      MySensor config file myownconfig.h

      // myownconfig.h
      #ifndef MYOWNCONFIG_H
      #define MYOWNCONFIG_H
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      ...
      #endif
      

      and my test class header and source files test.cpp and test.h

      // test.cpp
      #include "test.h"
      
      // test.h
      #ifndef TEST_H
      #define TEST_H
      
      #include "myownconfig.h"
      #include <MySensors.h>
      
      class Test {
         MyMessage &message;
        };
      #endif
      

      Compiling (board NodeMCU 0.9) gives a bunch of errors:
      sketch/test.cpp.o: In function `__gdb_do_break': /Users/hynekbaran/Documents/Arduino-ESP/libraries/MySensors/core/MyGatewayTransport.cpp:69: multiple definition of `g_cont' sketch/GatewayESP8266.ino.cpp.o:/Users/hynekbaran/Documents/Arduino-ESP/libraries/MySensors/core/MySensorsCore.h:428: first defined here sketch/test.cpp.o: In function `__gdb_do_break': /Users/hynekbaran/Documents/Arduino-ESP/libraries/MySensors/core/MyGatewayTransport.cpp:69: multiple definition of `_ethernetServer' sketch/GatewayESP8266.ino.cpp.o:/Users/hynekbaran/Documents/Arduino-ESP/libraries/MySensors/core/MySensorsCore.h:428: first defined here sketch/test.cpp.o: In function `hwInit()': /Users/hynekbaran/Documents/Arduino-ESP/libraries/MySensors/core/MyGatewayTransport.cpp:69: multiple definition of `hwInit()' sketch/GatewayESP8266.ino.cpp.o:/Users/hynekbaran/Documents/Arduino-ESP/libraries/MySensors/core/MyHwESP8266.cpp:24: first defined here sketch/test.cpp.o: ... collect2: error: ld returned 1 exit status exit status 1 Error compiling for board NodeMCU 0.9 (ESP-12 Module).
      The same problem appears with ArduinoPro DimmableLigth test project.

      Thanks for help!

      posted in Troubleshooting
      tlustoch
      tlustoch
    • RE: MYSBootloader 1.3pre2 testing

      Please, can you provide source code? I need to configure radio pins (default MySensors CE and CS pins 9 and 10 are PWM so I need to connect the radio in other way). Thanks a lot!

      posted in Development
      tlustoch
      tlustoch
    • RE: ATtiny supported?

      @Nca78
      DimmableLight example with disabled serial console is 5,742 bytes, RelayActuator 5,464 bytes.

      posted in Hardware
      tlustoch
      tlustoch
    • RE: ATtiny supported?

      It seems that it is possible: https://www.hackster.io/arjun/nrf24l01-with-attiny85-3-pins-74a1f2 but mysensors library has to support it?

      posted in Hardware
      tlustoch
      tlustoch
    • RE: ATtiny supported?

      Any progress? I like to build simple low-power temperature sensor based on attiny85 but cannot compile mysensors sketch if attiny85 set as a processor 😞

      posted in Hardware
      tlustoch
      tlustoch
    • RE: 💬 Touch Display Scene Controller

      @mfalkvidd
      See http://nailbuster.com/?page_id=341
      resp. https://www.mysensors.org/build/esp8266_gateway
      As far as I know SPI pins MOSI, MISO, SCK may be shared, just CS must be independent for each device (we need 3 CS - display, touch screen and radio ) so we will use just 6 data pins.
      Of course further testing is needed (my hw not arrived yet so I cannot do it now).

      On the other hand, radio may be omitted as the scene controller may be attached over WiFi. Moreover, running esp8266 + TFT display on batteries is not too practical.
      Thus, radio is no needed unless we want to use scene controller as a gateway.

      posted in Announcements
      tlustoch
      tlustoch
    • RE: 💬 Touch Display Scene Controller

      Is there a simple way how to port it to ESP 8266?

      posted in Announcements
      tlustoch
      tlustoch
    • RE: 💬 FOTA (Wireless Programming)

      There is an ambiguity in documetation of MYSBootloader:

      1. On https://www.mysensors.org/download/sensor_api_20#configuration there is a Note: "You can still have OTA FW updates without external flash but it requires the MYSBootloader and disabled MY_OTA_FIRMWARE_FEATURE"
      2. Above on https://www.mysensors.org/about/ota#enabling-ota-in-your-sketch there is written: "To enable OTA in your sketch, you need to add #define MY_OTA_FIRMWARE_FEATURE"
        So, in the case of MYSBootloader (no external flash), what is correct (I suppose 2)?

      Two additional questions:
      Where is located MYSBootloader for MySensors 2.0?
      Is it usable with 8MHz internal clock config?

      Thanks for answer(s)

      posted in Announcements
      tlustoch
      tlustoch
    • RE: 💬 Very narrow and minimal switch node

      @GertSanders
      have you considered https://www.mysensors.org/about/ota MYSBootloader? It is announced to work without flash.

      posted in OpenHardware.io
      tlustoch
      tlustoch
    • RE: 💬 Very narrow and minimal switch node

      Another question: Is OTA sketch upload possible?

      posted in OpenHardware.io
      tlustoch
      tlustoch
    • RE: 💬 Very narrow and minimal switch node

      Hi, if external reset is not needed, why you do not short /RESET pin 1 directly to Vcc to avoid resets in noisy environments?

      posted in OpenHardware.io
      tlustoch
      tlustoch
    • RE: 💬 Raspberry PI NRF24l01+ hat

      Is there available Gateway 2.0 for Raspberry?

      posted in OpenHardware.io
      tlustoch
      tlustoch
    • RE: C.H.I.P.

      Yes, I completely understand.

      I am just pointing out the C.H.I.P. will be probably a good alternative to Raspberry Pi (Zero) running simultaneously the controller and the gateway.
      Total cost of all components in Pi case is a much higher than C.H.I.P. solution, see http://makezine.com/2015/11/28/chip-vs-pi-zero/ for the details (cca $25 in Pi case ; C.H.I.P. has onboard WIFi and storage included in its $9 price)

      Even as an alternative to ESP8266, it is just a few bucks more.

      The original reason why I was looking for such alternatives was, by the way, different: I am constructing an OpenTherm home heating boiler controller mysensor node and the flash size of Atmega 328 is too low for such special sensor. Any idea of nearly supported more powerful mysensor nodes?

      posted in Hardware
      tlustoch
      tlustoch
    • C.H.I.P.

      Is there any chance of using C.H.I.P. ($9 linux computer, see http://getchip.com/pages/chip ) as a gateway? Any plans? 🙂

      posted in Hardware
      tlustoch
      tlustoch
    • RE: [SOLVED] V_DIMMER broken

      Hi developers.
      I did a little debugging job, as you will see, missing \0 terminator is causing troubles.

      So, I used slightly modified incomingMessage() DimmableLight example (little bit more logging is here):

      void incomingMessage(const MyMessage &message)
      {
        if (message.type == V_LIGHT) {
          Serial.print( "V_LIGHT command received. Value is " );
          Serial.println( message.data  );
          
          int lstate= atoi( message.data );
          Serial.print( "V_LIGHT new state: " );
          Serial.println( lstate );
          
          if ((lstate<0)||(lstate>1)) {
            Serial.println( "V_LIGHT data invalid (should be 0/1)" );
            return;
          }
          LastLightState=lstate;
          gw.saveState(EPROM_LIGHT_STATE, LastLightState);
          
          if ((LastLightState==LIGHT_ON)&&(LastDimValue==0)) {
             //In the case that the Light State = On, but the dimmer value is zero,
             //then something (probably the controller) did something wrong,
             //for the Dim value to 100%
            LastDimValue=100;
            gw.saveState(EPROM_DIMMER_LEVEL, LastDimValue);
          }
          
          //When receiving a V_LIGHT command we switch the light between OFF and the last received dimmer value
          //This means if you previously set the lights dimmer value to 50%, and turn the light ON
          //it will do so at 50%
        }
        else if (message.type == V_DIMMER) {
          Serial.print( "V_DIMMER command received. Value is " );
          Serial.println( message.data  );
          int dimvalue= atoi( message.data );
          Serial.print( "V_DIMMER new state: " );
          Serial.println( dimvalue );
          if ((dimvalue<0)||(dimvalue>100)) {
            Serial.println( "V_DIMMER data invalid (should be 0..100)" );
            return;
          }
          if (dimvalue==0) {
            LastLightState=LIGHT_OFF;
          }
          else {
            LastLightState=LIGHT_ON;
            LastDimValue=dimvalue;
            gw.saveState(EPROM_DIMMER_LEVEL, LastDimValue);
          }
        }
        else {
          Serial.println( "Invalid command received..." );  
          return;
        }
      

      I sent messages 34%, 100%, 49% and 0% to the node.
      The log is here:

      send: 31-31-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0,st=ok:0
      send: 31-31-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=ok:1.5.3
      send: 31-31-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
      read: 0-0-31 s=255,c=3,t=6,pt=0,l=1,sg=0:M
      send: 31-31-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0,st=ok:0
      send: 31-31-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=ok:1.5.3
      send: 31-31-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
      sensor started, id=31, parent=0, distance=1
      send: 31-31-0-0 s=255,c=3,t=11,pt=0,l=13,sg=0,st=ok:Dimable Light
      send: 31-31-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.0
      send: 31-31-0-0 s=1,c=0,t=4,pt=0,l=0,sg=0,st=ok:
      Light state: OFF
      send: 31-31-0-0 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:0
      Node ready to receive messages...
      read: 0-0-31 s=1,c=1,t=3,pt=0,l=2,sg=0:34
      V_DIMMER command received. Value is 340able Light
      V_DIMMER new state: 340
      V_DIMMER data invalid (should be 0..100)
      read: 0-0-31 s=1,c=1,t=3,pt=0,l=3,sg=0:100
      V_DIMMER command received. Value is 100able Light
      V_DIMMER new state: 100
      Light state: ON, Level: 100
      send: 31-31-0-0 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:100
      read: 0-0-31 s=1,c=1,t=3,pt=0,l=2,sg=0:49
      V_DIMMER command received. Value is 490able Light
      V_DIMMER new state: 490
      V_DIMMER data invalid (should be 0..100)
      read: 0-0-31 s=1,c=1,t=3,pt=0,l=1,sg=0:0
      V_DIMMER command received. Value is 090able Light
      V_DIMMER new state: 90
      Light state: ON, Level: 90
      send: 31-31-0-0 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:90
      

      Look for "V_DIMMER command received. Value is ..." lines. Makes a sense?

      I am not ready to update my 1.5 gateway now, sorry. If this is a problem, I can do it in a few weeks.
      HB

      posted in Bug Reports
      tlustoch
      tlustoch
    • RE: [SOLVED] V_DIMMER broken

      Yes, it works correctly when the above code is put back in the (node's) MySensor.cpp.

      My gateway's version is 1.5. I may try to upgrade, but not right now (in a few days).

      I will post a log but later (within a few hours), if you will be still interested.

      Do I understand well that you have not any troubles with DimmableLight example in version 1.5.3?

      posted in Bug Reports
      tlustoch
      tlustoch
    • [SOLVED] V_DIMMER broken

      Hi developers,
      V_DIMMER=V_PERCENTAGE is not working properly.

      You can try DimmableLight example and send several V_DIMMER messages (try for example send values 57 and 0 and see what is resulting state) to see the problem.

      After little research, I found that since commit b0ef810 (one commit before v. 1.5.2)
      the was removed a chunk of code in MySensor.cpp around line 588

      // Add string termination, good if we later would want to print it.
      	msg.data[mGetLength(msg)] = '\0'; 
      

      When I put this piece of code back, V_DIMMER is working again.
      Sincerely
      Hynek Baran

      posted in Bug Reports
      tlustoch
      tlustoch
    • RE: Where do I find Serial Gateway for Raspberry?

      I ment SerialGateway to be run on Raspberry Pi.

      posted in Development
      tlustoch
      tlustoch
    • Where do I find Serial Gateway for Raspberry?

      Hi, sorry for stupid question, but:
      Where to find the Serial Gateway library source code?

      posted in Development
      tlustoch
      tlustoch
    • RE: DHT22 lib working on 1Mhz?

      Sorry for a stupid question, but how do you run at 1 Mhz?
      See http://www.mysensors.org/hardware/micro#comment-2196823229
      Are you able to switch to 1 Mhz at runtime?

      posted in Development
      tlustoch
      tlustoch