I’ve been using OH2 for a 2-3 years now and I have accomplished quite a bit with it, using various bindings, including the HTTP binding. I’ve configured it to control a motor which is connected to Olimex’s PIC-WEB board, running Microchip’s TCP/IP stack.
I have recently installed OH3 and working my way through the new interface…much different than OH2, but very impressive. I’m struggling a bit trying to configure the HTTP binding to send commands to the PIC-WEB, like I did in OH2. At the moment, I’m trying to start simple, by just turning the on-board LED on and off. The commands do that are;
http://192.168.2.70/forms.htm?led1=0 to turn the LED on
http://192.168.2.70/forms.htm?led1=1 to turn the LED off
I have been able to configure the toggle switch, create the item, and configure the channel, for the most part, but I can’t seem to get the LED to turn off and on. I’ve tried all kinds of variations for the Base URL and set the On Value to 0 and the Off Value to 1, but no luck so far.
If I check the log, it shows the item receiving the commands;
Item ‘LED1’ received command ON
Item ‘LED1’ predicted to become ON
but I’m getting the following error messages;
Item ‘LED1’ changed from UNDEF to ON
Splitting header ‘’ failed. No ‘=’ was found. Ignoring
I’ve read several threads about configuring the HTTP binding and tried several of the suggestions, but still no luck.
I’m sure I’m missing something simple. As I mentioned, create a text based items file in OH2, to control the LED’s and other variables as well. For example, a slider variable to control the speed of the motor using Pulse Width Modulation. I would like to do the same in OH3, so I thought I would try starting with the LED’s first.
If anyone has any ideas, or can point me in the right direction, it would be greatly appreciated.
Thanks!!
[Update]
I managed to get the LED to turn on and off by doing the following;
Base URL: http://192.168.2.70/
Command URL Extension: forms.htm?led1=%2$s
On Value: 0
Off Value: 1
The trick was the ‘%2$s’. I know it has to do with formatting, but not quite sure why I need to use it for the on/off state in OH3. I didn’t have to use it in OH2. I had to use it in the following commands in OH2, to control the PWM function I mentioned;
POST:http://192.168.2.70/sliders.cgi?slider1=%2$s
I’m still getting the following message in the log though;
Splitting header ‘’ failed. No ‘=’ was found. Ignoring
I also noticed the timestamp in the log is not correct. I do have the timezone set properly.
Thanks.