Please, someone can help me this is very important for me.
Thanks
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
But now a i have doubts about the configuration.I installed mosquitto in my PC, but i prefer use the http://iot.eclipse.org/ as broker.Someone can help, please?
# -*- coding: utf-8 -*-
import paho.mqtt.client as mqtt
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
client.subscribe("weewx/vitor")
# The callback for when a PUBLISH message is received from the server.
def on_message(client, userdata, msg):
print "Topic: ", msg.topic+'\nMessage: '+str(msg.payload)
client = mqtt.Client()
client.on_connect = on_connect
client.on_message = on_message
client.connect("iot.eclipse.org", 1883, 60)
# Blocking call that processes network traffic, dispatches callbacks and
# handles reconnecting.
# Other loop*() functions are available that give a threaded interface and a
# manual interface.
client.loop_forever()data: {
'rain24_in': '0.0',
'barometer_inHg': '31.0779202224',
'outHumidity': '79.3376066706',
'interval_minute': '1.0',
'dewpoint_F': '24.496253969',
'rain_in': '0.0',
'cloudbase_foot': '4489.94913573',
'heatindex_F': '30.1050485174',
'altimeter_inHg': '34.826236951',
'dayRain_in': '0.0',
'windrun_mile': '0.0287244445624',
'inDewpoint': '30.7286642442',
'outTemp_F': '30.1050485174',
'windchill_F': '30.1050485174',
'windGustDir': '356.025640023',
'hourRain_in': '0.0',
'rainRate_inch_per_hour': '0.0',
'humidex': '30.1050485174',
'windGust_mph': '0.132478665889',
'pressure_inHg': '31.0779202224',
'inTemp_F': '63.4367203872',
'usUnits': '1.0',
'ET_in': '0.320804136611',
'appTemp': '25.5071786162',
'windSpeed_mph': '0.110398888241',
'UV': '6.10549869347',
'dateTime': '1444932960.0',
'windDir': '356.025640023',
'inHumidity': '29.1265592257',
'radiation_Wpm2': '436.107049534'
}Thanks mwall for your care.I configured my weewx.conf:
I installed the service following the instructions of the Wiki:The installer put the [[MQTT]] for me.In my log i don't have any errors.
The MQTT service run and output this "json":
In my mosquitto localhost i don't set the password and username.
Yes, log indicate mqtt upload succeed but i don't received anything in my subscrider
Sorry for my bad english.My native language is portuguese, i am from Brazil.I don't have account of iot.eclipse.orgI don't find anything about account in the iot.eclipse.org website.I see this json output in my syslog (tail -f /var/log/syslog).When i say: ""my mosquitto localhost" i want say i installed the mosquitto package (sudo apt-get install mosquitto and sudo apt-get install mosquitto-client) in my machine.The "subscriber" i want say is a small code in python to receive the message from my publisher (weewx).
[StdRESTful]
[[MQTT]]
server_url = mqtt://mypassword:myuse...@m11.cloudmqtt.com:myport
topic = weewxOct 20 10:42:37 raspberrypi weewx[32002]: engine: Loading service user.mqtt.MQTT
Oct 20 10:42:37 raspberrypi weewx[32002]: restx: MQTT: service version is 0.9
Oct 20 10:42:37 raspberrypi weewx[32002]: restx: MQTT: topic is weewx
Oct 20 10:42:37 raspberrypi weewx[32002]: restx: MQTT: Data will be uploaded to mqtt://mypassword:myuse...@m11.cloudmqtt.com:myport
Oct 20 10:42:37 raspberrypi weewx[32002]: engine: Finished loading service user.mqtt.MQTT
Oct 20 10:42:37 raspberrypi weewx[32002]: engine: Starting up weewx version 3.2.1
Oct 20 10:42:37 raspberrypi weewx[32002]: engine: Clock error is -0.25 seconds (positive is fast)
Oct 20 10:42:37 raspberrypi weewx[32002]: engine: Starting main packet loop.
Oct 20 10:44:37 raspberrypi weewx[32002]: manager: added record 2015-10-20 10:44:00 BRST (1445345040) to database 'weewx.sdb'
Oct 20 10:44:37 raspberrypi weewx[32002]: manager: added record 2015-10-20 10:44:00 BRST (1445345040) to daily summary in 'weewx.sdb'
Oct 20 10:44:37 raspberrypi weewx[32002]: restx: MQTT: data: {'rain24_in': '0.32', 'barometer_inHg': '31.099999405', 'outHumidity': '79.9999821513', 'interval_minute': '1.0', 'dewpoint_F': '27.1832189366', 'rain_in': '0.0', 'cloudbase_foot': '4459.42710406', 'heatindex_F': '32.6577165457', 'altimeter_inHg': '34.8504541967', 'dayRain_in': '0.32', 'windrun_mile': '0.000468325880368', 'inDewpoint': '31.0795245766', 'outTemp_F': '32.6577165457', 'windchill_F': '32.6577165457', 'windGustDir': '359.999892908', 'hourRain_in': '0.0', 'rainRate_inch_per_hour': '0.0', 'humidex': '32.6577165457', 'windGust_mph': '3.56973503379e-06', 'pressure_inHg': '31.099999405', 'inTemp_F': '63.0000118991', 'usUnits': '1.0', 'ET_in': '0.466552506793', 'appTemp': '28.4367381251', 'windSpeed_mph': '2.97477919542e-06', 'UV': '12.4826907711', 'dateTime': '1445345040.0', 'windDir': '359.999892908', 'inHumidity': '29.9999762018', 'radiation_Wpm2': '891.620769362'}
Oct 20 10:44:38 raspberrypi weewx[32002]: restx: MQTT: Published record 2015-10-20 10:44:00 BRST (1445345040)