@korttoma
Hi,
I switch "CommFailure" to 0 And reloaded engine. and error measure disappear.
But is this a new feature that you have implemented ?
@korttoma
Hi,
I switch "CommFailure" to 0 And reloaded engine. and error measure disappear.
But is this a new feature that you have implemented ?
Hi,
Thanx for 2.2.0
But I have a new feature that I did not have before.
I'm using VERA edge and my plugin reports that i don't have any connection to the Gateway.

Please advice :)
@hek
Thanx Again,
I think I was on that page 3-4 time without seeing getnodeid()
: )
Thanx @hek
Where do I find these definitions and functions ?
Is there a list somewhere ?
Hi,
I'm looking for a way to get the NODE_ID.
In lib 1,5 this was defined as MY_NODE_ID AUTO..
But in LIB 2,0 I can't find any defenitions like this.
I have tried to write out MY_NODE_ID but it only return 255,
I like to use it as a delay for my heaters. I don't like them all to be turned on at the same time. Thanx
Hi @korttoma,
Just an other question,
II'm also using PLEG.
Is there a way to compeer the last value against the new value and only IF these values are different we sending a this new value.
some thing like :
local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 35)
local oldTemp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","VAR_1", 14)
if temp != oldTemp then
luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="14;2", variableId="VAR_1", value=temp}, 3)
end
Thanx
@korttoma
Thanx this is working perfect.
Thanx, I will Try again this afternoon :)
hi @korttoma
Thanx for your suggestion, But I was not able to figure out where to insert this LUA code.
Thanx
Hi,
I'm have started to plan a irrigation controller(Thanx @petewill).
But I need to get the temperature from my sensors to my controller. I have not been able to do this :(
My plan was to read this out from my vera controller, but cant find any way to do this.
Does anyone have a advice or idea to do this ?
I'm using the V2.0.0, of library.
I have tried to use the
request(tempNode_ID, V_TEMP) But no replay from VERA.
To store/update the "setTemp" I'm using the V_VAR1 on the and this is returned from VEAR.
So Is this possible or not ?
Thanx
@korttoma
:cry: I did not see that :cry:
Is there any plan for implementing this ?
Hi,
I have a relay node that don't have any sensors, and therefore don't have communication between the vera and the node. like this
So I have been playing with heartbeat and I cas see in serial log local on the node that it is transmitted.
BUT my node in VERA dont update the last update time : Is tyhis how is sopose to be or do I something wrong?
Here are my code :
/**
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
*
* Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
*******************************
*
* REVISION HISTORY
* Version 1.0 - Henrik Ekblad
*
* DESCRIPTION
* Example sketch showing how to control physical relays.
* This example will remember relay state after power failure.
* http://www.mysensors.org/build/relay
*/
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69
// Enable repeater functionality for this node
// #define MY_REPEATER_FEATURE
#include <SPI.h>
#include <MySensors.h>
#define RELAY_1 3 // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
#define NUMBER_OF_RELAYS 2 // Total number of attached relays
#define RELAY_ON 1 // GPIO value to write to turn on attached relay
#define RELAY_OFF 0 // GPIO value to write to turn off attached relay
long double last_heartbeat_time = millis();
long double HEARTBEAT_TIME = 120000;
void before() {
for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
// Then set relay pins in output mode
pinMode(pin, OUTPUT);
// Set relay to last known state (using eeprom storage)
digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
}
}
void setup() {
}
void presentation()
{
// Send the sketch version information to the gateway and Controller
sendSketchInfo("Relay", "1.0");
for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
// Register all sensors to gw (they will be created as child devices)
present(sensor, S_LIGHT);
}
}
void loop()
{
long double temp = (millis() - last_heartbeat_time);
if (temp > HEARTBEAT_TIME) {
// If it exceeds the heartbeat time then send a heartbeat
sendHeartbeat();
last_heartbeat_time = millis();
#ifdef MY_DEBUG
Serial.print("Sent heartbeat" );
Serial.println(temp)
#endif
}
}
void receive(const MyMessage &message) {
// We only expect one type of message from controller. But we better check anyway.
if (message.type==V_LIGHT) {
// Change relay state
digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
// Store state in eeprom
saveState(message.sensor, message.getBool());
// Write some debug info
Serial.print("Incoming change for sensor:");
Serial.print(message.sensor);
Serial.print(", New status: ");
Serial.println(message.getBool());
}
}
If you are using the internal ref 1.1 you need to divide the voltage on the pin down to this level.
If you like in the example using a 1M and 470K you will have a approx 1Volt in the point.
@tlpeter said:
if (oldBatteryPcnt != batteryPcnt) {
// Power up radio after sleep
send(msgBatt.set(batteryV, 1));
//sendBatteryLevel(batteryPcnt);
oldBatteryPcnt = batteryPcnt;
}
Hi, This part should not have been updated
this part is icluded in the lib
So leave it like the exsample
if (oldBatteryPcnt != batteryPcnt) {
// Power up radio after sleep
sendBatteryLevel(batteryPcnt);
oldBatteryPcnt = batteryPcnt;
}
For sending over your voltage you need one additional
send(msgBatt.set(batteryV, 1));
Good luck
Hi @bisschopsr
I got this error when i'm using this lib
Any Idea. I'm using IDE 1.6.12. new install and Installed Mysensor through the Manage library. My sensor is working (updated my gw and other sensors, but can't upgrade my DHT sensors.
Thanx for your help
@robertmt Yes I have similar problems :/
But have not had the time to look into this yet.
Hopefully later today (or maybe closer to the weekend)
I was not able to upload a sketch with "arduino as ISP" so I whent back to my orginal idea to use a FTDI232(like I use for microPro).
I looked into the schematic on the nano and the micro. I found that on the micro the DTR pin there is a capacitor between reset and DTR input.. But the reset pin on the Nano did not. So I modified one FTDI232 with a capacitor 0,1uF (See picture).
When I also crossed the TX/RX pins it finally works :+1:
OK, I will Try again :)
Thanx
@sundberg84,
Is it possible to use an arduino to program a sketch into an other arduino ?
I can program a bootloader, but don't see a way to upload a sketch
Thanx
Yes That's correct :D
I can try this now :dancer:
Thanx