Author Topic: Tools: openHAB Item file generator  (Read 24285 times)

Offline Kmitchel

  • Full Member
  • ***
  • Posts: 167
  • Karma: +1/-2
Re: Tools: openHAB Item file generator
« Reply #75 on: April 28, 2017, 11:10:10 am »
I've never opened the script file in Windows, but I tried your command below just to be safe

tr -d '\015' miosLoad.sh nmiosLoad.sh

I get the error - tr: extra operand ?miosLoad.sh?

Offline jswim788

  • Hero Member
  • *****
  • Posts: 753
  • Karma: +51/-2
Re: Tools: openHAB Item file generator
« Reply #76 on: April 28, 2017, 11:41:36 am »
tr -d '\015' miosLoad.sh nmiosLoad.sh
You are missing the < and >.  The < says get it from this input file, and the > says put the output into the named file.
Code: [Select]
tr -d '\015' < miosLoad.sh > nmiosLoad.shThere are many, many ways to do this.  Search Google for 'dos2unix' or CR/LF to LF.  Your RPI3 may have dos2unix loaded or you can install it.  Most text editors will also do this for you.  Here's one sample: https://www.cyberciti.biz/faq/howto-unix-linux-convert-dos-newlines-cr-lf-unix-text-format/

Offline Kmitchel

  • Full Member
  • ***
  • Posts: 167
  • Karma: +1/-2
Re: Tools: openHAB Item file generator
« Reply #77 on: April 29, 2017, 08:59:02 am »
Getting closer, thanks SO much for helping me!  I ran the tr command on both Load and Transform files.  The Load ran successfully and created a user_data.xml file in my scripts directory.

I'm now getting this error when I try to run the command below:

./miosTransform.sh house

INFO: Transforming MiOS Unit Metadata from user_data.xml...
./miosTransform.sh: line 15: xsltproc: command not found
ERROR: Failed to Transform, Check for bogus XML in user_data.xml.



Offline jswim788

  • Hero Member
  • *****
  • Posts: 753
  • Karma: +51/-2
Re: Tools: openHAB Item file generator
« Reply #78 on: April 29, 2017, 11:40:52 am »
Code: [Select]
sudo apt-get update
sudo apt-get install xsltproc

Offline Kmitchel

  • Full Member
  • ***
  • Posts: 167
  • Karma: +1/-2
Re: Tools: openHAB Item file generator
« Reply #79 on: April 29, 2017, 04:56:01 pm »
Thank you, thank you, thank you!!!  That worked perfect!!

Offline Srki

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
Re: Tools: openHAB Item file generator
« Reply #80 on: March 14, 2018, 06:02:55 am »
Hi,
Hope someone can help me out with some basic instructions on how to bind my VERA to openHAB. My openHAB is running from a Windows 10 operating system. I am able to connect to openHAB and install the binding for MIOS but that is it. I edited the mios.cfg file with correct ip number to my VERA but I am stuck with the procedure where I need to use the MiOS Item Generator. First I needed to get bash in order to run the .sh files in Windows CMD. First error is in the miosLoad.sh where the port number is incorrect. I edited the file with port number 3480 but still I receive the error that the ip is incorrect. So I skipped this step and downloaded the .xml file by command http://MIOS_IP:3480/data_request?id=user_data&output_format=xml  but I am unable to use this XML through an XSLT Processor. Is there any step-by-step instruction for using the Mios Item Generator in Windows? Before I go any further, is this even possible to create using windows platform or do I need to use Linux?
/BR

Offline liko

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Tools: openHAB Item file generator
« Reply #81 on: May 01, 2018, 09:14:43 am »
It's easiest to just use Linux.  Most (if not all) of the tools that are required are easily available on Linux and it's a bit more challenging to get these for Windows.