panStamp support

Begonnen von justme1968, 24 April 2013, 21:35:25

Vorheriges Thema - Nächstes Thema

Bennemannc

Hallo,

wie, nicht installiert ? Du musst die aus dem "alten" Panstamp Forum nehmen - entpacken und unter libs.. kopieren. Anschließend die Libs über das Menue einbinden. Das läuft etwas anders als bei 1.6.x
Du brauchst die Lib von hier: https://code.google.com/p/panstamp/downloads/list - wie gesagt, entlacken und in das richtige Verzeichnis kopieren, anmelden und gut.

Gruß Christoph
Cubietruck, Fhem 5.8
CC-RT-DN|LC-SW2-FM|RC-12|RC-19|LC-SW4-BA-PCB|LCp-SW1-BA-PCB|ES-PMSw1-Pl|LC-Bl1PBU-FM|PBI-4-FM|CC-VD|CC-TC|SEC-SC(2)|RC-KEY3-B|LC-Sw1PBU-FM|PB-2-FM|WDS100-C6-O|WDC7000|LC-Bl1-FM
Module: Dewpoint,FB_Callmonitor,HCS,Panstamp,at,notify,THRESHOLD,average,DOIF

Markus

Hallo

Ich hab jetzt diesen Fehler beim Überprüfen...

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 (Windows NT (unknown)), Board: "PanStamp v2.0 (3.3V, 8 MHz) w/ ATmega328"
soilmoisture.ino: In function 'void setup()':
soilmoisture:106: error: 'class PANSTAMP' has no member named 'setHighTxPower'
Raspberry Pi2 als FHEM-Plattform
HM, FS20, 1-Wire, PanStamp,LW12,Intertechno,ESPEasy,Alexa

Bennemannc

Hallo,

das Board stimmt doch auch nicht, Du hast ein V1.0 Board. Also schau mal ob Du ein anderes Board findest. Und die Zeile mit dem "setHighTxPower" würde ich mal einfach auskommentieren. Wenn das der einzigste Fehler ist, kann man weiter suchen.

Gruß Christoph
Cubietruck, Fhem 5.8
CC-RT-DN|LC-SW2-FM|RC-12|RC-19|LC-SW4-BA-PCB|LCp-SW1-BA-PCB|ES-PMSw1-Pl|LC-Bl1PBU-FM|PBI-4-FM|CC-VD|CC-TC|SEC-SC(2)|RC-KEY3-B|LC-Sw1PBU-FM|PB-2-FM|WDS100-C6-O|WDC7000|LC-Bl1-FM
Module: Dewpoint,FB_Callmonitor,HCS,Panstamp,at,notify,THRESHOLD,average,DOIF

Markus

#408
Hallo Christoph

Ich hab jetzt wieder 1.6.6 Installiert nach dem ersten starten wurden Automatisch alle libs die ich früher schon oben hatte Nachgeladen und auch die Bords Aktualisiert...

Ich hab dann die Soilmoisture Datei Geöffnet und Verifyt. Es schaut aus als ob es Funktioniert :)
Jetzt hab ich auch schon einen Beschrieben der blinkt erst ganz wild und zum Schluss noch ein paar mal langsam.
Richte jetzt mal FHEM ein um zu Testen.
Danke! Berichte später ob es klappt.

Gruß Markus

Warning: platform.txt from core 'panStamp AVR Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
Warning: platform.txt from core 'panStamp MSP430 boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
Warning: platform.txt from core 'panStamp MSP430 boards' contains deprecated recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm, automatically converted to recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{archive_file_path}" "-L{build.path}" -lm. Consider upgrading this core.
WARNING: Category '' in library EEPROM is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library SPI is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library SoftwareSerial is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library Wire is not valid. Setting to 'Uncategorized'

Sketch uses 9,214 bytes (28%) of program storage space. Maximum is 32,256 bytes.
Global variables use 403 bytes (19%) of dynamic memory, leaving 1,645 bytes for local variables. Maximum is 2,048 bytes.
Raspberry Pi2 als FHEM-Plattform
HM, FS20, 1-Wire, PanStamp,LW12,Intertechno,ESPEasy,Alexa

Markus

Hallo
Bin jetzt schon weiter aber wie Rechne ich die Messwerte jetzt in Vernünftige Zahlen um?
Gruß Markus


2015-12-08_21:39:30 SWAP_52 0C.0-Moisture_level_0: 00B1
2015-12-08_21:39:30 SWAP_52 0C.1-Moisture_level_1: 0086
2015-12-08_21:39:30 SWAP_52 0B-Voltage: 0CDD
2015-12-08_21:39:30 SWAP_52 voltage: 3.293
2015-12-08_21:41:58 SWAP_52 0B-Voltage: 0CDD
2015-12-08_21:41:58 SWAP_52 voltage: 3.293
2015-12-08_21:41:59 SWAP_52 0C.0-Moisture_level_0: 0001
2015-12-08_21:41:59 SWAP_52 0C.1-Moisture_level_1: 0001
2015-12-08_21:41:59 SWAP_52 0B-Voltage: 0CDD
2015-12-08_21:41:59 SWAP_52 voltage: 3.293
2015-12-08_21:46:29 SWAP_52 0C.0-Moisture_level_0: 02A9
2015-12-08_21:46:29 SWAP_52 0C.1-Moisture_level_1: 01B9
2015-12-08_21:46:29 SWAP_52 0B-Voltage: 0CCA
2015-12-08_21:46:29 SWAP_52 voltage: 3.274
2015-12-08_21:50:33 SWAP_52 0C.0-Moisture_level_0: 02A8
2015-12-08_21:50:33 SWAP_52 0C.1-Moisture_level_1: 01B5
2015-12-08_21:50:33 SWAP_52 0B-Voltage: 0CE7
2015-12-08_21:50:33 SWAP_52 voltage: 3.303
2015-12-08_21:55:06 SWAP_52 0C.0-Moisture_level_0: 02A7
2015-12-08_21:55:06 SWAP_52 0C.1-Moisture_level_1: 01B2
2015-12-08_21:55:06 SWAP_52 0B-Voltage: 0CE7
2015-12-08_21:55:06 SWAP_52 voltage: 3.303
Raspberry Pi2 als FHEM-Plattform
HM, FS20, 1-Wire, PanStamp,LW12,Intertechno,ESPEasy,Alexa

Bennemannc

Hey Markus,

geil - hast es ja hinbekommen. Knall das Level0_Voltage {hex(ReadingsVal($name,"0C.0-Moisture_level_0","0"))*(4.0/1024)}, VWC_A:0C.0-Moisture_level_0 {sprintf("%.0f",(11.6552 * (ReadingsVal($name,"Level0_Voltage","0"))**4 + 7.10835 * (ReadingsVal($name,"Level0_Voltage","0"))**2 - 0.569557) / ((ReadingsVal($name,"Level0_Voltage","0"))**2 + 1))}, Level1_Voltage {hex(ReadingsVal($name,"0C.1-Moisture_level_1","0"))*(4.5/1024)}, VWC_B:0C.1-Moisture_level_1 {sprintf("%.0f",(11.6552 * (ReadingsVal($name,"Level1_Voltage","0"))**4 + 7.10835 * (ReadingsVal($name,"Level1_Voltage","0"))**2 - 0.569557) / ((ReadingsVal($name,"Level1_Voltage","0"))**2 + 1))}, voltage:0B-Voltage {hex(ReadingsVal($name,"0B-Voltage","0"))*0.001}, battery:0B-Voltage {(ReadingsVal($name,"voltage","0")<1?"low":"ok")} mal als userReading in deim Gerät.
Ich habe für mich die Werte etwas angepasst, da die Sensoren selbst im Wasserglas nicht 100% anzeigten. Normalerweise ist die Basis 3.3 V - ich habe die etwas angehoben und bekomme dann höhere Werte - die Basis steht (4.0/1024) bzw. (4.5/1024). Die Werte sind unterschiedlich, weil die Sensoren verschieden lange Kabel haben.

Gruß Christoph
Cubietruck, Fhem 5.8
CC-RT-DN|LC-SW2-FM|RC-12|RC-19|LC-SW4-BA-PCB|LCp-SW1-BA-PCB|ES-PMSw1-Pl|LC-Bl1PBU-FM|PBI-4-FM|CC-VD|CC-TC|SEC-SC(2)|RC-KEY3-B|LC-Sw1PBU-FM|PB-2-FM|WDS100-C6-O|WDC7000|LC-Bl1-FM
Module: Dewpoint,FB_Callmonitor,HCS,Panstamp,at,notify,THRESHOLD,average,DOIF

Markus

Hallo Christoph
Erst mal Danke!! Ohne dich hätte ich es nicht Geschafft!!

Aber ich hab da noch ein Problem:
wenn ich jetzt (4.0/1024) bzw. (4.5/1024) in (3.3/1024) ändere hab ich dann wieder den Original wert? sind die 1024 zum feineinstellen?
Ich frag nur weil ich so weit weg bin von richtigen werten wie es nur geht.
Im log sieht man zwei Sensoren in einem Vollem Wasserglas also 100%


Danke
Gruß Markus

2015-12-08_23:32:41 PanStamp_1 0C.0-Moisture_level_0: 0243
2015-12-08_23:32:41 PanStamp_1 0C.1-Moisture_level_1: 025F
2015-12-08_23:32:41 PanStamp_1 VWC_B: 79
2015-12-08_23:32:41 PanStamp_1 Level0_Voltage: 2.26171875
2015-12-08_23:32:41 PanStamp_1 Level1_Voltage: 2.66748046875
2015-12-08_23:32:41 PanStamp_1 VWC_A: 56
2015-12-08_23:32:42 PanStamp_1 0B-Voltage: 0CE7
2015-12-08_23:32:42 PanStamp_1 voltage: 3.303
2015-12-08_23:32:42 PanStamp_1 battery: ok
2015-12-08_23:32:42 PanStamp_1 Level0_Voltage: 2.26171875
2015-12-08_23:32:42 PanStamp_1 Level1_Voltage: 2.66748046875
2015-12-08_23:36:58 PanStamp_1 0C.0-Moisture_level_0: 0240
2015-12-08_23:36:58 PanStamp_1 0C.1-Moisture_level_1: 025B
2015-12-08_23:36:58 PanStamp_1 VWC_B: 79
2015-12-08_23:36:58 PanStamp_1 Level0_Voltage: 2.25
2015-12-08_23:36:58 PanStamp_1 Level1_Voltage: 2.64990234375
2015-12-08_23:36:58 PanStamp_1 VWC_A: 55
2015-12-08_23:36:58 PanStamp_1 0B-Voltage: 0CE7
2015-12-08_23:36:58 PanStamp_1 voltage: 3.303
2015-12-08_23:36:58 PanStamp_1 battery: ok
2015-12-08_23:36:58 PanStamp_1 Level0_Voltage: 2.25
2015-12-08_23:36:58 PanStamp_1 Level1_Voltage: 2.64990234375
Raspberry Pi2 als FHEM-Plattform
HM, FS20, 1-Wire, PanStamp,LW12,Intertechno,ESPEasy,Alexa

Bennemannc

Hallo,

die 1024 sind ein Teiler wegen dem A/D Wandler. Eigentlich müsste die Spannung wenn die Teile im Wasserglas sind 3,3 Volt sein. Das das nicht so ist (2,26 bzw. 2,66) habe ich die Basis von 3,3 auf 4,0 bzw. 4,5 erhöht. Ich habe das auch irgendwo gefunden und nicht selber entwickelt. Zunächst hatte ich beide auf 4,5 - den einen habe ich vor kurzem runtergesetzt, da ich über 100% kam. Ich habe einfach versucht, die darüber auf 100% zu kalibrieren. Wichtig ist - länger im Wasser stehen lassen, die Werte verändern sich anscheinen noch leicht.

Gruß Christoph
Cubietruck, Fhem 5.8
CC-RT-DN|LC-SW2-FM|RC-12|RC-19|LC-SW4-BA-PCB|LCp-SW1-BA-PCB|ES-PMSw1-Pl|LC-Bl1PBU-FM|PBI-4-FM|CC-VD|CC-TC|SEC-SC(2)|RC-KEY3-B|LC-Sw1PBU-FM|PB-2-FM|WDS100-C6-O|WDC7000|LC-Bl1-FM
Module: Dewpoint,FB_Callmonitor,HCS,Panstamp,at,notify,THRESHOLD,average,DOIF

Markus

Danke das Funktioniert aber noch nicht perfekt...
Noch Teste ich in einem Wasserglas zwei Sensoren Neben einander.
Ich musste 6 und 6.3 Volt einstellen um 100% zu haben
Die Sensoren schwanken um bis zu 15% rauf und runter ist das Normal?
Der erste VWC_A wird sofort Aktualisiert und der VWC_B hängt 4 Minuten nach (ich glaub das hatte Puschel74 auch)

Gruß Markus
Raspberry Pi2 als FHEM-Plattform
HM, FS20, 1-Wire, PanStamp,LW12,Intertechno,ESPEasy,Alexa

Bennemannc

Hallo,

Feuchtigkeit messen - das ist immer so eine Sache. Auch bei den Luftfeuchtesensoren gibt es wahnsinnige Abweichungen. Ich habe im Wohnzimmer noch ein Therm-/Hygdrometer von Oregon stehen - die Abweichung zu dem HM Teil - was direkt daneben steht - sind so um die 10 - 15%.
Für mich ist das nur ein "Peilometer" ich bestimme durch Versuch einen Wert, ab dem bewässert werden muss. Es kommt ja auch noch immer darauf an, wieviel Schatten usw. vorhanden sind. Meine zwei Sensoren sind ca. 4 Meter auseinander. Der eine geschützt unter Efeu, der andere nicht - Unterschied schlappe 26%.

Gruß Christoph
Cubietruck, Fhem 5.8
CC-RT-DN|LC-SW2-FM|RC-12|RC-19|LC-SW4-BA-PCB|LCp-SW1-BA-PCB|ES-PMSw1-Pl|LC-Bl1PBU-FM|PBI-4-FM|CC-VD|CC-TC|SEC-SC(2)|RC-KEY3-B|LC-Sw1PBU-FM|PB-2-FM|WDS100-C6-O|WDC7000|LC-Bl1-FM
Module: Dewpoint,FB_Callmonitor,HCS,Panstamp,at,notify,THRESHOLD,average,DOIF

Markus

Hallo Christoph

Ist jetzt auch nicht so extrem wie es am Anfang ausgeschaut hat Hab mir gerade einen Plot gemacht und die letzten 13 Stunden Schwankungen von 96 bis 100 und einmal 102% das las ich gelten  ;D

Nochmals Danke!!! ohne dich hätte ich es nicht Geschafft!

Gruß Markus
Raspberry Pi2 als FHEM-Plattform
HM, FS20, 1-Wire, PanStamp,LW12,Intertechno,ESPEasy,Alexa

Markus

Hallo

Mir ist gerade aufgefallen das der PanStamp immer 3.3 Volt anzeigt egal wie lehr die Batterie ist.
hab dann hier: http://old.panstamp.com/products/battery-board gelesen das der Max aus 0.8-1.5 Volt 3.3 Volt Macht.
Frage: Kann ich dann den wert überhaupt zur Batterieüberwachung nutzen?

Gruß Markus
Raspberry Pi2 als FHEM-Plattform
HM, FS20, 1-Wire, PanStamp,LW12,Intertechno,ESPEasy,Alexa

Bennemannc

#417
Hallo,

mit der alten Bibliothek waren die Werte korrekt - also im Bereich der Batterie 1,5 - 1,2 Volt. Schau mal im Sktech an welchem Pin gemessen wird. Müsste nachsehen - glaube aber es war A7. Sonst müsste man mal beide Versionen vergleichen.

Gruß Christoph

Edit: in den alten Sketches stand immer "define VOLT_SUPPLY_A7" und dann gibt es noch in der regtable einen Abschnitt, wo der Wert berechnet wird.
Cubietruck, Fhem 5.8
CC-RT-DN|LC-SW2-FM|RC-12|RC-19|LC-SW4-BA-PCB|LCp-SW1-BA-PCB|ES-PMSw1-Pl|LC-Bl1PBU-FM|PBI-4-FM|CC-VD|CC-TC|SEC-SC(2)|RC-KEY3-B|LC-Sw1PBU-FM|PB-2-FM|WDS100-C6-O|WDC7000|LC-Bl1-FM
Module: Dewpoint,FB_Callmonitor,HCS,Panstamp,at,notify,THRESHOLD,average,DOIF

Markus

Hallo
in welcher Date muss ich nach "define VOLT_SUPPLY_A7" suchen?
die Berechnung hab ich gefunden aber das ist mir zu hoch :(

Gruß Markus

/*
* soilmoisture
*
* Copyright (c) 2014 panStamp <contact@panstamp.com>
*
* This file is part of the panStamp project.
*
* panStamp  is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* panStamp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with panStamp; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
* USA
*
* Author: Daniel Berenguer
* Creation date: 04/29/2013
*
* Device:
* Soil Moisture sensor
*
* Description:
* This application measures soil moisture from any two sensor providing an
* analog signal
*
* These devices are low-power enabled so they will enter low-power mode
* just after reading the sensor values and transmitting them over the
* SWAP network.
*
* Associated Device Definition File, defining registers, endpoints and
* configuration parameters:
* soilmoisture.xml
*/

#include "regtable.h"
#include "swap.h"

/**
* Sensor pins
*/
#define SENSOR_0_PIN  A4    // Analog pin - sensor 0
#define POWER_0_PIN   7    // Digital pin used to powwer sensor 0
#define SENSOR_1_PIN  A5    // Analog pin - sensor 1
#define POWER_1_PIN   6    // Digital pin used to powwer sensor 1
/**
* setup
*
* Arduino setup function
*/
void setup()
{
  int i;

  pinMode(LED, OUTPUT);
  digitalWrite(LED, LOW);

  // Initialize power pins
  pinMode(POWER_0_PIN, OUTPUT);
  digitalWrite(POWER_0_PIN, LOW);
  pinMode(POWER_1_PIN, OUTPUT);
  digitalWrite(POWER_1_PIN, LOW);

  // Init SWAP stack
  swap.init();
 
  // Transmit product code
  swap.getRegister(REGI_PRODUCTCODE)->getData();

  // Enter SYNC state
  swap.enterSystemState(SYSTATE_SYNC);

  // During 3 seconds, listen the network for possible commands whilst the LED blinks
  for(i=0 ; i<6 ; i++)
  {
    digitalWrite(LED, HIGH);
    delay(100);
    digitalWrite(LED, LOW);
    delay(400);
  }

  // Transmit periodic Tx interval
  swap.getRegister(REGI_TXINTERVAL)->getData();
  // Transmit power voltage
  swap.getRegister(REGI_VOLTSUPPLY)->getData();
   // Switch to Rx OFF state
  swap.enterSystemState(SYSTATE_RXOFF);
}

/**
* loop
*
* Arduino main loop
*/
void loop()
{
  // Transmit sensor data
  swap.getRegister(REGI_SENSOR)->getData();
  // Transmit power voltage
  swap.getRegister(REGI_VOLTSUPPLY)->getData();

  // Sleep
  swap.goToSleep();
}

// Voltage supply
static byte dtVoltSupply[2];
REGISTER regVoltSupply(dtVoltSupply, sizeof(dtVoltSupply), &updtVoltSupply, NULL);
// Sensor value register (dual sensor)
static byte dtSensor[4];
REGISTER regSensor(dtSensor, sizeof(dtSensor), &updtSensor, NULL);


Raspberry Pi2 als FHEM-Plattform
HM, FS20, 1-Wire, PanStamp,LW12,Intertechno,ESPEasy,Alexa

Bennemannc

Hallo Markus,

nach den beiden "include" geht es bei mir so
/**
* Uncomment if you are reading Vcc from A7. All battery-boards do this
*/
#define VOLT_SUPPLY_A7

/**
* LED pin
*/
#define LEDPIN        4

weiter. Dann kommt wie bei Dir die Definition der Sensorpins.
In der regtable steht das bei mir so
// Voltage supply
static unsigned long voltageSupply = 3300;
static byte dtVoltSupply[2];
REGISTER regVoltSupply(dtVoltSupply, sizeof(dtVoltSupply), &updtVoltSupply, NULL);
// Sensor value register (dual sensor)
static byte dtSensor[4];
REGISTER regSensor(dtSensor, sizeof(dtSensor), &updtSensor, NULL);

wie schon gesagt - die "alte" Version arbeitet noch mit der panstamp.h und nicht mit der swap.h

Gruß Christoph
Cubietruck, Fhem 5.8
CC-RT-DN|LC-SW2-FM|RC-12|RC-19|LC-SW4-BA-PCB|LCp-SW1-BA-PCB|ES-PMSw1-Pl|LC-Bl1PBU-FM|PBI-4-FM|CC-VD|CC-TC|SEC-SC(2)|RC-KEY3-B|LC-Sw1PBU-FM|PB-2-FM|WDS100-C6-O|WDC7000|LC-Bl1-FM
Module: Dewpoint,FB_Callmonitor,HCS,Panstamp,at,notify,THRESHOLD,average,DOIF