Navigation

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

    Posts made by Mickey

    • RE: Esp32-cam with pan - Mysensors powered

      @franz-unix it really an overkill... you can use gpio from esp to control pan and tilt no need for atmega and nrf...

      posted in General Discussion
      Mickey
      Mickey
    • RE: Cheap dirty way to send a raw-mysensors message?

      @cimba007
      Can you post the complete code of the chirp including the headers?
      Did you only include these libraries:
      #include <SPI.h>
      #include "nRF24L01.h"
      #include "RF24.h"
      ?

      posted in Development
      Mickey
      Mickey
    • RE: GatewayESP8266MQTTClient with realtime connection params

      Is the
      "bcn_timout,ap_probe_send_start
      ap_probe_send over, rest wifi status to disassoc"

      message is a known issue? I cant seem to find anything with this string when searching this forum...

      posted in Development
      Mickey
      Mickey
    • RE: GatewayESP8266MQTTClient with realtime connection params

      So after seeing this post:
      https://forum.mysensors.org/topic/5533/esp8266-gw-node-mqtt-transport-won-t-present-sketch-or-actuator-to-controller

      I finally succeeded to change the GatewayESP8266MQTTClient that it can load connection parameters dynamicaly and also use smart config to send SSID and password to the ESP.(I using a android app I developped for it).
      This is the source code of GatewayESP8266MQTTClient:

      
      #include <EEPROM.h>
      #include <SPI.h>
      #include <ESP8266WiFi.h>
      #include <ESP8266WebServer.h>
      #include <ArduinoJson.h>
      #include <FS.h>
      
      const int button = 0;//button for reset config
      ESP8266WebServer server (80);
      File configFile;
      
      boolean configExist = false; 
      
      struct My_Config_t
      {
      String WLAN_STA_SSID = "";
      String WLAN_STA_PASSWD = "";
      String MQTT_Broker_FQDN = "";
      //IPAddress MQTT_Broker_IP;
      uint16_t MQTT_Broker_Port = 0;
      } My_Config;
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      //#define MY_DEBUG_VERBOSE
      //#define TRANSPORT_DEBUG
      
      // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
      #define MY_BAUD_RATE 9600
      
      // Enables and select radio type (if attached)
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      #define MY_GATEWAY_MQTT_CLIENT
      #define MY_GATEWAY_ESP8266
      
      // Set this nodes subscripe and publish topic prefix
      #define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
      #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
      
      // Set MQTT client id
      #define MY_MQTT_CLIENT_ID "mysensors-1"
      
      // Enable these if your MQTT broker requires usenrame/password
      //#define MY_MQTT_USER "username"
      //#define MY_MQTT_PASSWORD "password"
      
      // Set WIFI SSID and password
      #define MY_ESP8266_SSID (My_Config.WLAN_STA_SSID).c_str()
      #define MY_ESP8266_PASSWORD (My_Config.WLAN_STA_PASSWD).c_str()
      
      
      
      // MQTT broker ip address.  
      //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
      //#define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
      #define MY_CONTROLLER_URL_ADDRESS ((My_Config.MQTT_Broker_FQDN).c_str())
      
      // The MQTT broker port to to open 
      //#define MY_PORT 1883      
      #define MY_PORT (My_Config.MQTT_Broker_Port)
      
      
      bool loadConfig() {
        configFile = SPIFFS.open("/config.json", "r");
        if (!configFile) {
          return false;
        }
      size_t size = configFile.size();
        if (size > 1024) {
          Serial.println("Config file size is too large");
          return false;
        }
        // Allocate a buffer to store contents of the file.
        std::unique_ptr<char[]> buf(new char[size]);
        configFile.readBytes(buf.get(), size);
      
        StaticJsonBuffer<1024> jsonBuffer;
        JsonObject& json = jsonBuffer.parseObject(buf.get());
      
        if (!json.success()) {
          Serial.println("Failed to parse config file");
          return false;
        }
      
        char MQTTURL[40];
        char MQTTPORT[4];
        char wlan_sta_ssid[20];
        char wlan_sta_passwd[20];
      
        strcpy(wlan_sta_ssid, json["wlan_sta_ssid"]); 
        strcpy(wlan_sta_passwd, json["wlan_sta_passwd"]);
        strcpy(MQTTURL, json["mqttbrockerurl"]); 
        strcpy(MQTTPORT, json["mqttport"]);
      
        My_Config.WLAN_STA_SSID = String(wlan_sta_ssid); 
        My_Config.WLAN_STA_PASSWD = String(wlan_sta_passwd); 
        My_Config.MQTT_Broker_FQDN = String(MQTTURL);
        My_Config.MQTT_Broker_Port = String(MQTTPORT).toInt();
        configFile.close();
        jsonBuffer = StaticJsonBuffer<1024>();
      
      return true;
      }
      bool startSmartConfig()
       {
          WiFi.mode(WIFI_STA);
          delay(500);
          // Start SmartConfig if necessary
          WiFi.beginSmartConfig();
          while (WiFi.status() != WL_CONNECTED)
              {
                delay(500);
                Serial.print(".");
                if(WiFi.smartConfigDone())
                  Serial.println("smart Config Done");
              }
           WiFi.stopSmartConfig();
           delay(500);
           WiFi.begin();
           return true;
      }
      void handleJson() {
      
        StaticJsonBuffer<1024> newBuffer;
        JsonObject& newjson = newBuffer.parseObject(server.arg("plain"));
        server.sendHeader("Access-Control-Max-Age", "10000");
        server.sendHeader("Access-Control-Allow-Methods", "POST,GET,OPTIONS");
        server.sendHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
        if (!newjson.success()) {
          Serial.println("Failed to parse config file from handleJson 1");
          server.send ( 200, "text/json", "{success:false,deviceID:'none'}" );
        }
        else{
       configFile = SPIFFS.open("/config.json", "w");
             if (!configFile) {
            Serial.println("Failed to open config file for writing in handleJson 2");
            server.send ( 200, "text/json", "{success:false,deviceID:'none'}" );
              }
              else{
             newjson.printTo(configFile);
             configFile.close();
             //server.send ( 200, "text/json", "{success:true,deviceID:'bla'}" );*/
             server.send ( 200, "text/json", "{ \"success\": \"OK\",\"deviceID\": \""+String(MY_MQTT_CLIENT_ID)+"\" }" );
             newBuffer = StaticJsonBuffer<1024>();
             }
        
        }
      }
      void startConfigWebServer()
        {
        server.on("/json",handleJson);
        server.begin(); // Web server start
        Serial.println("HTTP server started");
        }
      
      #include <MySensors.h>
      
      
      void before() {
      Serial.println("Resetting WiFi credentials");
      WiFi.disconnect();
      ESP.eraseConfig();
      //spi_flash_erase_sector(0x7e);
      if (!SPIFFS.begin()) {
          Serial.println("Failed to mount file system");
        }
        if(!loadConfig())
        {
            if(startSmartConfig())
            {
              startConfigWebServer();
              server.handleClient();
            }
            while(!loadConfig())
        {
            server.handleClient();
        }
        delay(2000);
        server.stop();
        WiFi.disconnect();
        ESP.eraseConfig();
      //  spi_flash_erase_sector(0x7e);
        //loadConfig();
        SPIFFS.end();
        ESP.reset();
        }
        else{Serial.println("Config loaded...");
        delay(2000);
        }
      
        server.stop();
        WiFi.disconnect();
        ESP.eraseConfig();
      //  spi_flash_erase_sector(0x7e);
        //loadConfig();
        SPIFFS.end();
        //ESP.reset();
      }
      
      void setup() { 
        ESP.wdtDisable();
        pinMode( button, INPUT_PULLUP );
        digitalRead(button) == HIGH;
      }
      
      void presentation() {
        // Present locally attached sensors here    
      }
      
      
      void loop() {
        ESP.wdtDisable();
        //Serial.println("inside loop");
        if ( digitalRead(button) == LOW ) {
          Serial.println("Resetting WiFi credentials");
          SPIFFS.begin();
          SPIFFS.remove("/config.json");
          SPIFFS.end();
          WiFi.disconnect();
          ESP.eraseConfig();
          spi_flash_erase_sector(0x7e);
          configExist = false;
          ESP.restart();
          }
         //Send locally attech sensors data here
      }
      
      
      

      So after a some time I get this esp reset (I tried to put ESP.wdtDisable(); in loop)
      this is the serial output:

      connected with MYSSID, channel 1
      dhcp client start...
      ..ip:192.168.0.113,mask:255.255.255.0,gw:192.168.0.1
      .IP: 192.168.0.113
      0;255;3;0;9;MCO:BGN:STP
      0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
      IP: 192.168.0.113
      0;255;3;0;9;Attempting MQTT connection...
      0;255;3;0;9;MQTT connected
      0;255;3;0;9;Sending message on topic: mygateway1-out/0/255/0/0/18
      pm open,type:2 0
      

      but after a few seconds (mainly after a message is sent from a sensor...but not only . if I send a message from broker that is not sending via radio to sensor its more stable ) I getting this:

      bcn_timout,ap_probe_send_start
      ap_probe_send over, rest wifi status to disassoc
      state: 5 -> 0 (1)
      rm 0
      pm close 7
      ?)�‏L®‎D‚
      

      And its seems that the ESP is resetting itself...
      What do you think I can do to make this more stable? maybe add "__yield" some where? (I think to adding of ESP.wdtDisable helped a little at list the reset is with out the long stack message...)

      posted in Development
      Mickey
      Mickey
    • RE: ESP8266 GW+Node (MQTT Transport): Won't Present Sketch or Actuator To Controller

      @non_avg_joe
      In the section where needed to populate the params from SPIFFS

      // Here to be the reading of a json/cbor object from a file on a local storage (e.g. : SPIFFS over Serial NVRAM) & the parsing of it into the My_Config struct
      
      My_Config.WLAN_STA_SSID = "My-WLAN";
      My_Config.WLAN_STA_PASSWD = "My-Passwd";
      My_Config.MQTT_Broker_FQDN = "hercules.local";
      
      

      Did you ever got to implement this section?

      posted in Troubleshooting
      Mickey
      Mickey
    • RE: Gateway to hands out node ID's

      So I went and change the MyTransport.cpp file and added a few lines around line 740:

      		uint8_t currentID;
      		#if defined(MY_GATEWAY_FEATURE)
      			if (type == I_ID_REQUEST) {
      				currentID = hwReadConfig(0X123); //Read first byte of free conf eeprom space
      				if(currentID==0xFF)//check to see if it was never changed (255)...
      				{currentID = 1;}
      				_msg.set(currentID);
      				if(transportSendWrite(0xFF,_msg))
      				{
      				hwWriteConfig(0X123,currentID+1)
      				}
      			}
      			else
      			// Hand over message to controller
      

      But the sensor still requesting an ID without getting it...

      posted in Development
      Mickey
      Mickey
    • RE: Gateway to hands out node ID's

      @hek said:

      Why pass it to the sketch? You could implement the id-handout directly in core (I pointed out the area where internal messages directed to the node is processed).

      To mess with core as little as I could so it can be easy upgradable in future (I already altered the MyGatewayTransportMQTTClient.cpp to support using dynamic connection parameters instead hard coded , I don't want to alter a lot of core files but if it necessary I will...)

      posted in Development
      Mickey
      Mickey
    • RE: Gateway to hands out node ID's

      @hek said:

      Internal messages does not get exposed in the receive() function of the sketch.

      To archive this you would have to modify the core somewhere here:
      https://github.com/mysensors/MySensors/blob/development/core/MyTransport.cpp#L706

      Thanks for answer.
      I tried to figure where I change the internal msg type to be exposed to GW in the MyTransport.cpp around line 706 but can't seems to find it...

      posted in Development
      Mickey
      Mickey
    • RE: Gateway to hands out node ID's

      @sundberg84 it's need to be automatic. Fix id is easy to implement but because there will be an unknown number of nodes than I cannot use fix id's...

      posted in Development
      Mickey
      Mickey
    • RE: Gateway to hands out node ID's

      @tbowmo said:

      This is not implemented in the gateway code, as it's "always" been the job of the attached controller.

      I know it's "always" been the job of the attached controller but I have a scenario that the mqtt gateway will send directly to a cloud broker and an app that will receive it without any controller on the way. one problem I facing is the nodes id handing...so my question is if I would like to implement this in the GatewayESP8266MQTTClient.ino file is it possible?(check for incoming id request and 255 id number and saving current id handed in gateway eeprom etc...)

      posted in Development
      Mickey
      Mickey
    • Gateway to hands out node ID's

      Hi
      Is it even possible to implement that Gateway will hands out node ID's ?(something simple like store the assigned id's in eeprom and hand out what is not assigned...)

      posted in Development
      Mickey
      Mickey
    • RE: GatewayESP8266MQTTClient with realtime connection params

      So I saw that I cannot use WIFI object out side setup and also if I take all the web based parameters configuration code to a separate library its not so different because library initiation can be done only in setup function also.
      So I'm trying to include an ordinary cpp code that will perform this before #include <MySensors.h> and before setup. So how do I go and do that should I include the cpp file in the ino file or do I do it like an ordinary library and only include the .h file?

      Also I had another problem
      @hek said:

      strcpy(myTopicPrefix, <something>);

      So if I implement this code :

      String uniqueID = (String)ESP.getChipId();
      #define MY_MQTT_CLIENT_ID uniqueID
      char mqtt_username[20];
      char mqtt_password[20];
      strcpy(mqtt_username, json["mqttusername"]); 
      strcpy(mqtt_password, json["mqttpassword"]); 
      #define MY_MQTT_USER mqtt_username
      #define MY_MQTT_PASSWORD mqtt_password
      
      I keep getting this error:
      error: no matching function for call to 'PubSubClient::connect(String&, char [20], char [20])'
      candidates are:
      boolean PubSubClient::connect(const char*, const char*, const char*)
      

      Is it mean that I can only use const variables and thus cannot put dynamic parameters that I will get from user at run time?

      ***EDIT
      I finally change the MyGatewayTransportMQTTClient.cpp without really touching the ino file...

      posted in Development
      Mickey
      Mickey
    • RE: GatewayESP8266MQTTClient with realtime connection params

      I included whats need to be included and this variable known when it is inside setup function but I need to call it before setup().

      EDIT
      @hek I trying to implement your suggested pseudo code but in an ordinary esp8266 sketch WIFI object is only recognizable in the setup function and on but in the GatewayESP8266MQTTClient.ino the setup is empty and the WIFI object becoming recognizable somewhere in the core code long before the main sketch setup function.
      I see that it is put to use already in MyGatewayTransportMQTTClient.cpp and MyGatewayTransportEthernet.cpp but in order to receive the mqtt params from user I need to use the WIFI object before including MySensors (#include <MySensors.h>) much like it is being done by the core.(to use the WIFI object it is not enough to include <ESP8266WiFi.h> but also to initiate it in setup).

      So how it is done in the core? what one need to include/implement in order to use WIFI in the GatewayESP8266MQTTClient.ino before including <MySensors.h> and before the setup function.

      Hope I made myself clear enough ...
      thanks

      posted in Development
      Mickey
      Mickey
    • RE: GatewayESP8266MQTTClient with realtime connection params

      Hi
      So I change the order of the core code as I mention and all the WIFI connection is done before the main sketch setup function instead off the MyGatewayTransportMQTTClient.cpp file.
      But when I try to use:
      WiFi.mode(WIFI_STA);
      or
      WiFi.hostname(MY_ESP8266_HOSTNAME);
      or
      WiFi.begin();
      before the setup function I keep getting:
      error: 'WiFi' does not name a type.
      Can I take WIFI.begin() before setup ? (the original core code seems to do it... )

      posted in Development
      Mickey
      Mickey
    • GatewayESP8266MQTTClient with realtime connection params

      Hi
      I would like to alter GatewayESP8266MQTTClient.ino a bit to be able to transfer mqtt broker connection params from an HTML5 app I developed.
      I altered the core code in the file MyGatewayTransportMQTTClient.cpp to enable SMARTCONFIG:
      WiFi.beginSmartConfig();
      To be able to transfer the SSID and PASS dynamically from the app.

      All the other params(server IP, user/password for MQTT broker etc.) I would send from the app with JSON and the GATEWAY will save them to local storage (the ESP-12 have 4mb for storage).
      I do not want to alter core files too much and would like to implement all of the above in the ino file as much as I can.(with the smart config option I didn't see a way other than altering the MyGatewayTransportMQTTClient file.)

      The MyGatewayTransportMQTTClient file looks for defined variables to function but I need to change the code to enable dynamic params.

      The parameters I need to change are:

      #define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
      #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
      #define MY_MQTT_CLIENT_ID "mysensors-1"
      #define MY_MQTT_USER "username"
      #define MY_MQTT_PASSWORD "password"
      #define MY_ESP8266_SSID "MySSID"
      #define MY_ESP8266_PASSWORD "MyVerySecretPassword"
      #define MY_ESP8266_HOSTNAME "mqtt-sensor-gateway"
      #define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
      #define MY_PORT 1883
      

      I know how to code the ino file to listen to JSON and then process the data and put it in storage but I cant seem to grasp how to change the core file as minimally as I can...

      posted in Development
      Mickey
      Mickey
    • RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta

      @tekka said:

      @Mickey Ok, I see, this is something related to the internal checksum, need to adjust that. In short: the bootloader doesn't hand over to the sketch

      Has this adjusted already?

      posted in Development
      Mickey
      Mickey
    • RE: MYSBootloader 1.4 testing

      Hi
      I would like to test too.
      On atmega 328p au 8mhz internal board.

      posted in My Project
      Mickey
      Mickey
    • RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta

      @tekka
      It's not failing the node is functional and I can upload a sketch to it via MYSController but It cannot get sketch from the arduino IDE (the IDE gives the normal output that upload complete and all OK without any Error notice but after it the node doesn't have a FW on it and even if I upload some basic sketch that spit Serial to monitor nothing happen.)
      I will try to upload the bootloader to an Arduino nano node to see if on 16Mhz board and 115200bps the problem exist.
      Also you mention that the hex file compiled to 16Mhz board and 115200bps , maybe it should also compile on a internal 8Mhz to fix this.

      posted in Development
      Mickey
      Mickey
    • RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta

      @tekka
      My arduino IDE: 1.6.11
      The avrdude inside that arduino IDE is: 6.0.1

      posted in Development
      Mickey
      Mickey
    • RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta

      @tekka
      I used the MYSBootloader 1.3pre with version 2.0.0
      I managed to upload FW to nodes with MYSController.

      As mention:
      "supports OTA FW AND serial FW updates"

      But I cannot get anything to serial port with the nodes.
      Is the serial option really works on this bootloader?
      the specs:
      1.board - my own developed board with atmega328p au without external clock.
      2.board.txt:

      ######## settings for 8Mhz internal clock, EESAVE, BOD1V8, no lock
      proMYSBL8.name=ATmega328 internal 8Mhz with MYSBootloader
      proMYSBL8.upload.tool=avrdude
      proMYSBL8.upload.protocol=arduino
      proMYSBL8.upload.maximum_size=30720
      proMYSBL8.upload.maximum_data_size=2048
      proMYSBL8.upload.speed=57600
      proMYSBL8.bootloader.tool=avrdude
      proMYSBL8.bootloader.low_fuses=0xE2
      proMYSBL8.bootloader.high_fuses=0xD2
      proMYSBL8.bootloader.extended_fuses=0x06
      proMYSBL8.bootloader.unlock_bits=0x3F
      proMYSBL8.bootloader.lock_bits=0x3F
      proMYSBL8.bootloader.file=MySensors/MYSBootloaderV13pre.hex
      proMYSBL8.build.mcu=atmega328p
      proMYSBL8.build.f_cpu=8000000L
      proMYSBL8.build.board=AVR_UNO
      proMYSBL8.build.core=arduino
      proMYSBL8.build.variant=standard 
      
      1. the bootloader hex file is : MYSBootloaderV13pre.hex from MYSController 1.0.0beta

      So is serial possible or/and should I change something?

      posted in Development
      Mickey
      Mickey
    • RE: !TSM:FPAR:FAIL - node not connecting to working GW

      OK
      So I ported all the library to 2.0.0 and the same !TSM:FPAR:FAIL

      So I switch to serial GW and all is OK.
      Is the 5100 ethernet GW example sketch compatible with 2.0.0?

      posted in Troubleshooting
      Mickey
      Mickey
    • !TSM:FPAR:FAIL - node not connecting to working GW

      Hi
      I created a new node with latest 1.5 mysensors version.
      this is what I get in sensor debug:
      Starting sensor (RNNNA-, 2.0.0)
      TSM:INIT
      TSM:RADIO:OK
      TSM:FPAR
      TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSM:FPAR
      TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSM:FPAR
      TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSM:FPAR
      TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      !TSM:FPAR:FAIL
      !TSM:FAILURE
      TSM:PDT

      and this is from the 5100 GW debug:

      0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
      0;255;3;0;9;TSM:INIT
      0;255;3;0;9;TSM:RADIO:OK
      0;255;3;0;9;TSM:GW MODE
      0;255;3;0;9;TSM:READY
      IP: 192.168.0.109
      0;255;3;0;9;No registration required
      0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
      0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSP:MSG:BC
      0;255;3;0;9;TSP:MSG:FPAR REQ (sender=255)
      0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
      0;255;3;0;9;TSP:MSG:GWL OK
      0;255;3;0;9;TSP:MSG:SEND 0-0-255-255 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=bc:0
      0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSP:MSG:BC
      0;255;3;0;9;TSP:MSG:FPAR REQ (sender=255)
      0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
      0;255;3;0;9;TSP:MSG:GWL OK
      0;255;3;0;9;TSP:MSG:SEND 0-0-255-255 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=bc:0
      0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSP:MSG:BC
      0;255;3;0;9;TSP:MSG:FPAR REQ (sender=255)
      0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
      0;255;3;0;9;TSP:MSG:GWL OK
      0;255;3;0;9;TSP:MSG:SEND 0-0-255-255 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=bc:0
      0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSP:MSG:BC
      0;255;3;0;9;TSP:MSG:FPAR REQ (sender=255)
      0;255;3;0;9;TSP:CHKUPL:OK
      0;255;3;0;9;TSP:MSG:GWL OK
      0;255;3;0;9;TSP:MSG:SEND 0-0-255-255 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=bc:0
      0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSP:MSG:BC
      0;255;3;0;9;TSP:MSG:FPAR REQ (sender=255)
      0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
      0;255;3;0;9;TSP:MSG:GWL OK
      0;255;3;0;9;TSP:MSG:SEND 0-0-255-255 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=bc:0
      0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSP:MSG:BC

      so node is transmitting and receiving and also the GW
      Why aren't the node get an ID and why the finding parent part is failing?

      I also checked to see this is not working with 5 examples. and I did clear the eeprom.
      also when I flash serial GW to this node just to check if it is power issues everything is OK and the serial GW is OK so it is not power issues. also this 5100 GW works with other sensors...

      posted in Troubleshooting
      Mickey
      Mickey
    • esp8266 wifi gateway used also as a node

      Hi
      Is it possible to use esp8266 wifi gateway also as a node (with the address of 0 naturaly)?

      posted in Development
      Mickey
      Mickey
    • RE: Error flashing bootloader to atmega328p au board I design

      @AWI said:

      @Mickey Maybe you need to disconnect the radio. I am not able to use SPI programming with the radio connected...

      I also thought that but I made another board without the radio with the same error.
      I needed a fast way to figure it out so I desolder the atmega from an old arduino nano board but before I did it I read the fuses and got this:
      nanofuses.png

      then I soldered the virgin series I have and read the fuses:

      virginfuses.png

      so first of all It appears that I need the chips first hook up to an external clock just to be able to read the fuses and then change them.

      posted in Hardware
      Mickey
      Mickey
    • RE: Which ATmega do i go with?

      @tbowmo said:

      @Mickey

      By default the atmega328p is running from the internal 8Mhz oscillator, but with clkdiv8 enabled, so that it runs at 1Mhz. For running it at 8Mhz you have to set the fuses and disable the clkdiv8. I'm using the following avrdude command to set fuses with my jtagice3 programmer in an atmega328p

      avrdude -c jtag3isp -p m328p\
      -U lfuse:w:0xE2:m \
      -U hfuse:w:0xD2:m \
      -U efuse:w:0xFE:m \
      -U lock:w:0xEF:m 
      

      change above to use the programmer that you have

      So if my current fuses are like this:
      virginfuses.png
      can I still communicate with the chip with usbasp without external crystal?

      posted in Hardware
      Mickey
      Mickey
    • RE: Which ATmega do i go with?

      @tbowmo said:

      You don't need the crystal, there is an internal 8mhz RC oscillator available.

      I would recommend to take a look at the sensebender, it's as basic as it can be (just remove sensor / flash / atsha204 if you don't need those)

      How do you programme a factory atmega328p to run on 8mhz internal?

      posted in Hardware
      Mickey
      Mickey
    • RE: Error flashing bootloader to atmega328p au board I design

      @scalz said:

      @Mickey: I think you have to change fuses. What I usually do is:

      • program fuses with : avrdudess+usbasp.
        you can check your fuse here: http://www.engbedded.com/fusecalc/
      • Then copy atmega boards files, and you can use arduino ide to upload your bootloader, still with usbasp of course.
      • Finally, you can bootload with ftdi.

      But, adding atmega board files doesn't reprogram the fuses if I remember right. If it doesn't work like I explained, then maybe hardware connection..

      On my side, I prefer usbasp/avrspi. it's very easy too, I think 😃 most important is that it works 😉

      Hi
      How can I change fuses if the avr programmer doesn't even detect the chip? when I run

      avrdude -b 19200 -c usbasp -p m328p -v
      

      I get

      cmd.png

      posted in Hardware
      Mickey
      Mickey
    • RE: Error flashing bootloader to atmega328p au board I design

      @GertSanders said:

      @Mickey Correct, if electrically your board is OK, and you do not have a spare working Arduino board, you will need to use an AVR programmer to flash the bootloader.

      What is correct? I use an Avr programmer - Usbasp as I mention . I have a few working arduinos is it better to use them as a programmer? Can you tell me what values should I need to the fueses?

      posted in Hardware
      Mickey
      Mickey
    • RE: Error flashing bootloader to atmega328p au board I design

      @GertSanders said:

      @Mickey I'm just wondering why you would need a pull up of 56K, since the internal pullup resistor of those pins in the atmega328 is about the same value (somewhere between 30K and 50K according to datasheet). I see no need to R1.

      When I design the board I use the sensebender micro as reference. I did ask my self is it really needed but Deside to go with that but its not part of the problem...

      posted in Hardware
      Mickey
      Mickey
    • RE: Error flashing bootloader to atmega328p au board I design

      @GertSanders said:

      @Mickey Nice board ! Just a question: why did you add the 56K (R1) ?
      The schematic does not show U3, is the schematic complete ?

      U3 is not relevant to topic but yes the schematic is short u3 which is ADXL345
      Also I used 56k because I didnt find 47k in my stock...(is it a problem?)

      posted in Hardware
      Mickey
      Mickey
    • RE: Error flashing bootloader to atmega328p au board I design

      @scalz said:

      hi.
      the factory state for chip is Internal RC 1Mhz. So be careful, when you set the fuses to not set External fuses ON if you have no crystal onboard. because you will need one then 😉
      Did you program the fuses with avrdude or avrdudess? and then upload your bootloader with arduino ide...or do you try to change fuses with arduino ide?

      The only thing I tried is what I wrote. I didnt try to mess with fuses. Isnt boards.txt implies that the fuses changed also by trying to bootloader burn?
      Any way if I want to program this chip what are the fuses state to change? I would like 8mhz internal...

      posted in Hardware
      Mickey
      Mickey
    • Error flashing bootloader to atmega328p au board I design

      Hi
      I design this board (schematic and pcb pics):
      myboard.png
      mydesign.png
      20151207_072430.jpg
      I bought atmega328p au from here:
      link text
      I solder all components and check and everything seems connected right.
      Then I tried to programme the chip with bootloader(as you see in the pics there is spi connector) using USBASP V2.0:
      UsbAspCableNewer2275.jpg
      I added to boards.txt the following section:

      ##############################################################

      int.name=Arduino int

      int.upload.tool=avrdude
      int.upload.protocol=arduino

      int.bootloader.tool=avrdude
      int.bootloader.unlock_bits=0x3F
      int.bootloader.lock_bits=0x0F

      int.build.board=AVR_PRO
      int.build.core=arduino
      int.build.variant=eightanaloginputs

      Arduino int internal clock (3.3V, 8 MHz) w/ ATmega328

      --------------------------------------------------

      int.menu.cpu.8MHzatmega328=ATmega328 (3.3V, 8 MHz)

      int.menu.cpu.8MHzatmega328.upload.maximum_size=30720
      int.menu.cpu.8MHzatmega328.upload.maximum_data_size=2048
      int.menu.cpu.8MHzatmega328.upload.speed=57600

      int.menu.cpu.8MHzatmega328.bootloader.low_fuses=0xE2
      int.menu.cpu.8MHzatmega328.bootloader.high_fuses=0xDA
      int.menu.cpu.8MHzatmega328.bootloader.extended_fuses=0x05
      int.menu.cpu.8MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex

      int.menu.cpu.8MHzatmega328.build.mcu=atmega328p
      int.menu.cpu.8MHzatmega328.build.f_cpu=8000000L

      and from Arduino IDE I tried to burn bootloader and got this output:

      avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
           Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
           Copyright (c) 2007-2009 Joerg Wunsch
      
           System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
      
           Using Port                    : usb
           Using Programmer              : usbasp
           AVR Part                      : ATmega328P
           Chip Erase delay              : 9000 us
           PAGEL                         : PD7
           BS2                           : PC2
           RESET disposition             : dedicated
           RETRY pulse                   : SCK
           serial program mode           : yes
           parallel program mode         : yes
           Timeout                       : 200
           StabDelay                     : 100
           CmdexeDelay                   : 25
           SyncLoops                     : 32
           ByteDelay                     : 0
           PollIndex                     : 3
           PollValue                     : 0x53
           Memory Detail                 :
      
                                    Block Poll               Page                       Polled
             Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
             ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
             eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
             flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
             lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
             hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
             efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
             lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
             calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
             signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
      
           Programmer Type : usbasp
           Description     : USBasp, http://www.fischl.de/usbasp/
      
      avrdude: auto set sck period (because given equals null)
      avrdude: warning: cannot set sck period. please check for usbasp firmware update.
      avrdude: error: programm enable: target doesn't answer. 1 
      avrdude: initialization failed, rc=-1
               Double check connections and try again, or use -F to override
           this check.
      
      
      avrdude done.  Thank you.
      
      Error while burning bootloader.
      

      Am I at the right direction and should focus on checking my soldering or I burning firmware the wrong way?
      the chip is without any bootloader and I don't know what is his "factory" state. also I want to drive this board without an external clock and only with internal 8mhz clock (does the boards.txt fit to this?)

      I will be happy to have some help here because I banging my head on this for days...

      posted in Hardware
      Mickey
      Mickey
    • RE: Sending Byte Array in messages

      @Oitzu said:

      Well depends.. how big is the array? If it is bigger then 25bytes you probably need to split the array in multiple messages and build it back together on the receiving site.

      I`m aware of the 25 byte restriction. I just cant find the appropriate code in the api...

      posted in Development
      Mickey
      Mickey
    • Sending Byte Array in messages

      Can I Send Byte Array in mysensors radio messages?

      posted in Development
      Mickey
      Mickey
    • RE: find parent [solution found]

      try to delete eeprom of gateway and node...

      posted in Troubleshooting
      Mickey
      Mickey
    • RE: ESP8266 WiFi gateway port for MySensors

      @Yveaux said:

      @Mickey I'm afraid it's not that simple... MySensors is purely written in C++, and although this code could be rewritten in C it is a lot of work and requires decent C/C++/MySensors knowledge.
      Did you consider doing it the other way around and port your work to fit in this MySensors gateway?
      Could be a lot less work (depending on how much code you wrote yourself) as C code compiles (almost) without problems in the Arduino IDE.

      those esp projects I mention are very extensive to just port them.(mainly the httpd) but I once saw a guy here that made the mysensors code work on the native sdk ide but only wanted to sell the binaries and wouldn't share his code.

      posted in Development
      Mickey
      Mickey
    • RE: ESP8266 WiFi gateway port for MySensors

      I have up and running a mqtt gateway with esp8266 that is connected to ordinary serial gateway (with the arduino) I based it on 2 projects-
      ESPHTTPD and tuanpmt mqtt for esp and all is working fine and deliver the serial gateway messages to cloud based mqtt broker and I also have the benefit of configuring everything by webpages (mqtt params ,wifi params)and use all benefits of http server like serving pictures(favicon)and jquery for all web based configuration like this,and now after I see this project I like to remove the arduino and connect the esp directly to nrf but the native sdk is c and I use eclipse.
      Is it possible to pull all the relative mysensors code from this work (I see it's mainly in c++) and add it to the code in native esp mqtt (which is mainly in c)?

      posted in Development
      Mickey
      Mickey
    • RE: ESP8266 WiFi gateway port for MySensors

      Great work!
      Wanted to see it for a long time.
      Now the way for making a mqtt with the esp8266 is shorter...

      posted in Development
      Mickey
      Mickey
    • RE: My Ugly ESP GW Prototype

      @tekka said:

      @hek said:

      Waiting with interest on results from the community members trying to port MySensors library running natively on ESP.

      I'm running the GW sketch (and repeater node) natively on the ESP8266 - however, the porting needs some additional work on EEPROM handling and pointer addressing. Also, a stable power supply is important (>3.1V with ESP8266 and NRF24 attached, no peaks). Will post more as porting progresses.

      Do you porting it to Arduino environment or using the native esp sdk ?

      posted in My Project
      Mickey
      Mickey
    • RE: XAmbi Kid mini Pro - Prototype

      My experience with the smd range very similar to the usual nrf modules.

      posted in Hardware
      Mickey
      Mickey
    • RE: WiFi MQTTGateway

      @tekka

      Excellent progress.
      Waiting to see this...

      posted in Development
      Mickey
      Mickey
    • RE: WiFi MQTTGateway

      Maybe in the first phase we can use an Arduino as an intermediate and use the serial gateway to talk with the esp and only implement (what is already implemented by this chip community) the WiFi and MQTT connectivity.

      posted in Development
      Mickey
      Mickey
    • RE: Mysensored Garageport

      @tbowmo said:

      @Mickey

      On this one I only populated the atmega on the board. I removed the vcc pin on the radio module, before I soldered it back to back with the minimal sensebender module, and then put a le33 between vcc on sensebender board, and vcc on the radio (and added a capacitor on the radio, for good measures)

      and did you flash the the "official" sensebender bootloader ?

      posted in My Project
      Mickey
      Mickey
    • RE: Windows GUI/Controller for MySensors

      This is the most helpful tool I used since I started messing around with mysensors.

      I hate to nag but this tool source code would be a giant step to someone looking to create a new controller by himself.
      .

      posted in Controllers
      Mickey
      Mickey
    • RE: Mysensored Garageport

      Very nice work.
      I notice that there are a lot of parts missing in the sensbender I understand you took out sensor and eeprom but I notice some caps and resistors also not attach.
      can you specify what did you populate the board with only the atmega?

      posted in My Project
      Mickey
      Mickey
    • RE: arduino pro 3.3 + nrf24l01 smd onboard + On board 4K-Bit Flash memory

      No I decide that price is to high. in this price I can buy 2 pro and 2 nrf smd version.

      posted in Hardware
      Mickey
      Mickey
    • RE: Camera as a sensor

      @Moshe-Livne said:

      Been there.... just wasn't keen on compiling it. Oh well.

      https://github.com/sternlabs/RT5350F-cheap-router/tree/master/openwrt

      http://www.digitalinferno.com/wiki/attach/Mini3G4GUSBRouterOpenWrtExternalUSB/openwrt-ramips-rt305x-a5-v11-squashfs-sysupgrade.bin

      https://www.digitalinferno.com/wiki/Wiki.jsp?page=Mini3G4GUSBRouterOpenWrtExternalUSB

      posted in Hardware
      Mickey
      Mickey
    • RE: Camera as a sensor

      @Moshe-Livne said:

      @Mickey http://www.aliexpress.com/item/LYNEW-Portable-Mini-Wireless-wifi-Router-3G-4G-Hotspot-Wifi-Hotspot-support-3G-USB-modems/32257312139.html

      start from here:
      http://wiki.openwrt.org/toh/unbranded/a5-v11

      posted in Hardware
      Mickey
      Mickey
    • RE: Camera as a sensor

      which one exactly did you buy?

      posted in Hardware
      Mickey
      Mickey
    • RE: Camera as a sensor

      @Moshe-Livne said:

      @Mickey they are so small!!!!

      what is so small?

      posted in Hardware
      Mickey
      Mickey
    • RE: arduino pro 3.3 + nrf24l01 smd onboard + On board 4K-Bit Flash memory

      @Sweebee said in arduino pro 3.3 + nrf24l01 smd onboard + On board 4K-Bit Flash memory:

      @Mickey Nice, can you show the inside of the box?

      1432066107892-2129748257.jpg

      posted in Hardware
      Mickey
      Mickey
    • RE: arduino pro 3.3 + nrf24l01 smd onboard + On board 4K-Bit Flash memory

      @bjornhallberg said:

      Interesting stuff. Would have bought a couple of them if it had another voltage regulator more battery friendly. And the authentication chip. Also, with all the talk of bad nrf24 chips, it is probably time to get around to making the radio integrated on the board. But just soldering the nrf24 smd board to the back is obviously so much easier. It's weird that no one has looked into an in-house mysensor pcb for the smd module yet.

      @Mickey are you still happy with your SMD nrf24 boards? No issues with range or other weird issues?

      Giles did something like that with his Micromesh board (https://hackaday.io/project/2492-micromesh-iot-mesh-network). Did not turn out well apparently.

      I saw the hackaday.io project with the smd and also the poor range report but it was after I bought 6 modules and got very disappointed but then I check 6 modules from 2 diffrent chinees marchents and they both gave me an excellent range without caps.
      then I put one inside 2 point outlet box and connected 2 5v relays to pro mini raw and the range and signal quality was very poor, then added a cup and the range got back to be as before I attached the relays. so from there on I only buying the smd version and really got to shrink my sensors.
      in this outlet I managed to squise a 220vac to 5vdc ,the smd module, 2 relays:image.jpg

      posted in Hardware
      Mickey
      Mickey
    • RE: arduino pro 3.3 + nrf24l01 smd onboard + On board 4K-Bit Flash memory

      currently Im using this modules:

      my smd modules

      and the smd nrf version have a range like the normal version. I just saw it and thought I share . anyway going to buy and test a couple...

      posted in Hardware
      Mickey
      Mickey
    • arduino pro 3.3 + nrf24l01 smd onboard + On board 4K-Bit Flash memory

      check this module electrodragon nrf module

      posted in Hardware
      Mickey
      Mickey
    • RE: Sensebender Micro

      However if someone has a good proposal for how these kind of batteries are best used with the Sensebender Micro I would like to know also.

      mcp1702 for example...

      posted in Announcements
      Mickey
      Mickey
    • RE: Camera as a sensor

      @Moshe-Livne said:

      @Mickey how quickly do they boot up? might boot it when pir is triggered.

      I thought about it but openwrt is a full linux and it takes 15-20 seconds to boot up so it will be half a minute delay between trigger and response

      posted in Hardware
      Mickey
      Mickey
    • RE: Camera as a sensor

      @bjornhallberg said:

      @axillent
      @Moshe-Livne

      Yeah, it is perhaps not the most economical solution. Probably closer to $100 per unit. Foscams have probably become better and cheaper since last I looked. Personally I'd rather have more control over my setup. Like how the housing is ventilated. Plus all the fun of building and figuring things out. Of course I don't get night vision, but I figured it is better to trigger a relay to turn on some floodlights or whatnot that will give intruders some warning. No use being sneaky about it.

      But yes, it would be really interesting if someone could come up with a really cheap battery powered solution.

      openwrt as battery powered solution wont last much but they can be attach to cheap 5v solar pannel by day and run on lipo by night so no need for external power source. also
      Its possible to install Motion on thoes modules and have state of the art motion sensors.

      posted in Hardware
      Mickey
      Mickey
    • RE: Camera as a sensor

      @Moshe-Livne said:

      @Mickey very good and detailed article. I have several of the GSM modems (that I now understand are not GSM modems at all) somewhere so i'll see if they can be flashed with openwrt. should be fuuuunnnn.

      Notice that the one I posted from aliexpress have its own procedure to flash openwrt on. Be careful not to brick your module...

      posted in Hardware
      Mickey
      Mickey
    • RE: Camera as a sensor

      @Moshe-Livne said:

      @axillent Oh, still not used to thinking this way. This is beyond the (very limited) limits of my knowledge.... can be great.... total setup fee of ~15$

      I have an example of this just with tl-wr703n but the one I posted from aliexpress is just the same:
      openwrt webcam

      posted in Hardware
      Mickey
      Mickey
    • RE: Camera as a sensor

      http://www.aliexpress.com/item/LYNEW-Portable-Mini-Wireless-wifi-Router-3G-4G-Hotspot-Wifi-Hotspot-support-3G-USB-modems/32257312139.html
      Today there are openwrt enable modules on aliexpress that start from below 8$ that can be attached to mjpg usb camera and can take pictures and streams with less than 10$ price tag.

      posted in Hardware
      Mickey
      Mickey
    • RE: Power source for relay actuator

      @Cory said:

      I usually search for "ac usb" on ebay and get good results.

      So far i have been happy to find chargers like these. They support up to 240V and are small enough to fit into electrical boxes with the case on.
      http://www.ebay.com/itm/New-US-Plug-USB-AC-Wall-Charger-Adapter-For-Samsung-iPad-iPhon-White-f20-/281681762352?pt=LH_DefaultDomain_0&hash=item41958a9830

      I typically get them for ~$0.70 each but have also won some bids for less.

      those modules not so safe to be inside a 220v box without ventilation they can burst in flames (its rare but imagine it happen once in 220v box and the all house could burn...) I open one once to see how can they fit in so small box and they just cut the PCB on half and connect one half to another with ribbon cable and fold the 2 pieces on on another with a thin foam to protect the capacitors...

      posted in Hardware
      Mickey
      Mickey
    • RE: Domoticz full integration

      maybe the V_VAR value sending node need to send some kind of values to be recognized beside the first recognition packets? because in the relay node there was a problem with the mysensors build section basic sketch that domoticz didnt recognize until I change the sketch and made a call to gateway with relay pin status for it to recognize the node...

      posted in Feature Requests
      Mickey
      Mickey
    • RE: Domoticz full integration

      @AWI said:

      The supported "V" types as of today for "SET" (read from the code):
      V_TEMP:, V_HUM, V_PRESSURE, V_VARx, V_TRIPPED, V_ARMED, V_LOCK_STATUS, V_LIGHT, V_DIMMER, V_DUST_LEVEL, V_WATT, V_KWH, V_DISTANCE, V_FLOW, V_VOLUME:, V_WIND, V_GUST, V_DIRECTION, V_LIGHT_LEVEL,:V_FORECAST,: V_VOLTAGE, V_UV, (so almost all )

      The list for 'REQ' is (and will be.?) limited to V_LIGHT, V_DIMMER and V_VAR types. If anyone needs more please address this on the Domticz forum as I am out of arguments.

      Be aware that the MySensor support is beta, but very promissing.

      are the V_VARx types realy supported? because I can run domoticz with V_DISTANCE , V_TEMP:, V_HUM, V_PRESSURE etc but V_VARx types only showed on the log but not recognized on the devices list...

      posted in Feature Requests
      Mickey
      Mickey
    • allow sensors to operate on voltage lower than 2.7v

      Hi
      I made this boards as small as I could and would like to operate them on 3v coin battery - CR2032.
      IMAG3051.jpg
      IMAG3052.jpg
      I check them all and the range is excellent (more than 15 meter and behind 3 brick walls)
      but they will run out of power quite soon with this battery so what is the simplest and fastest way to change the arduino fuses so it can run down to 1.8v.
      If there is a need for external flash I have this one(is it good?):
      IMAG3053.jpg

      posted in Hardware
      Mickey
      Mickey
    • RE: Minimal design thoughts

      @hek said:

      Small production run of 200 units started this morning. 🙂

      You would run-out of units very soon...

      posted in Hardware
      Mickey
      Mickey
    • RE: Minimal design thoughts

      will it be possible to use this board pcb without soldering the sensor , flash and security chip?

      posted in Hardware
      Mickey
      Mickey
    • RE: atmega328 tqfp pcb design

      so if I have FTDI cable with 100nF cap on DTR pin that go to reset pin on atmega and I expose pins for serial and isp what I need is on 100nF on supply pins and on 10k pullup on reset line - 2 components ?

      posted in Hardware
      Mickey
      Mickey
    • atmega328 tqfp pcb design

      I would like to design in eagle atmega328 tqfp pcb. what is the bare minimum for board component (much like the microsensor board published here but only the arduino mcu functioning). I would like it to run on the chip internal clock.
      so what would I need to get in the BOM just for minimal arduino functioning? (caps and resistorts if any)

      posted in Hardware
      Mickey
      Mickey
    • RE: Sensor shield for Arduino Pro Mini 3.3V with boost up regulator

      turn out very nice.
      are you planing to share eagle files?

      posted in My Project
      Mickey
      Mickey
    • RE: Sensor shield for Arduino Pro Mini 3.3V with boost up regulator

      Very nice board.
      Do you intend to share gerber files/eagle file?

      posted in My Project
      Mickey
      Mickey
    • RE: Arduino Pro Mini adapter card and nice box from "biltema"

      can you share this board schematics?

      posted in My Project
      Mickey
      Mickey
    • RE: get a string out of a payload

      I'm writing a sketch that use a MEMS sensor (ADXL345 in this case but it will be a start point for more sensors like this like MPU6050).
      this chip can raise an interrupt when: inactivity sensed,activity sensed,tap,double tap,free fall.
      so the reading of the XYZ values with a leading char that represent the event sensed (I for inactivity and etc ) are going to a serial MySensor GW and from there to the controller (right now I'm using MYSController).

      *EDIT
      I found out that values can be negative so I just sending the decimal numbers as is...

      posted in Development
      Mickey
      Mickey
    • RE: get a string out of a payload

      @BulldogLowell said:

      char *buffer = "";
      sprintf(buffer,"%02x%02x%02x",a,b,c);
      Serial.println(buffer);
      // gw.send(msg.set(buffer))//<<<<<<<<<<<<<<

      this is what I get with this suggested code:

      acff53ffd2

      I expected and needed a six char figure here like RGB color code:
      ffffff
      000000
      and this is what I got with my previous code
      but I getting 10 chars now...(or am I missing some fundamental understanding on hex numbers...?)

      posted in Development
      Mickey
      Mickey
    • ATMEGA48V-10PI

      I found this on eBay:
      wireless shield

      it have the ATMEGA48V-10PI chip on it but it seems that all spi connections to nrf are in board and also spi and i2c are exposed.
      I one can burn arduino bootloader this board can be in-use with my sensors.

      posted in Hardware
      Mickey
      Mickey
    • RE: get a string out of a payload

      @Chaotic said:

      @Mickey oh thats easy start the line with 4 spaces and a blank line before it

      like this
      

      I had assumed you knew about that since you did it in your post before this.

      If you click on the ? when replying it should bring you to a page on markup which tells you how to do that and other things.

      Thanks
      I must say its turn out to be a great community this site...

      posted in Development
      Mickey
      Mickey
    • RE: get a string out of a payload

      no I meant like above with the black background(didn't know how but I just paste code from arduino IDE and it turn out like this...)

      posted in Development
      Mickey
      Mickey
    • RE: get a string out of a payload

      ok I saw what you did and its way better.
      this is my current code:

      char strMsg[]="";
      char *strMsgPtr = strMsg;
      unsigned long myHex = 0;
      myHex |= x;
      myHex <<= 8;
      myHex |= y;
      myHex <<= 8;
      myHex |= z;
      String myString = String(myHex, HEX);
      myString .toCharArray(strMsg,7;
      gw.send(msg.set(strMsgPtr));
      

      right now its doing the job.
      also how do I embed code in the forum?

      posted in Development
      Mickey
      Mickey
    • RE: get a string out of a payload

      OK
      Now I having problems with the other way around(x,y,z are one byte numbers) I want to convert 3 values of x,y,z to one string that contain 3 hex numbers

      char *strTag[] = {String(x, HEX)+String(y, HEX)+String(z, HEX)};
      gw.send(msg.set(strTag));

      but I cant work it out...

      *EDIT:
      This workout for me:
      String temp="I";
      temp+=String(x, HEX);
      temp+=String(y, HEX);
      temp+=String(z, HEX);
      temp.toCharArray(strMsg,10);
      gw.send(msg.set(strMsgPtr));

      posted in Development
      Mickey
      Mickey
    • RE: get a string out of a payload

      No
      with this method it compile ...

      thanks

      posted in Development
      Mickey
      Mickey
    • RE: get a string out of a payload

      char strMsg[25];
      char *strMsgPtr = strMsg;

      void incomingMessage(const MyMessage &message)
      {
      // We only expect one type of message from controller. But we better check anyway.
      if (message.type==V_VAR1)
      {
      // spit to serial
      Serial.print("Incoming change for sensor:");
      Serial.print(message.sensor);
      Serial.print(", New payload: ");
      Serial.println(message.getCustomString(strMsgPtr));
      }
      }

      posted in Development
      Mickey
      Mickey
    • get a string out of a payload

      Hi
      I creating a message that holds a string in the payload.
      I also want to get a message like that and using the mymessage.getcustomstring() but cant pass compilation.
      Can I have example for using this method or rather I need to use some other method?

      posted in Development
      Mickey
      Mickey
    • RE: using 2 interrupt pins (2,3) inside a node.

      ooouuu sorry missed that....(you really thought on everything with this library....)

      posted in Development
      Mickey
      Mickey
    • using 2 interrupt pins (2,3) inside a node.

      Hi
      I have a sensor that in some cases can raise 2 interrupt pins on the sensor one for each case.
      I see when I'm going to sleep I can only attach one interrupt pin to sleeping mode:

      bool sleep(int interrupt, int mode, unsigned long ms=0);

      can I attach 2 separate arduino pins (2,3) to the 2 separate sensor pins and get out from sleep with either one of them?

      thanks.

      posted in Development
      Mickey
      Mickey
    • MySensors first nodes ( after a long time using only NRF24NETWORK library )

      Im starting to upgrade all my sensor nodes to use mysensors library after a ling time just using nrf24network with my own star topology implementation:
      IMAG3034.jpg
      I design my own board to put the pro and radio and use the tuner transfer method.

      posted in My Project
      Mickey
      Mickey
    • eeprom address for node id

      Hi
      I want to develop a node that need to save some data to local node eeprom. but I wouldn't want to erase the node id and other params that the mysensors library saving.
      how much room is available for my node ( arduino pro mini 328 ) and from where can I write to eeprom without erasing anything?

      posted in Development
      Mickey
      Mickey
    • RE: bootloader

      Thanks a lot...
      I already create a MYSController and GW + 2 NODES but your explanation made things much clearer especially the OTA part.
      Do you plan to publish MYSController source?

      and again I really appreciate the detailed step by step guide.

      posted in Development
      Mickey
      Mickey
    • RE: bootloader

      @hek said:

      @Mickey

      Sorry, I might have misinterpreted your initial question.

      The bootloader is NOT needed if you download sketch/node code from your computer.

      If you want to do over-the-air updates of your nodes you'll need it though.

      OK I would like to do OTA, is what I wrote in the answer to tekka OK? to make brownout lower for 1.8-2.4 I will also need to burn new bootloader right?

      posted in Development
      Mickey
      Mickey
    • RE: bootloader

      @tekka said:

      @Mickey Yes, however, the .hex file was compiled for 16Mhz, but you can also use it at 8Mhz. Ideally you re-compile the bootloader with your preferred frequency. I'm using the MYSBootloader at 1Mhz intRC for battery-powered sensors. You can test the OTA functionality with MYSController.

      OK Its keeps getting complicated...thanks for your answer but I really would like to clear things so I can start with Mysensors, I quite familiar with arduino+nrf24 but mainly with rf24network librery from MANIACBUG - http://iot.org.il/2014/04/06/iot-smart-home-2/
      So to make things straight:
      1.I start with MYSController on my pc.
      2.I put gw sketch on arduino nano with radio module ( does it also need customized bootloader - MYSBootloader?! ) .
      3. take arduino pro mini 3,3v (without regulator and leds) go to bootloader folder in the MYSController and flash it with the MYSBootloader.hex file with USBasp Programmer.
      do I need to change something in the boards.txt that came with the MYSController folder if I want to use the external 8mhz on the pro mini board? and if I want to use the internal one than what do I need to change in this file? is the 115200 rate will stand with the external 8mhz? If not to what do I need to change it? and if the internal one will be used what need to be change in the boards.txt ? and just wondering what is the fuses.txt file is for?
      4. after the bootloader flashed I put a sketch on the node and all will go automatic? including the id designation?(I used the motion sensor example).
      thanks for the answers and for the Patience and with the hope it will get me started and I could contribute too...

      posted in Development
      Mickey
      Mickey
    • RE: bootloader

      @hek said:

      Yes, the MYSBootloader is smaller and has been tested more recently by @tekka.

      But in boards.txt I see its configured for 16mhz crystal , and I read here that to get maximum battery time one need to use 8mhz and configure the boards,txt accordingly.

      posted in Development
      Mickey
      Mickey
    • nodejs controller

      The controller:
      https://github.com/mysensors/Arduino/tree/master/NodeJsController

      is it a full controller or just one for OTA?
      is there a UI for it?

      posted in Controllers
      Mickey
      Mickey
    • bootloader

      Hi
      I see in the git repo that there are 2 bootloaders:
      Bootloader
      MYSBootloader
      Do I need to burn one of them to use MySensors ?

      posted in Development
      Mickey
      Mickey
    • RE: Arduino Yun, Linino, OpenWRT

      I think the Vera board that mentioned here in this site a lot is basically an openwrt box with customized lua scripts...

      posted in Controllers
      Mickey
      Mickey
    • RE: sending sensor reading with more than one value

      @hek said:

      ...or pack your data into VAR_1.

      can you give an example?

      posted in Development
      Mickey
      Mickey
    • sending sensor reading with more than one value

      Hi
      I want to interface with accelerometer and there for need to send 3 values in payload. Can the Protocol support it?

      posted in Development
      Mickey
      Mickey