Sensebender Micro
-
There is an explanation to the problem further up in the thread:
@gloob said:
Hello
I found an error in the sensebender micro sketch in the latest release.
The calculation of the temperature change is wrong.
float diffTemp = abs(lastTemperature - (isMetric ? data.celsiusHundredths : data.fahrenheitHundredths) / 100);needs to be replaced with
float diffTemp = abs(lastTemperature - (isMetric ? data.celsiusHundredths : data.fahrenheitHundredths) / 100.0);The division with 100 needs to be 100.0 otherwise the result will be an integer instead of a float value and the difference will be the decimal places of the last temperature.
-
@korttoma i did see that. but your saying that is what is causing it to transmit every 1 minute?
-
@hek I've soldered a second unit to compare, same error, I flashed back the sensebender version from the examples and on both I am stuck here: "Sensebender Micro FW 1.2radio init fail"
Gateway is 1.5 BTW, one radio is from itead the other not.
-
@epierre Can you confirm the settings you used in the IDE to program it? Are you sure there are no solder bridges where you soldered the radio or socket for the radio? Have you tried powering it with a couple of AA batteries after you uploaded the sketch?
Cheers
Al@Sparkman said:
@epierre Can you confirm the settings you used in the IDE to program it?
1.6.5 version
Are you sure there are no solder bridges where you soldered the radio or socket for the radio?
same behavior on two units
Have you tried powering it with a couple of AA batteries after you uploaded the sketch?
not yet but why should that change anything ?
-
Just tried out my first Sensebender...
soldered pins and battery power...
turn on...
led flashes once...
start inclusion...
3 devices...
Vera restarts (actually, it's openLuup running on an Arduino Yún)...
there they are...
and updating every minute!Thanks so much to all who made this level of sophistication so easy!! (Z-wave was never this simple!)
Whilst I need a couple of temp/humidity sensors, I also need to reflash one as a 4-switch sensor. Can I do this with an Arduino Uno configured with the ArduinoISP sketch as described here ?
https://www.arduino.cc/en/Tutorial/ArduinoISPAny advice or useful pointers? Thanks.
-
I am a noob in coding so I need some advice for tuning the sensebender.ino
current observed problems:- sensor values transmitted every minutes
- battery level info seems wrong
I am running the default senseblender.ino.
on 1) What I understood in this forum, it should transmit the temp. values only every 30min (or direct when change is >.05). However, I see them arriving in my controller (Domoticz) every minute. What should I change to have it send every 30min?
on 2) I observe in Domoticz that the battery levels reported (in the Devices section) are inaccurate. For example: one sensebender with 3.2v measured power reports 80, where I would expect round 100 (this one has new batteries). Other sensebenders with still 2.63v report 53. How to calibrate the battery measurement?
I have been searching this forum, but was unable to find the answer.
Alternatively, a pointer to a wiki on sensebender.ino that has this explained would work as well. -
The firmware that the sensebender is shipped with is pretty old, compared to the one that's available in the current master branch of mysensors library. A lot have been done to do better transmit control (like, limiting number of transmits etc.)
About the battery voltage, the sensebender is measuring against an internal vref, which isn't that accurate. I can't remember the specifics at the moment, but it's hidden somewhere in the datasheet. The measurement method has a lot of inaccuracy, but on the other hand it saves external components and power.
I didn't focus on it, but one could perhaps make some kind of calibration routine, use a known supply voltage and do some internal calculations and store an offset in eeprom.
-
I am a noob in coding so I need some advice for tuning the sensebender.ino
current observed problems:- sensor values transmitted every minutes
- battery level info seems wrong
I am running the default senseblender.ino.
on 1) What I understood in this forum, it should transmit the temp. values only every 30min (or direct when change is >.05). However, I see them arriving in my controller (Domoticz) every minute. What should I change to have it send every 30min?
on 2) I observe in Domoticz that the battery levels reported (in the Devices section) are inaccurate. For example: one sensebender with 3.2v measured power reports 80, where I would expect round 100 (this one has new batteries). Other sensebenders with still 2.63v report 53. How to calibrate the battery measurement?
I have been searching this forum, but was unable to find the answer.
Alternatively, a pointer to a wiki on sensebender.ino that has this explained would work as well.@jovo As @Fabien wrote, the default code puts 3.3 V as 100%. Look for the percentage calculation. You will see that it's basically (vcc - 1900)/14. This makes sense if using a step-up converter where you get 3.3 V. But if connecting directly to two AAs, 100% should be around 3 V. So just replace 14 with 11 in the calculation.
-
Thanks for the comments and suggestion.
Now I have installed the master branch code from the mys. library.
Unfortunately no change. Still very frequent updates (under the same circumstances).
I sense it has something to do with :
bool tx = force;
but I am not quite sure where to change it in.
I will continue my search..... -
There is a small error in the sketch, that falsely converts floats to ints. Look at line 243, it's dividing by 100:
float diffTemp = abs(lastTemperature - (isMetric ? data.celsiusHundredths : data.fahrenheitHundredths)/100); float diffHum = abs(lastHumidity - raHum.getAverage());This should be changed to 100.0 instead. This way the calculation is returning as a float.
float diffTemp = abs(lastTemperature - (isMetric ? data.celsiusHundredths : data.fahrenheitHundredths)/100.0); float diffHum = abs(lastHumidity - raHum.getAverage());