Posts made by Bram81

disabled MY_USE_UDP and it's connecting now... Thanks, feel pretty stupid.. Attaching the humidity sensor does cause de gateway to a reboot loop. Could that be a power issue since it's connected to my laptop's usb right now?

gateway address must be my internet gateway right? In that case 192.168.2.254 is correct.
#define MY_CONTROLLER_IP_ADDRESS 192, 168, 2, 1 is my Domoticz server. Is that the way to go or am I doing something wrong?

I'm trying to use a esp8266 gateway as a standalone node and let it connect to Domoticz. After some hick ups I managed to compile my sketch. The gateway boots, but I'm not sure if it gets connected the right way. Serial log shows:

My sketchbook location is set to E:\documenten\Arduino and it contains the MySensors library. I think I was using 1.5 before so I removed all libraries and extracted everything from the 2.0 zip to that folder, Now compiling gives me this:

After a day of trying I'm starting to drive mad... After several reinstalls of Arduino IDE, Java and my libraries it seems like I'm almost there, but I realy don't have a clue on how to fix this anymore..I'm trying to use this sketch:

Arduino: 1.6.5 (Windows 8.1), Board:"NodeMCU 0.9 (ESP-12 Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"
GatewayESP8266.ino: In function 'void presentation()':
GatewayESP8266:153: error: 'sendSketchInfo' was not declared in this scope
GatewayESP8266:156: error: 'present' was not declared in this scope
GatewayESP8266.ino: In function 'void loop()':
GatewayESP8266:169: error: 'send' was not declared in this scope
GatewayESP8266:170: error: 'sleep' was not declared in this scope
'sendSketchInfo' was not declared in this scope

Maybe I'm just being stupid, but I don't see what to do anymore. Hope there is someone who can help me with this.

In file included from C:\Users\braml\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\libraries\ESP8266WiFi\src/ESP8266WiFi.h:32:0,
from esp_gateway_aangepast.ino:63:
C:\Users\braml\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\libraries\ESP8266WiFi\src/WiFiClient.h: In instantiation of 'size_t WiFiClient::write(T&, size_t) [with T = char*; size_t = unsigned int]':
C:\Users\braml\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:164:52: required from here
C:\Users\braml\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\libraries\ESP8266WiFi\src/WiFiClient.h:113:36: error: request for member 'available' in 'source', which is of non-class type 'char*'
size_t left = source.available();
^
C:\Users\braml\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\libraries\ESP8266WiFi\src/WiFiClient.h:117:5: error: request for member 'read' in 'source', which is of non-class type 'char*'
source.read(buffer.get(), will_send);
^
Multiple libraries were found for "EEPROM.h"

Used: C:\Users\braml\Documents\Arduino\libraries\EEPROM

Not used: C:\Users\braml\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\libraries\EEPROM

Multiple libraries were found for "SPI.h"

Used: C:\Users\braml\Documents\Arduino\libraries\SPI

Not used: C:\Users\braml\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\libraries\SPI

Fout bij compileren.

I've removed all libraries and reinstalled the board manager.. Have you seen this before?

Thanks very much for your quick reply! Now suddenly I get compiling errors saying there is no such file as espwifi8266.h, which is weird because it was compiling other sketches just fine. Reinstalling libraries and the board manager now....

I'm trying to use a nodemcu 0.9 as a standalone node using wifi and not the radio to connect to my Domoticz. Using the ESP8266 gateway i'm facing a problem. I've added the setup and loop part to it from a sketch I used earlier on a node with a traditional radio on it.
My guess is that trying to use the wifi connection to send data the commands in a sketch must be slightly different, but I have no idea how and can't find useful examples. Using this code gives me an error compiling in the line MySensor gw; , saying 'MySensor' does not name a type.

@ericvdb
Hi, yeah sorry for that. I only realised that when I took a closer look at your sketch because it gave me the check wires message..
Thanks a lot, I've now put the radio on a seperate pin too powering it down and let the radio reinitialize by using gw.begin(); in the void loop section.

Hi, thanks for your reply. I was using delay so much because it seemed that the radio and sensor both needed some time to start up after they were powered on by puting pin 4 high.

Using your sketch wasn't working because both the radio and sensor are powered by the same pin. In the Void setup the pin was not set high so the node and radio were not started and it would not come to the loop part of thee sketch.

Also I've put the digitalWrite low at the end before puting it to sleep, because otherwise it would not sent anything because being powered off.

Making this small changes to your sketch still made it be presented to the gateway only once. Could there be a problem in puting pin 4 high both in the setup and the loop part? This is the code right now...

I'm having a sketch problem.. In order to try and save battery power on my moisture sensors I'm trying to use a IO pin as power by setting it high for some time, let the sensor take a measurement, send the results to the gateway, setting the IO pin low again, let the node go to sleep for some time .

This works only one time, the node presents itself to the gateway, sends data but after that it's not seen again after the expected sleep time.
My guess was that somehow after puting the IO pin low it doesn't come back up in a high state. The strange thing is that when I measure the current on the pins of my moisture sensor with a multimeter the current goes from 0 to aprox 4.27V in the given time, so actually that indicates the pin is going from high to low and back to high as needed, but somehow the radio doesn't come back up... This is my code:

I'm having another sketch problem.. In order to try and save battery power on my moisture sensors I'm trying to use a IO pin as power by setting it high for some time, let the sensor take a measurement, send the results to the gateway, setting the IO pin low again, let the node go to sleep for some time .

This works only one time, the node presents itself to the gateway, sends data but after that it's not seen again after the expected sleep time.
My guess is that somehow after puting the IO pin low it doesn't come back up in a high state. The strange thing is that when I measure the current on the pins of my moisture sensor with a multimeter the current goes from 0 to aprox 4.27V in the given time, so actually that indicates the pin is going from high to low as needed, but somehow the radio doesn't come back up... This is my code:

However it's not realy a specific Mysensors matter I thought it might be usefull for others suffering on the same problem. It turned out that the Rpi and Domoticz crashed after being presented more than 1 node due to some 1Wire issue. Strange thing is I wasn't even using 1wire.

Disabling it running sudo rmmod w1_gpio did the trick. Domoticz is running stable and taking as by now, four nodes without any problem.

Ok, I'm almost where I want to be... Feeding my pro tinket 5v on a 9v battery I've managed to get the correct voltage reading. Which is aprox 9.10v on a new battery. The only thing I can't get to work is the % which I need to send to Domoticz .

I'm using this code, being pretty sure that the formula is correct but whatever I try, the battery % is shown as 0 on every voltage level. Am I missing something... ?

@rvendrame Hi! Just changed the code as you suggested. That 1800000 was still from an old test, I'm sure that the sleeptime on the nodes was set for 2 hrs. It's set in miliseconds right? In that case it wasn't 20 but 30 minutes..

For the test I've set it to 600000 - do we agree on this being 10 min..? Since I'm using a Pro Trinket which can only use the serial monitor via FDTI I had to connect a breadbord to get some extra GND pins.. Node are running now.. Knowing more within the next half hour...

I'm running a serial gateway on a rpi running Domoticz with two moisture sensores connected. Since I want to feed the nodes by batteries I'm trying to only let the nodes send their info a couple of times a day, starting with a two hours interval for now.
The nodes are seen by domoticz and their info is updated after two hours only once, after that no new data is send/received until I've restarted the nodes. Domoticz and the gateway are running fine for the entire time. It seems that the nodes don't wake up after sleeping for two hours for the second time. This is the sketch I use:

I'm still a newbie when it comes to coding, so maybe there is just a obvious error that I just miss?
BTW, the both nodes are fed through USB for now, so I'm sure it's not because of low battery levels. Is there anyone that can help me solve this?

@AWI Hey, I've already rebuild the DB too and still without luck.. The gateway is connected to a quite old RPI B model in the barn just to control watervalves over GPIO which have to operate autonomous after my soil moisture sensors send back a certain value. First I thought that it could be some kind of power problem, but feeding the gateway with it's own 5v power supply didn't solve anything either.

I've read something about domoticz crashing in some cases due to too much EMI, but all devices are boxed and the gateway is as far away from the pi as the cable allows so that doesn't seen a very likely cause to me..

I'm using Domoticz on a Raspi and have an Arduino Uno as a serial Mysensors gateway . The gateway starts and a node connected to a Pro Trinket 5v running on a 9v battery shows up in Domoticz without a problem.

Now the thing is when I add a second node, also on a Pro Triketk 5v sometimes the two nodes are both seen by Domoticz and within a couple of minutes Domoticz crashes or it crashes almost right away. Both nodes use the same sketch with different sketchnames. When a crash occurs I cannot even ssh into the pi anymore and domoticz is shown as being offline. The log shows no errors what so ever...

The sensor shows up in Domoticz as a light sensor meassuring in lux, but the numbers do match the output of the sensor.

Another thing is that after about 15 min the gateway started functioning. Seems like a problem that I had last week returned...
Loading the board with the pingpongtest shows that suddenly my radio chip is recognized as NRF24L01 instead of the + version, although the label on te chips shows NRF24L01+
Changing radios doesn't help, I'm completely in the dark... maybe just shitty radios..?

Using the analog output on the sensor and analog0 on the arduino. The values are presented in number between 1-1200 (aprox.)

Even readings in just a number would be fine for me / can be easily transered to a % I guess, where a value of aprox 300 is liquid water and 1050 is the value read when the sensor is in the open air and not sticked in the soil.

Can you think of alike types of sensors with values presented in that range?

Hi@sundberg84 Yes, that's me.. I saw that file too, but being still a newbie in Mysensors, Arduino and sketches I didn't really know how to use it. Do I have to put in my libraries folder and add a line #include <filename> in the gateway sketch..?

Right now the sensor is automatically seen as a certain device, within Domoticz there is no way to present it otherwise right?

Hooking up the gateway and node to a laptop to use the serial monitor shows data being send from the sensor and received by the gateway.

After plugging in the gateway to my pi running domoticz there was a new hardware detected right away, but only not as a sensor but as a lightning2 type lamp switch which I've named 'vochtigheid border'. The log of this 'switch itself shows:
2015-07-01 15:44:45 On
2015-07-01 15:44:41 Off
2015-07-01 15:41:02 On
2015-07-01 14:49:43 Off
2015-07-01 14:31:56 On
2015-07-01 14:31:56 Off

Thanks everybody! Got the serial gateway working and it's being picked up by domoticz. Now another Arduino Uno is holding a moisture sensor, it's communicating with the gateway, but Domoticz sees the sensor as a lamp so it's not logging the sensor output. The sensor is a YL-38. Is there a way to fix this or is this type simply not supported by Domoticz?

@Moshe-Livne Thanks for your reply! So if I understand correctly there is one Arduino with the serial sketch on it that acts as the gateway and I have to use another arduino to add sensors to. Will a second Arduino connected to the Rpi through USB and running my sensor sketch be picked up by the gateway automatically?

Maybe this is a stupid question, but I've only got my first Arduino Uno in two days ago and I'm a complete mysensors newbie... Already have been working with Domoticz on Rpi for over a year now. Recently I've build a water irrigation system for my garden, controlled by a relay which can be switched through Domoticz using a GPIO. Now I would like to add some ground moisture sensors, using a Arduino and the domoticz Gateway to Mysensors to water the garden when the soil gets too dry.
I've uploaded the serialgateway sketch to an Arduino Uno and I also have a sketch to read the output of the sensor using the Analog output. Now my question is, how can a add this sketch to the arduino without deleting the gateway sketch?

If I understand correctly, uploading the gateway sketch is obviously the first step, after that you'll have to upload specific sketches for various sensors to be able to add a 'node' ?