Go Down

Topic: Wireless temperatur sensor that is compatible with Tellstick Duo (Lib. included) (Read 22554 times) previous topic - next topic

seebee

Hi and thanks for the reply!

I belive I use the latest firmware (2.1.2)!? I don't see any newer?
http://download.telldus.com/TellStick/Software/telldus-core/

Here is the typical code I've used for my tests (only changed other settings):

Code: [Select]

...
void loop() {
  blinkled();
  delay(5000-blinkdelay);         //Set a delay between packages (blinkdelay = 500)
  Sensor2.Transmitt();            //Transmitts sensor data
}
...


Perhaps it's because I've tried so many times to upload and restart my sensor/Arduino? You also see a clear pattern:
- At least two faults hits are registred!?
- It seems to be common that data-values get "halfed" for each erroneous hit. Correct id=44 -> becomes id=22, and after that id=11... The same for the other data values.
But some data also get corrupt in other ways - see the bottom table.

Right now, at about 21:48 I tried to run again. When I uploaded the code to my Arduino I get the following:

1. I directly run 'tdtool --list' and get this (I left out hits from yesterday hits here):

Code: [Select]

fineoffset          temperaturehumidity 44    44.4° 44%   2015-08-11 21:48:28
fineoffset          temperaturehumidity 22    22.2° 22%   2015-08-11 21:48:28
fineoffset          temperaturehumidity 11    11.1° 11%   2015-08-11 21:48:29


2. Running 'tdtool --list' again (after a couple of seconds) gets the "same" data but other timestamps (I left out hits from yesterday hits here):

Code: [Select]

fineoffset          temperaturehumidity 44    44.4° 44%   2015-08-11 21:49:06
fineoffset          temperaturehumidity 22    22.2° 20%   2015-08-11 21:49:07
fineoffset          temperaturehumidity 11    11.1° 11%   2015-08-11 21:48:55


3. Again, after another few seconds (I left out hits from yesterday hits here):

Code: [Select]

fineoffset          temperaturehumidity 44    44.4° 44%   2015-08-11 21:49:28
fineoffset          temperaturehumidity 22    22.2° 20%   2015-08-11 21:49:28
fineoffset          temperaturehumidity 11    11.1° 14%   2015-08-11 21:49:12


BR
/ Calle

seebee

In my last post i left out some data. Here is the full list of today (bottom three hits are from tonight):

Here is my current "list" - where you still can see several hits from yesterday/last night. As I wrote - the number of hits might be related to how many times I've tried to get it to work. Nevertheless - erroneous hits always get registred...

Code: [Select]

pi@raspberrypi ~ $ tdtool --list
Number of devices: 1
2 LuxorSwitch2 OFF


SENSORS:

PROTOCOL             MODEL               ID   TEMP HUMIDITY RAIN                 WIND                 LAST UPDATED
mandolyn             temperaturehumidity 11   15.3° 93%       2015-08-11 21:42:05
mandolyn             temperaturehumidity 31   15.9° 80%       2015-08-11 21:49:08
mandolyn             temperaturehumidity 32   -17.1° 36%       2015-08-08 19:37:08
fineoffset           temperaturehumidity 200   66.7° 55%       2015-08-11 00:38:16
fineoffset           temperaturehumidity 100   33.3° 23%       2015-08-11 00:38:16
fineoffset           temperaturehumidity 50   16.6° 23%       2015-08-10 22:19:55
fineoffset           temperaturehumidity 204   66.7° 23%       2015-08-10 22:07:37
fineoffset           temperaturehumidity 216   66.7° 23%       2015-08-10 22:07:58
fineoffset           temperaturehumidity 174   115.1° 12%       2015-08-09 22:45:20
fineoffset           temperaturehumidity 104   66.7° 23%       2015-08-10 22:12:30
fineoffset           temperaturehumidity 72   66.7° 23%       2015-08-10 22:21:22
fineoffset           temperaturehumidity 144   133.4° 47%       2015-08-10 21:44:05
fineoffset           temperaturehumidity 36   -34.7° 23%       2015-08-10 21:44:16
fineoffset           temperaturehumidity 96   66.7° 23%       2015-08-10 22:20:49
fineoffset           temperaturehumidity 124   -25.5° 12%       2015-08-10 21:53:35
fineoffset           temperaturehumidity 201   66.7° 23%       2015-08-10 22:16:02
fineoffset           temperaturehumidity 202   66.7° 23%       2015-08-10 22:20:49
fineoffset           temperaturehumidity 25   8.3° 98%       2015-08-10 22:01:27
fineoffset           temperaturehumidity 126   -191.5° 23%       2015-08-10 21:50:52
fineoffset           temperature         225   -26.1°         2015-08-10 21:52:24
fineoffset           temperaturehumidity 248   66.7° 23%       2015-08-10 22:22:05
fineoffset           temperaturehumidity 232   66.7° 23%       2015-08-10 22:21:16
fineoffset           temperaturehumidity 40   66.7° 23%       2015-08-10 22:03:32
fineoffset           temperaturehumidity 108   152.2° 63%       2015-08-10 21:59:17
fineoffset           temperaturehumidity 255   22.5° 63%       2015-08-11 00:50:28
fineoffset           temperaturehumidity 242   102.0° 50%       2015-08-10 22:00:06
fineoffset           temperaturehumidity 71   -192.6° 65%       2015-08-10 22:01:54
fineoffset           temperaturehumidity 8     66.7° 23%       2015-08-10 22:03:48
fineoffset           temperaturehumidity 249   51.0° 25%       2015-08-10 22:05:32
fineoffset           temperaturehumidity 63   -107.5° 31%       2015-08-10 22:05:32
fineoffset           temperature         177   199.2°         2015-08-10 22:07:42
fineoffset           temperaturehumidity 222   66.7° 23%       2015-08-11 00:40:04
fineoffset           temperaturehumidity 110   66.7° 23%       2015-08-11 00:38:32
fineoffset           temperaturehumidity 111   33.1° 23%       2015-08-11 00:39:59
fineoffset           temperaturehumidity 55   -16.7° 23%       2015-08-11 00:39:21
fineoffset           temperaturehumidity 94   66.7° 23%       2015-08-11 00:39:48
fineoffset           temperaturehumidity 225   99.9° 77%       2015-08-11 07:56:27
fineoffset           temperaturehumidity 112   -50.3° 77%       2015-08-11 01:06:21
fineoffset           temperaturehumidity 56   125.5° 77%       2015-08-11 01:03:01
fineoffset           temperaturehumidity 97   99.9° 77%       2015-08-11 01:04:11
fineoffset           temperaturehumidity 113   99.9° 77%       2015-08-11 01:06:53
fineoffset           temperaturehumidity 135   15.9° 58%       2015-08-11 00:56:04
fineoffset           temperaturehumidity 233   99.9° 77%       2015-08-11 01:05:32
fineoffset           temperaturehumidity 95   -114.9° 77%       2015-08-11 00:56:47
fineoffset           temperaturehumidity 241   99.9° 77%       2015-08-11 01:01:34
fineoffset           temperaturehumidity 229   99.9° 77%       2015-08-11 01:00:56
fineoffset           temperaturehumidity 49   99.9° 77%       2015-08-11 00:59:35
fineoffset           temperaturehumidity 227   99.9° 77%       2015-08-11 01:04:54
fineoffset           temperaturehumidity 44   44.4° 44%       2015-08-11 21:49:28
fineoffset           temperaturehumidity 22   22.2° 20%       2015-08-11 21:49:28
fineoffset           temperaturehumidity 11   11.1° 14%       2015-08-11 21:49:12

olof_n

Hi!

I checked with tdtool and I am getting 1-2 faulty readings each day. My sensor sends every 30 minute.

48*3 (sendcount) = 144 sendings.
2  / 144 = 1,3% faults.

EDIT: missed that you got so many errors.

Are you using a Attiny85? Is it possible that the fuses are wrong?
If so, try to blink a led every second and see if the time between blinks is right,

/Olof





seebee

Ok, I will try lower my interval :-)

It seems like I need to add some software logic to filter out the faulty ones.

Do you have multiple sensors? How do you seperate possible id-collisions?
(One obvious way is to filter out "fineoffset" hits with id's that does not match my hardcoded id's).

Again - thanks!
 

seebee

I'm a newbie when it comes to this micro-controller world...

I've started to test using a Arduino Uno Rev 3 (=> ATmega328).

Perhaps I should make a better antenna on my RF-transmitter. Now, I use a ordinary wire... (have not checked the length of it).
I might also try to move/isolate my Telldus (now I squeezed it into a  cabinette which also contains my router, raspberry, NAS).

/Cheers

olof_n

Ok, if you use a Arduino Uno it should work.

Try and check the antenna. I use a ordinary wire.

For 315Mhz the length should be 23.81cm (9.37 inches).
For 433 Mhz the length should be17.2 cm (6.7 inches)


/Olof

seebee

Oh - I'm a little bit embarrassed...

I didn't have the latest firmware installed on my Tellstick. I hade the latest software of telldus-core on my Rasberry. But when I put my Tellstick to my Windows computer and verified my firmware version - I had only version 5 installed. The latest is version 12. (Don't know how to check this on Linux - that's why I missed it).

So, my bad.

Anyway, now it seems to work very well. Don't see any faulty recordings. Guess that the CRC-check helps out a bit (both the firmware upgrade and Peters contribution).

Sorry for the waste of time Olof - but thanks for your effort to help me - and the software you have written! Very appreciated. Perhaps (hopefully) this thread might help someone else not to make that same misstake.

olof_n


solem

I have successfully made a circuit with the Attiny85 now which is transmitting to Telldus Live via a Tellstick Net. My only problem is that the watchdog seems to be at half speed. When using setup_watchdog(9) which should represent 8 sec and a TransmittInterval of 5 I would expect about 8x5=40 sec round time. But I am getting 80 sec between my transmits. Anyone knowing what could cause this?

It is worth mentioning I am running my gear on a 3V battery cell with the Attiny85 using internal 8mhz and I have of course set the fuses (tried both with Arduino ISP and STK500). Reading the fuses back also gives me the right values so I really don't understand this.

define_swe

I have successfully made a circuit with the Attiny85 now which is transmitting to Telldus Live via a Tellstick Net. My only problem is that the watchdog seems to be at half speed. When using setup_watchdog(9) which should represent 8 sec and a TransmittInterval of 5 I would expect about 8x5=40 sec round time. But I am getting 80 sec between my transmits. Anyone knowing what could cause this?

It is worth mentioning I am running my gear on a 3V battery cell with the Attiny85 using internal 8mhz and I have of course set the fuses (tried both with Arduino ISP and STK500). Reading the fuses back also gives me the right values so I really don't understand this.
Have you managed to figured it out?. I am just started out PIC programing again after 20 year of high level languages. Starting to build an automated plant watering solution for my whife. And whould like it to send ON/OFF state to Telldus.Net when the water tank holding the water used for watering is empty.

Therefor i am intrested if you solved the problem.

Best reg
Johan

bergetun

First of all. THANK YOU SO MUCH for creating this library. I have been looking for something like this for ages and was so happy when i finally found a solution.(This post)

My projects has been working perfectly with this library on a Arduino Uno for weeks now.  Since i use both wifi and 433 mhz radio for my sensors,  I ordered 10 x Wemos D1 r1 cards that i was planning to use for different sensors using this library

I was very disapointed when i discovered that my project didnt compile on the Wemos d1 cards.  I am a complete newbie on Arduino and programming microcontrollers, so i dont have the knowledge to fix this issue my self,  so i hope the community can help me out.

The problem seems to be that the compiler for Wemos D1 r1 doesnt recognise the "static" DDRB and PORTB in the Tellstick.cpp library file.   I think these statics has something to do with the pins on the board and that the Wemos doesnt have the same as Arduino uno.

Is it possible to get this library working on a Wemos D1 r1 card?


Here is the compile error i get

Code: [Select]

Arduino:1.8.9 (Mac OS X), Kort"WeMos D1 R1, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

/Users/jimmybergetun/Documents/Arduino/libraries/TellstickSensor/TellstickSensor.cpp: In constructor 'TellstickSensor::TellstickSensor(uint8_t)':
/Users/jimmybergetun/Documents/Arduino/libraries/TellstickSensor/TellstickSensor.cpp:6:3: error: 'DDRB' was not declared in this scope
   DDRB |= 1 << _transmittpin ;

   ^
/Users/jimmybergetun/Documents/Arduino/libraries/TellstickSensor/TellstickSensor.cpp: In member function 'void TellstickSensor::Transmitt()':
/Users/jimmybergetun/Documents/Arduino/libraries/TellstickSensor/TellstickSensor.cpp:77:7: error: 'PORTB' was not declared in this scope
       PORTB |= 1 << _transmittpin ;

       ^
/Users/jimmybergetun/Documents/Arduino/libraries/TellstickSensor/TellstickSensor.cpp:84:5: error: 'PORTB' was not declared in this scope
     PORTB |= 1 << _transmittpin ;

     ^
/Users/jimmybergetun/Documents/Arduino/libraries/TellstickSensor/TellstickSensor.cpp:98:5: error: 'PORTB' was not declared in this scope
     PORTB |= 1 << _transmittpin ;

     ^
exit status 1
Feil ved kompilering for kort WeMos D1 R1.

Denne rapporten ville hatt mer informasjon med
"Vis detaljert informasjon under kompilering"
alternativet aktivert i Fil -> Innstillinger.




Go Up