HomeGenie Forum
Development => Feature request => Topic started by: Marco on October 21, 2014, 04:45:43 PM
-
Hi Genie,
great project!!! ;D
I'm waiting for Banana-pi and DS18B20, first to find your project, I finded this:
http://www.raspibo.org/wiki/index.php/Termostato (http://www.raspibo.org/wiki/index.php/Termostato)
Do you think is possible install server for data and monitor, in homegenie Banana Pi SD-Card?
http://www.raspibo.org/wiki/index.php/File:Termostato_grafico.png (http://www.raspibo.org/wiki/index.php/File:Termostato_grafico.png)
I want build a chronothermostat with DS18B20 and implement the weekly programming but I don't like the system used in the link http://www.raspibo.org/wiki/index.php/File:Termostato_prog_settimana.png (http://www.raspibo.org/wiki/index.php/File:Termostato_prog_settimana.png) only "N:night" or "G:Day" ...unfortunatly I'm not a developer and search news idea about the weekly programming and web interface.
For example insert a function like "away" or "on/off" or a pir sensor who switch the state on/off when away.
In the next future you have idea about a chronothermostat weekly?
Thank in advance
Marco
-
Hi Marco,
read this:
http://www.homegenie.it/forum/index.php?topic=351.msg2533#msg2533 (http://www.homegenie.it/forum/index.php?topic=351.msg2533#msg2533)
hope this helps.
Cheers,
g.
-
Hi Genie,
the APP for read the temperature from the sensor DS18B20, work very well.
Tested 3 sensors at the same time and work fine.
An other information please, is possible disable the fahrenheit temperature and view only the grade temperature?
how I can disable the refresh information in the right corner?
Every time the temperature change a windows appear, and the temperature is displayed only in fahrenheit.
thank
Marco
-
Hi Marco,
the DS18B20 app was just an early example, so it is not complete.
You can't disable the event notification but it shouldn't popup if the value is the same as the previously reported one.
Later on today I will add the ability to configure the update interval and the unit (celsius/fahrenheit).
If you can test this I will include the app in the next hg update as well.
One question: did you have to "modprobe" for 1-wire modules in order to make it work?
Cheers,
g.
-
Hi, Marco
How did you get the DS18B20 to work on RPI?
I have it plugged in, as per AdaFruit instructions on GPIO 4 and 1-Wire is enabled. No readings. Must I enable MCP3008 as well?
Any other tricks? Must GPIO be enabled as well?
-
Hi Bitcraze,
sorry but I use bananapi is little bit different like raspberrypi.
Check two time the wire and pin, if you have use another sensor(possible your is broken) then update homegenie, there is new app by default "One-Wire Devices" enable it, and read instruction : Integrates 1-wire devices as HG modules (linux only).To enable a 1-wire device, its ID must be specified in the module options popup.To find out your connected devices ID, issue from a terminal the command:
ls -la /sys/bus/w1/devices/"
after the command in the terminal, you need to copy something like this number:
28-00044aXXXX (Is your sensor if you have one, more like this if you have more sensors) after the command and put in "devices ID" of the app.
Or you can read this: http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/temperature/ (http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/temperature/)
I hope you solve your problem
Marco
-
Hi Genie,
about your request, this is my configuration for bananapi and the commands used for read the sensor DS18B20
thank for the APP, work well
banana pi + HomeGenie_1_00_beta_r411_banpi-armhf-4GB + 3 sensor DS18B20 with resistor of 4700 ohm between pin 7(GPIO) and pin 1(+3.3 V), pin6 for GND.
updated the system with
sudo apt-get update && sudo apt-get dist-upgrade
update homegenie
then in the terminal:
cd /home/bananapi/
sudo apt-get install git
sudo apt-get install make
git clone https://github.com/linux-sunxi/sunxi-tools
cd sunxi-tools
sudo make
cd /boot/bananapi/
sudo /home/bananapi/sunxi-tools/bin2fex script.bin bananapi.fex
sudo nano bananapi.fex
Information: add the following at the end, save (CTRL + O) and close
[w1_para]
gpio = 4
then use the command below
sudo /home/bananapi/sunxi-tools/fex2bin bananapi.fex script.bin
sudo reboot
After reboot I can see the sensors and use ID for APP with command:
ls /sys/bus/w1/devices
28-00044a3XXX 28-00044aXXXX 28-00044XXXXX (the numbers are the 3 ID-sensor, because I used 3 sensors)
Marco
-
Hi,
sometime I have a wrong read of sensor, it's normal?
root@lemaker:/sys/devices/w1_bus_master1/28-00044a3866ff# cat w1_slave
ff ff ff ff ff ff ff ff ff : crc=c9 NO
52 01 55 00 7f ff 0c 10 53 t=-62
and the APP read negative value -0.1 °C
I use three sensor at the same time and casually the read temperature of one, is wrong..
In the link down, (Reading temperatures on a Raspberry Pi using DS18B20 sensors - part 2), speak about an error of read, is possible read again the value and don't view the wrong value in the app?
http://raspbrew.tumblr.com/ (http://raspbrew.tumblr.com/)
thank
-
Hi Marco,
the app doesn't check against the CRC line, which supposingly tells if the reading was correct.
Add the follwing instruction before line #56:
if (data.Count > 0 && data[0].Contains(" crc=") && data[0].Contains(" NO")) continue;
Also the parseTemperatureData function could be optimized... the code is very approximative.... for example if the temperature value is always placed on the 2nd line, there's no need of using a for iteration (or at least should be break once the temp value is found).
Cheers,
g.
-
Hi Genie,
thank for the fast answer. :)
First to add the instruction, I tested five sensors and obtained less errors when I used only one resistor of 1200 ohm.
I think obtain better temperature value, When I use 5 V and not 3.3 V, in the future I will connect it with long wire.
I hope this is useful for other forum users.
Thank
Marco