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

506 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
  #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

506 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
254 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

 

 




  #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!


  #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 and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

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



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.