Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Errors starting kura with greenhouse example
Errors starting kura with greenhouse example [message #1698349] Sun, 14 June 2015 18:53 Go to next message
Diego Alejandro Palmeira is currently offline Diego Alejandro PalmeiraFriend
Messages: 8
Registered: June 2015
Junior Member
Hi guys,

I'm trying to get work with http://iot.eclipse.org/java/tutorial/ example, but I have some errors and it doesn't works for me.

I'm using Raspberry PI B+ with JDK8 preinstalled.

Basically if I set "javaonedemo/device1" in Kura, I get an error in the kura log file:
"Invalid usage of multi-level wildcard in topic string: javaonedemo/device1#", and if I replace it with a "/" at the end... "javaonedemo/device1/" it seems to work, and kura don't complain in the startup process.

After this little change if I try http://iot.eclipse.org/java/demo/app/#/greenhouses/remote/device1

Nothing happened in the showed page.

So I decided to test it using my local Mosquitto server...

But, I get a new error when I'm trying to send a message to turn "on" the light, for example: mosquitto_pub -t "javaonedemo/device1/actuators/light" -m "on" -q 0 -r

Kura log says (in debug mode):

2015-06-14 11:19:15,361 [MQTT Call: 40:A5:EF:03:2B:8A] ERROR o.e.k.c.d.DataServiceListeners - Unexpected Throwable
java.lang.NullPointerException
at org.eclipse.iot.greenhouse.sensors.raspberrypi.Pi4JGreenhouseSensorService.setActuatorValue(Pi4JGreenhouseSensorService.java:154)
at org.eclipse.iot.greenhouse.publisher.GreenhousePublisher.onMessageArrived(GreenhousePublisher.java:149)
...
2015-06-14 11:19:15,366 [MQTT Call: 40:A5:EF:03:2B:8A] DEBUG o.e.k.c.c.CloudServiceImpl - Message arrived on topic: javaonedemo/device1/actuators/light
2015-06-14 11:19:15,371 [MQTT Call: 40:A5:EF:03:2B:8A] ERROR o.e.k.c.d.DataServiceListeners - Unexpected Throwable
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.kura.core.message.protobuf.KuraPayloadProto
at org.eclipse.kura.core.message.protobuf.KuraPayloadProto$KuraPayload.getDescriptor(KuraPayloadProto.java:69)
...
If you see the code there, it is: (Pi4JGreenhouseSensorService line 154)
_lightActuator.setState("on".equals(value));

as if _lightActuator is null ??

I don't know if sensors are working or not... I checked their connections many times, so... I think the problem is in another place...

Could you help me in some way?
Thank you so much for your time.
Re: Errors starting kura with greenhouse example [message #1698483 is a reply to message #1698349] Mon, 15 June 2015 22:42 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

Regarding the topic, I believe that is a typo in the demo write up. What you are entering is a topic prefix that must contain the trailing "/". So, 'javaonedemo/device1/' would be the correct entry.

I am not sure on the second error. The error is not coming from the Greenhouse app, it is coming from the Kura framework. It is attempting to deserialize the message as if it were compressed using Google Protobuf. Which version of Kura are you using? I just tried running the demo with v1.2.0 and didn't see any problems. Can you post your complete log file?

Thanks,
--Dave
Re: Errors starting kura with greenhouse example [message #1699107 is a reply to message #1698483] Sun, 21 June 2015 09:44 Go to previous messageGo to next message
Diego Alejandro Palmeira is currently offline Diego Alejandro PalmeiraFriend
Messages: 8
Registered: June 2015
Junior Member
Hi David thank you for your reply.
I'm using KURA_1.0.0, I've downloaded it just as GreenHouse tutorial says:
wget h ttps : // s3.amazonaws.com/kura_downloads/raspbian/release/1.0.0/kura_1.0.0_raspberry-pi_armv6.deb

I'll try with the lasted version. I guess the correct one for my new Raspberry PI B+ (raspbian wheezy) is:
Raspbian (Model B+, with Web UI) - Stable --> h ttp s : // s3.amazonaws.com/kura_downloads/raspbian/release/1.2.0/kura_1.2.0_raspberry-pi-bplus_armv6.deb
(From the "Kura 1.2.0 Extended Downloads list" in the right column of http://www.eclipse.org/kura/downloads.php page)

What does "NO NET" version means?

Thank you for your time, I will try it and then come back with the results.
Diego
Re: Errors starting kura with greenhouse example [message #1699124 is a reply to message #1699107] Sun, 21 June 2015 16:56 Go to previous messageGo to next message
Diego Alejandro Palmeira is currently offline Diego Alejandro PalmeiraFriend
Messages: 8
Registered: June 2015
Junior Member
Hello,

After uninstall Kura 1.0.0 and install 1.2.0 in my Raspberry PI b+, I got the same error when I try to send a message from my Mosquitto server over my LAN:

If I send a msg to turn the light on...
$mosquitto_pub -t "liferay/device1/actuators/light" -m "on" -q 0 -r

I see the same original error in the kura.log...

2015-06-21 15:31:29,781 [MQTT Call: B8:27:EB:81:B0:9C] DEBUG o.e.k.c.c.c.CloudCallServiceImpl - Message arrived on topic: 'liferay/device1/actuators/light'
2015-06-21 15:31:29,783 [MQTT Call: B8:27:EB:81:B0:9C] ERROR o.e.k.c.d.DataServiceListeners - Unexpected Throwable
java.lang.NullPointerException
at org.eclipse.iot.greenhouse.sensors.raspberrypi.Pi4JGreenhouseSensorService.setActuatorValue(Pi4JGreenhouseSensorService.java:154)
at org.eclipse.iot.greenhouse.publisher.GreenhousePublisher.onMessageArrived(GreenhousePublisher.java:149)

Besides that, I got another errors, so, I think I need to resolve it one by one.

The first problem to solve is the lose of WIFI connection.

This is my env:
- MacBook Pro with mosquitto server running to make tests in my local area network using a WIFI conn.
- Raspberry PI B+ with raspbian wheezy. (I bought it some weeks ago) + a installed Eclipse Kura 1.2.0. I raised up log levels from INFO to DEBUG in the log4j.properties file for a little bit more verbosity.
- jdk8 in the RB. It's installed by default... I've noticed Kura works with jdk7, maybe this is part of the problem.., I don't know.
- Home WIFI network, basically I want to connect my Raspberry using mini-usb WIFI dongle (I bought it at Adafriuit and this is a RTL8188CUS). Looking for the web it should to be compatible it use driver rtl871xdrv (htt p : // elinux.org/RPi_USB_Wi-Fi_Adapters)
- I want the Raspberry's IP should be 192.168.1.137, and for my Macbook Pro with Mosquitto server: 192.168.1.136

Well here is the problem...

1) When you install Kura in Raspberry, it has some dependencies... one of this is isc-dhcp-server and it isn't well configured after installation process, causing fails in the RB starup. So, to solve this problem I've configured by hand some files:

- I put INTERFACES="wlan0" in the /etc/default/isc-dhcp-server
- Then I had to modify the /etc/dhcp/dhcpd.conf file:
significant parts...

I commented this... (I'm not sure if this is necessary)
# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;
#option domain-name-servers 8.8.8.8, 8.8.4.4;

and added this to define the dhcp range..
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.20;
option routers 192.168.1.1;
}

Then I've changed the generated /etc/network/interfaces file with the following content:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
#post-up route del default dev eth0

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.137
netmask 255.255.255.0
gateway 192.168.1.1
# WIFI Settings
wpa-ssid xxxxxxx
wpa-passphrase xxxxxx
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wireless-channel 1
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

#iface home inet static
#address 192.168.1.137
#netmask 255.255.255.0
#gateway 192.168.1.1

#iface default inet dhcp

Note: I tested the option of using wpa_supplicant.conf file, and WIFI works with the same effects, but in this case Kura complains with a message about it doesn't have NETMASK, etc...
So for simplicity, I decided to leave this WIFI SSID and PASS configs in the /etc/network/interfaces file, but I'm not sure if for Kura this is correct, or I could use wpa-roam instad. This second choice looks more smart.

After that when I startup my RB, with or without wire (eth0), the WIFI (wlan0) works perfectly and the connection is stable until the server KURA STARTS! (the effect is the same even without GreenHouse demo installed.)

Before KURA starts the nwework works fine, even if I kill KURA process the connection works for ever well!

Note the following output, the wlan0 is present and has the correct IP and I can access my RB via SSH from my local network using my MacBook.

pi@raspberrypi ~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:81:b0:9c
inet addr:192.168.1.128 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2064 (2.0 KiB) TX bytes:750 (750.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:400 (400.0 B) TX bytes:400 (400.0 B)

wlan0 Link encap:Ethernet HWaddr 40:a5:ef:03:2b:8a
inet addr:192.168.1.137 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:159 errors:0 dropped:84 overruns:0 frame:0
TX packets:124 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25245 (24.6 KiB) TX bytes:17935 (17.5 KiB)


Some minutes later, KURA starts and removes my wlan0 interface at this point!

2015-06-21 15:28:29,394 [WifiMonitor Thread] DEBUG o.e.k.l.n.w.WpaSupplicantManager - stopping wpa_supplicant
2015-06-21 15:28:29,418 [WifiMonitor Thread] INFO o.e.k.c.l.u.LinuxProcessUtil - executing: killall wpa_supplicant
2015-06-21 15:28:29,430 [SafeProcessExecutor] DEBUG o.e.k.c.u.SafeProcess - Executing: [killall, wpa_supplicant]
2015-06-21 15:28:29,612 [WifiMonitor Thread] INFO o.e.k.c.l.u.LinuxProcessUtil - killall wpa_supplicant returned with exit value:0
2015-06-21 15:28:29,718 [Component Resolve Thread (Bundle 6)] INFO o.e.k.w.Console - activate...
2015-06-21 15:28:29,808 [Component Resolve Thread (Bundle 6)] INFO o.e.k.w.AuthenticationManager - db is file

After some seconds... network comes back available via wire eth0 (ssh) but my wlan0 interface is missing!

pi@raspberrypi ~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:81:b0:9c
inet addr:192.168.1.128 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:182 errors:0 dropped:0 overruns:0 frame:0
TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12448 (12.1 KiB) TX bytes:63458 (61.9 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:500 (500.0 B) TX bytes:500 (500.0 B)

Rare effect is eth0 says 192.168.1.128, and I'm still connected to 192.168.1.137 via SSH. If I disconnect the ethernet cable, I get disconnected ! It's like the IP configured for wlan0 is used by the eth0 interface ?? extrange effect...

In th Kura web UI --> Network section, I only see "lo" and "eth0" interfaces... where is my wlan0 ?? is it normal ? or my wlan0 should to appears here? :S

Well, as you can see, I need to solve the WIFI problem first, and then go to the next I think.

I attached here the kura.log.

Can you help me?
Thank you!
  • Attachment: kura.log
    (Size: 450.51KB, Downloaded 165 times)
Re: Errors starting kura with greenhouse example [message #1699197 is a reply to message #1699124] Mon, 22 June 2015 13:28 Go to previous messageGo to next message
Diego Alejandro Palmeira is currently offline Diego Alejandro PalmeiraFriend
Messages: 8
Registered: June 2015
Junior Member

Objectives of my proof of concept:

- I only want to test the Kura Demo GreenHouse project using Temp and Led sensors to publish their data in a LAN Mosquitto server.
- After that, I want to send a message to my Mosquitto server and it route the message to turn on & off the light (led).

A little more info:

I've decided to uninstall everything (Kura 1.2.0 + his dependencies) and reinstall all again from scratch.

1) I installed one by one all dependencies without problems:
- hostapd
- bind9
- isc-dhcp-server
- iw
- monit
- dos2unix
- telnet

After that, I've rebooted my RB, and everything was started up [Ok]

2) Then, I've installed Kura 1.2.0
sudo dpkg -i kura_1.2.0_raspberry-pi-bplus_armv6.deb

After that, in the next reboot, isc-dhcp-server fails !

I noticed /etc/network/interfaces file was changed. I put my old file with the original interfaces and IPs configs, and dhcp works again.

4) After that, bind9 fails, so I noticed some configuration with a bad IP in file /etc/bind/named.conf
I replaced: 172.16.0.1 in order to match my network:

allow-query {192.168.1.1/24;};

After this change, all services started up [OK] again.

5) I've changed the WIFI usb driver at:
sudo nano /opt/eclipse/kura/data/kuranet.conf

#net.interface.wlan0.config.wifi.infra.driver=nl80211
net.interface.wlan0.config.wifi.infra.driver=rtl871xdrv

6) Then also put wlan0 at:
sudo nano /opt/eclipse/kura/kura/kura_custom.properties

kura.primary.network.interface=wlan0

7) Then Kura starts ok, but fails with the following error:

2015-06-21 22:21:05,550 [SafeProcessExecutor] DEBUG o.e.k.c.u.SafeProcess - Executing: [hostapd, -B, /etc/hostapd.conf]
2015-06-21 22:21:05,644 [WifiMonitor Thread] ERROR o.e.k.l.n.w.HostapdManager - failed to start hostapd for unknown reason
2015-06-21 22:21:05,744 [WifiMonitor Thread] WARN o.e.k.n.a.m.WifiMonitorServiceImpl - Error during WiFi Monitor handle event
org.eclipse.kura.KuraException: An internal error occurred. {0}
at org.eclipse.kura.net.admin.NetworkAdminServiceImpl.enableInterface(NetworkAdminServiceImpl.java:812)
at org.eclipse.kura.net.admin.monitor.WifiMonitorServiceImpl.enableInterface(WifiMonitorServiceImpl.java:556)
at org.eclipse.kura.net.admin.monitor.WifiMonitorServiceImpl.monitor(WifiMonitorServiceImpl.java:291)
at org.eclipse.kura.net.admin.monitor.WifiMonitorServiceImpl.access$1(WifiMonitorServiceImpl.java:205)
at org.eclipse.kura.net.admin.monitor.WifiMonitorServiceImpl$1.run(WifiMonitorServiceImpl.java:609)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.eclipse.kura.KuraException: An internal error occurred.
at org.eclipse.kura.KuraException.internalError(KuraException.java:102)
at org.eclipse.kura.linux.net.wifi.HostapdManager.start(HostapdManager.java:52)
at org.eclipse.kura.net.admin.NetworkAdminServiceImpl.enableWifiInterface(NetworkAdminServiceImpl.java:1310)
at org.eclipse.kura.net.admin.NetworkAdminServiceImpl.enableInterface(NetworkAdminServiceImpl.java:796)
... 9 more
Caused by: org.eclipse.kura.KuraException: An internal error occurred. failed to start hostapd for unknown reason
at org.eclipse.kura.KuraException.internalError(KuraException.java:113)
at org.eclipse.kura.linux.net.wifi.HostapdManager.start(HostapdManager.java:48)
... 11 more
2015-06-21 22:21:07,977 [Component Resolve Thread (Bundle 6)] INFO o.e.k.w.s.s.FileServlet - Servlet org.eclipse.kura.web.server.servlet.FileServlet initialized

For some reason WifiMonitorServiceImpl can't work properly.

Thank you for your help.
Diego
Re: Errors starting kura with greenhouse example [message #1699243 is a reply to message #1699197] Mon, 22 June 2015 22:34 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello Diego,

A few things:

1. Definitely use v1.2.0. I will contact the author of the tutorial about updating the link.
2. The "no net" option in the downloads provides an installation of Kura that does not contain the network administration services. This is desirable if you wish to manage your network settings yourself.
3. Kura does not currently officially support WiFi on the Raspberry Pi. This is due to the numerous Wifi USB adapters on the market. Many of these adapters are not compatible with cfg80211, which is a requirement of adapters supported by Kura. We plan to have a fix for this in the next release of Kura. If using WiFi is a requirement, you may wish to use the "no net" option for now.
4. I have tried the demo in several different ways and cannot reproduce the error you are seeing. Have you tried using the MQTT server from Eclipse (iot.eclipse.org:1883)? It may be worth trying to ensure there is not an issue with your Mosquitto broker.

Thanks,
--Dave
Re: Errors starting kura with greenhouse example [message #1699290 is a reply to message #1699243] Tue, 23 June 2015 09:14 Go to previous messageGo to next message
Diego Alejandro Palmeira is currently offline Diego Alejandro PalmeiraFriend
Messages: 8
Registered: June 2015
Junior Member
Thank you Dave,

I removed all again, and installed the "no net" version. This looks better, much more simple, and I have no errors!, my WIFI works stable, and well.

I decided to test the original greenhouse example pointing my Kura to mqtt://iot.eclipse.org:1883/ and using this page for test: http://iot.eclipse.org/java/demo/app/#/greenhouses/remote/diegotest1

No data is showed for temp sensor in the page (and no errors in log debug mode), but if I do click over the Lamp image, I receive a message and then the same error appears in my Kura Log:

2015-06-23 09:02:53,322 [MQTT Call: B8:27:EB:81:B0:9C] DEBUG o.e.k.c.c.c.CloudCallServiceImpl - Message arrived on topic: 'javaonedemo/diegotest1/actuators/light'
2015-06-23 09:02:53,324 [MQTT Call: B8:27:EB:81:B0:9C] ERROR o.e.k.c.d.DataServiceListeners - Unexpected Throwable
java.lang.NullPointerException
at org.eclipse.iot.greenhouse.sensors.raspberrypi.Pi4JGreenhouseSensorService.setActuatorValue(Pi4JGreenhouseSensorService.java:154)
at org.eclipse.iot.greenhouse.publisher.GreenhousePublisher.onMessageArrived(GreenhousePublisher.java:149)
at org.eclipse.kura.core.data.DataServiceListeners.onMessageArrived(DataServiceListeners.java:106)
at org.eclipse.kura.core.data.DataServiceImpl.onMessageArrived(DataServiceImpl.java:332)
at org.eclipse.kura.core.data.transport.mqtt.DataTransportListeners.onMessageArrived(DataTransportListeners.java:144)
at org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport.messageArrived(MqttDataTransport.java:602)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:354)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:162)
at java.lang.Thread.run(Thread.java:744)

Why Kura can't process the msg? I only installed the package original version of code example: org.eclipse.greenhouse.iot-0.1.0.dp

Any idea?
Re: Errors starting kura with greenhouse example [message #1699378 is a reply to message #1699290] Tue, 23 June 2015 21:29 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
I have to say I am a bit stumped. I have tried the demo on 2 different Raspberry Pis, both running Kura v1.2.0 and Java SE 8, both using your username of "diegotest1", and both are behaving as expected. Can you try subscribing to the topic from a stand alone MQTT client (ex: mosquitto_sub)? I am wondering if the message is getting corrupted. For reference, I am getting this from the mosquitto client:

$ ./mosquitto_sub -d -v -i test -q 0 -h iot.eclipse.org -t javaonedemo/diegotest1/#
Client test sending CONNECT
Client test received CONNACK
Client test sending SUBSCRIBE (Mid: 1, Topic: javaonedemo/diegotest1/#, QoS: 0)
Client test received SUBACK
Subscribed (mid: 1): 0
Client test received PUBLISH (d0, q0, r1, m0, 'javaonedemo/diegotest1/sensors/temperature', ... (5 bytes))
javaonedemo/diegotest1/sensors/temperature 24.16
Client test received PUBLISH (d0, q0, r1, m0, 'javaonedemo/diegotest1/sensors/light', ... (2 bytes))
javaonedemo/diegotest1/sensors/light on
Client test received PUBLISH (d0, q0, r0, m0, 'javaonedemo/diegotest1/sensors/temperature', ... (5 bytes))
javaonedemo/diegotest1/sensors/temperature 24.28
Client test received PUBLISH (d0, q0, r0, m0, 'javaonedemo/diegotest1/actuators/light', ... (3 bytes))
javaonedemo/diegotest1/actuators/light off
Client test received PUBLISH (d0, q0, r0, m0, 'javaonedemo/diegotest1/sensors/light', ... (3 bytes))
javaonedemo/diegotest1/sensors/light off
Client test received PUBLISH (d0, q0, r0, m0, 'javaonedemo/diegotest1/actuators/light', ... (2 bytes))
javaonedemo/diegotest1/actuators/light on
Client test received PUBLISH (d0, q0, r0, m0, 'javaonedemo/diegotest1/sensors/light', ... (2 bytes))
javaonedemo/diegotest1/sensors/light on


--Dave
Re: Errors starting kura with greenhouse example [message #1699412 is a reply to message #1699378] Wed, 24 June 2015 07:43 Go to previous messageGo to next message
Diego Alejandro Palmeira is currently offline Diego Alejandro PalmeiraFriend
Messages: 8
Registered: June 2015
Junior Member
Hi Dave, I've tested the same from my MacBook inside my local network, and this is the result.

$ mosquitto_sub -d -v -i test -q 0 -h iot.eclipse.org -t javaonedemo/diegotest1/#
Client test sending CONNECT
Client test received CONNACK
Client test sending SUBSCRIBE (Mid: 1, Topic: javaonedemo/diegotest1/#, QoS: 0)
Client test received SUBACK
Subscribed (mid: 1): 0
Client test received PUBLISH (d0, q0, r1, m0, 'javaonedemo/diegotest1/sensors/temperature', ... (5 bytes))
javaonedemo/diegotest1/sensors/temperature 24.41
Client test received PUBLISH (d0, q0, r1, m0, 'javaonedemo/diegotest1/sensors/light', ... (2 bytes))
javaonedemo/diegotest1/sensors/light on

But, I don't know if I have to do this from my Raspberry PI B+ ? maybe installing mosquitto client first?

Thank you for your help!
Diego
Re: Errors starting kura with greenhouse example [message #1699456 is a reply to message #1699412] Wed, 24 June 2015 12:39 Go to previous messageGo to next message
Diego Alejandro Palmeira is currently offline Diego Alejandro PalmeiraFriend
Messages: 8
Registered: June 2015
Junior Member
GOOD NEWS Dave! It works!!!

I've discovered the problem was related with modules who handles the pins of RB. I follow the steps of "Installing Kernel Support (with Raspi-Config)" section from this website: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c
and after performs: sudo raspi-config and enabled the i2c as described in the screenshots, it works!, and I can turn on and off the lights from Eclipse page. Now, I will continue working with my Mosquitto server.

In the other hand, the Greenhouse tutorial should to mention this little additional step before to enable i2c-bcm2708 & i2c-dev modules in /etc/modules. Please update the tutorial for the next developer Smile

I've just noticed the temp changed right now with 27.5 grades also, so, it looks good!

Thank you for your help, I will continue with my "proof of concept" about Kura and IoT, because it is part of a more bigger task I'm working for.
Diego
Re: Errors starting kura with greenhouse example [message #1699474 is a reply to message #1699456] Wed, 24 June 2015 13:54 Go to previous messageGo to next message
Diego Alejandro Palmeira is currently offline Diego Alejandro PalmeiraFriend
Messages: 8
Registered: June 2015
Junior Member
Hi Dave, just tell you I'm able to receive temp data, light status, and turn on/off the light using my Mosquitto server! It works as expected.

I appreciate a lot your time and help.
Diego
Re: Errors starting kura with greenhouse example [message #1699489 is a reply to message #1699474] Wed, 24 June 2015 14:54 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hi Diego,

Great news! The beginning of the tutorial does mention enabling I2C, but I will let the author know it may need to be more complete. Also, I should have had you check /var/log/kura-console.log, you would likely have seen errors in there. The errors you were getting are very strange. Glad you were able to get it working.

--Dave
Re: Errors starting kura with greenhouse example [message #1714636 is a reply to message #1698349] Sat, 14 November 2015 10:51 Go to previous messageGo to next message
Emiliano Sico is currently offline Emiliano SicoFriend
Messages: 1
Registered: November 2015
Junior Member
Hello Dave,

I'm able to receive light status, and turn on/off the light, but I cannot receive the temperature status.

At the end I understood why (probably). I bought a different temperature sensor, this one:

www.amazon.it/SENSOR-TEMPERATURE-HUMIDITY-SEN11301P-TECHNOLOGY/dp/B011873TEW/ref=sr_1_1?s=electronics&ie=UTF8&qid=1447453624&sr=1-1&keywords=GROVE%2C+SENSOR%2C+TEMPERATURE+%26+HUMIDITY#productDetails

So, the question is: what is the difference from the code point of view? What I should modify in order to get this sensor working for ths tutorial?

thanks a lot for your effort in advance.
e.
Re: Errors starting kura with greenhouse example [message #1715189 is a reply to message #1714636] Fri, 20 November 2015 01:16 Go to previous message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

I believe that is an analog sensor, not a digital sensor. That will make the code considerably different. It is still possible, but you will likely need to use a serial connection instead of digital. There is information on the sensor here: http://www.seeedstudio.com/wiki/Grove_-_Temperature_and_Humidity_Sensor.

Thanks,
--Dave
Previous Topic:javax.net.ssl.HttpsURLConnection no class def found error
Next Topic:how to receive MQTT messages using the DataService?
Goto Forum:
  


Current Time: Wed Apr 24 22:47:39 GMT 2024

Powered by FUDForum. Page generated in 0.04080 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top