Navigation

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

    Posts made by gvorster

    • RE: ๐Ÿ’ฌ Connecting the Radio

      @manutremo said in ๐Ÿ’ฌ Connecting the Radio:

      I have one question regarding the length of the 868MHz antenna. According to the theory, a the wavelength of a 868Mhz signal is 300/868 = 34.6 mm, so a quarter wave antenna should be 8.6mm long. The table above indicates 8.2mm. May someone confirm the correct figure, and also indicate how critical is that difference in terms of range?

      I tried 3 types of antennas with RFM69HCW 868mhz.

      1. Just a 8.6 cm wire

      2. helical antenna

      alt text

      1. sma antenna

      alt text

      Indoor in my appartement (one floor) it doesn't matter which one I use. All is working fine.
      I tried 2 nodes in my metal mailbox 10 meters below which has 2 tiny holes.
      One with helical antenna, one with sma antenna.

      Gateway (using sma antenna) receives no data.

      Testing two repeater nodes (1 helical, 1 sma antenna) near a window I receive data via both repeaters. Sometimes the repeater with sma antenna is not relaying messages for the node with the sma antenna.

      In my situation, the helical antenna works better for me. I just buy them on ebay.

      posted in Announcements
      gvorster
      gvorster
    • RE: MQTT/Ethernet Gateway using Leonardo(32u4), W5100, RFM69H, Hard SPI

      @Carywin Thanks for the instructions!!

      I followed it and just got it working on a Leonardo clone. I am receiving messages from nodes on the Mosquitto broker on a Raspberry Pi.

      0;255;3;0;9;TSF:MSG:SEND,0-0-51-213,s=213,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=OK:10280
      0;255;3;0;9;Sending message on topic: sensors-out/213/213/1/0/23
      0;255;3;0;9;TSF:MSG:READ,213-51-0,s=213,c=1,t=23,pt=2,l=2,sg=0:10281
      0;255;3;0;9;TSF:MSG:ACK REQ
      0;255;3;0;9;TSF:MSG:SEND,0-0-51-213,s=213,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=OK:10281
      0;255;3;0;9;Sending message on topic: sensors-out/213/213/1/0/23
      0;255;3;0;9;TSF:MSG:READ,207-51-0,s=207,c=1,t=23,pt=2,l=2,sg=0:21655
      0;255;3;0;9;TSF:MSG:ACK REQ
      0;255;3;0;9;TSF:MSG:SEND,0-0-51-207,s=207,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=OK:21655
      0;255;3;0;9;Sending message on topic: sensors-out/207/207/1/0/23
      0;255;3;0;9;TSF:MSG:READ,213-51-0,s=213,c=1,t=23,pt=2,l=2,sg=0:10282
      0;255;3;0;9;TSF:MSG:ACK REQ
      
      mosquitto_sub -v -t 'sensors-out/#' -u XXXXXXX -P XXXXXXX
      sensors-out/0/255/0/0/18 2.1.1
      sensors-out/0/255/0/0/18 2.1.1
      sensors-out/213/213/1/0/23 10217
      sensors-out/208/208/1/0/0 24.69
      sensors-out/213/213/1/0/23 10218
      sensors-out/213/213/1/0/23 10219
      sensors-out/213/213/1/0/23 10220
      sensors-out/213/213/1/0/23 10221
      sensors-out/213/213/1/0/23 10222
      sensors-out/213/213/1/0/23 10223
      sensors-out/208/208/1/0/0 24.69
      sensors-out/213/213/1/0/23 10224
      

      I am using Mysensors 2.1.1. and didn't need to do anything on the nodes.

      Never worked with a Leonardo and spend a lot of time getting the serial port working on Win7. Also need to press reset everytime right before uploading a sketch.

      Also need to add:

      void setup() {
          while (!Serial) {;}
      }
      

      otherwise Serial monitor shows nothing.

      posted in My Project
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Serial Protocol - 2.x

      @siod said in ๐Ÿ’ฌ Serial Protocol - 2.x:

      @gvorster Thank you for explanation!

      One more thing: I wanted to implement a sendHeartbeat() into a Repeater node (which should never sleep!), where should I put this function and how? When putting it just into the loop it is of course spamming my gateway with heartbeat messages...Is it possible anyway?

      There are many examples code how to do this. One Timer library I use myself is this https://playground.arduino.cc/Code/Timer

      e.g. for a repeater you could use this:

      #include "Timer.h"
      
      Timer t;
      
      void setup() {
          t.every(60000, sendImAlive);
      }
      
      void loop() {
          t.update();
      }
      
      void sendImAlive() {
          sendHeartbeat();
      }
      
      posted in Announcements
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Serial Protocol - 2.x

      @siod said in ๐Ÿ’ฌ Serial Protocol - 2.x:

      how can I handle sendheartbeat() messages in my controller? What payload will be sent? 1 or 0, True or False...?

      ps Iยดm using openhab

      I just tested this using a Serial gateway.

      Sending sendHeartbeat() from node displays this on my Serial gateway:

      ...
      214;255;3;0;22;73
      214;255;3;0;22;108
      214;255;3;0;22;143
      ...
      

      3=internal message
      0=nack
      22=I_HEARTBEAT_RESPONSE

      In MyTransport.cpp I found

      uint32_t transportGetHeartbeat(void)
      {
      	return transportTimeInState();
      }
      
      ---
      
      uint32_t transportTimeInState(void)
      {
      	return hwMillis() - _transportSM.stateEnter;
      }
      

      So the payload is some elapsed time in milliseconds.

      posted in Announcements
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Serial Protocol - 2.x

      @mfalkvidd said in ๐Ÿ’ฌ Serial Protocol - 2.x:

      @gvorster see https://forum.mysensors.org/post/43373

      Thanks, got it now.

      posted in Announcements
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Serial Protocol - 2.x

      Where can I find the structure for the payload of the internal command I_LOG_MESSAGE ? e.g. payload "TSF:MSG:SEND,211-0-220-220,s=211,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=OK:69"
      I know I'm sending a value from node 211 to node 220 with the value 69. What does c=1, t=23, pt=2, l=2, sg=0,ft=0 mean?

      posted in Announcements
      gvorster
      gvorster
    • RE: Signing fails with V2.1

      I am using MySensors 2.1.1 and see a lot of these messages

      0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
      

      As a test I use 2 nodes with this same sketch:

      #include "arduino.h"
      #include <OneWire.h>
      #include <DallasTemperature.h>
      
      #define ONE_WIRE_BUS 5
      OneWire oneWire(ONE_WIRE_BUS);
      DallasTemperature sensors(&oneWire);
      
      #define MY_DEBUG 
      
      #define MY_RADIO_RFM69
      #define MY_IS_RFM69HW
      
      #define MY_NODE_ID 11     // node 1
      //#define MY_NODE_ID 12  // node 2
      
      #define MY_DEFAULT_ERR_LED_PIN 9  
      #define MY_DEFAULT_RX_LED_PIN  8  
      #define MY_DEFAULT_TX_LED_PIN  7 
      #define MY_DEFAULT_LED_BLINK_PERIOD 20
      
      #define MY_SIGNING_SOFT
      #define MY_SIGNING_SOFT_RANDOMSEED_PIN 3
      #define MY_SIGNING_REQUEST_SIGNATURES
      
      #include <MySensors.h>
      
      MyMessage msg(MY_NODE_ID, V_TEMP);
      
      void presentation()
      {
      	sendSketchInfo("Test temperature node", "1.0");
      	present(MY_NODE_ID, S_TEMP);
      }
      
      void setup()
      {
      	sensors.begin();
      }
      
      void loop()
      {
        sensors.requestTemperatures();
        send(msg.set(sensors.getTempCByIndex(0), 2));
      
        sleep(1000);
      }
      

      I use this serial gateway:

      #define MY_DEBUG
      
      #define MY_SIGNING_SOFT
      #define MY_SIGNING_SOFT_RANDOMSEED_PIN 3
      #define MY_SIGNING_REQUEST_SIGNATURES
      
      #define MY_RADIO_RFM69
      #define MY_IS_RFM69HW
      
      #define MY_GATEWAY_SERIAL
      
      #define MY_DEFAULT_LED_BLINK_PERIOD 10
      #define MY_DEFAULT_ERR_LED_PIN 5  
      #define MY_DEFAULT_RX_LED_PIN  6  
      #define MY_DEFAULT_TX_LED_PIN  7  
      
      #include <SPI.h>
      #include <MySensors.h>
         
      void setup() {}
      void presentation() {}
      void loop() {}
      

      If I comment this line in the gateway everything works fine:

      //#define MY_SIGNING_REQUEST_SIGNATURES
      

      I only see these error messages when I turn on both nodes.
      If I use either Node 1 or Node 2 and turn the other off, I don't see any of these error messages.

      The nodes and gateway are on my workbench close next to each other.
      For each I use a bare ATMEGA328P burned with bootloader Pro Mini 3.3v 8 mhz

      posted in Troubleshooting
      gvorster
      gvorster
    • RE: Raspberry PI + MQTT (Mosquitto) + Serial Gateway

      @catcher Thanks, I tried this Perl script and it is working out of the box with OpenHAB2! And I'm sending with MySensors 2.

      posted in General Discussion
      gvorster
      gvorster
    • RE: Raspberry PI + MQTT (Mosquitto) + Serial Gateway

      @catcher bit late, but do you have this serial to mqtt bridge working?
      I would like to use RFM69 radio's which I think don't have a direct MySensors MQTT gateway.
      I have the serial gateway working and can see data on a RasPi 3 via serial0.

      Would like to publish to OpenHab2 via MQTT so this bridge would be great if it works.

      posted in General Discussion
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Connecting the Radio

      @pepson said:

      Now any problem. I only need info how write sketch to use radio RFM69HW.

      Try the MockMySensors.ino sketch and enable a few sensors.

      posted in Announcements
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Connecting the Radio

      @pepson said:

      Hi
      how long is real range on radio RFM69HW ? It is better than NRF24L01 ?

      This post has some more info on this: Which is better: RFM69 or NRF24L01+

      I want to use these radio's indoors and need to have a good connection through a couple of thin walls. My impression is that the RFM69 has at least better wall penetration. I'm using the RFM69HCW 868Mhz with only a 82mm wire connected to the ANT pin.

      I tested the Mock sketch and enabled a few mock sensors. Throughout my appartment I have no problem having a good connection.

      But, there are fake NRF24L01+ chips out there which might be the cause of my penetration connections errors.

      I'm buying my RFM69 radio's from a reliable distributor in the Netherlands http://webshop.ideetron.nl/HopeRF

      posted in Announcements
      gvorster
      gvorster
    • RE: Choosing the right Controller

      What controller have you decided to use?
      I'm also deciding which controller to choose. I'm using Mysensors v2.
      Does PiDome/Domoticz/Openhab work with MySensors v2? Or should I use MySensors v1.5?

      posted in General Discussion
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Connecting the Radio

      @gvorster said:

      @mfalkvidd said:

      @gvorster 868 is the default so you don't need to do anything. If you want to change it, add

      #define MY_RFM69_FREQUENCY
      

      Great, thanks!

      I have a RFM69HCW and was getting a terrible connection from 5 meters through two thin walls.

      After using:

      #define IS_RFM69HW
      

      The connection and range is incredible!
      I live in an appartment 3rd floor, put a node in my mailbox which is 15 meters below and still got sensor data.
      This did not work for me before using NRF24L01+

      posted in Announcements
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Building an Ethernet Gateway

      @scalz said:

      @gvorster
      hello, i'm working on rfm69 (refactorization and adding features), which will support softspi and w5100, and uses a lot less memory. might be available soon.

      Great, looking forward to it!

      posted in Announcements
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Building an Ethernet Gateway

      Would like to use MQTT gateway using RFM69. The RFM69 cannot be used with W5100 because of soft-spi, is this still the case? Can it then be used with ENC28J60?

      posted in Announcements
      gvorster
      gvorster
    • RE: [SOLVED] Only TX led is blinking, ERR and RX led are alway on

      @Yveaux said:

      @gvorster could it be that the leds that are always on are connected inverted wrt the one that's working?
      What hardware are you using and how are the leds connected?

      Yes that's it I had it turned around.

      posted in Troubleshooting
      gvorster
      gvorster
    • RE: [SOLVED] Only TX led is blinking, ERR and RX led are alway on

      @gloob said:

      How are the leds connected to the arduino? Are the LEDs connected to ground or 5V?

      Ah, sorry my bad. That's it. I had it turned around.
      Should have rtfm:

      "Each LED is connected by its anode (long leg) to +5V. The cathode (short leg) is connected through a resistor to one of the following digital pins of the Arduino:"

      posted in Troubleshooting
      gvorster
      gvorster
    • RE: [SOLVED] Only TX led is blinking, ERR and RX led are alway on

      @Yveaux said:

      @gvorster could it be that the leds that are always on are connected inverted wrt the one that's working?
      What hardware are you using and how are the leds connected?

      I tested a blink sketch on all 3 pins and they are working.
      Also when I switch the pins to:

      #define MY_DEFAULT_ERR_LED_PIN 6 
      #define MY_DEFAULT_RX_LED_PIN    7 
      #define MY_DEFAULT_TX_LED_PIN    5
      
      or
      
      #define MY_DEFAULT_ERR_LED_PIN 5  
      #define MY_DEFAULT_RX_LED_PIN    7  
      #define MY_DEFAULT_TX_LED_PIN    6
      

      still only TX is blinking and other leds are always on.

      However I'm using a bare ATMEGA328P in QFP package running on the Arduino Pro Mini 3.3v 8mhz bootloader on a diy pcb board.

      I will try it later today on a Nano on breadboard.

      posted in Troubleshooting
      gvorster
      gvorster
    • [SOLVED] Only TX led is blinking, ERR and RX led are alway on

      I am using v2.0.0 in Arduino ide 1.6.5 and RFM69 radios.
      I am running MockMySensors example on the node and have the following defines:

      #define MY_LEDS_BLINKING_FEATURE
      #define MY_DEFAULT_ERR_LED_PIN 5  
      #define MY_DEFAULT_RX_LED_PIN    6  
      #define MY_DEFAULT_TX_LED_PIN    7 
      
      #include <MySensors.h>  
      

      In the terminal of the node I see these ok messages:

      #########################
      RandomNumber:58
      Send Battery Level
      TSP:MSG:SEND 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=ok:58
      Request Time
      TSP:MSG:SEND 254-254-0-0 s=255,c=3,t=1,pt=0,l=0,sg=0,ft=0,st=ok:
      Door is: Closed
      TSP:MSG:SEND 254-254-0-0 s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=ok:0
      System is: Armed
      TSP:MSG:SEND 254-254-0-0 s=1,c=1,t=15,pt=1,l=1,sg=0,ft=0,st=ok:1
      Temperature is: 25
      TSP:MSG:SEND 254-254-0-0 s=7,c=1,t=0,pt=4,l=4,sg=0,ft=0,st=ok:25
      TSP:MSG:SEND 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=ok:58
      #########################
      

      MY_DEFAULT_ERR_LED_PIN and MY_DEFAULT_RX_LED_PIN are always on and only MY_DEFAULT_TX_LED_PIN is blinking.

      Is this normal behaviour?

      posted in Troubleshooting
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Connecting the Radio

      @mfalkvidd said:

      @gvorster 868 is the default so you don't need to do anything. If you want to change it, add

      #define MY_RFM69_FREQUENCY
      

      Great, thanks!

      posted in Announcements
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Connecting the Radio

      I used RFM69 with Arduino before and a library where I have to initialize the radio with the frequency (868MHZ in my case) Does the mysensors library work for all frequencies of RFM69 without telling it which frequency to use?

      posted in Announcements
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Connecting the Radio

      Can I use a RFM69HCW as radio?

      posted in Announcements
      gvorster
      gvorster
    • RE: ๐Ÿ’ฌ Building a Raspberry Pi Gateway

      I'm a bit confused about gateway and controller. Can I use a Pi as both gateway and controller?

      posted in Announcements
      gvorster
      gvorster