Recently formated pc and Installed arduino and mysensors.. Now I get this error message and cant find out where I get Vcc.h??
Installed arduino 1.6.9
Tested mysensors dev and 1.5
Recently formated pc and Installed arduino and mysensors.. Now I get this error message and cant find out where I get Vcc.h??
Installed arduino 1.6.9
Tested mysensors dev and 1.5
@GertSanders Okey, I almost got it! I am stuck on compiling the sketch. It says "pins_arduino.h" is missing. Apparently I need a folder called "28PinBoard" with a file "pins_arduino.h" in it. Wich one can I use for this project?
@GertSanders Okey, thanks so In my understanding, that takes care of the fuses also.
Hi, and thanks for your amazing work! I am trying to make your Narrow node with a Atmega 328P-PU and the pcb you made. I have low understanding of how I am going to upload "optiboot_atmega328_08M_038400_D6.hex" via a arduino uno.. Do I need to make anything with fuses or so? And how do I do it if that is the case?
Hello all! I have a minor issue. I recently upgraded my router to a Netgear Nighthawk R7000 with DD-WRT.
My problem is that I can't get my ethernetgateway to show up as an active client or anywhere in the router. I have set it with static ip and mac adress and it is indeed working, but I want to see it in the router UI cause this does not feel good..
Anyone with expertise of DD-wrt and ethernetgateway?
Got delayed.. I had to order a IR reciver to find out my remote codes, didnt thought I would find them easily on the internet but nope!
@mfalkvidd Thank you! This is really great!
I will take a look at this after work tomorrow
I have just put my nodemcu on a breadboard, connected it to ground and vin. I have also just put the led and the transistor on the board.
I wanted to start with just making the IR part work to turn on the TV and then continue from there. This is my first time following a schematic like this and also first time using a transistor. Im more used to the very user friendly guides from @hek where everything is visual on how to wire. This type of schematic confuse me but I want to learn
So if "D21 IR" is the IR led this means..
hmm
Thanks again
Hello again! Im trying to get better at understanding schematics.. This is what I want to do on my breadboard LINK to schematic
NPN is a TIP120 transistor.
IR led is a simple 5mm 940nm with 2 legs.
What does "D21 IR" mean?
How exactly do I wire this?.. I dont understand how to wire From A0 to the TIP120 with 4.7k resistor to IR LED..
Thank you for help!
edit: This is a part of the schematic from Makeit.netflix.com/the-switch
Basicly if I figure this out I want to make a Wifi button so when I press the button, the ir will start the TV and my phone will get a notification that will trigger tasker to run a scene in the android App imperihome.
This scene would do something like Turn off some lights, Dim those lights, set this light to this colour and so on.. For Friday/Saturday nights
@cranky Thanks, I will test when my neopixels arrive from le China!
Nice work!
I really like neopixels! I dont know anything about Node-Red.. Can this be used without it?
Im not home right now but gateway is v 1.5 and almost all sensors is also 1.5 recept 1 or 2 at 1.4..
Distance vary alot between 1 to 50 meters from the gateway.
I've traced the problem to the gateway though, it loses connection to my Vera for some unknown reson
Hmm now it happends again, after working for 1,5 week..
What happends is that the gateway some how dont have connection with the Vera.
Reboot will fix this but it only seems to be temporary.
@jeylites Dif you also recently update your Vera? Feels like this starten to happend after doing so..
Sorry about bumping but I've got an update. Same thing happend again - It stopped working about 12 hours after my "fix".
as @hek Asked in the other thread about a recent update of Vera; Yes I recently updated my Vera Edge with Two updates last week I think.. :s
Is this Vera's Fault or is it hardware? I dont have another Uno to test with atm
@johnr My Mysensors also stopped working yesterday - after running flawlessly for 6 months. I have a Vera Edge and an Ethernetgateway..
I was unsure what you mean though, is just 1 sensor not working or none working? For nothing works since "MySensors plugin : Cannot send command - communications error"
I used my433node created by @olaeke. It works great for me. You just need an arduino, radio and a 433mhz transmitter. Remember that the 433mhz transmitter need 5V directly from power source (not 5V from arduino) or the range can be very inconsistent.
Im using a Vera Edge and Ethernetgateway. It's been setup for about 6 months working flawlessly. The daily lights on worked but when the schedueled lights out did not work I logged in on my Vera and saw this: "MySensors plugin : Cannot send command - communications error" This happend without me doing anything. I've tried to restart router, Ethernetgateway, reload luup, The Ip for Ethernetgateway is correct in both router and Vera.. Could this mean hardwarefailure?
Anyone?
Ye, I tried that already but maybe I did something wrong.. I'll try it again.
Hello, I wanted to make a battery powered BH1750 lux sensor. I've tried to do it with Sensebender but there is missing analog ports (A4 and A5)
How can I do this and is this a bad idea (battery drains in 1 week?) ?
Anybody made some Nice enclosure for this?
@Dan-S. Thanks for your investigation! I made the changes and it seems to work well!
About the high pitch sound I mentioned earlier; I changed NEO_KHZ400.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, NEO_PIN, NEO_GRB + NEO_KHZ400);
to
NEO_KHZ800
This removed the annoying high pitch sound
I guess it is that neopixel cant run with your RGB-3D since it only has 3 pins - VCC, GND, DATA.
Edit : I figured it out! I will add some more functions to it and then share it.
Thx for help!
This is my attempt at millis... I can still not get it to stop. :sadface:
#define SN "Moodlight"
#define SV "v1.0"
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#include <SPI.h>
#include <MySensor.h>
#define NEO_PIN 4 // NeoPixels input pin
#define NUMPIXELS 16 // Number of nexpixels in ring/strip
#define interval 50
Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, NEO_PIN, NEO_GRB + NEO_KHZ800);
long previousMillis = 0;
int l = 0;
int isShow;
MySensor gw;
MyMessage rgbShowState(0, V_LIGHT);
void setup()
{
gw.begin(incomingMessage, AUTO, true);
gw.sendSketchInfo(SN, SV);
gw.present(0, S_LIGHT, "Moodlight", false);
// Correct RGB show state for first start and load it (set to 'On' at first start)
gw.saveState(0, constrain((int8_t)gw.loadState(0), 0, 1));
isShow=gw.loadState(0);
// Send RGB show state to controler (request ack back: true/false)
gw.send( rgbShowState.set(isShow), false);
if (isShow==1){Serial.println("RGB show running..."); }
Serial.println("Ready to receive messages...");
strip.begin();
strip.show();
}
void loop()
{
// Process incoming messages (like config and light state from controller)
gw.process();
// LEDs off if state 0
if (isShow == 0)
{
strip.Color(0,0,0);
}
// Run RGB show if state 1
if (isShow == 1)
{
newRainbow();
}
}
void incomingMessage(const MyMessage &message)
{
if (message.type == V_LIGHT)
{
// Incoming on/off command sent from controller ("1" or "0")
int lightState = message.getString()[0] == '1';
// if receive RGB Show On commands, start the show
if (message.sensor==0 && lightState==1){ rgbShowOn(); }
// if receive RGB Show Off commands, stop the show
else if (message.sensor==0 && lightState==0){ rgbShowOff(); }
}
}
void rgbShowOn()
{
// define show On
isShow = 1;
// Write some debug info
Serial.println("Show must go on");
}
void rgbShowOff()
{
// define show Off
isShow = 0;
Serial.println("Stop the show");
}
void newRainbow()
{
if (millis() - previousMillis > interval * 2)
{
for (int h = 0; h < strip.numPixels(); h++)
{
strip.setPixelColor(h, Wheel((h + l) & 255));
}
l++;
if (l >= 256)
l = 0;
strip.show();
previousMillis = millis();
}
}
// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
WheelPos = 255 - WheelPos;
if(WheelPos < 85) {
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
}
if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
WheelPos -= 170;
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
@TD22057 Okey, thank you. I will try with millis when I have time this weekend
No problems for me when I use chrome. If I use Microsoft Edge on my Surface Pro, Windows 10 then this keeps happening. Not bothered though.
@AWI Hi, thanks for reply.
I tried putting gw.process on a few different places now but it still seems like it gets stuck in the loop rainbow();
If I remove rainbow(); from the main loop, everything seems to work according to the debug messages. Except for that there is no lights but.. Either I need to listen to messages from gw in the rainbow(); or this to be reworked in some way.
Hello, I have modified the RGB-3D example to run my Neopixel as a moodlight. I am trying to do so that When I press light switch ON, it will run a loop that slowly changes colour. When I press light switch OFF it will exit the loop and turn leds off.
Turning it on works, but It seem that it gets stuck in the loop so that it cant turn off.. How can I fix this?
#define SN "Moodlight"
#define SV "v1.0"
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#include <SPI.h>
#include <MySensor.h>
#define NEO_PIN 4 // NeoPixels input pin
#define NUMPIXELS 16 // Number of nexpixels in ring/strip
Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, NEO_PIN, NEO_GRB + NEO_KHZ800);
MySensor gw;
MyMessage rgbShowState(0, V_LIGHT);
int isShow;
void setup()
{
gw.begin(incomingMessage, AUTO, true);
gw.sendSketchInfo(SN, SV);
gw.present(0, S_LIGHT, "Moodlight", false);
// Correct RGB show state for first start and load it (set to 'On' at first start)
gw.saveState(0, constrain((int8_t)gw.loadState(0), 0, 1));
isShow=gw.loadState(0);
// Send RGB show state to controler (request ack back: true/false)
gw.send( rgbShowState.set(isShow), false);
if (isShow==1){Serial.println("RGB show running..."); }
Serial.println("Ready to receive messages...");
strip.begin();
strip.show();
}
void loop()
{
// Process incoming messages (like config and light state from controller)
gw.process();
// Run RGB show if is set
while (isShow==1)
{
rainbow(6000);
}
}
void incomingMessage(const MyMessage &message)
{
if (message.isAck())
{
Serial.println("Got ack from gateway");
}
if (message.type == V_LIGHT)
{
// Incoming on/off command sent from controller ("1" or "0")
int lightState = message.getString()[0] == '1';
// if receive RGB Show On commands, start the show
if (message.sensor==0 && lightState==1){ rgbShowOn(); }
// if receive RGB Show Off commands, stop the show
else if (message.sensor==0 && lightState==0){ rgbShowOff(); }
}
}
void rgbShowOn()
{
// define show On
isShow=1;
// Write some debug info
Serial.println("Show must go on");
}
void rgbShowOff()
{
// define show Off
isShow=0;
Serial.println("Stop the show");
}
void rainbow(uint8_t wait) {
uint16_t i, j;
for(j=0; j<256; j++) {
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel((i+j) & 255));
}
strip.show();
delay(wait);
}
}
// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
WheelPos = 255 - WheelPos;
if(WheelPos < 85) {
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
}
if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
WheelPos -= 170;
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}```
@olaeke Oh sorry I didnt see that you replied! I mean Can I use a cable from a cat5 cable?
Edit: Used a piece of cat5 wire and it works great!
I must also thank you for your 433node sketch and .h file. It is working so well with 3x Nexa 433mhz switches (150 sek for 3 switches)
Edit 2: The 433 transmitter should not be powered by usb - > arduino - > 433 transmitter. I had a very low rate of success until i powered it with a wallplug.
@Dwalt And I made mine by using exact same IKEA lamp
@petewill said:
@AWI & @hek thanks, yeah, I have been wanting to play with capacitive touch too! Someday soon hopefully
Cool! What do you think about a battery version of this? (short battery life?)
Ok, thank you guys, will try this tomorrow when I have a whole day free
@AWI said:
@msebbe put the two resistors in series between Vcc (Vin) and Gnd and connect the middle ( Vout) to the A0 pin. If you connect the 1 MOhm (R2) to ground, the voltage on the A0 pin is then two third (2/3) times Vcc. This is called a voltage divider.
1M to grund? In example from mysensors picture says 1M to vcc.
Also, could I wire so both resistors meet at A0 or how do you do it?
I dont understand how to wire if I want to measure battery level at A0 pin.. I have 1MΩ (R1) and 470KΩ (R2) resistor. But how do I connect this?
It is correct that I have really good hearing.. But if I use the distance sensor sketch the HC-SR04 is not making any sound at all, first now with this sketch I hear it. Could it have something to do with the LED-strip I got from china?
This was fun to build
However, my HC-SR04 is making a high pitch sound when distance is close and a more static sound when distance is further. I have tried with 3 different modules and 2 different Nanos and 2 different power sources. Is this normal?
@Dan-S. I am going to do this but with a rgb led strip instead of a ring.
@hek I have updated my gateway but should the vera say plugin version 1.5? Or is the plugin version still 1.4? Im confused
@JoeStrout said:
I started setting up a Z-wave network a couple months ago when I moved into this new house. For the most part, things are working pretty well. But I have a node in the back yard that controls the yard lights; it's located in the pool pump area, behind a concrete wall, and the far edge of the property.
At first I couldn't reach that node at all, but then I stuck another module on one of the outside outlets on that side of the house. Then I was able to reach that remote node fairly reliably. But it was still a bit flaky, and for the past two days, I haven't been able to reach it at all. That means trudging out to turn the yard lights on and off by hand. WAF is low, and I'm not happy either. Moreover, we want to add Z-wave control of the pool pump as well, which would be in the same area, but that's going to require an extensive electrical refactoring — so we need to be sure it's going to actually work!
So! This is why I'm asking:
How can I best extend the range out to a remote node, when there are no outlets in between? Are there dedicated "relay" modules that have bigger antennas or more power? Or is there some sort of wired relay (the wire of which I suppose I could bury in the yard)?
(And sorry for the non-MySensors-specific question... but I've found this forum to be friendlier and more helpful on all topics than other Z-wave forums on the net!)
What controller are you using?
I successfully changed antenna in my Vera Edge wich gavel alot better range
@olaeke Hello, how do you solder the antenna on the 433 sender? Can I just take a cable and solder from 433 sender modules antenna to a bigger antenna?
@BulldogLowell said:
and you cn try this:
/* this is set up for a 4 pin recv unit GND DATA DATA VCC plug GND into D2, DATA into D3 and D4, and VCC into D5 */ #include <MySensor.h> #include <SPI.h> #include <Bounce2.h> #include <RCSwitch.h> RCSwitch mySwitch = RCSwitch(); #define CHILD_ID 3 #define VCC_PIN 5 // source 5V up to 40mA from this pin #define GND_PIN 2 // sink up to 40mA on this pin #define DATA_PIN 3 // external int 1 on Uno MySensor gw; const int bell = -251; // This is the value that my 433mhz doorbell sends out when button is pushed boolean tripped = false; unsigned long timerStart; // Change to V_LIGHT if you use S_LIGHT in presentation below MyMessage msg(CHILD_ID, V_TRIPPED); void setup() { gw.begin(); // Register binary input sensor to gw (they will be created as child devices) // You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage. // If S_LIGHT is used, remember to update variable type you send in. See "msg" above. gw.present(CHILD_ID, S_DOOR); // 433mhz Part pinMode(DATA_PIN, INPUT); // just leave D4 tristated pinMode(GND_PIN, OUTPUT); digitalWrite(GND_PIN, LOW); pinMode(VCC_PIN, OUTPUT); digitalWrite(VCC_PIN, HIGH); mySwitch.enableReceive(1); // Receiver on interrupt 1 => that is pin D3 } void loop() { if (mySwitch.available()) { tripped = (mySwitch.getReceivedValue() == bell); if (tripped) { gw.send(msg.set(true)); timerStart = millis(); Serial.println(F("Ding Dong!!")); } mySwitch.resetAvailable(); //<<<<<<<<<< I think you want this here... I looked at the library on GitHub } if (tripped && millis() - timerStart > 5000UL) { gw.send(msg.set(false)); Serial.println(F("no activity")); tripped = false; } }
Hmm, still nothing. It seems to be the 433mhz reciver part that is not working.
@BulldogLowell said:
unsigned long timerStart;
Thanks that worked, however nothing happends when I test by using the door bell. I will investigate this when I get home on monday and stick to my old sketch until then .
@BulldogLowell said:
OK, I reviewed the arduino library and it looks like
mySwitch.resetAvailable();
belonged higher in the code, so I edited it. You may want to be wary of that.
Ok thanks for your effort
When compiling I get this error below. I think this should be quiet easy to fix but I dont understand this language yet
sketch_jul03a.ino: In function 'void loop()':
sketch_jul03a:49: error: 'timerStart' was not declared in this scope
sketch_jul03a:54: error: 'timerStart' was not declared in this scope
'timerStart' was not declared in this scope
@BulldogLowell said:
not tested, but I'd look to do it like this... with non-blocking code in case of a second press of the doorbell within the 5second timeout:
/* this is set up for a 4 pin recv unit GND DATA DATA VCC plug GND into D2, DATA into D3 and D4, and VCC into D5 */ #include <MySensor.h> #include <SPI.h> #include <Bounce2.h> #include <RCSwitch.h> RCSwitch mySwitch = RCSwitch(); #define CHILD_ID 3 #define VCC_PIN 5 // source 5V up to 40mA from this pin #define GND_PIN 2 // sink up to 40mA on this pin #define DATA_PIN 3 // external int 1 on Uno MySensor gw; const int bell = -251; // This is the value that my 433mhz doorbell sends out when button is pushed boolean tripped = false; // Change to V_LIGHT if you use S_LIGHT in presentation below MyMessage msg(CHILD_ID, V_TRIPPED); void setup() { gw.begin(); // Register binary input sensor to gw (they will be created as child devices) // You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage. // If S_LIGHT is used, remember to update variable type you send in. See "msg" above. gw.present(CHILD_ID, S_DOOR); // 433mhz Part pinMode(DATA_PIN, INPUT); // just leave D4 tristated pinMode(GND_PIN, OUTPUT); digitalWrite(GND_PIN, LOW); pinMode(VCC_PIN, OUTPUT); digitalWrite(VCC_PIN, HIGH); mySwitch.enableReceive(1); // Receiver on interrupt 1 => that is pin D3 } void loop() { if (mySwitch.available()) { tripped = (mySwitch.getReceivedValue() == bell); if (tripped) { gw.send(msg.set("1")); timerStart = millis(); Serial.println(F("Ding Dong!!")); } } if (tripped && millis() - timerStart > 5000UL) { gw.send(msg.set("0")); Serial.println(F("no activity")); tripped = false; } mySwitch.resetAvailable();// i am not familiar with your library, so I'm not sure where this would go... or if you even need it with the non-blocking code. }
again, I could not test it...
Thank you! Looks much better. I will test later today when its not 31 celsius outside
Below is my working sketch. Could somebody help clean it up? I made this sketch by combining two sketches and removing some parts from each.
/*
this is set up for a 4 pin recv unit GND DATA DATA VCC
plug GND into D2, DATA into D3 and D4, and VCC into D5
*/
#include <MySensor.h>
#include <SPI.h>
#include <Bounce2.h>
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
#define CHILD_ID 3
#define VCC_PIN 5 // source 5V up to 40mA from this pin
#define GND_PIN 2 // sink up to 40mA on this pin
#define DATA_PIN 3 // external int 1 on Uno
MySensor gw;
int oldValue = -1;
int bell = -251; // This is the value that my 433mhz doorbell sends out when button is pushed
// Change to V_LIGHT if you use S_LIGHT in presentation below
MyMessage msg(CHILD_ID, V_TRIPPED);
void setup()
{
gw.begin();
// Register binary input sensor to gw (they will be created as child devices)
// You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage.
// If S_LIGHT is used, remember to update variable type you send in. See "msg" above.
gw.present(CHILD_ID, S_DOOR);
// 433mhz Part
pinMode(DATA_PIN, INPUT);
// just leave D4 tristated
pinMode(GND_PIN, OUTPUT);
digitalWrite(GND_PIN, LOW);
pinMode(VCC_PIN, OUTPUT);
digitalWrite(VCC_PIN, HIGH);
mySwitch.enableReceive(1); // Receiver on interrupt 1 => that is pin D3
}
static unsigned long count = 0;
void loop()
{
if (mySwitch.available()) {
int value = mySwitch.getReceivedValue(); // This is where 433mhz signal are recieved
if (value == bell) {
// Send in the new value
gw.send(msg.set("1")); // Gives doorbell status tripped
delay(5000);
gw.send(msg.set("0")); // Gives doorbell status not tripped
}
mySwitch.resetAvailable();
count = 0;
}
else {
if (++count == 0) Serial.println("no activity");
}
}
@hek said:
Guess you'll also have to send/restore the tripped value after some time?
Yes, that would be ideal. First problem for me is how to change tripped value without using the actual magnetic sensor..
Hi!
Im using a modified version of the Door/Window sketch. I have a random 433mhz doorbell at my door and a arduino nano 3.0 with radio and 433mhz receiver connected.
I have managed to make the node send this message every time the doorbell is pressed
gw.send(msg.set(value == HIGH ? 1 : 0));
Nothing happends in the Vera edge UI tho. I would like to make it so that when doorbell is pushed, same thing happends like when you open the door in the original sketch (red color in Vera UI when door open)
here is full code;
this is set up for a 4 pin recv unit GND DATA DATA VCC
plug GND into D2, DATA into D3 and D4, and VCC into D5
*/
#include <MySensor.h>
#include <SPI.h>
#include <Bounce2.h>
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
#define CHILD_ID 3
#define VCC_PIN 5 // source 5V up to 40mA from this pin
#define GND_PIN 2 // sink up to 40mA on this pin
#define DATA_PIN 3 // external int 1 on Uno
MySensor gw;
int oldValue = -1;
int bell = -251;
// Change to V_LIGHT if you use S_LIGHT in presentation below
MyMessage msg(CHILD_ID, V_TRIPPED);
void setup()
{
gw.begin();
// Register binary input sensor to gw (they will be created as child devices)
// You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage.
// If S_LIGHT is used, remember to update variable type you send in. See "msg" above.
gw.present(CHILD_ID, S_DOOR);
// 433mhz Part
pinMode(DATA_PIN, INPUT);
// just leave D4 tristated
pinMode(GND_PIN, OUTPUT);
digitalWrite(GND_PIN, LOW);
pinMode(VCC_PIN, OUTPUT);
digitalWrite(VCC_PIN, HIGH);
mySwitch.enableReceive(1); // Receiver on interrupt 1 => that is pin D3
}
static unsigned long count = 0;
void loop()
{
if (mySwitch.available()) {
int value = mySwitch.getReceivedValue();
if (value == bell) {
// Send in the new value
gw.send(msg.set(value== HIGH ? 1 : 0));
oldValue = 1;
}
mySwitch.resetAvailable();
count = 0;
}
else {
if (++count == 0) Serial.println("no activity");
}
}
Any Ideas how I can just make the message so it triggers "door sensor" in my UI?
This looks really good Does it work with Vera only or can Domoticz work?
I have the 12 LED version and Im trying to find a way to select color via the vera edge ui
@stephenmhall said:
Well, I turned on my PC before I left work today, because I could
Awsome! I would do that too even though it takes 20 seconds for pc to boot
@scalz said:
you can disassemble some components like transformer and cap. So you can make your own mysensors design and you get very small and cheap transformer. I can't find cheaper I think. or maybe on alibaba!
I have these http://fr.aliexpress.com/item/AC-220V-DC-3V-10V-5V-9V-1w-1x1w-2w-2x1w-3w-3x1w-Constant-Current-Constant/1900256299.html?recommendVersion=1
Can this convert 230v to 5v and supply enough power for say an pro mini with motion sensor?
@celonunes Ok, thanks! I got the discovery working by just rebuilding the same sensor from scratch!
Sorry for so many questions.. But I have now changed to Openhab and got it working with my MQTT gateway. Now Another problem appear:
http://i60.tinypic.com/2d2eqzk.png[/IMG
I would like to display the temperature in °C like in your guide sketch (wich I am using) but instead it looks like in the picture. Same thing about humidity, why is it like this?
Edit: For anyone wondering, I solved the issue with the degree symbol not showing up properly by replacing "°C" with "& deg;C" without space between & deg
@celonunes In the Mqtt broker sketch, Ethernet.h was included. I suppose it should be UIPEthernet.h for me? So I tried that but nothing.
I had better luck with the UIPEthernet examples, there my arduino shows up with an ip and mac adress.. Hmmm.
edit:
So after using UIPEthernet "Advanced chat server" sketch, the MAC and IP showed up in my router. When I then tried with the MQTT sketch with UIPEthernet.h it would not work. So then I tried to copy the MAC and IP I used in the chat server sketch into the Mqtt sketch and bom! I can now ping it, so I guess it works now?
edit2: Should it say anything more then "Started!" on serial monitor? Like "on ip 192.168.1.197" or something like that? Since Im now trying the MQTT in pidome as I know how to use pidome better. Pidome states;
Connected: Yes, with 192.168.1.197:1883 at topic: MyMQTT/# (without subscribe promise)
Last receive time: 00-00-0000 00:00
Last send time: 00-00-0000 00:00
This is what Serial monitor says http://i61.tinypic.com/i252kn.png
But when I use device discovery it cannot find the temperature sensor that could be found using the serial gateway
@celonunes
Yes, both from windows cmd and from the router ui with this result:
PING 192.168.1.197 (192.168.1.197): 56 data bytes
--- 192.168.1.197 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
Could be that I have not changed the MAC adress cause I tried to figure out how to do it but I dont understand this part from the MQTT gateway sketch:
*1 -> NOTE: Keep first byte at x2, x6, xA or xE (replace x with any hex value) for using Local Ranges.
#define TCP_PORT 1883 // Set your MQTT Broker Listening port.
IPAddress TCP_IP ( 192, 168, 1, 197 ); // Configure your static ip-address here
uint8_t TCP_MAC[] = { 0x02, 0xDE, 0xAD, 0x00, 0x00, 0x42 }; // Mac-address - You should change this! see note *2 above!
I have ENC28J60-I/SO connected by ethernetcable to my Asus RT-n66u in LAN 4. But It will not show up in my router... On my ENC28J60 there is a red light on D1 and the ethernet port has a green light and a yellow flashing light.
Serial monitor says "
Started!
0;0;3;0;9;read: 20-20-0 s=255,c=0,t=17,pt=0,l=5:1.4.1
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=6,pt=1,l=1:0
0;0;3;0;9;send: 0-0-20-20 s=255,c=3,t=6,pt=0,l=1,st=ok:M
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0
. But nothing more. I have followed the MQTT gateway guide and set an static ip in the sketch.. DHCP is on in my router.
The only thing I see in my router is : That the cable is connected to something and that its 10 Half duplex.
I have also tried to connect it to other LAN ports but no difference
What could be wrong?
I have ENC28J60-I/SO connected by ethernetcable to my Asus RT-n66u in LAN 4. But It will not show up in my router... On my ENC28J60 there is a red light on D1 and the ethernet port has a green light and a yellow flashing light.
Serial monitor says 0;0;3;0;14;Gateway startup complete. But nothing more. I have followed the ethernet gateway guide and set an static ip in the sketch.. DHCP is on in my router.
The only thing I see in my router is : That the cable is connected to something and that its 10 Half duplex.
I have also tried to connect it to other LAN ports but no difference
What could be wrong?