This site has the best collection I have found: http://www.embeddedworks.net/wsim3951.html
In the US the T-Mobile pre-paid seems to be the best deal. Similar on sparkfun
https://www.sparkfun.com/products/13186
This site has the best collection I have found: http://www.embeddedworks.net/wsim3951.html
In the US the T-Mobile pre-paid seems to be the best deal. Similar on sparkfun
https://www.sparkfun.com/products/13186
Is anybody connecting to the internet via a SIM card? If so what cellular plan are you using? I think I can stay below 1GB a month and I am in the United States (North Carolina). I know there are a few companies offering M2M Data Only plans but I have not been able to organize what is currently available. I also know Twilio is joining with T-Mobile but I have not seen the plan yet. Does anybody have any information?
The arduino should send a "presentation" message when powered up which could be the "on" message. If there is a way to send a "Powering Down" message at the loss of power by using a capacitor, that would be fantastic. In my setup it would have to have enough juice to send the message via the long range radio. I suspect some of the experts on this forum have done something similar to this solution.
I think the issue with the current sensor is the pump would need to be running for it to work and they are looking to know that the pump could run if it needs to.
This page provides a design based on a capacitive voltage detector (like the "pen" you stick in an outlet to see if it has power): http://electronics.stackexchange.com/questions/94782/capacitive-ac-voltage-detection.
Seems plausible but you could also just power the arduino from the GFCI. I would have the arduino monitor a float switch in the sump pump. You could send a signal indicating the water level every 2 minutes.
If the pump dies or is blocked or malfunctions but the GFCI is still powering the arduino you would get a signal that the water level has risen and is going to flood the basement.
If the GFCI trips and your controller does not receive an update from the sensor you could send an email indicating a possible powe failure. This is a tricky alarm and not all controllers can do it. You need to know when the arduino last sent a message to the controller and act accordingly. You also only want to send one email even if the power is out for a long time. And it is nice to send a follow-up email when the arduino comes back online.
I can do some testting also. Happy to help.
I noticed the web page on connecting the radio does not match the troubleshooting section. Connecting a Decoupling-Capacitor on the Radio page says 4.7µF but the troubleshooting page says 47µF. Seems a bit confusing.
Thanks for sharing this! I am hoping to create an all-in-one extension cord plus this meter. I hope this way I can detect when a pump fails or maybe just how much power is being used.
I have read that you when using a CT you must be careful to avoid a voltage build up on the CT output. Is that a concern with this current setup? With a battery powered arduino you are not grounded? In my extension cord project I was thinking I could use the ground from the extension cord.
I am not an electrical engineer so I may be way off here, just trying to be safe.
I think this setup could be very useful. In the high school greenhouse where I have my sensor network there are so many pumps, heaters, air stones, that need to be monitored and an alert sent if they stop working.
I may also try this with the sensebender micro.
And I just noticed the internet has been down at the greenhouse since early Saturday! More reason to have a local install.
@FotoFieber Just the standard serial gateway. There is a nice node-red node for parsing mysensors serial data. I then have some basic code that recognizes the specific data, e.g. node 9 child 10 is the aquaponics water temperature, so that I can store more information in influxd to mak ethe graphs better.
I also have node-red respond to the metric/imperial question. That is basically it.
@Yveaux The install in the greenhouse is basically because the internet connection is costly and not reliable. I have an old linux computer in teh greenhouse for the following reasons:
@Yveaux Yeah Grafana has been great. I would have something similar to your setup but the greenhouse only has a cell phone hotspot so I wanted to get the data out to the cloud with as little traffic as possible. Then display all the graphs from there (grafana on Amazon)
I have been creating a sensor network at a local high school and the mysensors project is basically what makes it possible. I just launched a website on amazon documenting some of what is deployed with live graphs.
http://growing.education/index.php/farm-monitoring-and-automation/garinger-sensor-network/
At this point we are mainly just monitoring and collecting data, so my controller is a very simple node-red installation that saves data locally and transmits data via MQTT to mosquitto runing on an Amazon EC2 instance. Another installation of node-red again saves data to InfluxDB and Grafana displays the data very nicely.
We have three active nodes. One sensebender node running off battery and another solar powered node. A sample of the graphing is below. Check it out. The site is new so I suspect there are many typos and broken links. Thanks again to this community for helping me.
I have tried bot the long range and normal radios. Everything works fine when connected to an Uno but I only see "radio init fail" on the mega2560.
Some of thes radios are NRF24L01 instead of the NRF24L01+ but I ma able to get them all working on the Uno. I have changed the power setting and data refresh rates but that has no affect.
I saw a post saying the pins should be different on the mega but I ma not sure if that is true and I am having a hard time searching and finding that post.
If anybody has suggestions I would appreciate them.
Just an example that I am using (I am sure there are better ways):
void loop()
{
// Process incoming messages (like config from server)
gw.process();
#ifdef CHILD_HUMIDITY
loopHumid();
#endif
#ifdef CHILD_H2O
loopH2O();
#endif
#ifdef CHILD_LUX
loopLux();
#endif
#ifdef CHILD_RELAY
loopRelay();
#endif
gw.wait(SLEEP_TIME); //sleep a bit
}
void loopHumid()
{...
Combining sketches is a big one. I am new to electronics and while I have had good success building 1 or 2 sensor nodes with nanos, minis, and unos I have struggled when attempting to create a multi-sensor node with a LCD panel and radio using a mega2560. I am hoping maybe there are some "best practices" to follow and the wiki could document these.
Ideally I would some programming patterns to follow when writing sketches that make it much easier to combine them. The existing sketches on the MySensors website could be rewritten to follow these patterns.
For example:
How to combine sleep/waits is not completely intuitive in all cases. It seems that maybe these calls should be in the main loop and that the main loop then calls each sensor loop. Are sleep and wait completely interchangeable? Why not always use wait then?
The mysensors library defines the radio pins in the library. That is not very clear and does not match the pattern of all the example build sketches on the site. At first when switching boards I was not sure if the radio needed PWM or not. Changing what pins to use should be an easy thing to do when combining sensors in one sketch so it should be done in a standard way.
Also for sensors like the DS18B20 that can have many sensors attached to the same pin, determining the child ids to avoid conflicts with other sensors on the same node can be tricky. This also raises issues about assigning IDs or requesting IDs. Most sketches let the gateway assign IDs and I am not sure that is easier for a beginner.
Also it seems if you have a problem with the radio ("radio init fail") all other serial output seems to stop (that has been my experience). I am going to start taking the approach of adding the radio first, make sure everything is good. Then add 1 sensor , recheck and so on. To do this quickly I want to be able to quickly add/remove sensors from my sketch. I suspect there is a programming pattern that makes this easy.
My main concern when I started adding multiple sensor types to a single node was conflicts in the imported libraries. I am not confident enough to modify these libraries. Fortunately I have not had any issues, but if people no about conflicts it would be good to document them.
Lastly, maybe we just need an easy place to share sketches. The forum has a Project section but a Sketches library where people could possibly add feedback would be nice.
As always my comments are just suggestions for improvement. The mysensors project is fantastic and i appreciate all the great work.
I have a similar issue. I want to collect data from several locations and potentially also control some relays remotely. Some locations (Haiti0 will need to use a SIM card to send data. So I am looking for a reliable cloud based system to collect data and possibly control.
I stumbled on this http://developers.sensetecnic.com/ , which is free. Lets you store, view data privately, and they host node-red so you can run rules and notifications or send data anywhere. It seems like a great offering but for some reason there is not that many people using it.
The other thing i though about was having the remote locations post the data to dweet.io and then I could retieve from any machine i decide to be the central server. you can also do this privately for a few buck a month. If your channel resembles MQTT then you can run node-red locally and from there do formal MQTT or just a serial connection to any controller or board.
I am still just testing different things. Amazon started their IoT offering yesterday which is currently free.
@jkandasa Great. I just tried it. I used send on the activity board and it appears to be doing what i meant by Receive. Of course once you fix that "bug" it may not work like that anymore.
But I did see the data on the chart.
@jkandasa Wow, quick replies.
Actually the charts are not that critical but it would be very simple charts showing the value with a custom unit (for example mg/L) over time. The unit should be specified when adding the sensor to MyController.
There will never be a physical sensor connected to MyController for these custom sensors. These are virtual sensors. Because there is no physical sensor connected to MyController a person would be manually entering the data (the person is the sensor).
An example may help:
We have a fish tank with sensors for measuring water temperature, pH, and water level. The data from these sensors is easily sent to a controller as well as to thingspeak or a local database.
Data for ammonia, nitrates and nitrites is also recorded but we have no sensor recording this data. A person manually records these measurements in a notebook.
I do not want the person to record this data in a notebook. I want this person to record the data in MyController. Then all of the data from the sensors and all of the data manually entered would be in the same place.
So I would add a custom sensor to MyController with a name of "Tank A Nitrates" and a unit of "mg/L". The Action Board shows the new sensor and lets me enter a sensor reading - 1.5 mg/L.
Does that make sense?
@TD22057 I do like MQTT but I wish the topic format was more standardized for sensor networks. I could certainly even see using something like dweet.io for publishing these messages to the world (beyond the mqtt broker).
However in this case I plan to have different students and classes adding sensors, manually taking measurements, etc.. If the MyController Action board was an easy 1 stop place for this, making it easy to add new "manual sensors" without the problems of how to format the topic or how to post an mqtt message from the command line it would be great.
I have thought about formalizing this manual entry with Node-Red but MyController is better than what I could create.
This is fantastic. Thank you!
I am very grateful but I do have a feature request. I am collecting data in a greenhouse (and in the gardens) with mysensors. The more automation, the better. However, there are some instruments we still use manually, record data in a notebook, maybe copy to excel and manually create charts. It is very tedious and isolated form the automated sensor data.
It seems with your controller I can add a custom sensor (or use any of the other sensors) and with the Action board send data to the sensor. The feature I want is to enter data and have it appear as if the sensor sent the data. This data would then be logged along with all the automated data.
For example, we manually measure Nitrites. If I could add a custom sensor (a Manual Entry Sensor) and the action board allowed receiving data from the sensor it would provide a huge benefit. (No send data for this type of sensor is needed, only receive).
I am not sure how much work would be needed but it could also be used to test rules and other configurations.
Thanks for your work.
@tbowmo Thanks for the update. I hope to try using socat as a way to test different controllers easily. I am frustrated with the controller options and I feel like as my project progresses being able to easily change controllers might be very desirable. This architecture makes that possible.
I have a function in my node-red flow that enriches the messages from MySensors. I realize this begins to do what a controller might do, but I need a simple way to translate "Node:20, Child:1" to "Tank 1 - Water Temperature" so that I can publish that to a database or dweet.io or easily display in a graph. I might know what a graph of Node:20:Child1=25.6 means but nobody else will.
I am new to json but am attempting to use that. Ideally node-red would allow for easily manage this mapping information via a web page and store it. I am setting this globally:
[{"id":"d5d724ec.cba8c","type":"subflow","name":"On Startup","in":[],"out":[{"x":454,"y":160,"wires":[{"id":"dcd80855.bc4688","port":0}]}]},{"id":"c7328a87.d34f28","type":"inject","name":"On Startup","topic":"server-startup","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":148,"y":160,"z":"d5d724ec.cba8c","wires":[["dcd80855.bc4688"]]},{"id":"dcd80855.bc4688","type":"function","name":"Save startup date","func":"msg.startupDate = msg.payload;\nmsg.payload = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":318,"y":160,"z":"d5d724ec.cba8c","wires":[[]]},{"id":"302ddf01.cbf0b8","type":"subflow:d5d724ec.cba8c","name":"","x":127,"y":214,"z":"5791498e.8d6878","wires":[["841c3e7c.b41288"]]},{"id":"841c3e7c.b41288","type":"function","name":"SetGlobalVars","func":"node.log(\"Add sensorNodes to global context\");\n\nvar sNodes = [ \n {nodeId:30, nodeLabel:\"Greenhouse\", \n sensors:[\n {childSensorId:1, childSensorLabel:\"Air\", sensorTypeLabel:\"Temperature\"},\n {childSensorId:2, childSensorLabel:\"Air\", sensorTypeLabel:\"Humidity\"},\n {childSensorId:130, childSensorLabel:\"AirBattery\", sensorTypeLabel:\"Voltage\"}\n ] \n }, \n {nodeId:50, nodeLabel:\"Aquaponics\", \n sensors:[\n {childSensorId:0, childSensorLabel:\"Water\", sensorTypeLabel:\"Temperature\"},\n {childSensorId:20, childSensorLabel:\"Air\", sensorTypeLabel:\"Humidity\"},\n {childSensorId:21, childSensorLabel:\"Air\", sensorTypeLabel:\"Temperature\"},\n {childSensorId:30, childSensorLabel:\"Light\", sensorTypeLabel:\"Lux\"}\n ]\n }\n ];\n\ncontext.global.sensorNodes = sNodes;\n\n \nmsg.payload = context.global.sensorNodes;\n\nreturn msg;","outputs":1,"noerr":0,"x":357,"y":213,"z":"5791498e.8d6878","wires":[[]]},{"id":"8ad9f121.3ea3b","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":127,"y":135,"z":"5791498e.8d6878","wires":[["841c3e7c.b41288"]]}]
and then using it:
[{"id":"d14e00ff.cc9f7","type":"function","name":"MySensorIdInfo","func":"var sensorNode = getByNodeId(context.global.sensorNodes, \"\"+msg.nodeId);\nif (sensorNode != null) {\n console.log(\"NodeLabel = \" + sensorNode.nodeLabel);\n msg.nodeLabel = sensorNode.nodeLabel;\n \n var childNode = getByChildId(sensorNode.sensors, \"\"+msg.childSensorId);\n if (childNode != null) {\n console.log(\"ChildNodeLabel = \" + childNode.childSensorLabel);\n msg.childSensorLabel = childNode.childSensorLabel;\n msg.sensorTypeLabel = childNode.sensorTypeLabel;\n } else {\n msg.childSensorLabel = msg.childSensorId;\n msg.sensorTypeLabel = \"undefined\";\n }\n} else {\n node.error(\"No sensor match found in sensorNodes\");\n msg.nodeLabel = msg.nodeId;\n msg.childSensorLabel = msg.childSensorId;\n msg.sensorTypeLabel = \"undefined\"; \n}\n\nif (msg.sensorTypeLabel == \"undefined\") {\n return null;\n}\n\n//debug\nnode.log(\"nodeId = \" + msg.nodeId + \" :--: \" + \n\"nodeLabel = \" + msg.nodeLabel + \" :--: \" + \n\"childSensorId = \" + msg.childSensorId + \" :--: \" + \n\"childSensorLabel = \" + msg.childSensorLabel + \" :--: \" + \n\"sensorTypeLabel = \" + msg.sensorTypeLabel);\n\nreturn msg;\n\n//------- Helper Functions ----------//\n\nfunction getByNodeId(arr, value) {\n for (var i=0, iLen=arr.length; i<iLen; i++) {\n if (arr[i].nodeId == value) return arr[i];\n }\n}\n\nfunction getByChildId(arr, value) {\n for (var i=0, iLen=arr.length; i<iLen; i++) {\n if (arr[i].childSensorId == value) return arr[i];\n }\n}","outputs":1,"noerr":0,"x":614,"y":390,"z":"c3095d41.89f1e8","wires":[["6e57151f.370ffc","ae35a271.90c3b"]]}]
The one other piece I added was a response to the MetricOrImperial question. Maybe some of this is useful. Thanks for your work.
@bpair
I think I found the issue with my serial port configuration:
baud rate: 115200
data bits: 8
parity: none
stop bits: 1
split input: after a timeout of 10ms
I have since changed the "split input" to split on "\n" chracter
I am using a serial gateway connected to node-red. I am trying to parse the serial output but having problems. It appears that the node-red messages may not be "splitting" correctly (or mysensors is not outputting them correctly). At first you see a bunch of what I think are node ID requests. This seems strange to me because I am setting the node and child IDs in my sketch (Using version 1.5 of mysensors). I have two nodes:
Looking at the serial output in node-red
--first message
"0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:45\n50;30;1;0;23;45\n"
--next message
"0;0;3;0;9;read: 50-50-255 s=255,c=3,t=7,pt=0,l=0,sg=0:\n"
--next message
"0;0;3;0;9;send: 0-0-50-50 s=255,c=3,t=8,pt=1,l=1,sg=0,st=fail:0\n"
--next message
"0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:34\n50;30;1;0;23;34\n"
--next message
"0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:36\n50;30;1;0;23;36\n"
--next message
"0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:43\n50;30;1;0;23;43\n"
--next message
"0;0;3;0;9;read: 30-30-0 s=1,c=1,t=0,pt=7,l=5,sg=0:24.4\n30;1;1;0;0;24.4\n0;0;3;0;9;read: 30-30-0 s=2,c=1,"
--next message
t=1,pt=2,l=2,sg=0:69\n30;2;1;0;1;69\n"
--next message
You can see that the last couple ,messages did not appear to split correctly. Is this a problem with something I am doing or node-red or mysensors?
Has anybody had this trouble?
@gbfromhb Good to know. Thanks!
I have been playing with a similar setup but connecting to openHAB via MQTT via Mosquitto. I am also looking at using the REST API to connect to openHAB. I really like the simplicity of node-red and I want to be able to send the data to several places (to a file, to influxdb/grafana, maybe to thingspeak). I have been frustrated with the controller options as I do not think they can solve every issue.
One thing to know about node-red is that it is single threaded. I don't think it is an issue with a small setup and with small node-red sketches but if you have a large number of messages you could start to see a delay in processing. It probably won't affect your project but good to know. I believe i saw somewhere that the ethernet gateway can only handle 4 threads anyway and I guess if you are using the serial gateway it is single-threaded as well.
There are now a number of posts on this forum about node-red, as well as MQTT. I think the forum needs some new categories. Controllers/Hardware/General is not enough. Maybe Gateways and Brokers and Bridges should be added.
I certainly would like a place to share node-red work. All the code that exists for the ethernet MQTT gateways could be converted to javascript and node-red . It provides a solution for code that has trouble fitting in the space available on the arduino.
One of the issues I have with this setup is translating node IDs and therefore also which piece assigns them. If you plan to send data to a database like influxdb from node-red it is better to send a descriptive name rather than node-id=20, child-id=0, so do you maintain a map of these translations in node-red and then duplicate the map in your controller? I don't know the answer.
I really like the concept of using MQTT and node-red however my setup is in a school greenhouse without internet or a router. I will have one older computer running linux with a serial gateway. Is it possible to use your perl MQTT with a serial connection?
If not maybe I just spend the $25 and get a cheap router.
Also is it necessary to run mosquitto?
I have been struggling with this as well. Have you played with openHAB2? If you are using NodeRed do you still need openHAB? The charting seems weak in openHAB so i will look at Grafana.
Does the MQTT interface provide everything the serial or ethernet does?
The last feature i am looking for is an easy way to create forms for manually entered data. Unfortunately I have some data that must still be manually collected and i want an easy UI form to enter it.
@Qu3Uk Looks like they are adding some support for this: https://community.openhab.org/t/rules-allowing-regexp-for-items-and-catching-individual-items-in-a-group/2165
@Qu3Uk I asked a similar question about persistence on the OH2 forum and the response was you could set up a group and configure persistence for it. Then as the new items are dynamically found they just need to be added to the group without adding them to the config files. Possibly the same thing would work for rules.
I am interested in what people have tried. For example i am creating an outdoor soil moisture + Light sensor + either temperature only or temp/humidity sensor. I am very concerned how to weatherproof while still getting accurate data.
I planned to have the soil moisture sticking out of my enclosure but sealed so that all the connections and electronics are inside the enclosure. The enclosure basically sitting on the soil with the prongs from the sensor in the soil.
lThe Light sensor I was hoping to have sealed in the enclosure but with a clear plastic window. I am not sure how to keep this from fogging up.
The temp/humidity sensor should be measuring outside air, so it would need to have air flow. However I do not think this sensor could handle being in the rain so it would still need to be protected. I am not really sure how to get good air flow but protect this sensor from being splashed by rain.
I would love to hear what other people have done. I will post some pictures if i ever get finished.
Thanks - your schematic/drawing is really helpful. I just ordered some of those step-up components and a few sensebenders.
I have read over the battery powered section which uses a 3V Pro Mini. I was hoping to create a sensor that combines the following sensors
Soil moisture sensor (3.3-5V)
BH1750 Ambient Light sensor (3-5V)
DHT22 Humidity/Temperature Module (3.3-5V)
I will only be recording data once every 10-20 minutes. For longest battery life would it be better to use a 3V Pro Mini( and I suppose I would need a step-up or bi-directional logic level shifter ?) or just go with the 5V Pro Mini?
I have never created a battery powered device so I am ot really sure what will happen as the battery drains. For example if the Pro-Mini needs a regulated 3.3v supply and it is connected to a battery what happens as the voltage drops below 3 volts?
This is probably a better question for the openHAB2 google group but is there anyway to persist the data without having to create a items.xml? Or another way to put it, is there any way to persist data for a sensor that is detected and added?
I followed your directions and installed on a Windows 7 machine with a serial gateway. Everything came up fine. I configured the serial gateway (added the port). Then I waited but my humidity sensor was not detected. I restarted my arduino with the humidity sensor and immediately two new devices appeared (Humidity plus temperature).
Really nice! Thanks.
I just wanted to say thanks for your work on this. OpenHAB2 has been slow to a release but I think a mySensors-openHAB2 combination could really be a solution that many people need. Ease of entry, big user base, handles many sensors and applications.
My kids go back to school in a couple weeks and I hope to help with testing. Thanks.
I have been playing around with the MQTT Gateway and Node-Red. I started with what user @Heinz did in a different forum topic however I am hoping to use MQTT.
First of all, node-red is a dead simple way to monitor MQTT traffiction. The question I have is about the messages created form the MQTT gateway.
I am only getting messages that "set" data. For example
{ "topic": "MyMQTT/20/0/V_HUM", "payload": "53.5", "qos": 0, "retain": false, "_msgid": "a3f256c8.5c0da8" }
but I never see any presentation messages or ack messages. I took a look at the MQTT code but I don't know C++. Is there a difference between the serial gateway and the mqtt gateway? Meaning is there more functionality in the serial gateway?
By the way the vis app for node-red, https://www.npmjs.com/package/node-red-vis
, has some nice functionality. Pretty easy to add switches. I think you need your sensor IDs to be static but I think you could easily create a widget to display sensors that are new.
@rickmontana83 I have been anxiously awaiting openHAB2 for several months now. It is supposed to solve most of your issues although still java but optimized for devices like raspberry pi. I believe ReleaseCandidate2 was scheduled in the next week. However that is all marketing at this point.
To me openHAB seems to have the biggest user community and industry support which is why I have been waiting for openHAB2. I completely agree that asking new users to create sitemaps, xml files and download an eclipse app is just too much.
I hope openHAB2 delivers.
One more update. The port forwarding was not a complete fix. The real culprit was my Asus RT-N66U router which has LAN-WAN firewall. When enabled it was allowing wan traffic to my gateway but not allowing a response from my gateway out to the controller.
Thanks for all the comments but it looks like the issue was actually my Asus RT-N66U router which has LAN-WAN firewall. When enabled it was doing wan traffic to my gateway but not allowing a response from my gateway out.
I saw this in a different thread:
@rickmontana83 said:
If you're using the cheaper low-power variants of the nrf24l01+ on the gateway then make sure that your MyConfig.h file has RF24_PA_MAX for RF24_PA_LEVEL_GW.
I noticed the other day that the default value from GitHub is RF24_PA_LOW, which gave me only a couple of feet of comms. Changing the default made everything work much better. Seems like the default repos is set up for the high-power radio variants.
I will try that tonight. My other concern is I do not have openHAB working correctly so it is not handing out sensor IDs. The output seems OK. It connects to the mysensor broker but possibly the item file must be perfect for the sensor IDs to be assigned?
@shabba I am very new to all of this. I was not trying to doing anything "permanent" but just protect my 3.3v Pro-Mini. But after trying to move that resistor I don't think I will move it again. It will be staying on the 3.3v pad.
Maybe a heat gun would have been easier? I don't know like I say I am new to this.
The radio and gateway are about 25 feet apart, although 1 is upstairs and 1 downstairs. I do have 4.7 uF capactors on both. I was using the power from the computer on the radio and gateway when I captured the serial output however originally the gateway was powered with the power supply that came with arduino and had similar results.
I am using library 1.4 with a MQTTGateway and testing my first sensor, a humidity/temperature sensor with the default sketch. The sensor serial monitor shows the following:
send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
req node id
send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
sensor started, id 255
req node id
send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
req node id
send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
req node id
send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
req node id
send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
req node id
send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
T: 25.10
req node id
send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
H: 75.00
Not really sure what is wrong. Seems like it does get a sensor id=255. The sketch has the humidity sensor on child id=0 and temperature on child id =1, but it doesn't look like that is being sent.
I do see this in the gateway serial monitor:
<<C0 00
>>D0 00
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=1,l=1,st=fail:20
<<C0 00
>>D0 00
<<C0 00
>>D0 00
<<C0 00
>>D0 00
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=1,l=1,st=fail:20
<<C0 00
>>D0 00
<<C0 00
>>D0 00
I am connected to the openHAB controller 1.7
Any comments are greatly appreciated. I feel like i am so close to actually having this working!
Thank you very much!
I am sure this is a pretty dumb question but I do not want to mess up my FTDI board or pro-mini 3.3v. The FTDI board I bought from the mysensors link does not have any instructions and does not have a switch or a jumper like I have seen on orther FTDI boards. There is resistor soldered to a pad marked 5v and an empty pad marked 3.3v.
So I planned to solder a wire to the 3.3v pad and use that as Vcc. However when I applied power to the FTDI board I was only getting 90 mV on the 3.3 and 5v pads. The USB cable I found to use is old so maybe there is an issue with it.
Does anybody know if there are instructions for changing the board to 3.3v.?
Well I took a break from this and when I returned I realized my mistake. It is a bit embarrassing but I will explain so maybe it helps somebody else.
openHAB would start and be unable to connect to the mysensor MQTT gateway (Broker). It would throw a timeout error.
Using the MQTTLens chrome client I could publish mqtt messages and see some output in the serial monitor for the arduino.(Side note baud rate for the monitor must be 115200 to see real output). However I noticed I could never receive messages, only publish.
That made me think the messages were getting to my arduno mqtt gateway but not leaving. I then looked at my router's port forwarding and sure enough I had it wrong. I had 1883 forwarding to the IP address of my gateway but on port 1883. Since the default mqtt port is 1883 I decided to change my listener port on the arduino. So in the MQTTGateway sketch I changed it to 1880. Then I changed my port forwarding to forward 1883 to my arduino IP on port 1880.
Now all is working. I hope my mistake can help save somebody some time in the future.
This may be an OpenHab problem. I don't know anything about MQTT but after downloading an MQTT client it appears it can connect where OpenHab cannot. From the MQTT client I can publish some data and see at least some output in the arduino serial console (not the same text).
I can also see that the MQTT gateway (Mysensors code running on arduino with w5100) appears in my router and I can ping the IP.
Using openHab 1.6.2 on Windows 7
Mysensors 1.4
Followed directions: http://www.mysensors.org/build/mqtt_gateway and also http://forum.mysensors.org/topic/303/mqtt-broker-gateway
Using an arduino R3 and a W5100 Etherent Shield and NRF24L01 radio wired up just like the web page instructions. When starting openHab I see MQTT errors. Primarily: Unable to connect to server.
Does anybody have any thoughts on what could be wrong? Attached full debig log. I have tried port 1883 and 1880.
Enabling SOFTSPI corrected the issue.
OK Thanks. I was just playing around with this last night and had not wired up the radio yet. So I actually did not enable SOFTSPI in the library. Maybe that is the issue? I will slow down and follow all the steps. Still seems like a strange error. Thanks for your help.
Arduino Ethernet W5100 network expansion module - I bought from china: http://www.aliexpress.com/item/For-Arduino-W5100-Ethernet-module-network-expansion-board-SD-card-expansion-mega-2560-1280-328-UNR/32215690927.html
You think that might be causing an issue? Must that even be connected to load a sketch? I will remove it and try again later today.
@rvendrame Thanks. When using codebender is there an easy way to adjust the values in MyConfig.h?
No, if you need to alter the config-file you'll probably have to download the code an use a local IDE (at least I can't modify the library code online when trying).
I am using the codebender chrome app, but i have also tried in the arduino 1.6.4 IDE and get the same result. I can connect to my Arduino. I can move sketches to my arduino (I have tried on both an official unoR3 and a knockoff with same result). However when I use the latest MQTTGateway sketch on codebender or from MySensors I get an error saying cannot connect to my arduino. Since I can connect for other sketches I feel like this error is hiding the real issue. Has anybody else had this problem?
Sketch says this at the top which I assume is a version #
Created by Daniel Wiegert <daniel.wiegert@gmail.com>
Based on MySensors Ethernet Gateway by Henrik Ekblad <henrik.ekblad@gmail.com>
http://www.mysensors.org"
I have seen a few comments on the ethernet sketch that you need to disable debugging so that the sketch will fit on an arduino. So I am using codebender and the arduino ide 1.6.4 but I do not see anything about disabling debugging. What exactly am I missing here?
@John PiDome looks really nice. When I said "mistake" I meant that developing PiDome only for raspberry pi is a mistake, not so much using java. I understand why they must pick and support one platform and why at this time that platform is rasberry pi it just seems like that will be limiting in the future. I could be wrong.
Of course what would be really great is if PiDome and openHAB combine efforts! I won't be waiting around for that to happen. Anyway, thanks for your feedback.
I am new to all of this, having only done some small arduino projects although I have a career in Software Development and a long time ago I studied Mechanical Engineering in school However I am having difficulty selecting a controller.
I have started working with a middle school and a high school. They are both automating their greenhouses and grow beds including aquapoincs. The goal is to help them track environmental properties as well as control lighting and heaters. Each school has slightly different requirements but they both have no money. I am hoping to find 1 system that can work for both. I am looking for any advice anybody is willing to provide.
Using a VERA with an arduino for cheap sensors is a possibility but I would prefer something cheap and openSource. Some things I am looking for:
I have looked at all the controllers listed on the Mysensors controllers page and only 3 seem like good possibilities:
VERA
Buying a vera seems like it would be easy but I would rather only do this if there is no good open-source alternative. Plus it would be nice if the webapp can be customized - which I am not sure micasaverde allows.
**
PiDome**
Looks great but the website says the main focus is raspberry pi. That sure seems like a mistake especially if you are using java. However as a java developer I know you do not want to spend time making sure the code runs on multiple platforms (ignore the hype about write once, deploy anywhere). Also the project only has an Alpha release!
**
openHAB**
It seems like it has a large community and lots of bindings have been written for it. I downloaded it and the text file configuration is not that user friendly. Also the eclipse client is lacking. No teacher or student will understand why they need an eclipse IDE. I see there is another web app HABmin that offers some better control. MySensors also does not have a serial interface for openHAB although I saw some comments that people are working on it. Lastly I found that a new version of openHAB - openHAB2 has an alpha release (why is it not on the mysensors page). It looks very promising with auto discovery and web based configuration as well some optimization for running on raspberry pi. I did not find a roadmap or release schedule for openHAB2 and do not know how long it will take for all the bindings to be implemented but openHAB2 looks extremely promising. Too bad it is not out.
So these are the 3 that looked most promising and I am leaning toward openHAB only because I think I may want to try openHAB2 when it is released as it seems to address the problems I saw from openHAB. I would like to introduce a solution in the next 2 months.
Does anybody have any comments? Is anybody using openHAB2. Am I being silly by not just buying a VeraLite?
thanks for your help,
Brit