A Kodi/xbmc plugin to control openHab

2,725 views
Skip to first unread message

Enis Hoca

unread,
Apr 27, 2015, 8:25:59 PM4/27/15
to ope...@googlegroups.com
I discovered this quite by accident googling around, looks like some French university students have made a pretty decent GUI to control openhab from within xmbc/kodi.  I think its a brilliant idea, hate looking for the phone at night.

Anyway I have dusted it off, made it compatible with the latest version of Kodi and some minor changes on wording that I found confusing.

Here is the link to the github page https://github.com/enishoca/openhab-kodi


Introduction

This is a Kodi (formerly known as xbmc) plugin for Openhab. It allows users to control Openhab from within the Kodi environment. The orignal project was created for xmbc originally created by a group RICM5 2014 students. The original page in French is located herehttp://air.imag.fr/index.php/Extensions_XBMC.

The code as it stands now is compatible with the Kodi (Helix) the current version at the time of writing this.

Installation and Usage

  1. Download the current version or alternatively click on the the zip file link above - then right click on 'View Raw' link and save the file.
  2. install it as you would normally install Kodi addons. You will need to go in the setings menu and change the default settings for the addon to match your installation.

e.g.

  1. Server IP address : 127.0.0.1
  2. Server port : 8080
  3. Sitemap name : default
  4. Start page : default

Ben Jones

unread,
Apr 28, 2015, 4:52:31 PM4/28/15
to ope...@googlegroups.com
Hi Enis,

I tried this but didn't have much luck. What does the 'Start Page' setting refer to? 

Regards,
Ben

Enis Hoca

unread,
Apr 29, 2015, 12:20:14 AM4/29/15
to ope...@googlegroups.com
do this
from a browser go to http://openhabserver:port/rest for me http://pi:8080/rest
from here you should see a line like this  
    <link type="sitemaps">http://pi:8080/rest/sitemaps</link>

This a link for sitemaps -- Browse to this link in a browser, you will see the top level sitemaps list - I have only one so here is what I get
 
    <sitemaps>
    <sitemap>
    <name>default</name>
    <label>My Home</label>
    <homepage>
     <leaf>false</leaf>
    </homepage>
    </sitemap>
    </sitemaps>

This is the key line
    <homepage>
       <link>http://pi:8080/rest/sitemaps/xxx/yyy</link>

Sitemap = xxx
Start page = yyy

So for me 
Sitemap = default
Start page = default

If you have the demo sitemap still installed you can also use demo/demo
This yyy comes from the first line in the sitemap file e.g.

     sitemap yyy label="My Home"  

I think its the sitemap name is supposed to be optional but they are using this in this addin so I guess if you don't have it you should add it. 

I don't know enough python and xbmc addin development to fix this 




Hope this helps

Ben Jones

unread,
Apr 29, 2015, 12:35:21 AM4/29/15
to ope...@googlegroups.com
Ah - I think I know what the problem might be - I have security enabled for both INTERNAL/EXTERNAL - so I can't access anything, including the REST API, without authentication.

From what I could tell your plugin does not support authentication?




On 29/04/2015 4:20 p.m., Enis Hoca wrote:
do this
from a browser go to http://openhabserver:port/rest for me http://pi:8080/rest
from here you should see this a link for sitemaps
    <link type="sitemaps">http://pi:8080/rest/sitemaps</link>

Go to that link -> here you will see your top level site maps - for me it looks like this

    <sitemaps>
    <sitemap>
    <name>default</name>
    <label>My Home</label>
    <homepage>
     <leaf>false</leaf>
    </homepage>
    </sitemap>
    </sitemaps>

This is the key line
   
the first identifier after "sitemaps/" goes in sitemap
the second identifier goes in startpage 

I am not quite sure where the second identifier comes from or what its called, could find its name in the docs.  It was called id in the original addin, I had to debug the code to figure out what they were looking for.

hope this helps.

my settings are



On Tuesday, April 28, 2015 at 4:52:31 PM UTC-4, Ben Jones wrote:
Hi Enis,

I tried this but didn't have much luck. What does the 'Start Page' setting refer to? 

Regards,
Ben
--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/a6FBNtNyCck/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab/4125aa2c-97a8-40c4-a921-ce13148a5160%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Greg

unread,
Apr 29, 2015, 4:20:33 PM4/29/15
to ope...@googlegroups.com
Hi Enis.

I was excited to try this.
Unfortunately I am not having any luck with it.
In the Kodi log I keep getting:

ERROR: GetDirectory - Error getting plugin://script.module.openhab/
ERROR: CGUIMediaWindow::GetDirectory(plugin://script.module.openhab/) failed

Any ideas?

Enis Hoca

unread,
Apr 29, 2015, 9:05:15 PM4/29/15
to ope...@googlegroups.com
What version of Kodi are you on ? and which OS?  
can also put a few lines above and below this somewhere also it would help if your turned on debugging and got a more detailed log.

I will try to add some more debugging to help locate the source of the issue and post it here

Enis Hoca

unread,
Apr 29, 2015, 9:44:17 PM4/29/15
to ope...@googlegroups.com
yeah this addin doesnt support auth - I am not ready to call it my add-in yet,  since i just borrowed code and got it to work with pretty minor tweaking, unfortunatley know very little about xbmc programming

Ben Jones

unread,
Apr 29, 2015, 9:45:16 PM4/29/15
to ope...@googlegroups.com
No problem.

Greg

unread,
Apr 30, 2015, 12:31:43 AM4/30/15
to ope...@googlegroups.com
Sure, I will turn on debugging and report a more detailed log.
I'm currently using Kodi 14.2 on OpenELEC 5.0.7.

Greg

unread,
Apr 30, 2015, 12:28:40 PM4/30/15
to ope...@googlegroups.com
Debug doesn't report much more:

11:14:41 T:140442839725952   DEBUG: CGUIMediaWindow::GetDirectory (plugin://script.module.openhab/)
11:14:41 T:140442839725952   DEBUG:   ParentPath = [addons://sources/executable/]
11:14:41 T:140441496270592   DEBUG: StartScript - calling plugin openhHab for Kodi('plugin://script.module.openhab/','13','')
11:14:41 T:140441496270592   DEBUG: WaitOnScriptResult - waiting on the openhHab for Kodi (id=61) plugin...
11:14:41 T:140441331046144  NOTICE: Thread LanguageInvoker start, auto delete: false
11:14:41 T:140441331046144    INFO: initializing python engine.
11:14:41 T:140441331046144   DEBUG: CPythonInvoker(61, /storage/.kodi/addons/script.module.openhab/addon.py): start processing
11:14:41 T:140441331046144  NOTICE: -->Python Interpreter Initialized<--
11:14:41 T:140441331046144   DEBUG: CPythonInvoker(61, /storage/.kodi/addons/script.module.openhab/addon.py): the source file to load is "/storage/.kodi/addons/script.$
11:14:41 T:140441331046144   DEBUG: CPythonInvoker(61, /storage/.kodi/addons/script.module.openhab/addon.py): setting the Python path to /storage/.kodi/addons/script.m$
11:14:41 T:140441331046144   DEBUG: CPythonInvoker(61, /storage/.kodi/addons/script.module.openhab/addon.py): entering source directory /storage/.kodi/addons/script.mo$
11:14:41 T:140441331046144   DEBUG: CPythonInvoker(61, /storage/.kodi/addons/script.module.openhab/addon.py): instantiating addon using automatically obtained id of "s$
11:14:41 T:140441331046144  NOTICE: [openHab]  Init
11:14:41 T:140441331046144  NOTICE: KeyError
11:14:41 T:140441331046144   DEBUG: LocalizeStrings: no strings.po file exist at /storage/.kodi/addons/script.module.openhab/resources/language/English, fallback to st$
11:14:41 T:140442839725952   DEBUG: ------ Window Init (DialogBusy.xml) ------
11:14:41 T:140442839725952   DEBUG: ------ Window Init (DialogOK.xml) ------
11:14:43 T:140442839725952   DEBUG: ------ Window Deinit (DialogOK.xml) ------
11:14:43 T:140441331046144    INFO: CPythonInvoker(61, /storage/.kodi/addons/script.module.openhab/addon.py): script successfully run
11:14:43 T:140441331046144   DEBUG: Thread LanguageInvoker 140441331046144 terminating
11:14:43 T:140441496270592   DEBUG:  WaitOnScriptResult - plugin exited prematurely - terminating
11:14:43 T:140442839725952   ERROR: GetDirectory - Error getting plugin://script.module.openhab/
11:14:43 T:140442839725952   ERROR: CGUIMediaWindow::GetDirectory(plugin://script.module.openhab/) failed
11:14:43 T:140442839725952   DEBUG: CGUIMediaWindow::GetDirectory (addons://sources/executable/)
11:14:43 T:140442839725952   DEBUG:   ParentPath = []
11:14:43 T:140441331046144  NOTICE: Thread BackgroundLoader start, auto delete: false
11:14:43 T:140441331046144   DEBUG: Thread BackgroundLoader 140441331046144 terminating
11:14:43 T:140442839725952   DEBUG: ------ Window Deinit (DialogBusy.xml) ------

Juan Pinto

unread,
Apr 30, 2015, 5:42:14 PM4/30/15
to ope...@googlegroups.com
Hi all. I don't have security enabled (just external), and Openhab its on the same RPI (I left 127.0.0.1) I followed the steps to know the sitemap and start page (are both default), and I get "An error occured" when I try to start the plugin.
 
Im working with last Raspbian + Last Kodi.
 
Any help?
 
Regards

Manuel Carlos Rodriguez

unread,
May 1, 2015, 1:31:06 AM5/1/15
to ope...@googlegroups.com
Same problem with openelec 5.0.8


El jueves, 30 de abril de 2015, 18:28:40 (UTC+2), Greg escribió:

Enis Hoca

unread,
May 2, 2015, 4:28:52 PM5/2/15
to ope...@googlegroups.com
Does it work for anyone ? 
I wonder if there is someone with better xbmc expertise who can help.

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/a6FBNtNyCck/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Mike Hinton

unread,
May 3, 2015, 8:00:20 AM5/3/15
to ope...@googlegroups.com
I have not had any luck yet, but have tried some ideas.

When installing the original script get: Dependencies not met.
When installing your updated script I get: Incorrect structure.

I will try and do some homework and see if there is something simple to tweek. Anyone else have ideas?

Enis Hoca

unread,
May 3, 2015, 11:35:42 AM5/3/15
to ope...@googlegroups.com
when you say incorrect stucture what do you mean?

BTW if you want me to add you to the github project so you can make mods let me know.  We should start with putting a lot of debug logging in the code so we can figure out what the failures are.

Mike Hinton

unread,
May 4, 2015, 9:00:57 AM5/4/15
to ope...@googlegroups.com
When installing into Kodi, a message flashed at the bottom right of Kodi that stated incorrect structure. I took it to mean the the zip was structured incorrectly, but am unsure. It only flashed up for a second.

I have however found that if I use incorrect Startpage or sitemap the error changes from: 'An Error Occured' to: 'File or directory not found'. So something is working for sure.

Enis Hoca

unread,
May 10, 2015, 1:29:01 AM5/10/15
to ope...@googlegroups.com
There is an unpdated version of the addin available on Github.  

I have fixed the structure issues and added quite a bit of debug logging, also added a setting to turn on debugging.


if you guys want to try out the addin please download it again -

Manuel Carlos Rodriguez

unread,
May 10, 2015, 4:12:15 AM5/10/15
to ope...@googlegroups.com
Hi Enis,

Thanks for your effort. I just downloaded version 1.0.1 and got a problem with the package structure if I get the link from the file list. Instead, if I download from the link in the instructions it works (at least I can install).

When I started the addon, I got the following:

10:46:49 T:1422914624  NOTICE: (<type 'exceptions.KeyError'>, 'addon.py', 154)

10:46:49 T:1422914624  NOTICE: KeyError

10:46:49 T:1422914624  NOTICE: [openHab] ERROR: Exception Location: [Main Menu] Type:[KeyError] Exception:['widget']

10:46:55 T:1970033184   ERROR: GetDirectory - Error getting plugin://script.module.openhab/

10:46:55 T:1970033184   ERROR: CGUIMediaWindow::GetDirectory(plugin://script.module.openhab/) failed

I saw that the information is retrieved fromthe REST API, but I got the abover error.

HTH,
MC

Enis Hoca

unread,
May 10, 2015, 9:40:43 AM5/10/15
to ope...@googlegroups.com
Hi Manuel - 
The structure problem is a git zip thing, that is why you need to use the link, don[t think I can do anything about, other plugins in git have the same issue.

That GetDirectory was the error from previous plugin - did you uninstall the previous one?  if you didn't best to do that.  Actually probably best to delete teh folder manually if you can, this install this one

Can you please go in settings for the addon and turn Debug on, and capture the log

Enis Hoca

unread,
May 10, 2015, 9:48:20 AM5/10/15
to ope...@googlegroups.com
Can you kindly open an issue in github and also upload the data debug data there?  I am most interested in the JSON steeam becaeuse that will tell me why its not being parsed - 

Enis Hoca

unread,
May 10, 2015, 11:25:20 AM5/10/15
to ope...@googlegroups.com
I have updated the addin to with exception reporting cleaned up a little - kindly download 1.0.2 version

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/a6FBNtNyCck/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Juan Pinto

unread,
May 10, 2015, 2:39:59 PM5/10/15
to ope...@googlegroups.com
I get this on log:

20:36:31 T:1351611424  NOTICE: [openHab] Initializing - Main Menu
20:36:31 T:1351611424  NOTICE: [openHab] DEBUG: getJsonSiteMap url : [http://127.0.0.1:8080/rest/sitemaps/default/default?type=json]
20:36:31 T:1351611424  NOTICE: [openHab] DEBUG: getJson json_string : [{"id":"default","title":"Main Menu","link":"http://127.0.0.1:8080/rest/sitemaps/default/default","leaf":"true","
widget":[{"widgetId":"default_0","type":"Frame","label":"","icon":"frame","widget":[{"widgetId":"default_0_0","type":"Group","label":"Alarm","icon":"group","linkedPage":{"id":"0000","
title":"Alarm","icon":"group","link":"http://127.0.0.1:8080/rest/sitemaps/default/0000","leaf":"false"}},{"widgetId":"default_0_0_1","type":"Text","label":"Date [Sunday, 10.05.2015]",
"icon":"calendar","item":{"type":"DateTimeItem","name":"Date","state":"2015-05-10T20:24:27","link":"http://127.0.0.1:8080/rest/items/Date"}},{"widgetId":"default_0_0_1_2","type":"Swit
ch","label":"Rele 1 Timer (Ventilador)","icon":"light-off","item":{"type":"SwitchItem","name":"Rele1_Ocio_Timer","state":"OFF","link":"http://127.0.0.1:8080/rest/items/Rele1_Ocio_Time
r"}},{"widgetId":"default_0_0_1_2_3","type":"Switch","label":"Karla PC","icon":"switch-on","item":{"type":"SwitchItem","name":"KarlaPC","state":"ON","link":"http://127.0.0.1:8080/rest
/items/KarlaPC"}},{"widgetId":"default_0_0_1_2_3_4","type":"Switch","label":"Juan PC","icon":"switch-on","item":{"type":"SwitchItem","name":"JuanPC","state":"ON","link":"http://127.0.
0.1:8080/rest/items/JuanPC"}},{"widgetId":"default_0_0_1_2_3_4_5","type":"Group","label":"Kodi","icon":"sofa","linkedPage":{"id":"0005","title":"Kodi","icon":"sofa","link":"http://127
.0.0.1:8080/rest/sitemaps/default/0005","leaf":"true"}},{"widgetId":"default_0_0_1_2_3_4_5_6","type":"Group","label":"Astro","icon":"sun","linkedPage":{"id":"0006","title":"Astro","ic
on":"sun","link":"http://127.0.0.1:8080/rest/sitemaps/default/0006","leaf":"false"}},{"widgetId":"default_0_0_1_2_3_4_5_6_7","type":"Group","label":"Nodos","icon":"house","item":{"typ
e":"GroupItem","name":"Nodos","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Nodos"},"linkedPage":{"id":"0007","title":"Nodos","icon":"house","link":"http://127.0.0.1:80
80/rest/sitemaps/default/0007","leaf":"false"}},{"widgetId":"default_0_0_1_2_3_4_5_6_7_8","type":"Text","label":"Consumo [608.0 W]","icon":"energy","item":{"type":"NumberItem","name":
"Consumo_Entrada","state":"608","link":"http://127.0.0.1:8080/rest/items/Consumo_Entrada"}}]},{"widgetId":"default_1","type":"Frame","label":"","icon":"frame","widget":[{"widgetId":"d
efault_1_0","type":"Group","label":"Terraza","icon":"terrace","item":{"type":"GroupItem","name":"Terraza","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Terraza"},"linke
dPage":{"id":"0100","title":"Terraza","icon":"terrace","link":"http://127.0.0.1:8080/rest/sitemaps/default/0100","leaf":"false"}},{"widgetId":"default_1_0_1","type":"Group","label":"H
abitacion Ocio","icon":"firstfloor","item":{"type":"GroupItem","name":"Habitacion_Ocio","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Habitacion_Ocio"},"linkedPage":{"i
d":"0101","title":"Habitacion Ocio","icon":"firstfloor","link":"http://127.0.0.1:8080/rest/sitemaps/default/0101","leaf":"false"}},{"widgetId":"default_1_0_1_2","type":"Group","label"
:"Habitacion Dormir","icon":"groundfloor","item":{"type":"GroupItem","name":"Habitacion_Dormir","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Habitacion_Dormir"},"linke
dPage":{"id":"0102","title":"Habitacion Dormir","icon":"groundfloor","link":"http://127.0.0.1:8080/rest/sitemaps/default/0102","leaf":"true"}},{"widgetId":"default_1_0_1_2_3","type":"
Group","label":"Entrada","icon":"groundfloor","item":{"type":"GroupItem","name":"Entrada","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Entrada"},"linkedPage":{"id":"01
03","title":"Entrada","icon":"groundfloor","link":"http://127.0.0.1:8080/rest/sitemaps/default/0103","leaf":"true"}},{"widgetId":"default_1_0_1_2_3_4","type":"Group","label":"Nodo 3 -
 UNO","icon":"terrace","item":{"type":"GroupItem","name":"Nodo_3","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Nodo_3"},"linkedPage":{"id":"0104","title":"Nodo 3 - UNO
","icon":"terrace","link":"http://127.0.0.1:8080/rest/sitemaps/default/0104","leaf":"true"}},{"widgetId":"default_1_0_1_2_3_4_5","type":"Group","label":"Nodo 4","icon":"terrace","item
":{"type":"GroupItem","name":"Nodo_4","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Nodo_4"},"linkedPage":{"id":"0105","title":"Nodo 4","icon":"terrace","link":"http://
127.0.0.1:8080/rest/sitemaps/default/0105","leaf":"true"}}]},{"widgetId":"default_2","type":"Frame","label":"Fecha","icon":"frame","widget":[{"widgetId":"default_2_0","type":"Group","
label":"Luces","icon":"slider","item":{"type":"GroupItem","name":"Luces","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Luces"},"linkedPage":{"id":"0200","title":"Luces"
,"icon":"slider","link":"http://127.0.0.1:8080/rest/sitemaps/default/0200","leaf":"true"}},{"widgetId":"default_2_0_1","type":"Group","label":"Metereologia","icon":"sun","item":{"type
":"GroupItem","name":"Metereologia","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Metereologia"},"linkedPage":{"id":"0201","title":"Metereologia","icon":"sun","link":"h
ttp://127.0.0.1:8080/rest/sitemaps/default/0201","leaf":"false"}},{"widgetId":"default_2_0_1_2","type":"Group","label":"Temperaturas Medias  [26.0 ^`C]","icon":"temperature","item":{"
type":"GroupItem","name":"Temperaturas_Medias","state":"26.0","link":"http://127.0.0.1:8080/rest/items/Temperaturas_Medias"},"linkedPage":{"id":"0202","title":"Temperaturas Medias  [2
6.0 ^`C]","icon":"temperature","link":"http://127.0.0.1:8080/rest/sitemaps/default/0202","leaf":"true"}}]},{"widgetId":"default_3","type":"Frame","label":"Salud de los Nodos","icon":"
frame","widget":[{"widgetId":"default_3_0","type":"Group","label":"Debug","icon":"keyring","item":{"type":"GroupItem","name":"Debug","state":"Undefined","link":"http://127.0.0.1:8080/
rest/items/Debug"},"linkedPage":{"id":"0300","title":"Debug","icon":"keyring","link":"http://127.0.0.1:8080/rest/sitemaps/default/0300","leaf":"false"}},{"widgetId":"default_3_0_1","t
ype":"Group","label":"Timestamp","icon":"clock","item":{"type":"GroupItem","name":"Timestamp","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Timestamp"},"linkedPage":{"i
d":"0301","title":"Timestamp","icon":"clock","link":"http://127.0.0.1:8080/rest/sitemaps/default/0301","leaf":"true"}},{"widgetId":"default_3_0_1_2","type":"Text","label":"Salud Ocio
[255]","icon":"keyring","item":{"type":"NumberItem","name":"Salud_Ocio","state":"255.0","link":"http://127.0.0.1:8080/rest/items/Salud_Ocio"}},{"widgetId":"default_3_0_1_2_3","type":"
Text","label":"Salud Dormir [255]","icon":"keyring","item":{"type":"NumberItem","name":"Salud_Dormir","state":"255.0","link":"http://127.0.0.1:8080/rest/items/Salud_Dormir"}},{"widget
Id":"default_3_0_1_2_3_4","type":"Text","label":"Salud Entrada [25]","icon":"keyring","item":{"type":"NumberItem","name":"Salud_Entrada","state":"25.0","link":"http://127.0.0.1:8080/r
est/items/Salud_Entrada"}},{"widgetId":"default_3_0_1_2_3_4_5","type":"Text","label":"Salud Nodo_3 [231]","icon":"keyring","item":{"type":"NumberItem","name":"Salud_Nodo_3","state":"2
31.0","link":"http://127.0.0.1:8080/rest/items/Salud_Nodo_3"}},{"widgetId":"default_3_0_1_2_3_4_5_6","type":"Text","label":"Salud Nodo_4 [25]","icon":"keyring","item":{"type":"NumberI
tem","name":"Salud_Nodo_4","state":"25.0","link":"http://127.0.0.1:8080/rest/items/Salud_Nodo_4"}}]},{"widgetId":"default_4","type":"Frame","label":"","icon":"frame","widget":{"widget
Id":"default_4_0","type":"Group","label":"Webcam","icon":"video","linkedPage":{"id":"0400","title":"Webcam","icon":"video","link":"http://127.0.0.1:8080/rest/sitemaps/default/0400","l
eaf":"true"}}}]}]
20:36:31 T:1351611424   ERROR: Traceback (most recent call last):
20:36:31 T:1351611424   ERROR:   File "/home/osmc/.kodi/addons/script.module.openhab/addon.py", line 147, in <module>
20:36:31 T:1351611424   ERROR:     listing = createListingSite(siteMap)
20:36:31 T:1351611424   ERROR:   File "/home/osmc/.kodi/addons/script.module.openhab/addon.py", line 84, in createListingSite
20:36:31 T:1351611424   ERROR:     tmp_floor = Floor(floor['label'],floor['item']['link'], floor['linkedPage']['id'], floor['linkedPage']['leaf'])
20:36:31 T:1351611424   ERROR: KeyError: 'item'
20:36:31 T:1351611424  NOTICE: KeyError
20:36:31 T:1351611424  NOTICE: [openHab] ERROR: Exception Location: [Main Menu] Type:[KeyError] Exception:['item']


Mike Hinton

unread,
May 10, 2015, 4:04:43 PM5/10/15
to ope...@googlegroups.com
Just tried 1.0.2 Windows 8.1

Debug part

10:28:01 T:2488   DEBUG: Activating window ID: 10001
10:28:01 T:2488   DEBUG: ------ Window Deinit (Home.xml) ------
10:28:01 T:2488   DEBUG: ------ Window Init (MyPrograms.xml) ------
10:28:01 T:2488   DEBUG: CGUIMediaWindow::GetDirectory (addons://sources/executable/)
10:28:01 T:2488   DEBUG:   ParentPath = [addons://sources/executable/]
10:28:01 T:4036  NOTICE: Thread BackgroundLoader start, auto delete: false
10:28:01 T:4036   DEBUG: Thread BackgroundLoader 4036 terminating
10:28:01 T:2504   DEBUG: CTextureCacheJob::GetImageHash - unable to stat url C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.axel.downloader\icon.png
10:28:03 T:2488   DEBUG: CApplication::ProcessMouse: trying mouse action leftclick
10:28:03 T:2488   DEBUG: CGUIMediaWindow::GetDirectory (plugin://script.module.openhab/)
10:28:03 T:2488   DEBUG:   ParentPath = [addons://sources/executable/]
10:28:03 T:2504   DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin openhHab for Kodi('plugin://script.module.openhab/','3','')
10:28:03 T:2504   DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult - waiting on the openhHab for Kodi (id=15) plugin...
10:28:03 T:6604  NOTICE: Thread LanguageInvoker start, auto delete: false
10:28:03 T:6604    INFO: initializing python engine.
10:28:03 T:6604   DEBUG: CPythonInvoker(15, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): start processing
10:28:03 T:6604  NOTICE: -->Python Interpreter Initialized<--
10:28:03 T:6604   DEBUG: CPythonInvoker(15, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): the source file to load is "C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py"
10:28:03 T:6604   DEBUG: CPythonInvoker(15, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): setting the Python path to C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab;C:\Program Files\Kodi\system\python\DLLs;C:\Program Files\Kodi\system\python\Lib;C:\Program Files\Kodi\python27.zip;C:\Program Files\Kodi\system\python\lib\plat-win;C:\Program Files\Kodi\system\python\lib\lib-tk;C:\Program Files\Kodi;C:\Program Files\Kodi\system\python;C:\Program Files\Kodi\system\python\lib\site-packages
10:28:03 T:6604   DEBUG: CPythonInvoker(15, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): entering source directory C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab
10:28:03 T:6604   DEBUG: CPythonInvoker(15, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): instantiating addon using automatically obtained id of "script.module.openhab" dependent on version 2.19.0 of the xbmc.python api
10:28:03 T:2488   DEBUG: ------ Window Init (DialogBusy.xml) ------
10:28:04 T:6604  NOTICE: [openHab] Starting
10:28:04 T:6604  NOTICE: [openHab] DEBUG: Debug Flag is true
10:28:04 T:6604  NOTICE: [openHab] Initializing - Main Menu
10:28:04 T:6604  NOTICE: [openHab] DEBUG: getJsonSiteMap url : [http://127.0.0.1:8080/rest/sitemaps/ArduinoDemo/Home?type=json]
10:28:04 T:6604  NOTICE: [openHab] DEBUG: getJson json_string : [{"id":"Home","title":"Home","link":"http://127.0.0.1:8080/rest/sitemaps/ArduinoDemo/Home","leaf":"true","widget":[{"widgetId":"Home_0","type":"Frame","label":"Ardunio 1","icon":"frame","widget":[{"widgetId":"Home_0_0","type":"Text","label":"Arduino_1 Online [OFF]","icon":"network-off","item":{"type":"SwitchItem","name":"Arduino_1_Up","state":"OFF","link":"http://127.0.0.1:8080/rest/items/Arduino_1_Up"}},{"widgetId":"Home_0_0_1","type":"Group","label":"Arduino_1","icon":"bath","item":{"type":"GroupItem","name":"Arduino_1","state":"Undefined","link":"http://127.0.0.1:8080/rest/items/Arduino_1"},"linkedPage":{"id":"0001","title":"Arduino_1","icon":"bath","link":"http://127.0.0.1:8080/rest/sitemaps/ArduinoDemo/0001","leaf":"false"}},{"widgetId":"Home_0_0_1_2","type":"Text","label":"Analog outputs - adjustable","icon":"settings","linkedPage":{"id":"0002","title":"Analog outputs - adjustable","icon":"settings","link":"http://127.0.0.1:8080/rest/sitemaps/ArduinoDemo/0002","leaf":"true"}}]},{"widgetId":"Home_1","type":"Frame","label":"Internet","icon":"frame","widget":{"widgetId":"Home_1_0","type":"Text","label":"Internet","icon":"network","linkedPage":{"id":"0100","title":"Internet","icon":"network","link":"http://127.0.0.1:8080/rest/sitemaps/ArduinoDemo/0100","leaf":"false"}}}]}]
10:28:04 T:6604   ERROR: Traceback (most recent call last):
10:28:04 T:6604   ERROR:   File "C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py", line 147, in <module>
10:28:04 T:6604   ERROR:     listing = createListingSite(siteMap)
10:28:04 T:6604   ERROR:   File "C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py", line 84, in createListingSite
10:28:04 T:6604   ERROR:     tmp_floor = Floor(floor['label'],floor['item']['link'], floor['linkedPage']['id'], floor['linkedPage']['leaf'])
10:28:04 T:6604   ERROR: KeyError: 'linkedPage'
10:28:04 T:6604  NOTICE: KeyError
10:28:04 T:6604  NOTICE: [openHab] ERROR: Exception Location: [Main Menu] Type:[KeyError] Exception:['linkedPage']
10:28:04 T:6604   DEBUG: LocalizeStrings: no strings.po file exist at C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\resources\language\English, fallback to strings.xml
10:28:04 T:2488   DEBUG: ------ Window Init (DialogOK.xml) ------
10:28:08 T:2488   DEBUG: CApplication::ProcessMouse: trying mouse action leftclick
10:28:08 T:2488   DEBUG: ------ Window Deinit (DialogOK.xml) ------
10:28:08 T:6604    INFO: CPythonInvoker(15, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): script successfully run
10:28:08 T:2488   DEBUG: CPythonInvoker(15, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): script termination took 0ms
10:28:08 T:6604    INFO: Python script interrupted by user
10:28:08 T:6604   DEBUG: Thread LanguageInvoker 6604 terminating
10:28:08 T:2504   DEBUG:  XFILE::CPluginDirectory::WaitOnScriptResult - plugin exited prematurely - terminating
10:28:08 T:2488   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://script.module.openhab/
10:28:08 T:2488   ERROR: CGUIMediaWindow::GetDirectory(plugin://script.module.openhab/) failed
10:28:08 T:2488   DEBUG: CGUIMediaWindow::GetDirectory (addons://sources/executable/)
10:28:08 T:2488   DEBUG:   ParentPath = []
10:28:08 T:6940  NOTICE: Thread BackgroundLoader start, auto delete: false
10:28:09 T:2488   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
10:28:09 T:2504   DEBUG: CTextureCacheJob::GetImageHash - unable to stat url C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.axel.downloader\icon.png
10:28:09 T:6940   DEBUG: Thread BackgroundLoader 6940 terminating
Message has been deleted

Manuel Carlos Rodriguez

unread,
May 10, 2015, 4:36:41 PM5/10/15
to ope...@googlegroups.com
Attached my info.

22:28:34 T:1768895552  NOTICE: [openHab] Starting
22:28:34 T:1768895552  NOTICE: [openHab] DEBUG: Debug Flag is true
22:28:34 T:1768895552  NOTICE: [openHab] Initializing - Main Menu
22:28:34 T:1768895552  NOTICE: [openHab] DEBUG: getJsonSiteMap url : [http://127.0.0.1:8080/rest/sitemaps/Lillo/Lillo?type=json]
22:28:34 T:1768895552  NOTICE: [openHab] DEBUG: getJson json_string : [{"id":"Lillo","title":"Main Menu","link":"http://127.0.0.1:8080/rest/sitemaps/Lillo/Lillo","leaf":"false","widget":[{"widgetId":"Lillo_0","type":"Switch","label":"Enchufe","icon":"socket-off","item":{"type":"SwitchItem","name":"Enchufe1","state":"OFF","link":"http://127.0.0.1:8080/rest/items/Enchufe1"}},{"widgetId":"Lillo_1","type":"Switch","label":"Interruptor","icon":"switch-off","item":{"type":"SwitchItem","name":"Interruptor1","state":"OFF","link":"http://127.0.0.1:8080/rest/items/Interruptor1"}},{"widgetId":"Lillo_2","type":"Text","label":"MQTT [-]","icon":"bluetooth","item":{"type":"NumberItem","name":"testmqtt","state":"Uninitialized","link":"http://127.0.0.1:8080/rest/items/testmqtt"}},{"widgetId":"Lillo_3","type":"Text","label":"Temperatura [25.0 ºC]","icon":"temperature","item":{"type":"NumberItem","name":"Temperatura","state":"25.00","link":"http://127.0.0.1:8080/rest/items/Temperatura"}},{"widgetId":"Lillo_4","type":"Text","label":"DAFDSF [-]","icon":"switch","item":{"type":"StringItem","name":"test2mqtt","state":"Uninitialized","link":"http://127.0.0.1:8080/rest/items/test2mqtt"}},{"widgetId":"Lillo_5","type":"Group","label":"dfasf","icon":"group","linkedPage":{"id":"05","title":"dfasf","icon":"group","link":"http://127.0.0.1:8080/rest/sitemaps/Lillo/05","leaf":"true"}},{"widgetId":"Lillo_6","type":"Group","label":"XBMC","icon":"group","linkedPage":{"id":"06","title":"XBMC","icon":"group","link":"http://127.0.0.1:8080/rest/sitemaps/Lillo/06","leaf":"true"}}]}]
22:28:34 T:1768895552   ERROR: Traceback (most recent call last):
22:28:34 T:1768895552   ERROR:   File "/storage/.kodi/addons/script.module.openhab/addon.py", line 147, in <module>
22:28:34 T:1768895552   ERROR:     listing = createListingSite(siteMap)
22:28:34 T:1768895552   ERROR:   File "/storage/.kodi/addons/script.module.openhab/addon.py", line 81, in createListingSite
22:28:34 T:1768895552   ERROR:     widgets2.append(w['widget'])
22:28:34 T:1768895552   ERROR: KeyError: 'widget'
22:28:34 T:1768895552  NOTICE: KeyError
22:28:34 T:1768895552  NOTICE: [openHab] ERROR: Exception Location: [Main Menu] Type:[KeyError] Exception:['widget']
22:28:36 T:1970033184   ERROR: GetDirectory - Error getting plugin://script.module.openhab/
22:28:36 T:1970033184   ERROR: CGUIMediaWindow::GetDirectory(plugin://script.module.openhab/) failed
22:28:36 T:1768895552  NOTICE: Thread BackgroundLoader start, auto delete: false

HTH

Enis Hoca

unread,
May 10, 2015, 6:34:45 PM5/10/15
to ope...@googlegroups.com

Everyone - thanks for testing - 
I have tested these issues - unfortunately my python skill are not at a point where I can fully resolve these.  I will keep working on them and once I have an update I will announce here.

It would be good to hear if anyone has used this successfully.

It works fine for me but then I have a very simple setup with about 15 devices.

Enis Hoca

unread,
May 10, 2015, 8:40:32 PM5/10/15
to ope...@googlegroups.com
OK I know what the issue is - don't know how to fix it.
Basically this code expects items to be in groups not directly under frames.  It breaks when it finds switches, dimmers etc under frames.  it ignores text itmes like dates that are under frames.
The issue is so fundamental that I don't know how to address it, because this code lays out groups and frames on the main pages of kodi and items on popup windows.

Enis Hoca

unread,
May 11, 2015, 6:40:29 AM5/11/15
to ope...@googlegroups.com
I have noted this issue down as a limitation - however there is a workaround.  Not a terrible one either unless you have a very complex setup.
You can create an alternative sitemap which is compatible with this addon - use your primary one for Android iOS web etc, and use the alternative one with kodi.

Greg

unread,
May 11, 2015, 10:42:13 AM5/11/15
to ope...@googlegroups.com
I agree, more of a limitation.  I know myself my sitemap would be brief for what is displayed on kodi vs other devices.
Can you give an example of a sitemap what works vs one that will break it?
Appreciate your work on this!

Mike Hinton

unread,
May 15, 2015, 9:17:25 AM5/15/15
to ope...@googlegroups.com
That is just a small limitation as you say. i would want a separate sitemap for Kodi anyway.  Please post a working sample so we can at least learn how to make it work for us.  I am not experienced with programming in Python either but am excited to get some data available in Kodi.  I have attempted to create a sitemap working from the info you posted about limitations, but I still can't get it work.

Enis Hoca

unread,
May 17, 2015, 11:36:10 PM5/17/15
to ope...@googlegroups.com
this is my sitemap and it works
sitemap default label="Home"
{
Frame {
  Group item=gFF label="Living Space" icon="house" {
            Slider item=bedroomceiling switchSupport
            Slider item=bedroomlamp switchSupport
            Switch item=bedroomfan label="Bedroom Fan" mappings=[ON="On", OFF="Off"]
            Switch item=girlsfan label="Girl's Fan" mappings=[ON="On", OFF="Off"]
            Switch item=denfan label="Den Fan" mappings=[ON="On", OFF="Off"]
            Slider item=denlights switchSupport
            Slider item=parlour label="Parlour" switchSupport
            Slider item=diningroom  label="Dining Room" switchSupport
            Switch item=foyer label="Foyer" mappings=[ON="On", OFF="Off"]
            Switch item=corridor label="Hallway" mappings=[ON="On", OFF="Off"]
        }
Group item=gC label="Basement and Attic" icon="cellar" {
Slider item=attic switchSupport
Slider item=zwave7 switchSupport
Switch item=x10appliance
Switch item=x10lamp

Mike Hinton

unread,
May 19, 2015, 9:17:46 AM5/19/15
to ope...@googlegroups.com
Thank you for sending your sitemap, I tried it and it works in Openhab without problems, but Kodi still gets an error.  There must be something different with my Kodi setup. I will keep digging to see if I can find it.

Thanks



Enis Hoca

unread,
May 21, 2015, 7:42:39 PM5/21/15
to ope...@googlegroups.com
What error are you getting ?  Wonder if some underlying dependency of the code is not installed.  Has your log changes


On Tuesday, May 19, 2015, Mike Hinton <mikehi...@gmail.com> wrote:
Thank you for sending your sitemap, I tried it and it works in Openhab without problems, but Kodi still gets an error.  There must be something different with my Kodi setup. I will keep digging to see if I can find it.

Thanks


On Monday, April 27, 2015 at 6:25:59 PM UTC-6, Enis Hoca wrote:
I discovered this quite by accident googling around, looks like some French university students have made a pretty decent GUI to control openhab from within xmbc/kodi.  I think its a brilliant idea, hate looking for the phone at night.

Anyway I have dusted it off, made it compatible with the latest version of Kodi and some minor changes on wording that I found confusing.

Here is the link to the github page https://github.com/enishoca/openhab-kodi


Introduction

This is a Kodi (formerly known as xbmc) plugin for Openhab. It allows users to control Openhab from within the Kodi environment. The orignal project was created for xmbc originally created by a group RICM5 2014 students. The original page in French is located herehttp://air.imag.fr/index.php/Extensions_XBMC.

The code as it stands now is compatible with the Kodi (Helix) the current version at the time of writing this.

Installation and Usage

  1. Download the current version or alternatively click on the the zip file link above - then right click on 'View Raw' link and save the file.
  2. install it as you would normally install Kodi addons. You will need to go in the setings menu and change the default settings for the addon to match your installation.

e.g.

  1. Server IP address : 127.0.0.1
  2. Server port : 8080
  3. Sitemap name : default
  4. Start page : default

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/a6FBNtNyCck/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Mike Hinton

unread,
May 23, 2015, 7:48:21 AM5/23/15
to ope...@googlegroups.com
Thanks Enis;

Your help here is fantastic. I do get different errors now.

11:08:25 T:7668   DEBUG: CGUIMediaWindow::GetDirectory (plugin://script.module.openhab/)
11:08:25 T:7668   DEBUG:   ParentPath = [addons://sources/executable/]
11:08:25 T:6276   DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin openhHab for Kodi('plugin://script.module.openhab/','1','')
11:08:25 T:6276   DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult - waiting on the openhHab for Kodi (id=14) plugin...
11:08:25 T:8148  NOTICE: Thread LanguageInvoker start, auto delete: false
11:08:25 T:8148    INFO: initializing python engine.
11:08:25 T:8148   DEBUG: CPythonInvoker(14, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): start processing
11:08:25 T:8148  NOTICE: -->Python Interpreter Initialized<--
11:08:25 T:8148   DEBUG: CPythonInvoker(14, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): the source file to load is "C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py"
11:08:25 T:8148   DEBUG: CPythonInvoker(14, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): setting the Python path to C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab;C:\Program Files\Kodi\system\python\DLLs;C:\Program Files\Kodi\system\python\Lib;C:\Program Files\Kodi\python27.zip;C:\Program Files\Kodi\system\python\lib\plat-win;C:\Program Files\Kodi\system\python\lib\lib-tk;C:\Program Files\Kodi;C:\Program Files\Kodi\system\python;C:\Program Files\Kodi\system\python\lib\site-packages
11:08:25 T:8148   DEBUG: CPythonInvoker(14, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): entering source directory C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab
11:08:25 T:8148   DEBUG: CPythonInvoker(14, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): instantiating addon using automatically obtained id of "script.module.openhab" dependent on version 2.19.0 of the xbmc.python api
11:08:25 T:7668   DEBUG: ------ Window Init (DialogBusy.xml) ------
11:08:25 T:8148  NOTICE: [openHab] Starting
11:08:25 T:8148  NOTICE: [openHab] DEBUG: Debug Flag is true
11:08:25 T:8148  NOTICE: [openHab] Initializing - Main Menu
11:08:25 T:8148  NOTICE: [openHab] DEBUG: getJsonSiteMap url : [http://127.0.0.1:8080/rest/sitemaps/default/default?type=json]
11:08:26 T:8148  NOTICE: [openHab] DEBUG: getJson json_string : [{"id":"default","title":"Home","link":"http://127.0.0.1:8080/rest/sitemaps/default/default","leaf":"true","widget":{"widgetId":"default_0","type":"Frame","label":"","icon":"frame","widget":[{"widgetId":"default_0_0","type":"Group","label":"Living Space","icon":"house","linkedPage":{"id":"0000","title":"Living Space","icon":"house","link":"http://127.0.0.1:8080/rest/sitemaps/default/0000","leaf":"true"}},{"widgetId":"default_0_0_1","type":"Group","label":"Basement and Attic","icon":"cellar","linkedPage":{"id":"0001","title":"Basement and Attic","icon":"cellar","link":"http://127.0.0.1:8080/rest/sitemaps/default/0001","leaf":"true"}}]}}]
11:08:26 T:8148   ERROR: Traceback (most recent call last):
11:08:26 T:8148   ERROR:   File "C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py", line 147, in <module>
11:08:26 T:8148   ERROR:     listing = createListingSite(siteMap)
11:08:26 T:8148   ERROR:   File "C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py", line 81, in createListingSite
11:08:26 T:8148   ERROR:     widgets2.append(w['widget'])
11:08:26 T:8148   ERROR: TypeError: string indices must be integers
11:08:26 T:8148  NOTICE: TypeError
11:08:26 T:8148  NOTICE: [openHab] ERROR: Exception Location: [Main Menu] Type:[TypeError] Exception:[string indices must be integers]
11:08:26 T:8148   DEBUG: LocalizeStrings: no strings.po file exist at C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\resources\language\English, fallback to strings.xml
11:08:26 T:7668   DEBUG: ------ Window Init (DialogOK.xml) ------
11:08:26 T:7668    INFO: Loading skin file: DialogOK.xml, load type: KEEP_IN_MEMORY
11:08:28 T:7668   DEBUG: CApplication::ProcessMouse: trying mouse action leftclick
11:08:28 T:7668   DEBUG: ------ Window Deinit (DialogOK.xml) ------
11:08:28 T:8148    INFO: CPythonInvoker(14, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): script successfully run
11:08:28 T:7668   DEBUG: CPythonInvoker(14, C:\Users\Mike\AppData\Roaming\Kodi\addons\script.module.openhab\addon.py): script termination took 0ms
11:08:28 T:8148    INFO: Python script interrupted by user
11:08:28 T:8148   DEBUG: Thread LanguageInvoker 8148 terminating
11:08:28 T:6276   DEBUG:  XFILE::CPluginDirectory::WaitOnScriptResult - plugin exited prematurely - terminating
11:08:28 T:7668   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://script.module.openhab/
11:08:28 T:7668   ERROR: CGUIMediaWindow::GetDirectory(plugin://script.module.openhab/) failed
11:08:28 T:7668   DEBUG: CGUIMediaWindow::GetDirectory (addons://sources/executable/)
11:08:28 T:7668   DEBUG:   ParentPath = []

*...@markferry.net

unread,
Jun 24, 2015, 11:21:41 AM6/24/15
to ope...@googlegroups.com
Hi Mike

The plugin is expecting a list of frames ("Floors") in your top-level sitemap but you have only one.

This is a side-effect of the json output:
 * When there is more than one sub-structure the output is a json list containing some dicts.
 * When there is just one sub-structure the output is just a dict, not a list of (one) dict.

The plugin is quite fragile and makes a lot of assumptions about your sitemap.

Try something like:

sitemap simple label="Simple"
{
   
Frame label="Floor1" {
       
Group item=Room1 icon="bedroom"
       
Group item=Room2 icon="kitchen"
   
}
   
Frame label="Floor2" {
       
Group item=Room3 label="Study" icon="office"
       
Group item=Room4 label="Study" icon="office"
   
}
}

Mike Hinton

unread,
Jun 24, 2015, 11:51:09 AM6/24/15
to ope...@googlegroups.com
WOW!!

I finally got it to work, THANK YOU!

Now to build some useful site maps.  This is great! :-)

Mike
...
Reply all
Reply to author
Forward
0 new messages