cdjackson / HABmin

A web admin console for openHAB home automation
http://www.cd-jackson.com/index.php/openhab/habmin
217 stars 51 forks source link

Sitemap not read if name contains underscore #236

Closed GeorgeEsper closed 9 years ago

GeorgeEsper commented 9 years ago

Just installed habmin 1.7.0 SNAPSHOT with openHAB 1.6.2.

filename: office-alarm.sitemap contents: sitemap office_alarm label="Office Alarm" {...}

renamed file to alarm.sitemap and changed content to: sitemap alarm label="Office Alarm" {...}

with this change I can now see widgets in the Sitemap Configuration window.

By the way, great tool!

cdjackson commented 9 years ago

Hi, Can you confirm if this is definitely a bug in HABmin, or if the sitemap fails to load in the other UIs that use the REST interface (so, GreenT, Android, iOS). I think this is a bug in openhab rather than habmin, but I might be wrong. I think I saw a bug recently that said sitemaps failed to load if the filename name wasn’t the same as the label and I think it was fixed a week or so ago so it would also be worth looking at the latest snapshot build…

Cheers Chris

On 12 May 2015, at 04:09, George Esper notifications@github.com wrote:

Just installed habmin 1.7.0 SNAPSHOT with openHAB 1.6.2.

filename: office-alarm.sitemap contents: sitemap office_alarm label="Office Alarm" {...}

renamed file to alarm.sitemap and changed content to: sitemap alarm label="Office Alarm" {...}

with this change I can now see widgets in the Sitemap Configuration window.

By the way, great tool!

— Reply to this email directly or view it on GitHub https://github.com/cdjackson/HABmin/issues/236.

GeorgeEsper commented 9 years ago

Hi Chris,

I can confirm that openHAB parses the sitemap file correctly with this: sitemap office_alarm label="Office Alarm" {...}, but it fails in the openHAB classic UI if the underscore is replaced with a dash.

The file name is not the same as the name inside the sitemap: filename was office-alarm.sitemap and the sitemap name inside was office_alarm.

I can further confirm that the version with the underscore works using the classic UI. I have not been able to make greenT work at all, so I can't say if it has a problem with an underscore in the sitemap name.

George

On Tuesday, May 12, 2015 01:59 EDT, Chris Jackson notifications@github.com wrote:  Hi, Can you confirm if this is definitely a bug in HABmin, or if the sitemap fails to load in the other UIs that use the REST interface (so, GreenT, Android, iOS). I think this is a bug in openhab rather than habmin, but I might be wrong. I think I saw a bug recently that said sitemaps failed to load if the filename name wasn’t the same as the label and I think it was fixed a week or so ago so it would also be worth looking at the latest snapshot build…

Cheers Chris

On 12 May 2015, at 04:09, George Esper notifications@github.com wrote:

Just installed habmin 1.7.0 SNAPSHOT with openHAB 1.6.2.

filename: office-alarm.sitemap contents: sitemap office_alarm label="Office Alarm" {...}

renamed file to alarm.sitemap and changed content to: sitemap alarm label="Office Alarm" {...}

with this change I can now see widgets in the Sitemap Configuration window.

By the way, great tool!

— Reply to this email directly or view it on GitHub https://github.com/cdjackson/HABmin/issues/236.

  — Reply to this email directly or view it on GitHub.   

cdjackson commented 9 years ago

As per this bug (https://github.com/openhab/openhab/issues/2510 https://github.com/openhab/openhab/issues/2510) unless you are running a recent version of openhab, the filename must ne the same as the label or it won’t work. Since you are running an old version of openhab (i.e. 1.6.2) this bug will be present. I would suggest the you upgrade to the latest snapshot.

Cheers Chris

On 12 May 2015, at 04:09, George Esper notifications@github.com wrote:

Just installed habmin 1.7.0 SNAPSHOT with openHAB 1.6.2.

filename: office-alarm.sitemap contents: sitemap office_alarm label="Office Alarm" {...}

renamed file to alarm.sitemap and changed content to: sitemap alarm label="Office Alarm" {...}

with this change I can now see widgets in the Sitemap Configuration window.

By the way, great tool!

— Reply to this email directly or view it on GitHub https://github.com/cdjackson/HABmin/issues/236.

GeorgeEsper commented 9 years ago

Upgraded to 1.7.0 SNAPSHOT. All seems to be OK.

Thanks for your help.

As per this bug (https://github.com/openhab/openhab/issues/2510 https://github.com/openhab/openhab/issues/2510) unless you are running a recent version of openhab, the filename must ne the same as the label or it won’t work. Since you are running an old version of openhab (i.e. 1.6.2) this bug will be present. I would suggest the you upgrade to the latest snapshot.

Cheers Chris