Page 1 of 1

problem with current states blocky ?

Posted: Sunday 24 May 2015 23:01
by fred97
hello everybody ,

i have a litle problem , i use mysensor gateway usb arduino uno and nano arduino for node , i try soil moister sensor as a humidity sensor it's work very well , this the sketch for convert 0-1023 like a 0-100% but when i want put some blocky for send me alert , i click on show current states and my sensor is alway 2 or 3 .

the sketch :

Code: Select all

#include <SPI.h>
#include <MySensor.h>

#define ANALOG_INPUT_SOIL_SENSOR A0
#define CHILD_ID 0 // Id of the sensor child

MySensor gw;
MyMessage msg(CHILD_ID, V_HUM);
int lastSoilValue = -1;

void setup()
{
  gw.begin();

  // Send the sketch version information to the gateway and Controller
  gw.sendSketchInfo("Soil Moisture Sensor - analog", "1.0");
  // sets the soil sensor analog pin as input
  pinMode(ANALOG_INPUT_SOIL_SENSOR, INPUT);
  // Register all sensors to gw (they will be created as child devices)
  gw.present(CHILD_ID, S_HUM);
}

void loop()
{
  // Read analog soil value
  int soilValue = analogRead(ANALOG_INPUT_SOIL_SENSOR);

  if (soilValue != lastSoilValue) {
    Serial.println(soilValue);
    gw.send(msg.set(constrain(map(soilValue, 1023, 250, 0, 100),0,100)));
    lastSoilValue = soilValue;
  }
  // Power down the radio and arduino until analog input changes.
  gw.sleep(1000);
}
and domoticz current states :

Code: Select all

ID	Name	Current state	Last updated	sValues
1	Memory Usage		2015-05-24 23:00:00	17.17
2	HDD /boot		2015-05-24 23:00:00	25.69
3	HDD /		2015-05-24 23:00:00	42.62
4	Internal Temperature		2015-05-24 23:00:00	39.0
13	temp humid dht 22		2015-05-24 22:56:06	21.5;56;1
25	sol		2015-05-24 22:59:50	3
the id 13 is another node of mysensor and svalues is good .

the json request just for see all parameters , i have this from http://192.168.0.41:8080/json.htm?type=devices&rid=25

Code: Select all

{
   "ActTime" : 1432500584,
   "ServerTime" : "May 24 2015 22:49:44",
   "Sunrise" : "05:59:00",
   "Sunset" : "21:35:00",
   "result" : [
      {
         "BatteryLevel" : 100,
         "CustomImage" : 0,
         "Data" : "Humidity 19 %",
         "Favorite" : 0,
         "HardwareID" : 2,
         "HardwareName" : "tt",
         "HaveTimeout" : false,
         "Humidity" : 19,
         "HumidityStatus" : "Dry",
         "ID" : "0200",
         "LastUpdate" : "2015-05-24 22:49:43",
         "Name" : "sol",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 12,
         "SubType" : "LaCrosse TX3",
         "Timers" : "false",
         "Type" : "Humidity",
         "TypeImg" : "temperature",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "25"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}[code]
[/code]

Re: problem with current states blocky ?

Posted: Monday 13 July 2015 16:00
by treb0r
Did you solve the problem? I have the same situation
treb0r

Re: problem with current states blocky ?

Posted: Sunday 27 December 2015 1:12
by olafmarcos
Up!

I hava the same issue in V2.4015 on a Synology NAS. Any updates??

Re: problem with current states blocky ?

Posted: Sunday 27 December 2015 6:38
by gizmocuz
Why do you not use the default notification system?