Here's a bash script to generate a simple xml file that is compatible with the browser page above:
That's some clever stuff right there...
Here's a bash script to generate a simple xml file that is compatible with the browser page above:
I just have to try this. My order from Hobby Boards should be here next week. I'm building owfs on a Debian distro as I type this post. If all goes well, my next brew day will be controlled solely by 1-wire devices connected via USB to my NSLU2.
You can do both. It would just be poor practice to rely on remote browser input as the sole means for process control. Toggling a mode or changing a value via the browser is fine and perhaps even desirable behavior. It just shouldn't be the primary means by which the rig is managed, and there should be no negative/irrecoverable implications should browser connectivity be lost.
Here's a bash script to generate a simple xml file that is compatible with the browser page above:
Code:#!/bin/bash # read all files in a directory # output their contents to an xml file # create the xml header and root node xml="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" xml=$xml"<!-- Created by update_xml.sh bash script -->\n" xml=$xml"<brewhut>\n" # each file becomes a child element with the filename as its tag files=/mnt/onewire/links/* for f in $files do fname="${f##*/}" xml=$xml" <"$fname">"`cat $f`"</"$fname">\n" done # close the root node tag xml=$xml"</brewhut>" # output the file echo -e "$xml" > /var/www/xml/brewhut.xml
OUTPUT=/var/www/xml/brewhut.xml
cat <<EOF > $OUTPUT
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Created by update_xml.sh bash script -->
<brewhut>
EOF
find /mnt/onewire/links -maxdepth 1 | while read f; do
fname="${f##*/}"
cat <<EOF >> $OUTPUT
<$fname>$(cat $f)</$fname>
EOF
done
cat <<EOF >> $OUTPUT
</brewhut>
EOF
#!/usr/bin/env python
import ow
ow.init('/dev/1WIRE')
ow.opt('F')
for entry in ow.Sensor('/').sensorList():
if 'temperature' in entry.entryList():
print "{}: {}".format(entry, entry.temperature)
~$ ~/src/read1wire.py
/28.71818C020000 - DS18B20: 83.75
sudo /opt/owfs/bin/owfs -F -u --allow_other /mnt/onewire
I highly recommend the 8 relay board, but pay the extra few bucks to have it preassembled. It has a bunch surface mount components that are somewhat difficult to solder without a reflow setup. I managed, but it took a long time and a lot of patience.
The chart is courtesy of www.chartgo.com and some copy/paste.
I'm using sections of a Corny dip tube welded shut and the same epoxy fill method as Gator.
FWIW, you can't connect a thermistor directly to the 1-wire bus. A DS18S20 works to directly measure temp. You need an analog input device compatible with the 1-wire bus to use a thermistor.
Also, I'd like to be able to hide the "threshold" marker, but that doesn't seem possible without changing the SteelSeries code. That's probably an easier fix than the LED issue, but I really hate reverse engineering someone else's sparsely commented code.
thresholdVisible: false
For those of you using an arduino, how are you guys sending configuration data to the board? I'm not really seeing a "clean" and effective way to be able to send dynamic configurations to the board.
For instance, how do I change the max limit for my HLT (for example) from say a 164 degree max to a 185 degree max during operation?
Maybe I'm making this to complicated...
Add a potentiometer to an analog input. Use its value to set the temp threshold.
I've been through what you're experiencing. I've come to this conclusion:
If you're using a microcontroller, use it to its fullest capability. Allow it to control - that's what it's designed to do. If it's spitting out data to a computer, that data should likely be for display only. If it suddenly lost the data link with the computer, it should be able to run autonomously with no catastrophic errors. Use pots, buttons, and switches to interface with it directly.
Otherwise, use something like LabJack or the 1-wire setups mentioned in this thread. Using those systems, the computer itself becomes both the display and controller.
Trying to use Arduino as a "middle man" is highly likely to leave you frustrated. I'm not saying it can't be done. In fact, I had a great deal of success with such a system. I just think it's counterproductive. Also, I found serial comms to be somewhat finicky with Arduino. I'd much rather rely on a unidirectional data dump than bidirectional data/control streams where the control inputs could be critical.
This didn't work.Add the following to you constructor and the threshold marker will be hidden.
Code:thresholdVisible: false
This didn't work.
Exactly. I'm guessing you're using a different version. It appears there are several available.
Enter your email address to join: