Navigation

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

    pelnarp

    @pelnarp

    0
    Reputation
    11
    Posts
    238
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    pelnarp Follow

    Best posts made by pelnarp

    This user hasn't posted anything yet.

    Latest posts made by pelnarp

    • RE: Issues reading from serial gateway

      Ok, I have figured this out. When sending the value via the serial port there must be a delay between the characters (3ms). Therefore I do something like this (schematically), which works:

      foreach (char c in "255;255;3;0;4;1")
      {
      serialPort1.Write(c.ToString());
      Thread.Sleep(3);
      }

      posted in Development
      pelnarp
      pelnarp
    • RE: Issues reading from serial gateway

      I am trying to send the values, but nothing happens. I am sending "255;255;3;0;4;1\n" over serial port (USB) to the serial gateway, but this does not seem to be processed. Either it is not sent to the sensor at all, or the sensor does not react. I am trying to send this from either Serial Monitor in the Arduino Studio or from my C# code, console app. The serial port works and reads the values properly, however sending this sequence seems to be an issue.

      posted in Development
      pelnarp
      pelnarp
    • RE: Issues reading from serial gateway

      Hi, I have read the whole API documentation but still do not seem to find the way to configure the node ID. I have found this topic http://forum.mysensors.org/topic/350/problems-getting-sensorid/11 but sending the command "255;255;3;0;4;1" to the node did not help though. I would appreciate any hints on this topic. Thank you!

      posted in Development
      pelnarp
      pelnarp
    • RE: Issues reading from serial gateway

      Thank you for pointing me to this direction. Happy New Year!

      posted in Development
      pelnarp
      pelnarp
    • RE: Issues reading from serial gateway

      Thank you for the response, however it does not make sense to me. How would it be possible for a controller to assign the ID? There must be some set of commands (API) on the node that are used by the controllers to assign the node ID's, right? I basically want to write a code that will act as a controller in terms of assigning the ID's to the nodes. Is this possible?
      Thanks!

      posted in Development
      pelnarp
      pelnarp
    • RE: Issues reading from serial gateway

      I see, great, thank you! Is there a way how to assign the ID of the node from outside, without a controller? Let's say, there will be a number of nodes, sensors being turned on or off and the ID's should be assigned using the serial gateway from the connected PC. I guess this is what the controllers must be doing, I just want to control it myself.
      Thank you

      posted in Development
      pelnarp
      pelnarp
    • Issues reading from serial gateway

      Hi all,

      I am trying to setup a simple example. I use 2 Pro Mini with NRF24L01 to create simple binary sensor and serial gateway. I read the output from the serial gateway but the values read are not changing when the switch is toggled.
      The sensor uses this simple code: http://www.mysensors.org/build/binary#binaryswitchsensor-example
      And gateway is this: http://www.mysensors.org/build/serial_gateway No modifications to any of them. I do not use any controller, I was to de-serailize the output from the serial port myself on a PC for now.

      I have the output from the serial monitor which is following for the sensor and serial gateway:

      door sensor:
      req id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
      sensor started, id=255, parent=0, distance=1
      req id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
      req id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
      req id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
      req id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:

      serial gateway:
      0;0;3;0;9;gateway started, id=0, parent=0, distance=0
      0;0;3;0;14;Gateway startup complete.
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;

      I have searched this forum and is seems the issue might be the sensor trying to get the ID (as per the "req id" output). Any idea how to fix this?

      Thanks!

      posted in Development
      pelnarp
      pelnarp
    • RE: Send data to internet (REST API, other?)

      Many thanks for sharing, much appreciated!

      posted in Development
      pelnarp
      pelnarp
    • RE: Send data to internet (REST API, other?)

      Hi barduino,
      Thank you for your response! Yes, an example would be very much appreciated. Does it mean you have this simple serial gateway: http://www.mysensors.org/build/serial_gateway? and run the NodeJS program on the computer it is connected to? What do you use to read from serial gateway and send to REST API, RPi?

      posted in Development
      pelnarp
      pelnarp
    • RE: Send data to internet (REST API, other?)

      Thanks for your swift advice! Does it mean you hacked the GatewayUtil.h of the EthernetGateway code from GitHub to send the data to REST API?

      posted in Development
      pelnarp
      pelnarp