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.
[Settings]
=366 devRFXweight
Device Reference ID of your Weight Scale device
[Weight]
Person1=NamePerson1 name person 1
Person2=NamePerson2Min1=70 minimum weight person1
Max1=99 maximum weight person1
Length1=190 length of person1
Vdevice1=211 device reference ID for person1 weight
Vdevice1diff=212 device reference ID for person1 weight difference
Min2=45
Max2=69
Length2=168
Vdevice2=320
Vdevice2diff=321
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 ;-)