LaurentiuB
(Laurentiu B)
October 20, 2020, 8:48pm
21
Ok, let’s do a test
Items
Number TestItem
Sitemap
Frame label=“Test” icon=“settings” {
Slider item=TestItem label=“TestItem”
}
And the logs
23:45:56.131 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘TestItem’ received command 30
23:45:56.140 [INFO ] [smarthome.event.ItemStateChangedEvent] - TestItem changed from 0 to 30
You should have the same results if you copy this configuration.
And if that doesn’t work - restart openHAB completely and try again!
What is this stray “]” about?
When you are saving your things, items and sitemaps, are you checking the logs to make sure that there are no errors, and that they have loaded correctly?
1 Like
mohamed
(abou radia )
October 20, 2020, 9:04pm
25
i just copy and paste the commands
but it seems to have a problem in sitemap file . this what i have obtained
mohamed
(abou radia )
October 20, 2020, 9:13pm
27
for this fault
i modified it , and this what i have obtained
mohamed
(abou radia )
October 20, 2020, 9:15pm
28
i modified the qoutes and this is what i have obtained :
I think a big problem in this thread is that you’re providing screenshots which are difficult to analyse, and cut off some information. It also prevents copy/pasting for testing purposes.
Please use code fences:
```
like this
```
LaurentiuB
(Laurentiu B)
October 20, 2020, 9:18pm
30
You should have only one bridge definition.
1 Like
mohamed
(abou radia )
October 20, 2020, 9:26pm
31
//This is the Things
Bridge mqtt:broker:MosquittoMqttBroker “Mosquitto MQTT Broker” [host=“192.168.1.5”, secure=false]
{
// Switch Mohamed Light
Thing mqtt:topic:sonoffbasicmo “sonoffbasicmo” {
Channels:
Type switch : switch “Power Switch” [
stateTopic=“stat/sonoffbasicmo/POWER”,
commandTopic=“cmnd/sonoffbasicmo/POWER”,
on=“ON”,
off=“OFF”
]
Type string : reachable “Reachable” [
stateTopic = “tele/sonoffbasicmo/LWT”
]
}
// fire sensor
Thing mqtt:topic:mofiresensor "mofiresensor" {
Channels:
Type string : string "string1" [
stateTopic="mofiresensor"
]
}
// blinds system
Thing topic Mblinds "Mblinds" {
Channels:
Type number:Rollershutter1 "Rollershutter" [
commandTopic="Mblinds"
]
}
}
like that ?
LaurentiuB
(Laurentiu B)
October 20, 2020, 9:26pm
32
Mqtt should be like
Bridge
Thing topic
Channels
Type
Type
Thing topic
Channels
Type
Type
LaurentiuB
(Laurentiu B)
October 20, 2020, 9:28pm
33
It looks ok, but It’s hard to follow all the brackets.
LaurentiuB
(Laurentiu B)
October 20, 2020, 9:35pm
34
Now try with
Items
Number TestItem { channel="mqtt:topic:Mblinds:Rollershutter1" }
and see what happens
mohamed
(abou radia )
October 20, 2020, 9:39pm
35
you mean add the part { channel="… } to the test item i have made , right ?
mohamed
(abou radia )
October 20, 2020, 9:45pm
37
i made it
this what i have obtained
mohamed
(abou radia )
October 20, 2020, 9:50pm
39
but there is is something wrong .
look at that
i move the test item slider , but it returns to the same value (62) !
also the servo motor still not moving
LaurentiuB
(Laurentiu B)
October 20, 2020, 9:56pm
40
Is there other way you can post to that topic? I suspect that the “slider” is getting the value from the mqtt channel not sending to it.