Write variables to a text file on a network share
Posted: Thu May 19, 2016 10:25 am
I use Blue Iris running on a Windows box for all my security cameras, and one of the features it has is being able to overlay text onto the cam footage from a Macro (basically a pointer to a TXT file.)
I use a utility called Blue Iris Tools to do this with weather info and CPU/Mem/Disk status is the BI server, but I'm thinking I'd like to take certain device states and/or variables and overlay them onto the camera for that room.
Like my server room...I have a temp/humidity sensor in there, so I'd like to dump some information into a TXT file that is stored on the Mac Pro fileserver. The Blue Iris windows machine has a GPO that automatically connects it to a folder called "SharedMedia" so there's a central repository all of my systems can read and write to for file/data exchange.
What would be the best way to do this? AppleScript? Python?
For sake of examples, lets say I wanted to save some formatted info to this file:
/Volumes/SharedMedia/BlueIris/Macro2.txt
Here's what I'd like to pull data from (used Karl's Utilities to dump the device list and all)
Getting sensorValue.ui for each one except the AeonLabs SmartSwitch, getting curEnergyLevel.ui from that one.
and having the TXT file look like:
Thoughts on the best way to extract and format that data into a TXT file in the designated destination?
I use a utility called Blue Iris Tools to do this with weather info and CPU/Mem/Disk status is the BI server, but I'm thinking I'd like to take certain device states and/or variables and overlay them onto the camera for that room.
Like my server room...I have a temp/humidity sensor in there, so I'd like to dump some information into a TXT file that is stored on the Mac Pro fileserver. The Blue Iris windows machine has a GPO that automatically connects it to a folder called "SharedMedia" so there's a central repository all of my systems can read and write to for file/data exchange.
What would be the best way to do this? AppleScript? Python?
For sake of examples, lets say I wanted to save some formatted info to this file:
/Volumes/SharedMedia/BlueIris/Macro2.txt
Here's what I'd like to pull data from (used Karl's Utilities to dump the device list and all)
- Code: Select all
1532285937 Arduino 1 - Temperature: sensorValue("87.8"), sensorValue.ui("87.8 °F")
1750325374 Arduino 1 - Humidity: sensorValue("35.0"), sensorValue.ui("35.0 %")
1757912877 Computer Room Server Power: accumEnergyTimeDelta("1435801"), accumEnergyTimeDelta.ui("1435801 seconds"), accumEnergyTotal("394.555"), accumEnergyTotal.ui("394.555 kWh"), curEnergyLevel("553.353"),
: curEnergyLevel.ui("553.353 W"), onOffState("True")
Getting sensorValue.ui for each one except the AeonLabs SmartSwitch, getting curEnergyLevel.ui from that one.
and having the TXT file look like:
- Code: Select all
Room Temp: 87.8ºF
Room Humidity: 35.0 %
Power Use: 553.353 W
Thoughts on the best way to extract and format that data into a TXT file in the designated destination?