@breimann Hi there, @Lendog is right, this is a very old fork / source code, so you need an old version of the mysensors. You should better get the entire repository of mine as is. OLED is present and used in my example.
https://github.com/nikil511/Arduino
However, running two years old code is not a good idea. I suggest you do the whole thing again from scratch using my hack as an example/guide, applying it on the latest version of the mysensors code, which has evolved a lot since.
Posts made by nikil511
-
RE: ESP8266 as WiFi gateway & controller & node
-
RE: ESP8266 as WiFi gateway & controller & node
@hek I was under the impression RF69 was similar range to nRF24L01+ have not found any comparisons...
(maybe I did not search enough)
I am using the cheap Chinese ebay stuff, would something else with external antenna give dramatically better results ?
What kind of antenna do you suggest (relatively small)
e.g. will DIY helix/coil antenna do a good enough work at 868mhz with the RFM69? can you estimate range ?btw, what's your opinion on the LoRa hype? any interest utilizing LoRa in mysensors ?
thanks!
-
RE: ESP8266 as WiFi gateway & controller & node
I am having some " long range" problems with nRF on this setup of mine, since the external unit ideally should go at the top of the building (e.g. a few floors away).
There is a discussion on RadioHead library which could enable alternative RF chips,
http://forum.mysensors.org/topic/285/porting-mysensors-to-work-with-the-radiohead-library/271
so I am wondering how complex will this be, to use the the RadioHead approach on both ends (arduino & esp8266) in order to replace the nRF24L01+ with something with a longer range.Furthermore, there is quite a buzz around LoRa lately so I have ordered a few Microchip RN2483 to play with in a point-to-point setup. I guess since those are serial modems, they can never become compatible with mysensors.org even if the LoRaWAN stack is not used, right ?
My idea was that it would be useful to have mysensors protocol running on LoRa, and if possible an enhanced ver of mysensors protocol running on LoRaWAN in the future. (?) (e.g. city-wide instead of house-wide)
-
RE: ESP8266 as WiFi gateway & controller & node
@AWI no examples yet, but the concept is that the entire unit hangs from a string, and swings freely. Therefore wind moves the unit and the intertial sensors could potentially measure the speed and direction depending on aerodynamics of the body. I know it's challenging, but it will be also fun, and thats the whole point of DIY right?
As for rain, I will have a few wires running around the enclosure, so when a water-drop touches the case, it will be detected. I will actually use a multi channel capacitive sensor, in an attempt to measure rain fall.
My plan is to setup everything so I can remotely monitor/log the data, place a real weather station next to my prototype and then try to "calibrate" make sense of the motion data and perform OTA firmware upgrades until the thing produces useful results.
Will keep you posted. -
RE: ESP8266: MCU seems to be busy with the WiFi and stops receiving messages from NRF24
so can the GW nRF receive and aknowledge if the GW MCU is busy doing something else ?
eitherway I will update to latest dev branch, test again with modules on different locations and come back.
-
ESP8266: MCU seems to be busy with the WiFi and stops receiving messages from NRF24
Hello everyone,
I am using ESP8266 to forward data to the cloud, as described here:
http://forum.mysensors.org/topic/1973/esp8266-as-wifi-gateway-controller-node/My problem is that if I trigger the HTTP post from function incomingMessage() it seems the MCU is busy with the WiFi and it stops receiving messages from nRF. The first, second msg are handled then the others get a fail status. Any advice on how to handle this ? is there a more proper way than what i am doing?
or is it normal, hence I should manually buffer the messages and do the http post later ?Thanks!
here is my code:
void incomingMessage(const MyMessage & message) { Serial.print("Sensor:"); serial(PSTR("%d;%d;%d;%d;%d;%s\n"), message.sender, message.sensor, mGetCommand(message), mGetAck(message), message.type, message.getString(convBuf)); if (message.type == V_TEMP) { sendStrXY(message.getString(convBuf), 3, 10); // thingspeak("3", message.getString(convBuf)); } else if (message.type == V_HUM) { sendStrXY(message.getString(convBuf), 4, 10); // thingspeak("4" , message.getString(convBuf)); } else if (message.type == V_PRESSURE) { sendStrXY(message.getString(convBuf), 5, 10); // thingspeak("5", message.getString(convBuf)); } else if (message.type == V_WIND) { sendStrXY(message.getString(convBuf), 6, 5); // thingspeak("6", message.getString(convBuf)); } else if (message.type == V_RAINRATE) { sendStrXY(message.getString(convBuf), 6, 12); // thingspeak("7", message.getString(convBuf)); } else if (message.type == V_VAR1) { // sendStrXY(message.getString(convBuf), 7, 0); // thingspeak("8", message.getString(convBuf)); } else if (message.type == V_VAR2) { // sendStrXY(message.getString(convBuf), 7, 5); // thingspeak("8", message.getString(convBuf)); } else if (message.type == V_VAR3) { // sendStrXY(message.getString(convBuf), 7, 10); // thingspeak("8", message.getString(convBuf)); }
thingspeak function does a WiFiClient print to url...
-
RE: ESP8266 as WiFi gateway & controller & node
Hi @emc2
no I have not played with BME280 as it's more expensive than three dedicated sensorsHere is more light on the "unique" features of the ouside part;
https://github.com/ellak-monades-aristeias/WeatherXM/wiki
https://github.com/ellak-monades-aristeias/WeatherXM/wiki/WxM-prototypeThis is still work in progress, but you can get an idea.
in terms of sensors, so far I am using:
BMP180 - Temperature/Pressure
Si7021 - Temperature/Humidity
MPU-6050 - 6DOF inertial sensor (wind)
TTP223B - Touch/capacitive sensor (rain) -
RE: ESP8266 as WiFi gateway & controller & node
I've replaced DHT11 with DS18B20, until Si7021 arrives, as the inaccuracy of DHT11 hurts my eyes
I could not make OneWire compile with the mysensors OneWire library in place, as ESP8266 has it's own modified one. I guess one could merge them, or rename one, but I just removed the mysensors one completly as I do not currently use it.Also, it did not work on pin D0, had to use D1 (GPIO-05), so I changed the inclusion pin.
https://github.com/nikil511/Arduino/tree/development/WxM/MS_ESP_GW_THINGSPEAK_DALLAS
-
RE: ESP8266 as WiFi gateway & controller & node
Changed my repo to a forked "mysensors/Arduino" development branch, to simplify (future) comparisons/merges.
-
RE: Sensebender Micro...no GW?
Hello @Lucas-Figg
I am also keen on the idea of running a mysensor network without a full blown controller, so I am using an ESP8266 as a gateway to the cloud, but also as a controler, and as a sensor. It should be possible to do the same on the Spark/Particle but I suggest that you just buy a 5$ ESP8266 NodeMCU since it's ported allready as a gateway, and you can easilly add your favourite IoT cloud based platform.For more details, look here:
http://forum.mysensors.org/topic/1973/esp8266-as-wifi-gateway-controller-node -
ESP8266 as WiFi gateway & controller & node
I was very excited to see mysensors ported to ESP8266, so I thought why not add a few more things. I am working on (yet another) weather station, but this one might end up slightly different than the norm.
There will be an external unit, and an internal in the house. The external one is battery operated, with solar support and some really unique features, but I will leave this for a future post. For the internal unit, I've decided to use the ESP8266 (NodeMCU hardware flavour) since the port to mysensors was done by @Yveaux. However, I also want a display with external/internal weather conditions and forecasts. I'm a big fan of OpenHab, but in this case, why add more complexity if it's possible to avoid it.
So starting with the ESP8266 gateway example on a NodeMCU with a nRF I've also added; an OLED screen and a DHT11and I have it forwarding both external and internal sensor values directly to a cloud service (e.g. to Thingspeak) without using a controller.
I could not make DHT11 work on ESP8266 with current DHT mysensors library, so I pasted the adafruit DHT lib. Did not modify anything else in mysensors libraries, all necessary code is in the example, its messy but it works, so more of a proof of concept / hack. Here it is, in case anyone is interested. https://github.com/nikil511/Arduino/tree/development/WxM/MS_ESP_GW_THINGSPEAK_DHT
I'm new to mysensors, so any feedback is more than welcome
-Manolis
-
RE: ESP8266 WiFi gateway port for MySensors
@Yveaux Great work, well done!
I will give it a try as soon as possible, and post back.
Thanks! -
RE: WiFi MQTTGateway
@tekka hello, any progress on the ESP8266 gateway ?
Can you pls share some code (even if it's incomplete/hacked)
Thanks