Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


chimera

431 posts

Ultimate Geek


#198059 24-Jun-2016 12:42
Send private message

Got a weird issue with OpenHAB and MQTT broker (mosquitto) that was doing my head in last night...

 

I have MQTT running on same box as OpenHAB, sends messages to open/close the Garage Door and open/close the Roller Blinds.

 

The Garage door works perfectly fine.  The roller blinds don't. However with the rollerblinds if I publish a message from Linux command line (eg: mosquitto_pub -t "openhab/blinds/trigger" -m "OPEN") it works fine, the blinds will open.  There seems to be some issue between OpenHAB and Mosquitto - however I can't work it out because I've already proved that the communication must be fine as the Garage Door still works.  I just copied the garage door lines and altered for the blinds, changing the topic and message to suit. 

 

Here are the items and sitemap file:

 

 

 

Items file:

 

Switch doorButton "Garage Door" <garage> (gGarage) {mqtt=">[mqttbroker:openhab/garage/doorswitch:command:ON:ACTIVATE],>[mqttbroker:openhab/garage/doorswitch:command:OFF:DEACTIVATE]"}
Number doorStatus "Door Status [MAP(switch.map):%d]" <garagedoor> (gGarage) {mqtt="<[mqttbroker:openhab/garage/doorstatus:state:default]"}
Switch hallBlinds "Hall Blinds" <rollershutter> (gBlinds) {mqtt=">[mqttbroker:openhab/blinds/trigger:command:ON:OPEN],>[mqttbroker:openhab/blinds/trigger:command:OFF:CLOSE]"}
Number blindStatus "Controller [MAP(blinds.map):%d]" <icon16x16> (gBlinds) {mqtt="<[mqttbroker:openhab/blinds/status:state:default]"}

 

 

 

Sitemap:

 

Frame label="Doors and Blinds" {
  Switch item=hallBlinds mappings=[ON="Up", OFF="Down"]
  Text item=blindStatus
  Switch item=doorButton mappings=[ON="Open", OFF="Close"]
  Text item=doorStatus

 

 

 

Any ideas?

 

 





 

 


Create new topic
SumnerBoy
1735 posts

Uber Geek

Subscriber

  #1579496 24-Jun-2016 12:46
Send private message

Can't see anything obviously wrong in there. Time to enable debug logging for the OH MQTT binding and see what is happening in there maybe?

 

There is nothing at all appearing on your openhab/blinds/trigger topic when you switch via OH?


chimera

431 posts

Ultimate Geek


  #1579543 24-Jun-2016 13:41
Send private message

Wow, can you believe the issue is with the icon name?

 

I remove the dash in the icon name and it resolves the problem.

 

Changed from <rollershutter-20> to just <rollershutter> and that sorted it!  Ironically I posted the text without the - in it above...

 

 





 

 


 
 
 
 


Blanch
253 posts

Ultimate Geek


  #1579555 24-Jun-2016 14:08
Send private message

chimera:

 

Wow, can you believe the issue is with the icon name?

 

I remove the dash in the icon name and it resolves the problem.

 

Changed from <rollershutter-20> to just <rollershutter> and that sorted it!  Ironically I posted the text without the - in it above...

 

 

 

 

The fun to be had when playing with Openhab,

 

SumnerBoy comment “Can't see anything obviously wrong in there.” Had me worried

 

 


SumnerBoy
1735 posts

Uber Geek

Subscriber

  #1579590 24-Jun-2016 15:04
Send private message

Yeah I have come across that before - the openHAB parser is pretty sensitive to dashes. I once decided to re-name my entire config using a better naming scheme, thinking that "<FLOOR>-<ROOM>-<NAME>" was the way to go. Went through and spent an age renaming everything and when I loaded it up for the first time openHAB had all sorts of meltdowns. 

 

Had to revert to "<FLOOR>_<ROOM>_<NAME>" and everything was fine.

 

Definitely something to watch out for!


SumnerBoy
1735 posts

Uber Geek

Subscriber

  #1579592 24-Jun-2016 15:04
Send private message

Yeah I have come across that before - the openHAB parser is pretty sensitive to dashes. I once decided to re-name my entire config using a better naming scheme, thinking that "<FLOOR>-<ROOM>-<NAME>" was the way to go. Went through and spent an age renaming everything and when I loaded it up for the first time openHAB had all sorts of meltdowns. 

 

Had to revert to "<FLOOR>_<ROOM>_<NAME>" and everything was fine.

 

Definitely something to watch out for!


Create new topic





News »

Huawei launches IdeaHub Pro in New Zealand
Posted 27-Oct-2020 16:41


Southland-based IT specialist providing virtual services worldwide
Posted 27-Oct-2020 15:55


NASA discovers water on sunlit surface of Moon
Posted 27-Oct-2020 08:30


Huawei introduces new features to Petal Search, Maps and Docs
Posted 26-Oct-2020 18:05


Nokia selected by NASA to build first ever cellular network on the Moon
Posted 21-Oct-2020 08:34


Nanoleaf enhances lighting line with launch of Triangles and Mini Triangles
Posted 17-Oct-2020 20:18


Synology unveils DS16211+
Posted 17-Oct-2020 20:12


Ingram Micro introduces FootfallCam to New Zealand channel
Posted 17-Oct-2020 20:06


Dropbox adopts Virtual First working policy
Posted 17-Oct-2020 19:47


OPPO announces Reno4 Series 5G line-up in NZ
Posted 16-Oct-2020 08:52


Microsoft Highway to a Hundred expands to Asia Pacific
Posted 14-Oct-2020 09:34


Spark turns on 5G in Auckland
Posted 14-Oct-2020 09:29


AMD Launches AMD Ryzen 5000 Series Desktop Processors
Posted 9-Oct-2020 10:13


Teletrac Navman launches integrated multi-camera solution for transport and logistics industry
Posted 8-Oct-2020 10:57


Farmside hits 10,000 RBI customers
Posted 7-Oct-2020 15:32









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.