XTension can read 1-wire temperature sensors through the Barix interface. The barix barionet and barix 50 interfaces supposed a 1-wire bus of up to 50 temperature sensors. They are assigned at startup of the device to registers 601-650. If the bus changes, a device comes disconnected or you add a new device, the order may change. As of XTension build 818 Iʼve added a way to create temperature units with the low level address of the actual 1-wire device that does not change if the bus ordering changes.
Setting it up however, is not a single step.
Go to the preferences window and edit the device for the barix you wish to change. There is a new checkbox there for “Use native one wire addresses” check that and save the interface.
delete or change to pseudos any units you have created already created between addresses 601 and 650 that used to hold temperature readings. If those units are still addressed in that range the values will go to them instead of using the new address method. It will only look for a 1-wire addressed unit if there is no corresponding old style addressed unit. If you wish to keep the same unit to hold the temperature just change the address of these from 601-650 to the address we discover in the next steps.
Create a 1-wire address register unit for each device on your 1-wire bus. The Barix puts the native 1-wire address for the units it discovers in addresses 651-700 so if you have 3 sensors create 3 “register” units in XTension with the addresses of 651, 652 and 653. THe name doesn’t matter though it should be descriptive, I use “barix 1-wire address register 1, 2, 3, etc”
So the VALUE of that address register unit will contain the native address of the device. But we need to convert that to hex to address the value units. We can do that with a bit of scripting in the ON script of the address register units you’ve just created in the step above. Create an ON script that looks like this:
set xtOnLabel of xUnit (ThisUnit) to (number to hex (future value))
some of the addresses are going to be negative when converted to decimal, so you may have to also put that script into the OFF script and change the label to “xtOFFLabel” in that case in order to see the updated value. If the barix unit is already on turning off the register unit manually in XTension will cause it to resend the address and show you the formatted value. If not then reboot the barix now and all the units will update upon startup.
lastly either create a new unit, or change the address of the unit you saved off above if you’re updating an old setup, to the hex value now displayed in the address register unit. Now no matter how the devices physically re-arrange themselves on the bus the value will get routed in via the real address.