Blynk with Phillips Hue

Hi all,

I want to create buttons for on and off of my home lights via Phillips Hue platform. I create with success the interconnectio via webhook in my blynk app and when I run the test work perfect. I want now to create the button and I don’t find how I can trig wehook function. Can someone help me?

Have you checked the documentation?

yes but nothing to solve my issue with specific request.

1 Like

From the documentation…

Any write operation from hardware side will trigger Webhook Widget. You can also trigger webhook from Blynk app when a app widget is assigned to the same pin as Webhook.

Seems like it solves the issue you raised perfectly, unless maybe your actual issue is different from the one you described, or you didn’t actually read the documentation?

Pete.

I do not understand from what point you understood that I have solved the problem or that I have not read the relevant link. Please answers related to help with the topic and not general placements. I look forward to seeing relevant code examples in the query I describe. thanks

This is my code :

String lighton = "true";
String lightoff = "false";
.
.
.
if(light_state == 1)                                                                                                                
  {
   led1.on();
  String msgBody = ("{""\"on\":" + String(lighton)+ "}");
  Serial.println(msgBody);
  Blynk.virtualWrite(V1, msgBody);  
  }                                        
else                
    {
      led1.off();  
      String msgBody = ("{""\"on\":" + String(lightoff)+ "}");
  Serial.println(msgBody); 
  Blynk.virtualWrite(V1, msgBody); 
    }  
}

The serial answer is correct. {“on”: false} or {“on”: true}

My blynk webhook is the follow :

But i can’t control the light.

Any suggestions?

@morfeas please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

@PeteKnight if with all this comment you solve my issue or try to answer my real question… Ok. Until now only no answer comment i receive from you. I’ll be waiting for the substantial answer…

Morfeas.

I’m afraid that with that attitude you’ll be waiting a very long time :wink:

Pete.

2 Likes

Ok understand… You don’t have any real answer to discuss it with me☺️

From the other hand i believe that Blynk is a very good app and of course NOT free and means that if they have a good and professional support team with knowledge, help me to find the solution with the app.

Thanks for the non technical chat and the tips!!!

:rofl: :rofl: :rofl:

I think I can see what the problem with your webhook is, but once again, the answer is in the documentation…

or

but as you’ve read it then you’ll already know that :thinking:

If you’re paying for either the Startup, Business or Enterprise plans then the Blynk Community Forum is the wrong place to ask for this type of assistance. Your account manager should have provided you with details of how to obtain support when you signed-up to your plan.
The Startup plan (which begins at $166 per month) has an SLA of “3 business days reply. Email only”
The Business plan (from $1000 per month) has an SLA of “1 business day reply. Email and call”

Mere mortals like myself, who use the Developer version of the app and simply buy energy to allow more widgets to be used - or set-up a local Blynk server and give ourselves unlimited free energy - have a support SLA described as “Forum only” - which is where you are at the moment.

Full details of available plans are here:

Pete.

Final my solution for the Philips Hue interconnection :

HTTPClient http;
String req_string;
req_string = “http://”;
req_string += “192.168.1.40”; //Philips Hue router IP
req_string += “/api/”;
req_string += “HhaR8veR-Odqa7n2aYRWZuEmT8cHGxxxxxxxxxx”; //Philips Hue ID
req_string += “/lights/”;
req_string += 4; //light ID
req_string += “/state”;
Serial.println(req_string);
http.begin(req_string);
http.addHeader(“Content-Type”, “text/plain”);
String put_string;
put_string = “{“on”:”;
put_string += “true”; //true = on, false = off
put_string += “}”;
int httpResponseCode = http.PUT(put_string);

if anyone need any help for Philips Hue i am here for support.