RFXWeight Homeseer 3
The new RFXCOM plugin for Homeseer 3 doesn’t have the RFX Weight script anymore. So I decided to write it, but not as extensive as it used to be.
What it does
- An event runs this script if your Weight Scale device value changes.
- The event will get the last weight result and compare it with (max) 3individuals configured in the .ini file
- The script will check if the new weight value is within the range of Min1-Max1, Min2-Max2, Min3-Max3.
Based on that it will write to the right device: Vdevice1/Vdevice1diff, Vdevice2/Vdevice2diff, Vdevice3/Vdevice3diff - The height is used calculate the BMI.
<span style="color: #3366ff;"><code>[Settings]
<code><span style="color: #993366;">devRFXweight</span>
=366 <span class="s1" style="color: #008000;">Device Reference ID of your Weight Scale device</span><span class="s2">
</span>
[Weight]
<code>
Person1=NamePerson1 <code><span class="s1" style="color: #008000;">name person 1</span>
<code><span style="color: #993366;">Min1</span><span class="s1">=</span><span class="s2">70 <span style="color: #008000;">minimum weight person1</span>
Person2=NamePerson2
</span><span style="color: #993366;">Max1</span><span class="s1">=</span><span class="s2">99 <span style="color: #008000;">maximum weight person1</span>
</span><span style="color: #993366;">Length1</span><span class="s1">=</span><span class="s2">190 <span style="color: #008000;">length of person1</span>
</span><span style="color: #993366;">Vdevice1</span><span class="s1">=</span><span class="s2">211 <span style="color: #008000;">device reference ID for person1 weight</span>
</span><span style="color: #993366;">Vdevice1diff</span><span class="s1">=</span><span class="s2">212 <span style="color: #008000;">device reference ID for person1 weight difference</span>
</span>
<span style="color: #993366;">Min2</span><span class="s1">=</span><span class="s2">45
</span><span style="color: #993366;">Max2</span><span class="s1">=</span><span class="s2">69
</span><span style="color: #993366;">Length2</span><span class="s1">=</span><span class="s2">168
</span><span style="color: #993366;">Vdevice2</span><span class="s1">=320</span><span class="s2">
</span><span style="color: #993366;">Vdevice2diff</span><span class="s1">=321</span>
Devices
All Devices are referenced to by their Device Reference ID.
devRFXweight = Device of your weight scale (needed to pull the new data from)
VdeviceX = Virtual device for person X that holds the current weight and BMI
VdeviceXdiff = Virtual device for person X that holds the difference between the last and new weight.
Installation
- Extract ZIP file and copy the Config, html and Scripts folders into your HS3 base folder. That will put all files in the right place. OR:
- Copy DJ_HS3-RFXweight-0x.vb to the <HS3>\Scripts folder
- Copy DJ-weight.ini to the <HS3>\Config folder
- Copy images to folder: <HS3>\Images\DJ-images\ folder
- Create device: create 2 Status Only devices for each user:
- “WEIGHT <name>”
- “WEIGHT <name> difference”
- Edit .INI: edit <HS3>\Config\DJ-weight.ini file and update the data
- Create event “WEIGHT Main”
- IF = your weight device ‘just had it’s value set or changed’
- RUN = script “DJ_HS3-RFXweight-0x.vb”
- Optionally: In the “WEIGHT <name> difference” device, add a range status graphics.
So if the weight goes up it shows a red up icon, and if the weight goes down it shows a green down icon.
- Optionally: Assign device-image to the Weight and Weight-difference devices, for example:
WEIGHT <name>: orange weight icon (icon-weightscale.png)
WEIGHT <name> difference: grey weight icon (icon-weightscale-gray.png)
These image files are in the <HS3>\html\images\DJ-images\ folder. - Optionally: change debug parameter in script to 0 (line: Private strDebug as Integer = 0 )
- Optionally: Create a device that monitors the change of “WEIGHT <name>” and based on a change it could for example send a push notification to your phone. (or Twitter the weight ;-)
FILES
Tested With
- Homeseer 3.0.0.208 (on Windows 7)
- RFXCOM plugin 3.0.0.29
- Weight Scale: Oregon Scientific BWR-102
Q&A
Q: Do you support anything other than Kilograms?
A: Not consciously, you may be able to change the ” Kg” strings in the code. NOTE: this probably impacts the BMI calculation, making that useless.
Q: How to troubleshoot?
A: In the DJ_HS3-RFXweight-0x.vb, find line Private strDebug as Integer = 0 and change the 0 to a 1 or 2. (1=write debug info in HS3 logs + WRITE data, 2=write debug info but do NOT write to devices)
Q: The people in my home have overlapping weights, can I still use this?
A: No, because it couldn’t tell which person just stepped on the scale.
Q: Will this work with other scales, systems?
A: It may, as long as the weight is written to a device as a double value (so “76.1”, not “761”)
I have not tested with other “regional settings” in Windows nor have I tested on Linux HS3.
Q: Can I disable the BMI calculation?
A: Not right now, it’s on the roadmap.
Q: When is the next release coming?
A: No idea, whenever I feel like it ;-)