The Tellstick duo can wirelessly (433Mhz) control a lot of different brands of remote sockets. It can also receive temperatur and humidity from a variety of sensors.
So I made a wireless temperatur sensor that is compatible with my Tellstick Duo (and WH2 Weather Station).
The protocol is called "fine offset".
The sensor use the following parts:
Attiny85
Cheap 433Mhz transmitter
LM35 temperatur sensor.
The Attiny sleeps for 30minute (wakes up every 8 seconds and checks if 30 minutes has passed) and then makes the readings.
Sends the result to my Tellstick and then sleeps again for 30 minute.
In sleep mode it only consumes 59uA (according to my multimeter).
My next sensor will use a DHT22 humidity/temperatur sensor.
I attach 3 pictures.
Sensor1.jpg Shows my simple "board" with Attiny85, LM35 and radio transmitter.
Sensor2.jpg Enclosure with my "board" and two AA batteries inside.
Sensor3.jpg Output from Tellstick Duo command line utility.
The code from your link use the same CRC8 function (modified function from the OneWire library) as I do.
I recorded the traffic with my occiloscope and the CRC bits looked ok what I could see (compared my output with the picture from http://lucsmall.com/images/20130507-08-worksheet.png when I used the same temperature/humidity).
You are right that the Tellstick Duo don't care about the CRC bits but I send them anyway if you want to recive the data to a weather station.
By the way I have updated the library, fixed some major bugs (now handle negative temperature correct and changed some datatypes).
Also uploaded a new shetch that use a DHT22 sensor.
The row with the "OSCCAL " need to be removed or changed (use tinytuner to get the correct value if you use the internal oscillator).
My sensors (three) has worked flawlessly since I made them
I have tried your code but unfortunately without any success. I have verified that my TX circuit is working by using a simple transmit library (just to switch devices on/off).
To troubleshoot this does anyone have an example of a valid fine offset package from a sensor? I do not have a scope but I have a tellstick net which does not see what I send when trying to simulate a sensor.
Yes I noticed this site, however I am not exactly sure how to pass a datastring directly into the library. I guess I somehow have to fill _cdata[0]-[3] with the bits?
Maybe you could modify the code so it prints out 1/0 in the serial monitor.
Then you can set the temperature and humidity to the same as in the picture and compare the output.
Another error source could be the fuses of your MCU (if you use a Attiny or other non standard setup)?
Double check that the delay functions are working correct (the library uses the delayMicroseconds function).
Hi
I was struggling to get this lib running and i found out that earlier FW versions of the Tellstick DUO didn´t care about the CRC and then it worked. However i wanted it to work with latest FW (currently Ver 12.0) so for this needed to fix the CRC.
I am not a programmer at profession so my solution is most lightly not up to programming standards but it solves the problem with the CRC and now it works fine with all the latest SW & FW.
Running on Arduino Uno Rev3 with Ebay 433Mhz cheap TX
I noticed the same think when I upgraded my firmware. I tried to find the error in the CRC code but could not find it.
Ended with me downgrading the firmware.
Hello,
Nice work, i managed to get it to work on a MEGA2560 right away with one sensor.
I would like to attach up six sensors.
Have you tried this with several sensors?
When add more sensors it only sends the last one, any ideas??
However - I can't get it to work properly. I've used Ranemyrs zip on my Arduino Uno.
To test I use:
Sensor1.SetTemperature(999); //Set temperature
Sensor1.SetHumidity(77); //Set humidity
Sensor1.SetSendCount(3); //Number of times the sensor data should be transmitted (default 3)
Sensor1.SetSendCountDelay(10); //Delay in ms between transmitted data (default 10)
Sensor1.SetDeviceID(225); //Device id for sensor 1-255
I see that my Tellstick recives this data. However - it also seems to receive/register lots of fault sensors.
As you see, ther first is correct (id=225, temperature 99,9 and so on...). But the second row is errouneous (id=112).
Anyone else having the same problem? I've tried a couple of different values but I clearly see that a lot of bogus-sensors get's listed.
I have two real sensors (protocol=mandolyn) up and running. But the only "sensor" with protocol=fineoffset is my Arduino.
If I have my Arduino up and running for some time (10-20 minutes) I get a long list of erroneous registrations. Here's a part of the list I end up with:
Here is the typical code I've used for my tests (only changed other settings):
...
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:
I directly run 'tdtool --list' and get this (I left out hits from yesterday hits here):
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...
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).
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).