Fail Percentage Blind control in domoticz

Post Reply
miguelingles
Posts: 3
Joined: Monday 15 May 2017 21:35
Target OS: Raspberry Pi
Domoticz version:
Contact:

Fail Percentage Blind control in domoticz

Post by miguelingles » Tuesday 16 May 2017 10:16

Hi, I'm trying to control a blind with V_percentage and the problem is that Domoticz does not use it. The problem is that the option V_Percentaje in domoticz is not contemplated. It would have to be created and compiled to see if it works. Can somebody help me.
Attachments
domoticz.png
domoticz.png (39.74 KiB) Viewed 1774 times

Ronny
Posts: 7
Joined: Saturday 14 February 2015 18:41
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands
Contact:

Re: Fail Percentage Blind control in domoticz

Post by Ronny » Sunday 25 June 2017 15:22

Hi miguelingles, I believe I face the same difficulties. De slider in Domoticz does not work and does not send proper information back to the node. How did you proceed? I turned the node into a dimmer and in Domoticz I choose a blinds with percentage.

gryzli133
Posts: 4
Joined: Wednesday 23 August 2017 22:14
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Fail Percentage Blind control in domoticz

Post by gryzli133 » Wednesday 24 January 2018 16:38

did someone resolve the problem with percentage control of Blinds using mysensors and domoticz?

ppenguin
Posts: 1
Joined: Friday 06 April 2018 18:41
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Fail Percentage Blind control in domoticz

Post by ppenguin » Friday 06 April 2018 18:43

Is anybody working on this, it appears it's still not solved?
If not, I might try my hand at this...

annegerben
Posts: 25
Joined: Wednesday 03 August 2016 12:34
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Fail Percentage Blind control in domoticz

Post by annegerben » Monday 09 April 2018 10:57

I have the same issue

I'm running the lasted stable version 3.8153 on rpi2
but also tested on latest beta

dxfantome1
Posts: 3
Joined: Monday 18 June 2018 12:07
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Fail Percentage Blind control in domoticz

Post by dxfantome1 » Sunday 05 August 2018 5:47

my solution (in beta version):

/*DESCRIPTION
Commande d'orientation d'un store a lamelles via domoticz
materiel: arduino nano ,3 piles 1.5v ,NRF24L01+
Connection servo :rouge->+5V, Black ou maron->GND, blanc ou orange-> pin d3.
connection niveau batterie: A0
The servo consumes much power and should probably have its own powersource.'
The arduino might spontanally restart if too much power is used (happend
to me when servo tried to pass the extreme positions = full load).
version modifié de http://www.mysensors.org/build/servo
*/
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RF24_PA_LEVEL RF24_PA_MIN // = -18dBm
//#define MY_RF24_PA_LEVEL RF24_PA_LOW // = -12dBm
#define MY_RF24_PA_LEVEL RF24_PA_HIGH // = -6dBm (by defaut)
//#define MY_RF24_PA_LEVEL RF24_PA_MAX // = 0dBm

#include <SPI.h>
#include <MySensors.h>
#include <Servo.h>

#define SERVO_DIGITAL_OUT_PIN 3 //pin du ServoMoteur
#define SERVO_MIN 0 // Fine tune your servos min. 0-180
#define SERVO_MAX 180 // Fine tune your servos max. 0-180
#define DETACH_DELAY 1000 // Tune this to let your movement finish before detaching the servo Temps delais pour finir le mouvement avant de detacher le servomoteur
#define CHILD_ID 1 // Id of the sensor child
#define CHILD_ID_BATTERY 2 //test //battery level

MyMessage msgPCent(CHILD_ID, V_PERCENTAGE);
MyMessage msgStatus(CHILD_ID, V_STATUS);


Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created Sensor gw(9,10);

int BATTERY_SENSE_PIN = A0; //test //battery level
int oldBatteryPcnt = 0; //test //battery level
void setup()
{

// use the 1.1 V internal reference //test //battery level
# if defined(__AVR_ATmega2560__)
analogReference(INTERNAL1V1); //test //battery level
# else //test //battery level
analogReference(INTERNAL); //test //battery level
# endif } //test //battery level //test //battery level
//myservo.attach(SERVO_DIGITAL_OUT_PIN);
// Request last servo state at startup
//request(CHILD_ID, V_PERCENTAGE);
//request(CHILD_ID, V_STATUS);
}

void presentation() {
// Send the sketch version information to the gateway and Controller
sendSketchInfo("Store", "1.1beta");
// Register all sensors to gw (they will be created as child devices)
present(CHILD_ID, S_DIMMER,"store chambre");
}

void loop()
{
int sensorValue = analogRead(BATTERY_SENSE_PIN); //test //battery level // get the battery Voltage
# ifdef MY_DEBUG //test //battery level
Serial.println(sensorValue); //test //battery level
# endif //test //battery level
// 1M, 470K divider across battery and using internal ADC ref of 1.1V //test //battery level
// Sense point is bypassed with 0.1 uF cap to reduce noise at that point //test //battery level
// ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts //test //battery level
// 3.44/1023 = Volts per bit = 0.003363075 //test //battery level
int batteryPcnt = sensorValue / 10; //test //battery level
if (oldBatteryPcnt != batteryPcnt) {//test //battery level
sendBatteryLevel(batteryPcnt);//test //battery level
oldBatteryPcnt = batteryPcnt;//test //battery level
}
}
void receive(const MyMessage &message) {
if (message.type == V_STATUS && message.getInt()==0 ){
mouvement(100);}
if (message.type == V_STATUS && message.getInt()==1 ){
mouvement( 0);}
if (message.type == V_PERCENTAGE ) {
mouvement(100-message.getInt()); }
}

void mouvement(int PCent) {
myservo.attach(SERVO_DIGITAL_OUT_PIN);
myservo.write(SERVO_MAX + (SERVO_MIN - SERVO_MAX) / 100 *1.8* PCent); // sets the servo position 0-180
Serial.print( "V_PERCENTAGE=" );Serial.println(PCent);
delay(DETACH_DELAY); //
myservo.detach();
}

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests