Hello,
I'm living in Belgium, so I will stay at home
Hello,
I'm living in Belgium, so I will stay at home
Hello everybody.
I would like to know if it was possible to improve the resolution for the DS18B20 sensors.
The goal is to have a reading of XX.XX degrees instead of XX.X.
In the DallasTemperature.CPP, i have seen "DallasTemperature::setResolution", but i don't know how to use it in the sketch, certainly in the setup(), i think.
Thanks for answers
@floris said:
> Serial.println("Failed reading humidity from DHT");
> } else if (humidity != lastHum) {
> lastHum = humidity;
> gw.send(msgHum.set(humidity, 1));
> Serial.print("H: ");
> Serial.println(humidity);
Hello, have you a message on the serial print ? Failed reading humidity from DHT or the value ?
If you want to send every 2 mns, you have to "sleep" 2601000 milllseconds - the processing time for your code (near 0 compared to 2 mns)
@klim Nice integration.
Do you have a schematic of your board ?
especially for the pins with the jumper.
As I can see, the blue jumper is for open/closed current loop, but for the other pins ?
Thanks
@pjeterinfo Hello, maybe here [remove debug]](http://www.mysensors.org/build/debug)
Hello,
I saw on the freedomotic page, it was possible to use the serial gateway with freedomotic, but also a MQTT Broker.
Has anybody used this framework with the MQTT gateway with success ?
Thanks
@tekka Ah OK, it's better to know it, thanks;
And I found the error this morning and it works great......
To create the configuration file for openHAB, I made a copy/paste of the Mysensors example., and I haven't seen it was a space character at the beginning of each lines.
I removed it, and it's working fine.now
So be carefull with the spaces, it was a stupid mistake and boring to find.
I have done this test 5 times, so I'm sure that it's the problem.
Thank you everybody....
And tonight, the weird is back
C:\Users\Totche>netstat -an|find "1883"
TCP 0.0.0.0:1883 0.0.0.0:0 LISTENING
In openHAB.fx, I can see the msgs from the node, so I suppose that the ethernet connection is working
With MYSController, nothing displayed, no node network
With the serial, I can see the exchanges between node and the MQTTgateway
So what's wrong ? The Gateway, a port redirection ????
@GuyP Now I can see that
C:\Users\Totche>netstat -an|find "1883"
TCP 192.168.1.13:25638 192.168.1.134:1883 ESTABLISHED
UDP 0.0.0.0:61883 *:*
The last Ip 192.168.1.234 was out of range with the router definitions
But no more values in openHAB, pfff
@Xander I have that
C:\Users\Totche>netstat -an|find "1883"
TCP 0.0.0.0:1883 0.0.0
UDP 10.10.10.170:61883
:
@GuyP Thanks for reply
I'm using windows 7, so I can't use your command, and see if connection is made
The IP in openHAB is set since the beginning, and I never changed.
@Xander Thanks
Very great link, now I can see what is sent.
1)-
2- The ip in MQTT.fx is the same as in openhab.cfg
mqtt:mysensor.url=tcp://192.168.1.234:1883
mqtt:mysensor.clientId=MQTT
3- test.items
Group all
Group meteo //(all)
Group noeud_1 (meteo)
Group noeud_2 (meteo)
//Group sketch (all)
Number noeud1_temperature "Temperature [%.1f °C]" (noeud_1, all) {mqtt="<[mysensor:MyMQTT/21/0/V_TEMP:state:default]"}
Number noeud1_luminosite "Luminosite [%.0f Lux]" (noeud_1, all) {mqtt="<[mysensor:MyMQTT/21/1/V_LIGHT_LEVEL:state:default]"}
Number noeud1_humidite "Humidite [%.0f Rh]" (noeud_1, all) {mqtt="<[mysensor:MyMQTT/21/2/V_HUM:state:default]"}
4- openHAB runtime
Launching the openHAB runtime...
osgi> 2015-04-01 20:28:05.432 [INFO ] [.o.core.internal.CoreActivator] - openHAB
runtime has been started (v1.6.2).
2015-04-01 20:28:06.066 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service
has been started
2015-04-01 20:28:06.189 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Disco
very initialization completed.
2015-04-01 20:28:07.134 [INFO ] [penhab.io.rest.RESTApplication] - Started REST
API at /rest
2015-04-01 20:28:15.943 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model
'test.sitemap'
2015-04-01 20:28:16.055 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model
'test.items'
2015-04-01 20:28:16.653 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Class
ic UI at /openhab.app
And finally...........................
nothing
PS : i don't see the repeater with the barometer, I need to dissociate them so one nano more
Re,
I tried to use MYSController without success
The IP is 192.168.1.234:1883 for the MQTT controller , but I can't read any values with the browser and MYSController.
And as you can see in the serial monitors, the nodes seem to discuss together.
I don't know how to check the communication with the MQTT gateway, apparently the problem comes from him
Any tips, ?
Thanks
@Xander Thanks for the answer
For now, I have a MQTT controller, one repeater node with a BMP180 sensor (to do the forecast on a long time, as by definition the repeater never sleeps, with a modified sketch and a timer of 1 seconde), and an another node with temperature, luminance and hymidity sensors.
After some readings , i think that the gateway doesn't provide the Id, it's the role of the controller
=> in this discussion, you can read that, it's for Vera controller
Your going to want a controller in the long term. For testing you can either hard code the node ID in the sketch (you will want to flash the EEPROM clear sketch when you get a controller)
The reason your not seeing the temp on the gateway is because it doesn't get sent if there is no node ID.
Basically the node is asking the gateway/controller who am I and the controller isn't responding so it just keeps asking.
=> I use openHAb instead of Vera, and there is XXX.items file where you define the Ids for node and child
Number node1_temp "Temp [%.1f °C]" (node1,all) {mqtt="<[mysensor:MyMQTT/20/10/V_TEMP:state:default]"}
Number node1_humid "Humid [%.1f %%Rh]" (node1,all) {mqtt="<[mysensor:MyMQTT/20/11/V_HUM:state:default]"}
So I think that in this case, if the Ids are "constants" in openhab, they can't be randomly dealed by the gateway, and have to be fixed in each node
I just tested by giving Id to the nodes, and all seems correct
MQTT gateway
Started!
0;0;3;0;9;read: 20-20-0 s=255,c=0,t=18,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;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0
0;0;3;0;9;read: 20-20-0 s=0,c=0,t=8,pt=0,l=5:1.4.1
0;0;3;0;9;read: 20-20-0 s=0,c=1,t=4,pt=2,l=2:1012
0;0;3;0;9;read: 20-20-0 s=0,c=1,t=5,pt=0,l=7:inconnu
0;0;3;0;9;read: 21-21-0 s=255,c=0,t=17,pt=0,l=5:1.4.1
0;0;3;0;9;read: 21-21-0 s=255,c=3,t=6,pt=1,l=1:0
0;0;3;0;9;read: 21-21-0 s=255,c=3,t=11,pt=0,l=18:Temp, lumin, hygro
0;0;3;0;9;read: 21-21-0 s=255,c=3,t=12,pt=0,l=3:1.0
0;0;3;0;9;read: 21-21-0 s=0,c=0,t=6,pt=0,l=5:1.4.1
0;0;3;0;9;read: 21-21-0 s=1,c=0,t=16,pt=0,l=5:1.4.1
0;0;3;0;9;read: 21-21-0 s=2,c=0,t=7,pt=0,l=5:1.4.1
0;0;3;0;9;read: 21-21-0 s=0,c=1,t=0,pt=7,l=5:20.1
0;0;3;0;9;read: 21-21-0 s=1,c=1,t=23,pt=3,l=2:20
0;0;3;0;9;read: 21-21-0 s=2,c=1,t=1,pt=7,l=5:59.0
Repeater node
repeater started, id 20
send: 20-20-0-0 s=255,c=0,t=18,pt=0,l=5,st=ok:1.4.1
send: 20-20-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
send: 20-20-0-0 s=255,c=3,t=11,pt=0,l=17,st=fail:Repeter, pression
send: 20-20-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
BMP180 Initialisation OK
send: 20-20-0-0 s=0,c=0,t=8,pt=0,l=5,st=ok:1.4.1
Pression : 1012.27 hPa
send: 20-20-0-0 s=0,c=1,t=4,pt=2,l=2,st=ok:1012
send: 20-20-0-0 s=0,c=1,t=5,pt=0,l=7,st=ok:inconnu
Sensors node
sensor started, id 21
send: 21-21-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
send: 21-21-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
send: 21-21-0-0 s=255,c=3,t=11,pt=0,l=18,st=ok:Temp, lumin, hygro
send: 21-21-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
send: 21-21-0-0 s=0,c=0,t=6,pt=0,l=5,st=ok:1.4.1
send: 21-21-0-0 s=1,c=0,t=16,pt=0,l=5,st=ok:1.4.1
send: 21-21-0-0 s=2,c=0,t=7,pt=0,l=5,st=ok:1.4.1
Temperature : 20.10 C
send: 21-21-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:20.1
Luminosite : 20 lx
send: 21-21-0-0 s=1,c=1,t=23,pt=3,l=2,st=ok:20
Temperature hygro : 19.00C
send: 21-21-0-0 s=2,c=1,t=1,pt=7,l=5,st=ok:59.0
Hygrometrie : 59.00%
Luminosite : 20 lx
Temperature hygro : 19.00C
I use this one => Adafruit
#include <DHT.h>
#define HYGRO_PIN 4 // Pin DHT11
DHT dht(HYGRO_PIN, HYGRO_TYPE);
float hygrometrie_mem;
float hygro_temp_mem;
// hygrometrie
MyMessage msg_hygro(HYGROMETRIE_CHILD, V_HUM);
float hygro_temp = dht.readTemperature();
float hygrometrie = dht.readHumidity();
// isnan => Is Not A Number
if (isnan(hygro_temp) || isnan(hygrometrie))
{
Serial.println("Echec lecture du DHT");
}
else if (hygro_temp != hygro_temp_mem)
{
hygro_temp_mem = hygro_temp;
}
Serial.print("Temperature hygro : ");
Serial.print(hygro_temp);
Serial.println('C');
if (hygrometrie != hygrometrie_mem)
{
hygrometrie_mem = hygrometrie;
gw.send(msg_hygro.set(hygrometrie, 1));
Serial.print("Hygrometrie : ");
Serial.print(hygrometrie);
Serial.println('%');
}
So back to serial gateway.
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
sensor started, id 255
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
0;0;3;0;14;Gateway startup complete.
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
255;255;3;0;3;
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
255;255;3;0;3;
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
255;255;3;0;3;
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
255;255;3;0;3;
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
255;255;3;0;3;
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
255;255;3;0;3;
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
Are you sure that the gateway gives the Id ?
Ethernet, MQTT and serial gateways never send back ids to the nodes in my case.
When I force the Id, it's working and the gateway "shows" the values
repeater started, id 20
send: 20-20-0-0 s=255,c=0,t=18,pt=0,l=5,st=ok:1.4.1
send: 20-20-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
send: 20-20-0-0 s=255,c=3,t=11,pt=0,l=17,st=fail:Repeter, pression
send: 20-20-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
BMP180 Initialisation OK
send: 20-20-0-0 s=0,c=0,t=8,pt=0,l=5,st=ok:1.4.1
Pression : 998.68 hPa
send: 20-20-0-0 s=0,c=1,t=4,pt=2,l=2,st=ok:998
send: 20-20-0-0 s=0,c=1,t=5,pt=0,l=7,st=ok:inconnu
0;0;3;0;14;Gateway startup complete.
0;0;3;0;9;read: 20-20-0 s=255,c=0,t=18,pt=0,l=5:1.4.1
20;255;0;0;18;1.4.1
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=6,pt=1,l=1:0
20;255;3;0;6;0
0;0;3;0;9;read: 20-20-0 s=255,c=3,t=12,pt=0,l=3:1.0
20;255;3;0;12;1.0
0;0;3;0;9;read: 20-20-0 s=0,c=0,t=8,pt=0,l=5:1.4.1
20;0;0;0;8;1.4.1
0;0;3;0;9;read: 20-20-0 s=0,c=1,t=4,pt=2,l=2:998
20;0;1;0;4;998
0;0;3;0;9;read: 20-20-0 s=0,c=1,t=5,pt=0,l=7:inconnu
20;0;1;0;5;inconnu
@Xander Ok,
I just keep the gateway and the repeater.
repeater started, id 255
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
BMP180 Initialisation OK
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
Pression : 1010.47 hPa
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
It seems that the gateway don't give an Id to the repeater
@Xander Thanks for the answer.
For the auto-dealing with Ids, who did it ? Openhab or the gateway ?, or are the Ids fixed with (mysensor:MyMQTT/20/10/) ?
Thanks
The blue line disappeared when i reduced the text length
id 10 and 11 => ClearEeprom : it's ok now
But always request node Id for both nodes,
Same question as above => In the items definition, (mysensor:MyMQTT/20/10/) what are 20 and 10 ?
Thanks
Ok, so I leave aside the designer .
I set-up openhab like => MQTT Broker gateway
mqtt:mysensor.url=tcp://192.168.1.234:1883
mqtt:mysensor.clientId=MQTT`
and for the items
`
Group all
Group node1 (all)
Group node2 (all)
Group sketch (all)
Number node1_temperature "Temperature [%.1f °C]" (node1,all) {mqtt="<[mysensor:MyMQTT/20/10/V_TEMP:state:default]"}
Number node1_humidite "Humidite [%.1f %%Rh]" (node1,all) {mqtt="<[mysensor:MyMQTT/20/11/V_HUM:state:default]"}```
The Id are set auto in the sketch
For the sketch, the serial result is :
repeater started, id 10
send: 10-10-0-0 s=255,c=0,t=18,pt=0,l=5,st=ok:1.4.1
send: 10-10-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
send: 10-10-0-0 s=255,c=3,t=11,pt=0,l=18,st=ok:Temp, lumin, hygro
send: 10-10-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
send: 10-10-0-0 s=0,c=0,t=6,pt=0,l=5,st=ok:1.4.1
send: 10-10-0-0 s=1,c=0,t=16,pt=0,l=5,st=ok:1.4.1
send: 10-10-0-0 s=2,c=0,t=7,pt=0,l=5,st=ok:1.4.1
Temperature : 13.80 C
send: 10-10-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:13.8
Luminosite : 79 lx
send: 10-10-0-0 s=1,c=1,t=23,pt=3,l=2,st=ok:79
Temperature hygro : 14.00C
send: 10-10-0-0 s=2,c=1,t=1,pt=7,l=5,st=ok:93.0
Hygrometrie : 93.00%
Temperature : 13.90 C
send: 10-10-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:13.9
Luminosite : 85 lx
send: 10-10-0-0 s=1,c=1,t=23,pt=3,l=2,st=ok:85
Temperature hygro : 14.00C
So at this moment, everything seems to be ok
But when i try to select the first line (Tempearture, humidite....), i have a blue line
The ping works
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Tous droits réservés.
C:\Users\Ludo>ping 192.168.1.234
Envoi d'une requête 'Ping' 192.168.1.234 avec 32 octets de données :
Réponse de 192.168.1.234 : octets=32 temps=6 ms TTL=128
Réponse de 192.168.1.234 : octets=32 temps=1 ms TTL=128
Réponse de 192.168.1.234 : octets=32 temps=1 ms TTL=128
Réponse de 192.168.1.234 : octets=32 temps=1 ms TTL=128
Statistiques Ping pour 192.168.1.234:
Paquets : envoyés = 4, reçus = 4, perdus = 0 (perte 0%),
Durée approximative des boucles en millisecondes :
Minimum = 1ms, Maximum = 6ms, Moyenne = 2ms
I read somewhere that Id was autodealed (gw.begin(NULL, AUTO, true);) but my Id node is 10.
Normaly should'nt be from 20 to 254 ?
So what is wrong with the definitions ?
In the items definition, (mysensor:MyMQTT/20/10/) what are 20 and 10 ?
Thanks for any help
Hello,
I'm stuck with openhab configuration => Embedded browser not available.
No more handles [Could not detect registered XULRunner to use]
org.eclipse.swt.SWTError: No more handles [Could not detect registered XULRunner to use]
at org.eclipse.swt.SWT.error(SWT.java:4387)
at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:695)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:99)
at org.eclipse.ui.internal.browser.BrowserViewer.<init>(BrowserViewer.java:224)
at org.eclipse.ui.internal.browser.WebBrowserView.createPartControl(WebBrowserView.java:48)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:138)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:155)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:313)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:861)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:841)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:113)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:321)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:242)```
Which versions have to be installed for java and eclipse ?
I read the forums but it's obscure....
Thanks
EDit : It seems that it's not possible to have the designer working (some answers in other forums)
Hello,
I have almost understood this part of message : read: 10-10-0 s=1,c=1,t=0,pt=7,l=5:21.6
Just pt = payload type., it should be accorded to the type of sensor ?
Where is described pt ?
And what means 0;0;3;0;9 ?
9 -> Gateway to controller to store the message/value,
but what are the first numbers 0;0;3;0..... .?
Thanks
Edit : 0 => Gateway Id ?
0 => Child id, but has none, so by 0 by default ?
3 => internal message
0 => no acq
9 => I_LOG_MESSAGE ?
I you read the first message, it is a screencopy of the serial monitor for both, and I don't see the temperature on the gateway. from the node
Ps : ok the two are the same for the last question above
Ps : I don't have a controller
Thanks for the answer.
So how do you give an Id to a node, or is it unnecessary ?
Is it possible to read/check the sent values on the gateway, and send them on the serial port (always with the gateway) ?
Thanks
Hello,
I'm facing with a "req node id" problem
For the gateway I use a mega2560, and for sensor node, a nano with a DS18B20 sensor.
Both are usb powered, and radios have decoupling capacitors
I read the temperature correctly
The both arduinos seem to communicate, but I have always the message "req node id"
From what I understood,, it's the gateway who sends the id ??
For the temperature node
And for the gateway
So any tip ?
And in general, what does this mean => 0;0;3;0;9;read: 255-255-0 s=255, c=3............ ?
Thanks.