Hello can someone tell me how I can expand the kan with loud and quiet and switching on and off can switch
you need to post much more info to get help⦠(that were being requested in the template that you erased when creating the thread in this sectionā¦)
Item configs and sitemap config at least
Using Code Fences
default.sitemap
sitemap gigablue label=āGigablueā {
Frame {
Group item=Gigablue
}
Frame {
Text label="Gigablue" icon="rollershutter" {
Default item=Gigablue label="Gigabluer"
}
}
}
Enigma2.rule
rule "GB_Mute"
when
Item GB_sendMute received command
then
switch(receivedCommand) {
case ON : sendHttpGetRequest("http://root:xxxxxx@192.168.178.22:80/web/vol?set=mute")
case OFF : sendHttpGetRequest("http://root:xxxxxxx@192.168.178.22:80/web/vol?set=mute")
}
end
enigma2.itimes
Group Gigablue
/* Gigablue HD Quad /
String GB_Sendung āAktuelle Sendung [%s]ā <projector_benq> ( Gigablue ) { http="<[http://root:xxxxxx@192.168.178.22:80/web/getcurrent:3000:REGEX(.?(.?).)]" }
String GB_Kanal āSender [%s]ā <projector_benq> ( Gigablue ) { http="<[http://root:xxxxxxxx@192.168.178.22:80/web/getcurrent:3000:REGEX(.?(.?).*)]" }
Switch GB_sendMute āMuteā <soundvolume_mute> ( Gigablue )
I would like to expand that as written above
here is something useful (check many more examples in that thread)
then you can place enigma_power_switch
on your sitemap
and from what I saw in that thread quickly: you cannot set the volume directly to a preset using http. you can only send increase/decrease steps.
can you give me your whole template with sitmap
2018-11-30 00:25:01.911 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule āEnigma2 Stateā: The name āenigma_power_stateā cannot be resolved to an item or type; line 13, column 5, length 18
==> /var/log/openhab2/events.log <==
2018-11-30 00:25:03.728 [ome.event.ItemCommandEvent] - Item āGB_volumeā received command 0
==> /var/log/openhab2/openhab.log <==
2018-11-30 00:25:30.239 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule āEnigma2 Stateā: The name āenigma_power_stateā cannot be resolved to an item or type; line 13, column 5, length 18
2018-11-30 00:25:33.809 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename default.sitemap
does not match the name gigablue
of the sitemap - please fix this as you might see unexpected behavior otherwise.
2018-11-30 00:26:00.227 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule āEnigma2 Stateā: The name āenigma_power_stateā cannot be resolved to an item or type; line 13, column 5, length 18
2018-11-30 00:25:33.809 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename default.sitemap does not match the name gigablue of the sitemap - please fix this as you might see unexpected behavior otherwise.
The file name needs to be the same as the sitemap name.
Example
gigablue.sitemap
sitemap gigablue label=āGigablueā {
Frame {
Group item=Gigablue
}
2018-11-30 00:26:00.227 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule āEnigma2 Stateā: The name āenigma_power_stateā cannot be resolved to an item or type; line 13, column 5, length 18
You need to post the entire rule, not just a few lines.
thanks that works now now have the problem with sound
What am I doing wrong
rule āGB_Muteā
when
Item GB_sendMute received command
then
switch(receivedCommand) {
case ON : sendHttpGetRequest(āhttp://root:xxxxxx@192.168.178.22:80/web/vol?set=muteā)
case OFF : sendHttpGetRequest(āhttp://root:xxxxx@192.168.178.22:80/web/vol?set=muteā)
}
end
rule āGB_Volumeā
when
Item GB_sendVolume received command
then
dimmer(receivedCommand) {
case up : sendHttpGetRequest(āhttp://root:xxxxxx@192.168.178.22:80/web/vol?set=upā)
case down : sendHttpGetRequest(āhttp://root:xxxxxx@192.168.178.22:80/web/vol?set=downā)
}
end
Your rules need help in the then section. This section is used for doing something based on what is defined in the when section. See and answer the comments added to the rule below.
rule āGB_Volumeā
when
Item GB_sendVolume received command // when this item get a update
then
dimmer(receivedCommand) { // what are you trying to do on this line?
case up : sendHttpGetRequest(āhttp://root:werder123@192.168.178.22:80/web/vol?set=upā) // case up?? Are you wanting to use a switch case in the rule?
case down : sendHttpGetRequest(āhttp://root:werder123@192.168.178.22:80/web/vol?set=downā)
}
end
Simple rule example that turns ON/OFF a light at a given time. See the notes added
rule "Turn Couch Light On"
when
Time cron "0 30 18 ? * *" // At 6:30pm every day
then
CouchLight.sendCommand(ON) // My light, with item name CouchLight, sends the ON command to turn the light ON.
end
rule "Turn Couch Light Off"
when
Time cron "0 30 23 ? * *"
then
CouchLight.sendCommand(OFF)
end
I want to do loud and quiet thatās wrong
Do you have to use a rule, or will giving a command via BasicUI to an item work?
This is just an example, replace with the correct http info for volume.
Item
Dimmer Volume "Your Volume [%d]" { http="<[http://root:xxxxxx@192.168.178.22:80/web/getcurrent:3000:REGEX(.?(.?).)]" }
// or this if the info is correct.
Dimmer Volume "Your Volume [%d]" { http="<[http://root:xxxxxx@192.168.178.22:80/web/vol?set=up]" }
And something like this in the sitemap to control the volume:
sitemap gigablue label=āGigablueā {
Frame {
Group item=Gigablue
Slider item=Volume label="TV Volume"
}
Just looking at the link posted above try this:
Add the IP address and port number to both items below and try using them to control the volume.
Items
Dimmer Volume_Down "Volume Dowm [%d]" {http=">[ON:GET:http://IP-Address:Port/web/remotecontrol?command=114]", autoupdate="false"}
Dimmer Volume_Up "Volume Up [%d]" {http=">[ON:GET:http://IP-Address:Port/web/remotecontrol?command=115]", autoupdate="false"}
Sitemap
sitemap gigablue label=āGigablueā {
Frame {
Group item=Gigablue
Setpoint item=Volume_Up label="TV Volume Up" minValue=0 maxValue=100 step=1
Slider item=Volume_Down label="TV Volume Down"
}
The above sitemap is using Setpoint to change volume up and Slider to change it down. Verify this will control the volume, then work toward eliminating the need for extra sitemap entries with the help of rules.
Have problem with the sidemap
sitemap our_home label="Gigablue" {
Frame label="Gigablue" icon="groundfloor" {
Group item=Gigablue
}
Frame {
Text label="Gigablue" icon="rollershutter" {
Default item=Gigablue label="Gigablue"
sitemap gigablue label=āGigablueā {
Frame {
Group item=Gigablue
Setpoint item=Volume_Up label="TV Volume Up" minValue=0 maxValue=100 step=1
Slider item=Volume_Down label="TV Volume Down"
}
}
}
Welcome!
Available sitemaps
It seems like you have not defined any sitemaps yet. To build one, please check the documentation for guidance.
You had the site map before, what changed? Read both the documentation and what others take the time to reply in a post. e.g.
I corrected the site map file and commented out what you donāt need for testing. Try it now and see if this works. Also itās best to have your files organized so itās easier to read. e.g. placing the { } in a structured manor like below.
sitemap our_home label="Gigablue" {
// Frame label="Gigablue" icon="groundfloor"
// {
// Group item=Gigablue
// }
// Frame
// {
// Text label="Gigablue" icon="rollershutter"
// Default item=Gigablue label="Gigablue"
// }
Frame
{
Group item=Gigablue
Setpoint item=Volume_Up label="TV Volume Up" minValue=0 maxValue=100 step=1
Slider item=Volume_Down label="TV Volume Down"
}
}
ok I understood that
but unfortunately I have no function
Group Gigablue
/* Gigablue HD Quad */
String GB_Sendung "Aktuelle Sendung [%s]" <projector_benq> ( Gigablue ) { http="<[http://root:werder123@192.168.178.22:80/web/getcurrent:3000:REGEX(.*?<e2eventname>(.*?)</e2eventname>.*)]" }
String GB_Kanal "Sender [%s]" <projector_benq> ( Gigablue ) { http="<[http://root:werder123@192.168.178.22:80/web/getcurrent:3000:REGEX(.*?<e2servicename>(.*?)</e2servicename>.*)]" }
Switch GB_sendMute "Mute" <soundvolume_mute> ( Gigablue )
Dimmer Volume_Up "Volume Up [%d]" {http=">[ON:GET:http://root:werder123@192.168.178.22:80/web/remotecontrol?command=115]", autoupdate="false"}
Well, aside from telling you to read the suggested links/docās, as others have done, I would start with one item. That can be power ON/OFF, Volume UP/DOWN, whatever but only one item. Once you can control that item, adding the others should be straight forward.
Another tip, when you have something that doesnāt work, supply all the info you have. The logs are full of tips to what the issue may be. Another example from an earlier post shows the log warning, then gives the answer.
No one hear is gonna hold your hand thru every step, so stop posting and start reading.
When you have something to work with, thatās not riddled with syntax errors (because you took the time to read whats needed), post your issue someone will be glad to assist.
BTW: Based on the topic āEnigma2 sitemapā you can mark this solved. After 15 post, you now have a sitemap.
A new Topic, just in time!
That works so thatās all ok I would now like to make loud and quiet pure and switch of programs I have so far everything sank
sitemap our_home label="Gigablue" {
Frame label="Gigablue" icon="groundfloor"
{
Group item=Gigablue
Setpoint item=GB_Volumeup label="TV Volume" minValue=0 maxValue=100 step=1
}
}
rule "GB_Mute"
when
Item GB_sendMute received command
then
switch(receivedCommand) {
case ON : sendHttpGetRequest("http://root:werder123@192.168.178.22:80/web/vol?set=mute")
case OFF : sendHttpGetRequest("http://root:werder123@192.168.178.22:80/web/vol?set=mute")
rule "GB_Volume"
when
Item GB_Down received command
then
Setpoint(receivedCommand) {
case UP : sendHttpGetRequest("http://root:werder123@192.168.178.22:80/web/vol?set=up")
case DOWN : sendHttpGetRequest("http://root:werder123@192.168.178.22:80/web/vol?set=down")
}
end
Which mistake do I make I would like to do that loudly and quietly is the wen who yes what am I doing wrong
The first rule has no end, switch (first rule) and Setpoint (second rule) are not used correctly. Your post ask what mistakes do I make, but no error logs are provided to help diagnose the issue.
Please read
and for rules.