Navigation

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

    MrVince

    @MrVince

    2
    Reputation
    13
    Posts
    407
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    MrVince Follow

    Best posts made by MrVince

    • MySensors controller with Rasberry Pi 3 & Windows IoT

      Hi everyone !

      For my studies, I choose to create a "home monitoring" project. My project need to request a many informations like temperature, .. via a gateway using mysensor API. My controller need to be on Windows IoT (C#) and I need to write all the informations in database. So, everything is good except one thing.

      After searching a looooong time i'm blocked !

      I want to create my own controler working on Rpi with IoT (C#) but I don't know how send message to my gateway in serial USB. I found nothing about how to send request.

      I want to know how send request from my controller to my gateway. I can use an external API to do that, but I don't know what ><

      Please, someone can help me?

      Thank you 🙂

      PS : Sorry if my english is too bad, I'm a french guy !

      posted in Development
      MrVince
      MrVince
    • RE: MySensors controller with Rasberry Pi 3 & Windows IoT

      @sundberg84 It's work ! Thank you 🙂

      posted in Development
      MrVince
      MrVince

    Latest posts made by MrVince

    • RE: Connection ok but no comunication

      I try 2 power supplies, and I put the radio far away from it.

      And I use a decoupling capacitor like says in "Connecting the radio" page

      I don't understand what happend wrong with the log, can you explain me? Thank's

      posted in Troubleshooting
      MrVince
      MrVince
    • RE: Connection ok but no comunication

      Oh, when I plug a nano on computer with USB the GW connect without problem

      posted in Troubleshooting
      MrVince
      MrVince
    • RE: Connection ok but no comunication
      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0 - Henrik Ekblad
       *
       * DESCRIPTION
       * Example sketch showing how to control physical relays.
       * This example will remember relay state after power failure.
       * http://www.mysensors.org/build/relay
       */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_NRF5_ESB
      //#define MY_RADIO_RFM69
      //#define MY_RADIO_RFM95
      
      // Enable repeater functionality for this node
      #define MY_REPEATER_FEATURE
      
      #include <MySensors.h>
      
      #define RELAY_PIN 4  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
      #define NUMBER_OF_RELAYS 2 // Total number of attached relays
      #define RELAY_ON 1  // GPIO value to write to turn on attached relay
      #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
      
      
      void before()
      {
          for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) {
              // Then set relay pins in output mode
              pinMode(pin, OUTPUT);
              // Set relay to last known state (using eeprom storage)
              digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
          }
      }
      
      void setup()
      {
      
      }
      
      void presentation()
      {
          // Send the sketch version information to the gateway and Controller
          sendSketchInfo("Relay", "1.0");
      
          for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) {
              // Register all sensors to gw (they will be created as child devices)
              present(sensor, S_BINARY);
          }
      }
      
      
      void loop()
      {
      
      }
      
      void receive(const MyMessage &message)
      {
          // We only expect one type of message from controller. But we better check anyway.
          if (message.type==V_STATUS) {
              // Change relay state
              digitalWrite(message.sensor-1+RELAY_PIN, message.getBool()?RELAY_ON:RELAY_OFF);
              // Store state in eeprom
              saveState(message.sensor, message.getBool());
              // Write some debug info
              Serial.print("Incoming change for sensor:");
              Serial.print(message.sensor);
              Serial.print(", New status: ");
              Serial.println(message.getBool());
          }
      }```
      posted in Troubleshooting
      MrVince
      MrVince
    • Connection ok but no comunication

      Hi everyone 🙂

      I've build a relay to control my Senseo. All seems ok, I power the arduino/relay with a 5V transfo from USB charger, all seems ok, my arduino was add by the GW, but i can't send order to it.

      See below my log

      Tue Jan 09 2018 14:06:48 GMT+0100 (CET) : 0;255;3;0;9;TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Tue Jan 09 2018 14:06:48 GMT+0100 (CET) : 0;255;3;0;9;TSF:MSG:BC
      Tue Jan 09 2018 14:06:48 GMT+0100 (CET) : 0;255;3;0;9;TSF:MSG:FPAR REQ,ID=5
      Tue Jan 09 2018 14:06:48 GMT+0100 (CET) : 0;255;3;0;9;TSF:CKU:OK,FCTRL
      Tue Jan 09 2018 14:06:48 GMT+0100 (CET) : 0;255;3;0;9;TSF:MSG:GWL OK
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;9;!TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;9;TSM:INIT
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;9;TSF:WUR:MS=0
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;9;TSM:INIT:TSP OK
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;9;TSM:INIT:GW MODE
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;9;MCO:REG:NOT NEEDED
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;14;Gateway startup complete.
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;0;0;18;2.1.1
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;9;MCO:BGN:STP
      Tue Jan 09 2018 14:06:49 GMT+0100 (CET) : 0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
      

      Oh, and when I send a request, I see that :

      Tue Jan 09 2018 16:48:38 GMT+0100 (CET) : 5;1;1;1;2;1
      Tue Jan 09 2018 16:48:39 GMT+0100 (CET) - Server connected
      Tue Jan 09 2018 16:48:39 GMT+0100 (CET) - Response: 5;1;1;1;2;1
      Tue Jan 09 2018 16:48:39 GMT+0100 (CET) - Connexion closed
      Tue Jan 09 2018 16:48:39 GMT+0100 (CET) : 0;255;3;0;9;TSF:MSG:SEND,0-0-5-5,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
      Tue Jan 09 2018 16:48:39 GMT+0100 (CET) : 0;255;3;0;9;TSF:MSG:READ,5-5-0,s=1,c=1,t=2,pt=0,l=1,sg=0:1
      Tue Jan 09 2018 16:48:39 GMT+0100 (CET) : 0;255;3;0;9;TSF:MSG:ACK
      

      Thanks for your help, and happy new year 🙂

      posted in Troubleshooting
      MrVince
      MrVince
    • RE: MySensors controller with Rasberry Pi 3 & Windows IoT

      @gohan ok

      I understand for the controller, but I think I miss something about the ID_RESPONSE

      Imagine this situation:

      I have just one sensor with no ID
      The GW send me (the controller) : '255;255;3;0;3;' // Sensor want a node_ID
      If I want to give it the ID 1, what I need to send to the gw? I think something like '255;255;3;0;4;1', that's right?

      EDIT : I try and it's work now, but I need to clear EEPROM first

      posted in Development
      MrVince
      MrVince
    • RE: MySensors controller with Rasberry Pi 3 & Windows IoT

      Hi everyone !

      Let's do a check up :

      • Read from a GW in serial connection : ok
      • Read information when I give a static ID : ok
      • Find a node who want an ID : ok
      • Give an ID to a node with my controller : nope

      So, the question is, if I receive '255;255;3;0;3;' my controller understand it's an ID_REQUEST and I need to use an ID_RESPONSE, but if I want to give an ID I need to build something like this :

      node-id ; child-sensor-id ; command ; ack ; type ; payload

      node-id : ??
      child-id : ??
      command : 3 for internal
      ack : 0 ?
      type : 4 for response
      payload : new ID (ex: 101)

      What are the node-id & child-id if the sensor doesn't have one?

      One more time, I want to thank's all of you, with your help it's more easier to understand and I start to see the end !

      EDIT : One more thing, I have an idea. I want to open a pop-up when a new sensor is on to choose for wich room is it.
      Can I give an temporary ID (like 254), wait for a first message with ID 254, with a first message I can see what type of sensor is, open a pop up, and give a new ID after I choose the room?

      posted in Development
      MrVince
      MrVince
    • RE: 💬 Air Humidity Sensor - DHT

      Hi ! Thank's for working 🙂
      I add the libraries in "MySensors external examples" to Arduino IDE but when I want to compile I have this one log error :

      DhtTemperatureAndHumiditySensor.ino:43:25: fatal error: MySensors.h: No such file or directory
      compilation terminated.

      In MySensors folder's libraries, I have a MySensor.h, without 's' . This is one? Do I forget something?

      Thanks

      posted in Announcements
      MrVince
      MrVince
    • RE: MySensors controller with Rasberry Pi 3 & Windows IoT

      @sundberg84 It's work ! Thank you 🙂

      posted in Development
      MrVince
      MrVince
    • RE: MySensors controller with Rasberry Pi 3 & Windows IoT

      Ok, if I right, there is a trouble with a motionsensor who want an ID ?

      Do I need to give it one, or it's done by a gateway?

      posted in Development
      MrVince
      MrVince
    • RE: MySensors controller with Rasberry Pi 3 & Windows IoT

      Hy everyone ! So, THIS IS WORKING ! Thanks a lot 🙂

      Now, new problemes ! (It's not funny without)

      I build a serial gateway and a motionsensor

      This is my log

      0_1496323093938_Screenshot_1.jpg image url)

      0;0;3;0;9 -> ok it's a gateway init
      0;0;3;0;14 -> gateway is ready

      but, what is the next one? Normally I will receive just x;x;x;x;x; right? what's about read: 255-255....

      Thank you 🙂

      posted in Development
      MrVince
      MrVince