Go Down

Topic: Control Livolo switches / Livolo switch library (Read 170635 times) previous topic - next topic

DmitryP

Hi rastone and thanks for fast reply!

Pairing remote id 26339 completes and codes 0 (on/off toggle), 68 (dim up/down) and 106 (all off) work fine. How did you make key codes 78, 86, 102, 92 126, 34, 116 and 36 to change dimmer level?

Dmitry P

rastone

#181
Mar 11, 2018, 08:06 pm Last Edit: Mar 12, 2018, 12:09 pm by rastone
i just decoded the signals my remote was sending
Each dim code is for a different button.So for code eg. 78 to work you must 1st pair the switch with
button 2(key code 96).The dim codes are what the touch remote is sending when you press the
corresponding button for more than 1sec and you keep it pressed for up/down dimming.Hope that helps

DmitryP

Thanks, now it's clear. So all these dim codes control different dimmers but not dimmer levels on single dimmer.

rastone


kriss13

Hi and Happy new year!

Thanks for all who made titanic work with intagration of Livolo and Arduino. Library is very nice - special thanks to topic starter.

But there is one problem. There is not full description how  Arduino make to send commands only ON and only OFF. Joevpt try to do it but...

I wrote simple code for programming Livolo Switches. If you want  - "Code for dummies" (And now i'm dummie in Arduino coding too :) )

Code: [Select]

#include <livolo.h>

byte trport =12;              // port of 433-transmitter
Livolo livolo(trport);        // transmitter connected to pin trport
int onoff = 10;               // data from Serial
unsigned int ID = 6400;       // ID of Remote - type your own ID/ f.e. 6400; 19303; 10550; 8500; 7400
unsigned int IDB = 0;         // Number of remote's button #1: 0, #2: 96, #3: 120, #4: 24, #5: 80, #6: 48, #7: 108, #8: 12, #9: 72; #10: 40, #OFF: 106
unsigned int SCENE1 = 90;     // Number of scene (available 90, 114, 10, 18)

void setup() {
Serial.begin(9600);  // serial init
}

void loop() {

// Serial reading
//
if (Serial.available() > 0)
{
onoff = Serial.read()-48;
Serial.println(onoff);
}

if (onoff == 1)
{
  livolo.sendButton(ID, IDB);
  Serial.println("Button");
  delay (1000);
}

if (onoff == 2)
{
  livolo.sendButton(ID, SCENE1);
  Serial.println("Scene");
  delay (1000);
}

if (onoff == 0)
{
 
  livolo.sendButton(ID, 106);
  Serial.println("off");
  delay (1000);
}
}




There are steps for programming below:
1. wrote in header of code your ID, number off button and Scene.
2. compile and download in Arduino
3. open Serial monitor
4. press Livolo switch for 5 seconds (untill BEEP)
5. type 1 in Serial monitor and send - Livolo switch will BEEP
6. press Livolo switch for 5 seconds again (untill BEEP)
7. type 2 in Serial monitor and send - Livolo switch will BEEP
fin

Now You can test switch via sending same commands in Serial monitor.


Make it with all swithes in your location with individual Remote ID for each switch.

Now you can use 3 code for manage livolo switch from Arduino:

1. Standart on/off in single button with code you write in header

livolo.sendButton(RemoteID, Button)


2. Only ON via sending code of scene

livolo.sendButton(RemoteID, Scene)


3. Only OFF via sending code 106

livolo.sendButton(RemoteID, 106)

Hi

I am a noob too sort of.
Could you tell a dummy, that pins did you connect (transmitter to Arduino)?
I have a Nano.v3.
I am trying to setup mine, but all I have are bits of info from everywhere.

I wonder if I can use my nodemcu and Blynk app to sent commands to Livolo.


thank you.

kriss13

#185
Apr 19, 2018, 10:08 pm Last Edit: Apr 19, 2018, 10:10 pm by kriss13
anyone? :)

brewster_

anyone? :)
Hi!

Sorry for delay - was very busy.

I use port 12 in my Mega - this is PWM-port.

"And one more thing" - i use DIY antenna with the transmitter. Without it Livolo work bad and unstable.

kriss13

Hi!

Sorry for delay - was very busy.

I use port 12 in my Mega - this is PWM-port.

"And one more thing" - i use DIY antenna with the transmitter. Without it Livolo work bad and unstable.
Just got it to work and successfully turned the light on/off .
I use nodemcu D6 (12 in the scketch) (dear lord the designation of pins for nodemcu is a mess :))
Also on my Nano worked.

I know try to make it work with Blynk app (my final goal), as the native app is...well ..Chinese :))

Thanks all for the great work about Livolo!

brewster_

Yes - Blynk is very interesting application. I use it in my Smart house project.

I want to write about this project but I haven't time for it now. May be later.

Go Up