Upgrade from 1 to blynk 2

Is always a good idea to start with the official documentation…

https://docs.blynk.io/en/blynk-1.0-and-2.0-comparison

Pete.

Sorry, I’m starting to get pissed off because nothing is working. Everything has to be painstakingly put together.
This has nothing to do with you Pete.
In another post I got the answer that you only have to insert a few lines in the old code and that was it.

Changing the color at the segmentedswitch does not work.
I have now tried everything, The data is definitely being sent to the V5 every second.
In the app I have set blue as the active color but the color stays green.

setproperty works but with a normal button

  Blynk.setProperty(V5, "onBackColor", "#0088FF");
  Blynk.setProperty(V5, "onColor", "#FF0000");
  Blynk.setProperty(V5, "onColor", "#FF0000");
    Serial.println("Daten gesendet");

Like what ?

to change the color of a segmented switch
the switch is V5

I meant have you tried something like this

Blynk.setProperty(V5, "BackColor", "#0088FF");
Blynk.setProperty(V5, "Color", "#FF0000");

If you’re referring to this comment then I think you may need to re-read what I wrote (bold added to make that easier for you)…

Pete.

Thank you very much, now it works.
This morning I had the same question if something has changed.
I got a link to read.
A look at my posted code and a tip would have saved me a lot of time and trouble.

In the old app I use Notification, email and Real Time Clock.
I read that i have to use Blynk.logEvent if there is more description about it

You can use automation to send notification and emails as well.

For that to have worked, we would have needed to know exactly what it is that you were trying to achieve, and that’s something that you omitted to include.

Pete.

In my old code I have the following function to send a mail

void notification() {
  // function to send a mail on SensorAlarm
  if (strcmp(sensorName, sensorNameAlt)) { // compare if old sensor equals new sensor
    String body = String("sensor ") + sensorName + " has on " + (day()) + " " + month() + " " + year() + " at " + (hour()) + ":" + minute() + ":" + second() + " triggered";
    Blynk.email("Sensor Alarm", body); //Send email
    notifyOnButtonPress();
  }
  strcpy(sensorNameAlt, sensorName); // Store old sensor.
  //************ mail end *************
}

Is there an example of how this needs to be done in the new app?

When you create an event, go to the notification tab and you should see a page like this

ok, i create a new event to send a email.
what i have to change in my code?
What is the eventcode

Blynk.logEvent is used for notifications which can be sent over email, delivered as push notifications to user’s smartphone, or sent as an SMS, it depends on your event configuration.

Thank you for the short answers!
Is there an example where I can read all this in one piece.
Code for the sketch, template notification page app etc.
How do I have to change my code posted above.
It seems to me that everything has changed completely.

Do you mean other than my topic that I linked to in post #19 ?

Pete.

Hi Pete, thanks and sorry for my long line.
So slowly I understand that logEvents is much much better than the old solution

Hello again
Has anything changed at RTC?
in the old app I added the RTC widget, in the new app I can’t find it.

Yes, and if you search the documentation for “RTC” you’ll see what has changed and see some code examples too.

Pete.

Thank you for the succinct reply.
Honestly, I don’t feel like reading hundreds of posts where something doesn’t work with RTC.
I have no idea if you are paid Pete.
I am a paying customer and I can do without such answers.
I have no desire to discuss this with you now.
I need information that will help me to solve my problem without spending a weekend searching in a forum, I don’t have the time.
If I had wanted that, I would have looked for a free solution. But I like to repeat myself.
I AM A PAYING CUSTOMER!

I think you misunderstood. The official Blynk documentation is on the Blynk website, not part of this forum, and it doesn’t consist of “posts”. It should be your first place to look for information about the Blynk product,.
Myself and other forum members have linked you to specific parts of that documentation before, but this time I didn’t feel like doing your search for you and handing you the results in a plate. It’s better if you get used to doing that for yourself.

No, I have no connection with Blynk, and I am not paid. I do however receive a free subscription to the Blynk Pro plan, along with other regular contributors to this forum, for the part we play in contributing to and/or moderating the community forum.

You may pay Blynk, but you don’t pay me. I’m more than happy not to engage with you on the community forum any further.

Then don’t search the forum, search the official Blynk documentation as I originally suggested.

You’ve bought a product, but you aren’t prepared to read the manual provided by the manufacturer, then when you go to a forum for users of that product you are upset when people suggest that you should RTFM.
That’s an interesting approach!

Good luck with your Blynk journey.

Pete.

1 Like