Dimmer Light Rules / Command Help

Oh, come on. “not working” is so unhelpful. What, if anything, does it send now? How are you sending INCREASE/DECREASE commands? Does the rule trigger?

I send the Increase, decrease command through Slider -dimmer item which I posted above.
It does not send the value of ‘b’, but it sends the whole link “192.168.0.108:5000/red3/?status=%2$s&type=text” I have also posted my rules and Item settings in the previous comment.

Maybe you have to set the label of the item, so please try

Dimmer Led_R "Red [%d %%]" (FF_Nishit, Lights){http=">[*:GET:http://192.168.0.108:5000/red3/%2$s]"}

(removed spaces for better readability)

Udo,
When I move the slider from the Ios app, my python scripts replies ’ Could not convert string to float’
Kindly note that I need to use float value from the dimmer,
I also tried int, but when I move the slider, my python script replies 'invalid literal for int90 base 10 : 2$s’
also tried using 2$d, but getting the same error,
So how to send the int or float value directly?

Udo,
Can you help me with making a Main voltage dimmer
i has got the module done but iam not so good in programming,
I have an arduino sketch for the dimmer.
but i dont know how to make it work for the openhab2,
This is my script for 8channel dimmer.
i wanted to control each channel

#include <SPI.h>
#include <Ethernet.h>
#include <PubSubClient.h> // http://knolleary.net/arduino-client-for-mqtt/
 
// MAC Adresse des Ethernet Shields
byte mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED };
// IP des MQTT Servers
byte server[] = { 192, 168, 1, 12 };
// Ethernet Client zur Kommunikation des MQTT Clients
EthernetClient ethClient;
EthernetClient Client;
IPAddress broker(192,168,1,12);
// MQTT Client zur Kommunikation mit dem Server
// Server - Variable des Types byte mit Serveradresse
// 1883 - Ist der Standard TCP Port
// callback - Function wird aufgerufen wen MQTT Nachrichten eintreffen. Am ende des Sketches
// ethClient - Angabe des Ethernet Clients
PubSubClient client(ethClient);
 
// Timervariable für eine Verzögerung. Als alternative zu delay was die verarbeitung anhält.
int timer = 0;
int EndTimer = 200; 
 
// Pins des DIMMER
int dim1=4;
int dim2=5;
int dim3=6;
int dim4=7;
int dim5=8;
int dim6=9;
int dim7=10;
int dim8=11;
// Übermittelte Farbwerte
int dim1Value = 0;
int dim2Value = 0;
int dim3Value = 0;
int dim4Value = 0;
int dim5Value = 0;
int dim6Value = 0;
int dim7Value = 0;
int dim8Value = 0;
// Gerade gesetzte Farbe
int CURdim1Value = 0;
int CURdim2Value = 0;
int CURdim3Value = 0;
int CURdim4Value = 0;
int CURdim5Value = 0;
int CURdim6Value = 0;
int CURdim7Value = 0;
int CURdim8Value = 0;
void setup()
{
 // Setzen der PINS als Ausgang
 pinMode(dim8, OUTPUT);
 pinMode(dim7, OUTPUT);
 pinMode(dim6, OUTPUT);
 pinMode(dim5, OUTPUT);
 pinMode(dim4, OUTPUT);
 pinMode(dim3, OUTPUT);
 pinMode(dim2, OUTPUT);
 pinMode(dim1, OUTPUT);
 
 // Bei start Farbe Blau setzen
 analogWrite(dim1, 0);
 analogWrite(dim2, 0);
 analogWrite(dim3, 0);
 analogWrite(dim4, 0);
 analogWrite(dim5, 0);
 analogWrite(dim6, 0);
 analogWrite(dim7, 0);
 analogWrite(dim8, 0);
 // Initialisierung des Ethernets
 if (Ethernet.begin(mac) == 0) {
 
 // Wenn DHCP fehlschlägt dann rot setzen und aufhören
 analogWrite(dim1, 0);
 analogWrite(dim2, 0);
 analogWrite(dim3, 0);
 analogWrite(dim4, 0);
 analogWrite(dim5, 0);
 analogWrite(dim6, 0);
 analogWrite(dim7, 100);
 analogWrite(dim8, 100);
 while (true);
 }
 else {
 // Wenn DHCP OK ist dann grün setzen
 dim2Value = 100;
 dim7Value = 100
 }
 
}
 
void loop()
{
 // Aufbau der Verbindung mit MQTT falls diese nicht offen ist.
 if (!client.connected()) {
 client.connect("arduinoClient");
 // Abonieren von Nachrichten mit dem angegebenen Topics
 client.subscribe("/dd16/dimmer/1/#");
 client.subscribe("/dd16/dimmer/2/#");
 client.subscribe("/dd16/dimmer/3/#");
 client.subscribe("/dd16/dimmer/4/#");
 client.subscribe("/dd16/dimmer/5/#");
 client.subscribe("/dd16/dimmer/6/#");
 client.subscribe("/dd16/dimmer/7/#");
 client.subscribe("/dd16/dimmer/8/#");
 // Alternative Abonierung aller Topics unter /openHAB/Nachtlicht
 // mqttClient.subscribe("/openHAB/Nachtlicht/#");
 }
 
 if (timer <= EndTimer) timer++;
 else {
 timer = 0;
 
 if (dim1Value < CURdim1Value) CURdim1Value--;
 else if (dim1Value > CURdim1Value) CURdim1Value++;
 
 if (dim2Value < CURdim2Value) CURdim2Value--;
 else if (dim2Value > CURdim2Value) CURdim2Value++;
 
 if (dim3Value < CURdim3Value) CURdim3Value--;
 else if (dim3Value > CURdim3Value) CURdim3Value++;

 if (dim4Value < CURdim4Value) CURdim4Value--;
 else if (dim3Value > CURdim3Value) CURdim3Value++;

 if (dim5Value < CURdim5Value) CURdim5Value--;
 else if (dim5Value > CURdim5Value) CURdim5Value++;

 if (dim6Value < CURdim6Value) CURdim6Value--;
 else if (dim6Value > CURdim6Value) CURdim6Value++;

 if (dim7Value < CURdim7Value) CURdim7Value--;
 else if (dim7Value > CURdim7Value) CURdim7Value++;

 if (dim8Value < CURdim8Value) CURdim8Value--;
 else if (dim8Value > CURdim8Value) CURdim8Value++;
 }
 
 analogWrite(dim1, CURdim1Value);
 analogWrite(dim2, CURdim2Value);
 analogWrite(dim3, CURdim3Value);
 analogWrite(dim4, CURdim4Value);
 analogWrite(dim5, CURdim5Value);
 analogWrite(dim6, CURdim6Value);
 analogWrite(dim7, CURdim7Value);
 analogWrite(dim8, CURdim8Value);
 client.loop(); // Schleife für MQTT
 
}
 
// ===========================================================
// Callback Funktion von MQTT. Die Funktion wird aufgerufen
// wenn ein Wert empfangen wurde.
// ===========================================================
void callback(char* topic, byte* payload, unsigned int length) {
 // Zähler
 int i = 0;
 // Hilfsvariablen für die Convertierung der Nachricht in ein String
 char message_buff[100];
 
 // Kopieren der Nachricht und erstellen eines Bytes mit abschließender \0
 for(i=0; i<length; i++) {
 message_buff[i] = payload[i];
 }
 message_buff[i] = '\0';
 
 // Konvertierung der nachricht in ein String
 String msgString = String(message_buff);
 
 // Überprüfung des Topis und setzen der Farbe je nach übermittelten Topic
 if (String(topic) == "/dd16/dimmer/1") dim1Value = round(msgString.toInt() * 2.55);
 if (String(topic) == "/dd16/dimmer/2") dim2Value = round(msgString.toInt() * 2.55);
 if (String(topic) == "/dd16/dimmer/3") dim3Value = round(msgString.toInt() * 2.55);
 if (String(topic) == "/dd16/dimmer/4") dim4Value = round(msgString.toInt() * 2.55);
 if (String(topic) == "/dd16/dimmer/5") dim5Value = round(msgString.toInt() * 2.55);
 if (String(topic) == "/dd16/dimmer/6") dim6Value = round(msgString.toInt() * 2.55);
 if (String(topic) == "/dd16/dimmer/7") dim7Value = round(msgString.toInt() * 2.55);
 if (String(topic) == "/dd16/dimmer/8") dim8Value = round(msgString.toInt() * 2.55);
}

Sorry I don’t use mqtt yet, so I could only guess. But of course you will have to use a mqtt broker (e.g. mosquitto) for communication, the mqtt binding and the correct settings. There is lot of stuff about mqtt in this forum…

Oké no problem,
The mqtt setup is done ect