[weewx-user] Re: help with error message?

2017-11-01 Thread Jim W.
Thanks... I was thinking maybe driver issue... but looks like cable issue.

On Wednesday, November 1, 2017 at 2:59:14 PM UTC-4, vince wrote:
>
> On Wednesday, November 1, 2017 at 7:38:28 AM UTC-7, Jim W. wrote:
>>
>> Weewx seems to have stopped working? Is this a problem with the USB 
>> connection to the weather station console?
>>
>  
>
>> Nov  1 10:24:34 WXraspberrypi weewx[32745]: fousb: Cannot find USB device 
>> with Vendor=0x1941 ProdID=0x8021 Device=None
>> Nov  1 10:24:34 WXraspberrypi weewx[32745]: engine: Unable to load 
>> driver: Unable to find USB device
>> Nov  1 10:24:34 WXraspberrypi weewx[32745]:   Exiting...
>>
>>
> I don't know how the message could be any clearer.so yes I guess.
>
> Try 'lsusb' perhaps to see if the os sees a device ?
>  
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: help with error message?

2017-11-01 Thread vince
On Wednesday, November 1, 2017 at 7:38:28 AM UTC-7, Jim W. wrote:
>
> Weewx seems to have stopped working? Is this a problem with the USB 
> connection to the weather station console?
>
 

> Nov  1 10:24:34 WXraspberrypi weewx[32745]: fousb: Cannot find USB device 
> with Vendor=0x1941 ProdID=0x8021 Device=None
> Nov  1 10:24:34 WXraspberrypi weewx[32745]: engine: Unable to load driver: 
> Unable to find USB device
> Nov  1 10:24:34 WXraspberrypi weewx[32745]:   Exiting...
>
>
I don't know how the message could be any clearer.so yes I guess.

Try 'lsusb' perhaps to see if the os sees a device ?
 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] help with error message?

2017-11-01 Thread Jim W.
Weewx seems to have stopped working? Is this a problem with the USB 
connection to the weather station console?
Thanks for any insight!
I'm not a programmer... Mostly just a hack!



Rpi3b
VERSION="8 (jessie)"
weewx version 3.5.0
Ambient Weather Fineoffset




Nov  1 10:24:28 WXraspberrypi weewx[32680]: Stopping weewx weather system: 
weewx not running
Nov  1 10:24:28 WXraspberrypi systemd[1]: Stopped LSB: weewx weather system.
Nov  1 10:24:33 WXraspberrypi systemd[1]: Starting LSB: weewx weather 
system...
Nov  1 10:24:34 WXraspberrypi weewx[32741]: engine: Initializing weewx 
version 3.5.0
Nov  1 10:24:34 WXraspberrypi weewx[32741]: engine: Using Python 2.7.9 
(default, Mar  8 2015, 00:52:26) #012[GCC 4.9.2]
Nov  1 10:24:34 WXraspberrypi weewx[32741]: engine: Platform 
Linux-4.4.13-v7+-armv7l-with-debian-8.0
Nov  1 10:24:34 WXraspberrypi weewx[32741]: engine: pid file is 
/var/run/weewx.pid
Nov  1 10:24:34 WXraspberrypi weewx[32745]: engine: Using configuration 
file /etc/weewx/weewx.conf
Nov  1 10:24:34 WXraspberrypi weewx[32745]: engine: Initializing engine
Nov  1 10:24:34 WXraspberrypi weewx[32745]: engine: Loading station type 
FineOffsetUSB (weewx.drivers.fousb)
Nov  1 10:24:34 WXraspberrypi weewx[32730]: Starting weewx weather system: 
weewx.
Nov  1 10:24:34 WXraspberrypi systemd[1]: Started LSB: weewx weather system.
Nov  1 10:24:34 WXraspberrypi rsyslogd-2007: action 'action 17' suspended, 
next retry is Wed Nov  1 10:25:04 2017 [try http://www.rsyslog.com/e/2007 ]
Nov  1 10:24:34 WXraspberrypi weewx[32745]: fousb: driver version is 1.8
Nov  1 10:24:34 WXraspberrypi weewx[32745]: fousb: polling mode is PERIODIC
Nov  1 10:24:34 WXraspberrypi weewx[32745]: fousb: polling interval is 60
Nov  1 10:24:34 WXraspberrypi weewx[32745]: fousb: Cannot find USB device 
with Vendor=0x1941 ProdID=0x8021 Device=None
Nov  1 10:24:34 WXraspberrypi weewx[32745]: engine: Unable to load driver: 
Unable to find USB device
Nov  1 10:24:34 WXraspberrypi weewx[32745]:   Exiting...

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Adding Sensor to wmr928

2017-11-01 Thread Klaus Dengler
Hi, 
I'm using weewx on a RaspberryPi2 with an Origon WMR928. I'm adding sensor 
to my WMR928 in a different way as 'adding sensors' is descripted in 
documention. I have developed a circuit with an ATMega128 and a 868Mhz 
RFM12 module some years ago (before apeareance of RPi on the market). This 
circiut connects the WMR928 to the RaspberryPi. The RFM12 connects 
supplementary sensors, the Firmware of the ATMega128 translates the 
RFM12-sensor-protocol to an Oregon compatible protocol. That means starting 
0x are the same as the original, third byte is my new ptype and 
checksum will be calculated as WMR928 does.
Now I have extended wmr9x8.py for a second windspeed sensor like this:
DEFAULT_MAP = {
'barometer': 'barometer',
'pressure': 'pressure',
'windSpeed': 'wind_speed',
...
'wind2Speed': 'wind2_speed',
'wind2Gust': 'wind2_gust',
'wind2Vbat': 'wind2_vbat',
'wind2Temp': 'wind2_temp',
'wind2BatteryStatus': 'battery_status_wind2',
'wind2Charging': 'charging_wind2',
'wind2HeaterOn': 'heateron_wind2'}

and I have added follwing code:
@wmr9x8_registerpackettype(typecode=0x10, size=13)
def _wmr9x8_lisa_packet(self, packet):
"""Decode a lisa wind packet. Wind speed will be in kph"""
null, status, vbat100th, vbat10th, vbat1, gust10th, gust1, gust10, 
avg10th, avg1, avg10, chillstatus, chill1, chill10, ltmp10th, ltmp1, 
ltmp10, ltmp100etc

battery = (status & 0x04) >> 2
charging = (status & 0x08) >> 3
heater_on = (chillstatus & 0x04) >> 2

# The console returns wind speeds in m/s. Our metric system requires
# kph, so the result needs to be multiplied by 3.6
_record = {
'battery_status_wind2': battery,
'charging_wind2': charging,
'heateron_wind2': heater_on,
'wind2_speed': ((avg10th / 10.0) + avg1 + (avg10 * 10)) * 3.6,
'wind2_vbat': ((vbat100th / 100.0) + (vbat10th / 10.0) + vbat1),
'dateTime': int(time.time() + 0.5),
'usUnits': weewx.METRIC
}
# Sometimes the station emits a wind gust that is less than the
# average wind. Ignore it if this is the case.
windGustSpeed = ((gust10th / 10.0) + gust1 + (gust10 * 10)) * 3.6
if windGustSpeed >= _record['wind2_speed']:
_record['wind2_gust'] = windGustSpeed

# chill has no data;
tempoverunder = temp100etc & 0x04
temp_no_data = chillstatus & 0x08
if not tempoverunder and not temp_no_data:
temp = (ltmp10th / 10.0) + ltmp1 + (ltmp10 * 10) + ((ltmp100etc 
& 0x03) * 100)
if ltmp100etc & 0x08:
temp = -temp
_record['wind2_temp'] = temp
else:
_record['wind2_temp'] = None

return _record

I have extended and reconfigured the database as descriped in doc website 
(which is ok). But the new table columns are empty.

So I have added some more code to wmr9x8.py:
# WMR-9x8/968 packets are framed by 0xFF characters
if buf[0] == 0xFF and buf[1] == 0xFF and buf[2] in 
wmr9x8_packet_type_size_map:
# Look up packet type, the expected size of this packet type
ptype = buf[2]
*logdbg("Received packet type (%s)." % ptype)*

I never see my new packet type in log file. Why not? Should be there if 
buf[0] and buf[1] are 0xFF...

Kind regards 
Klaus

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: weewx and weewx-sdr - problems

2017-11-01 Thread mwall


On Wednesday, November 1, 2017 at 9:03:23 AM UTC-4, Andrew Dibbins wrote:
>
>
> Nov 01 12:42:58 raspberrypi weewx[2939]: File 
> "/usr/share/weewx/user/sdr.py", line 1
> Nov 01 12:42:58 raspberrypi weewx[2939]:   opyright 2016-2017 
> Matthew Wall
> Nov 01 12:42:58 raspberrypi weewx[2939]:   ^
> Nov 01 12:42:58 raspberrypi weewx[2939]:   SyntaxError: invalid 
> syntax
> root@raspberrypi:/usr/share/weewx/user#
>
>>
>>>
that smells like a corrupt file.  how did you download the extension?

open sdr.py in an editor that knows how to do syntax coloring for python

or just download the sdr zip/tgz again

m 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: weewx and weewx-sdr - problems

2017-11-01 Thread Andrew Dibbins
Hi Matthew,

Thanks for the updated version 0.37, but I'm seeing a further problem

root@raspberrypi:/usr/share/weewx/user# /etc/init.d/weewx status
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx; generated; vendor preset: enabled)
   Active: active (exited) since Wed 2017-11-01 12:42:58 GMT; 18min ago
 Docs: man:systemd-sysv-generator(8)
  Process: 2810 ExecStop=/etc/init.d/weewx stop (code=exited, 
status=0/SUCCESS)
  Process: 2924 ExecStart=/etc/init.d/weewx start (code=exited, 
status=0/SUCCESS)

Nov 01 12:42:58 raspberrypi weewx[2939]: File 
"/usr/share/weewx/weewx/engine.py", line 865, in main
Nov 01 12:42:58 raspberrypi weewx[2939]:   engine = 
engine_class(config_dict)
Nov 01 12:42:58 raspberrypi weewx[2939]: File 
"/usr/share/weewx/weewx/engine.py", line 71, in __init__
Nov 01 12:42:58 raspberrypi weewx[2939]:   
self.setupStation(config_dict)
Nov 01 12:42:58 raspberrypi weewx[2939]: File 
"/usr/share/weewx/weewx/engine.py", line 95, in setupStation
Nov 01 12:42:58 raspberrypi weewx[2939]:   __import__(driver)
Nov 01 12:42:58 raspberrypi weewx[2939]: File 
"/usr/share/weewx/user/sdr.py", line 1
Nov 01 12:42:58 raspberrypi weewx[2939]:   opyright 2016-2017 
Matthew Wall
Nov 01 12:42:58 raspberrypi weewx[2939]:   ^
Nov 01 12:42:58 raspberrypi weewx[2939]:   SyntaxError: invalid 
syntax
root@raspberrypi:/usr/share/weewx/user#

Thanks

Andy

On Wednesday, 1 November 2017 11:47:59 UTC, Ian A wrote:
>
> Andy
> All I can suggest is that you try replacing  obj.get('station_id') with 
> obj.get('id') in line 726 then save and rerun the script.
> Maybe this is yet another variation in the rtl_433 device
>
> Ian
>
> On Wednesday, November 1, 2017 at 8:21:00 PM UTC+11, Andrew Dibbins wrote:
>>
>> Hi Ian,
>>
>> Thanks for your help, here.
>>
>> I've changed the Identifier in lines 775/776 as you suggested, I'm still 
>> seeing the none records.
>>
>> I've attached the out from the rtl_433 command, that seems OK in my 
>> limited opinion, so I assume the problem exists within the sdr.py script ?
>>
>> Thanks
>>
>> Andy
>>
>> On 1 November 2017 at 07:58, Ian A  wrote:
>>
>>> Looks like the station ID isn't being passed  "should be "0119" where 
>>> its currently displaying "NONE"
>>>
>>> As i understand it the "input" taged  lines are the json nput to sdr.py 
>>> from rtl_433 and the "passed" lines are the data as passed to WEEWX
>>>
>>> You could try uncommenting line 775 of /usr/share/weewx/user/sdr.py and 
>>> commenting out line 776 then try executing sdr.py again,
>>>
>>>  If that fails maybe show a dump of just "sudo rtl_433 -q -U -F json -G 
>>> -R 32"
>>>
>>> Ian
>>>
>>>
>>>
>>> On Wednesday, November 1, 2017 at 9:39:32 AM UTC+11, Andrew Dibbins 
>>> wrote:

 Hi Ian,

 Here's the output from sdr.py command.

 How should we interpret it ?

 Thanks

 Andy

 On 31/10/2017 22:21, Ian A wrote:

 The mappings looks ok, mine look like this:  windGust = 
 wind_gust.37.FOWH1050Packet 

 What do you get when you with <   sudo PYTHONPATH=/usr/share/weewx 
 python /usr/share/weewx/user/sdr.py --cmd="rtl_433 -q -U -F json -G -R 32" 
  
 >

 You may have to check those paths are correct for your install.

 Ian
 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "weewx-user" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/weewx-user/w0a6M2RXTkI/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 weewx-user+...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


 -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/weewx-user/w0a6M2RXTkI/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> weewx-user+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] weewx and change to mysql

2017-11-01 Thread 'Holm Dittrich' via weewx-user
So I have to restart this discussion

Hello,
I need your help again.
I would like change the database from sqlite to mysql.

The changes into .conf is no problem. Change and save.

  [[wx_binding]]
 # The database should match one of 
the sections in [Databases]
database = *archive_mysql*

*Please tell me which other doings I have to make into the .conf file.*

If I go step by step the weewx user guide for mysql I see that a have to 
install  * sudo apt-get install python-mysqldb* This is reday 
but if I controle it with *python -c "import MySQLdb" *  I get 
the issue Name Error: name 'importMysqldb' is not defined


My problems starts with the creation of the weewx mysql database.

I set the following line into the console:  
  mysql CREATE USER 'weewx'@'localhost' 
IDENTIFIED BY 'weewx';
  mysql GRANT select, update, create, 
delete, insert, drop ON weewx.* TO weewx@localhost;



I know it is easy for you but I don`t know how go one next step.

Thanks for your support.

Holm

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: weewx and weewx-sdr - problems

2017-11-01 Thread mwall


On Wednesday, November 1, 2017 at 7:47:59 AM UTC-4, Ian A wrote:
>
> Andy
> All I can suggest is that you try replacing  obj.get('station_id') with 
> obj.get('id') in line 726 then save and rerun the script.
> Maybe this is yet another variation in the rtl_433 device
>
> Ian
>
>>
>>
andy,

ian's suggestion should work.  it looks like 'station_id' became 'id' in a 
change to rtl_433.

i have released weewx-sdr 0.37 with a fix that should work with either the 
old or new rtl_433

m 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] weewx and change to mysql

2017-11-01 Thread 'Holm Dittrich' via weewx-user
If I wrote:

mysql -u root -p
  Enter password: 
I get the Issue:  ERROR 2002 (HY000): Can`t connect to local MySQLK server 
through socket '/var/run/mysqld/mysqld.sock

What does it mean?

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] weewx and change to mysql

2017-11-01 Thread 'Holm Dittrich' via weewx-user
Sorry but I have to use mysql. We need the datas on our website and can`t 
user html files as I create now via sqlite.

this step are finshed

  mysql CREATE USER 'weewx'@'localhost' 
IDENTIFIED BY 'weewx';
  mysql GRANT select, update, create, 
delete, insert, drop ON weewx.* TO weewx@localhost;

after the first line it came a long text, after the secound line came 
nothing.

Then I restart weewx but it didn`t work

h

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: weewx and weewx-sdr - problems

2017-11-01 Thread Ian A
Andy
All I can suggest is that you try replacing  obj.get('station_id') with 
obj.get('id') in line 726 then save and rerun the script.
Maybe this is yet another variation in the rtl_433 device

Ian

On Wednesday, November 1, 2017 at 8:21:00 PM UTC+11, Andrew Dibbins wrote:
>
> Hi Ian,
>
> Thanks for your help, here.
>
> I've changed the Identifier in lines 775/776 as you suggested, I'm still 
> seeing the none records.
>
> I've attached the out from the rtl_433 command, that seems OK in my 
> limited opinion, so I assume the problem exists within the sdr.py script ?
>
> Thanks
>
> Andy
>
> On 1 November 2017 at 07:58, Ian A > wrote:
>
>> Looks like the station ID isn't being passed  "should be "0119" where its 
>> currently displaying "NONE"
>>
>> As i understand it the "input" taged  lines are the json nput to sdr.py 
>> from rtl_433 and the "passed" lines are the data as passed to WEEWX
>>
>> You could try uncommenting line 775 of /usr/share/weewx/user/sdr.py and 
>> commenting out line 776 then try executing sdr.py again,
>>
>>  If that fails maybe show a dump of just "sudo rtl_433 -q -U -F json -G 
>> -R 32"
>>
>> Ian
>>
>>
>>
>> On Wednesday, November 1, 2017 at 9:39:32 AM UTC+11, Andrew Dibbins wrote:
>>>
>>> Hi Ian,
>>>
>>> Here's the output from sdr.py command.
>>>
>>> How should we interpret it ?
>>>
>>> Thanks
>>>
>>> Andy
>>>
>>> On 31/10/2017 22:21, Ian A wrote:
>>>
>>> The mappings looks ok, mine look like this:  windGust = 
>>> wind_gust.37.FOWH1050Packet 
>>>
>>> What do you get when you with <   sudo PYTHONPATH=/usr/share/weewx 
>>> python /usr/share/weewx/user/sdr.py --cmd="rtl_433 -q -U -F json -G -R 32"  
>>> >
>>>
>>> You may have to check those paths are correct for your install.
>>>
>>> Ian
>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/weewx-user/w0a6M2RXTkI/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> weewx-user+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/w0a6M2RXTkI/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> weewx-user+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] weewx and change to mysql

2017-11-01 Thread Thomas Keffer
If you do not know how to administer a MySQL database, I would strongly
suggest sticking with sqlite. It's much simpler.

-tk

On Wed, Nov 1, 2017 at 3:21 AM, 'Holm Dittrich' via weewx-user <
weewx-user@googlegroups.com> wrote:

> Hello,
> I need your help again.
> I would like change the database from sqlite to mysql.
>
> My result should be to have the weather data`s into my database from my
> website
>
> The changes into .conf is no problem. Change and save.
>
>   [[wx_binding]]
>  # The database should match one
> of the sections in [Databases]
> database = *archive_mysql*
>
> My problems starts with the creation of the weewx mysql database.
>
> Where and how can i write following - into the console?:
>   mysql> CREATE USER 'weewx'@'localhost'
> IDENTIFIED BY 'weewx';
>   mysql> GRANT select, update, create,
> delete, insert, drop ON weewx.* TO weewx@localhost;
>
> I know it is easy for you but I don`t know how go one next step.
>
> Thanks for your support.
>
> Holm
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: weewx and change to mysql

2017-11-01 Thread Andrew Milner
via the MySQL client

http://www.dummies.com/programming/databases/how-to-use-the-mysql-client/



On Wednesday, 1 November 2017 12:21:48 UTC+2, Holm Dittrich wrote:

> Hello,
> I need your help again.
> I would like change the database from sqlite to mysql.
>
> My result should be to have the weather data`s into my database from my 
> website
>
> The changes into .conf is no problem. Change and save.
>
>   [[wx_binding]]
>  # The database should match one 
> of the sections in [Databases]
> database = *archive_mysql*
>
> My problems starts with the creation of the weewx mysql database.
>
> Where and how can i write following - into the console?:  
>   mysql> CREATE USER 'weewx'@'localhost' 
> IDENTIFIED BY 'weewx';
>   mysql> GRANT select, update, create, 
> delete, insert, drop ON weewx.* TO weewx@localhost;
>
> I know it is easy for you but I don`t know how go one next step.
>
> Thanks for your support.
>
> Holm
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] weewx and change to mysql

2017-11-01 Thread 'Holm Dittrich' via weewx-user
Hello,
I need your help again.
I would like change the database from sqlite to mysql.

My result should be to have the weather data`s into my database from my 
website

The changes into .conf is no problem. Change and save.

  [[wx_binding]]
 # The database should match one of 
the sections in [Databases]
database = *archive_mysql*

My problems starts with the creation of the weewx mysql database.

Where and how can i write following - into the console?:  
  mysql> CREATE USER 'weewx'@'localhost' 
IDENTIFIED BY 'weewx';
  mysql> GRANT select, update, create, 
delete, insert, drop ON weewx.* TO weewx@localhost;

I know it is easy for you but I don`t know how go one next step.

Thanks for your support.

Holm

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Air quality sensors?

2017-11-01 Thread 'pterodaktil' via weewx-user
я wrote  this  to   get data   to  database.

CREATE TABLE IF NOT EXISTS `data` (
  `unixtime` bigint(20) NOT NULL,
  `pm25` int(11) NOT NULL,
  `pm10` int(11) NOT NULL,
  `hcho` float NOT NULL,
  `voc` float NOT NULL,
  `co2` int(11) NOT NULL,
  `temp` float NOT NULL,
  `humidity` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



script   to  import  it 

#!/usr/bin/python
import os
import time
import serial
import MySQLdb
import statistics
db = MySQLdb.connect(host="127.0.0.1", 
 port=3306,
 user="user", # username
  passwd="password", # password
  db="air") # name of the database
 
cur = db.cursor()
ser = serial.Serial( '/dev/ttyUSB0', 9600, timeout=10 )
a=1
while a==1:
pm25 = [] 
pm10 = []
hcho = []
voc = []
co2 = []
temp = []
humidity =[]
for i in range(64):  
s = ser.readline()
sa = s.split(',')
if len(sa) == 8:
pm25.append(float(sa[0]))
pm10.append(float(sa[1]))
hcho.append(float(sa[2]))
voc.append(float(sa[3]))
co2.append(float(sa[4]))
temp.append(float(sa[5]))
humidity.append(float(sa[6]))
summ = float(sa[7])
 
unixtime = long(time.time())
pm25med=statistics.median(pm25) 
pm10med=statistics.median(pm10)
hchomed=statistics.median(hcho) 
vocmed=statistics.median(voc)
co2med=statistics.median(co2)
tempmed=statistics.median(temp)
humiditymed=statistics.median(humidity)
print (pm25med)
print (pm25)
a=2

cur.execute( 
'INSERT INTO data '
'(unixtime, pm25, pm10, hcho, voc, co2, temp, humidity)'
'VALUES'
'(%s, %s, %s, %s, %s, %s, %s, %s)',
(unixtime, pm25med, pm10med, hchomed,  vocmed,  co2med, tempmed, 
humiditymed))
db.commit()

db.close()  
   
print('end')



среда, 5 апреля 2017 г., 19:29:27 UTC+3 пользователь Horacio написал:
>
> Привет, Ив
>
> Если устройство отправляет данные через USB-порт, и если формат записи не 
> слишком сложный, можно было бы написать служебную программу для получения 
> данных.
>
> Это более дешевый датчик CO2, но вам понадобится MCU, например, Arduino 
> между датчиком и ПК.
> http://www.ebay.ca/sch/i.html?_odkw=co2+sensor&_osacat=0&_
> from=R40&_trksid=p2045573.m570.l1313.TR12.TRC2.A0.H0.
> XMG811.TRS0&_nkw=MG811&_sacat=0
>
> Я надеюсь, это поможет вам
>
>
> Во вторник, 4 апреля 2017 года в 6:44:40 вечера UTC-3, Ив Мартин писал:
>>
>> Здравствуй,
>>
>> Просто простой вопрос о «качестве воздуха», потому что в настоящее время 
>> он является важным фактором здоровья в городах. Я использую Vantage Pro 
>> с 10 лет, и эта станция является скалой ... она никогда не подводила и не 
>> давала точной информации.
>>
>> Есть ли какой-то проект, который можно использовать с «weewx» для такого 
>> рода информации? Это вид датчика качества воздуха, который я нашел на 
>> eBay:  http://www.ebay.ca/itm/ 132141883335? _trksid = p2060353. m1438.l2649 
>> & ssPageName = STRK% 3 AMEBIDX% 3AIT 
>> 
>>  
>> (2017 AirMaster2 AM7 главный воздух CO2 лазер pm2.5 формальдегид контроль 
>> качества воздуха). Есть ли способ интегрировать это с weewx?
>>
>> Ив,
>> YMartin.com/meteo
>> КАНАДА
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: weewx and weewx-sdr - problems

2017-11-01 Thread Andrew Dibbins
Hi Ian,

Thanks for your help, here.

I've changed the Identifier in lines 775/776 as you suggested, I'm still
seeing the none records.

I've attached the out from the rtl_433 command, that seems OK in my limited
opinion, so I assume the problem exists within the sdr.py script ?

Thanks

Andy

On 1 November 2017 at 07:58, Ian A  wrote:

> Looks like the station ID isn't being passed  "should be "0119" where its
> currently displaying "NONE"
>
> As i understand it the "input" taged  lines are the json nput to sdr.py
> from rtl_433 and the "passed" lines are the data as passed to WEEWX
>
> You could try uncommenting line 775 of /usr/share/weewx/user/sdr.py and
> commenting out line 776 then try executing sdr.py again,
>
>  If that fails maybe show a dump of just "sudo rtl_433 -q -U -F json -G -R
> 32"
>
> Ian
>
>
>
> On Wednesday, November 1, 2017 at 9:39:32 AM UTC+11, Andrew Dibbins wrote:
>>
>> Hi Ian,
>>
>> Here's the output from sdr.py command.
>>
>> How should we interpret it ?
>>
>> Thanks
>>
>> Andy
>>
>> On 31/10/2017 22:21, Ian A wrote:
>>
>> The mappings looks ok, mine look like this:  windGust =
>> wind_gust.37.FOWH1050Packet
>>
>> What do you get when you with <   sudo PYTHONPATH=/usr/share/weewx
>> python /usr/share/weewx/user/sdr.py --cmd="rtl_433 -q -U -F json -G -R 32"
>> >
>>
>> You may have to check those paths are correct for your install.
>>
>> Ian
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/weewx-user/w0a6M2RXTkI/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> weewx-user+...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/w0a6M2RXTkI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


rtl_433.out
Description: Binary data


sdr2.py.out
Description: Binary data


[weewx-user] WX data not send to APRS system

2017-11-01 Thread gjr80
Hi,

It could be a problem anywhere between your weather station and the APRS server 
:). It's impossible to say anything further without more information.

I recommend you set debug=1 in weewx.conf, stop then start weeWX. Let weeWX run 
for a few archive periods the post a log extract from weeWX start onwards. Make 
sure you include the weeWX startup and then we can see what is going on.

Gary

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] WX data not send to APRS system

2017-11-01 Thread Pavel Sticha
Hello. I have weewx installed on Ubuntu OS. I have a registered APRS / CWOP 
PIN and seting in configuration. But the data do not write to APRS. Where 
can be a problem?

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: weewx and weewx-sdr - problems

2017-11-01 Thread Ian A
Looks like the station ID isn't being passed  "should be "0119" where its 
currently displaying "NONE"

As i understand it the "input" taged  lines are the json nput to sdr.py 
from rtl_433 and the "passed" lines are the data as passed to WEEWX

You could try uncommenting line 775 of /usr/share/weewx/user/sdr.py and 
commenting out line 776 then try executing sdr.py again,

 If that fails maybe show a dump of just "sudo rtl_433 -q -U -F json -G -R 
32"

Ian



On Wednesday, November 1, 2017 at 9:39:32 AM UTC+11, Andrew Dibbins wrote:
>
> Hi Ian,
>
> Here's the output from sdr.py command.
>
> How should we interpret it ?
>
> Thanks
>
> Andy
>
> On 31/10/2017 22:21, Ian A wrote:
>
> The mappings looks ok, mine look like this:  windGust = 
> wind_gust.37.FOWH1050Packet 
>
> What do you get when you with <   sudo PYTHONPATH=/usr/share/weewx 
> python /usr/share/weewx/user/sdr.py --cmd="rtl_433 -q -U -F json -G -R 32"  
> >
>
> You may have to check those paths are correct for your install.
>
> Ian
> -- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/weewx-user/w0a6M2RXTkI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> weewx-user+...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Air quality sensors?

2017-11-01 Thread 'pterodaktil' via weewx-user
Best air  sensor   i see is airmaster  am7/ My  review  on  it  in russain  
https://mysku.ru/blog/taobao/40456.html Hope  google translate  can  help 
you
And  it can write to pc. I  write  simple  script  to   write  in database. 
Not weewx  but...

среда, 1 ноября 2017 г., 0:06:30 UTC+3 пользователь Yves Martin написал:
>
> This is really interesting... but I'm not a programmer,... so the code to 
> be written is not my cup of tea. Because of the Air quality, especially in 
> large cities, becomes a big issue, I hope some will write something someday 
> for Raspberry Pi (the most useful platform), I already use for Weewx but 
> also for my Radio with APRS ...
>
> I found also this very compact module made by Xiaomi: 
> https://xiaomi-mi.com/air-and-water-purifiers/xiaomi-mi-pm25-detector-white/
>
> Yves,
> YMartin.com/meteo
>
> Le lundi 17 avril 2017 15:52:29 UTC-4, Paul Bartholdi a écrit :
>>
>> Hello,   if this is still open, you may be interested with the 
>> "Yoctopuce" modules. " http://www.yoctopuce.com/EN/ ". They include CO_2 
>> and volatile air sensors in very tiny boards interconnected via USB. They 
>> are produced in Geneva/Switzerland, supposed of high quality, but at a 
>> rather reasonable price. One module includes barometer, temperature and 
>> humidity for < 75 US$... on a board of 20x60mm, including connector.
>> Hope this helps! Paul
>>
>> On Tuesday, April 4, 2017 at 11:44:40 PM UTC+2, Yves Martin wrote:
>>>
>>> Hi,
>>>
>>> Just a simple question about "air quality", because it is nowadays an 
>>> important health factor in the cities. I'm using a Vantage Pro since 10 
>>> years now, and this station is a rock... it never failed and gives accurate 
>>> information.
>>>
>>> Is there a kind of project that could be used with "weewx" for this kind 
>>> of information? This is the kind of air quality sensor I found on eBay: 
>>> http://www.ebay.ca/itm/132141883335?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT
>>>  
>>> (2017 AirMaster2 AM7 master air CO2 laser pm2.5 formaldehyde air quality 
>>> testing). Is there a way to integrate this with weewx?
>>>
>>> Yves,
>>> YMartin.com/meteo
>>> CANADA
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.