[SOLVED] Fbacker/broadlink-mqtt-bridge

what is the output of:

ls -al /srv/openhab2-conf/broadlink-mqtt-bridge/
ls -al /home/openhabian/broadlink-mqtt-bridge
ps -efw |grep index.js

log files

2018-11-06 15:52:58.478 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'SprinklerSystemSchedule' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-06 15:52:58.481 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-06 15:52:58.484 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'SprinklerSystemSchedule' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-06 15:52:58.487 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'SprinklerSystemSchedule' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-06 15:52:58.490 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'SprinklerSystemSchedule' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-06 15:53:03.447 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Menu' for the unknown item 'Menu'.

2018-11-06 15:53:06.106 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Menu' for the unknown item 'Menu'.

2018-11-06 16:19:11.717 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/MKSprinklerSystemZone1' for the unknown item 'MKSprinklerSystemZone1'.

2018-11-06 16:19:13.965 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Menu' for the unknown item 'Menu'.

2018-11-06 16:19:49.654 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/MKSprinklerSystemZone1' for the unknown item 'MKSprinklerSystemZone1'.

2018-11-06 16:19:50.977 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Menu' for the unknown item 'Menu'.

do I put that on in one line??

3 different commands in the Linux shell

you have another mess in your hands :slight_smile:
maybe something is wrong with your items files… you need to double check them

[16:31:26] openhabian@openHABianPi:~$ ls -al /srv/openhab2-conf/broadlink-mqtt-bridge/
total 224
drwxrwxr-x+  10 openhabian openhabian  4096 Nov  5 15:31 .
drwxrwxr-x+  14 openhab    openhabian  4096 Nov  5 15:29 ..
drwxrwxr-x+   3 root       root        4096 Nov  5 15:31 commands
drwxrwxr-x+   2 openhabian openhabian  4096 Nov  6 10:39 config
-rw-rw-r--    1 openhabian openhabian  1586 Nov  5 15:29 device.js
-rw-rw-r--    1 openhabian openhabian    51 Nov  5 15:29 .dockerignore
-rw-rw-r--    1 openhabian openhabian   163 Nov  5 15:29 .eslintrc.json
drwxrwxr-x+   8 openhabian openhabian  4096 Nov  6 16:03 .git
drwxrwxr-x+   2 openhabian openhabian  4096 Nov  5 15:29 github
-rw-rw-r--    1 openhabian openhabian    61 Nov  5 15:29 .gitignore
drwxrwxr-x+   2 openhabian openhabian  4096 Nov  5 15:29 html
-rw-rw-r--    1 openhabian openhabian 20648 Nov  5 15:29 index.js
drwxrwxr-x+   3 openhabian openhabian  4096 Nov  5 15:29 installers
-rw-rw-r--    1 openhabian openhabian    21 Nov  5 15:29 .jshintrc
drwxr-xr-x+ 185 openhabian openhabian  4096 Nov  5 15:30 node_modules
-rw-r--r--    1 root       root       14021 Nov  6 16:31 output.log
-rw-rw-r--    1 openhabian openhabian   465 Nov  5 15:29 package.json
-rw-rw-r--    1 openhabian openhabian 57138 Nov  5 15:30 package-lock.json
-rw-rw-r--    1 openhabian openhabian  7035 Nov  5 15:29 README.md
drwxrwxr-x+   2 openhabian openhabian  4096 Nov  5 15:29 .vscode
-rw-rw-r--    1 openhabian openhabian 53843 Nov  5 15:29 yarn.lock
[16:31:45] openhabian@openHABianPi:~$ ls -al /home/openhabian/broadlink-mqtt-bridge
ls: cannot access '/home/openhabian/broadlink-mqtt-bridge': No such file or directory
[16:32:47] openhabian@openHABianPi:~$ ps -efw |grep index.js
root       399     1  1 16:30 ?        00:00:02 /usr/bin/node index.js
openhab+  1106   929  0 16:33 pts/0    00:00:00 grep --color=auto index.js

so, the bridge is running (you most likely selected to enable auto-start upon reboot at the end of the AutoInstaller

If you access http://{computer-ip}:3000/ it should bring up its web interface

can you control the broadlink devices from OH2? you should be able to…
post your related item config

I have fixed MK smart house. :smiley:

1 Like

Yes I did ( was this bad)

yes .

prepareAction
{
  "action": "play",
  "topic": "broadlink/epson_projector/menu",
  "origin": "web"
}

I don’t know what you mean this ------->>> some thing like this

Switch Menu                      "Menu"                                                 {mqtt=">[broker:broadlink/epson_projector/menu:command:ON:play],>[broker:broadlink/epson_projector/menu:command:OFF:play"}```

work :smiley:

1 Like

No, it’s fine.

yes, this looks ok

ok can I ask one thing why

what I had worked with MK smart house MQTT ???
why did we have to chagen it?

we didn’t really have to change your mqtt.cfg
we did it just to make sure that everything is ok and to eliminate a potential cause of problems.

the first line “enforces” the config parameters by first cleaning whatever was configured in the past for the MQTT binding and the applying the correct ones in the file. You can now remove this first line if you want.

the second line just uses the localhost (127.0.0.1) IP address (instead of the local LAN (192.168.0.4) IP)

Ok my openhab is 192.168.0.4

at the end on the page Matt tell’s me to do this??

https://www.mksmarthouse.com/setupinstallationwindows

it’s the same thing (using the localhost IP or the LAN IP) since you are running the broker on the same machine as OH2… Actually… it’s “preferred” to use 127.0.0.1 :slight_smile:

this is for connecting OH2 MQTT Binding to the Broker

  1. https://unix.stackexchange.com/questions/184447/whats-the-difference-between-a-machines-ip-address-and-localhost
  2. https://whatismyipaddress.com/localhost

ok thanks for your help. I was think ok makeing another items file to store the broadlink Items is this a good ider if I do this

it’s always a good idea to use separate items files to group stuff
I use one items file per binding (or subsystem)

do I have to wright it different in sitemaps or rules?

No
you can have multiple items files and only 1 sitemap file and as many rule files as you want
all the items files will be loaded so all the items will be available to OH2

cool, thanks you, I so happy its working now.

1 Like