Re: [weewx-user] fousb issue with raspberry pi and stretch.......maybe

2018-11-09 Thread vince
On Friday, November 9, 2018 at 3:13:25 PM UTC-8, ianpre...@gmail.com wrote:
>
> Would there be any raspberry pi / apt-get gurus willing to give me some 
> guidance on how to find/replace/install an older version python library 
> file over a newer version.
>
>>
>>
google "pip install older version of package 
"
 
if you used pip
google "apt-get install older version of package" if you used a 
pre-packaged library
 

-- 
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: how to send more data to cwop

2018-11-09 Thread Jose Luiz Kotch
Sorry, is not possible, I'm wrong!

Em sexta-feira, 9 de novembro de 2018 21:39:34 UTC-2, Jose Luiz Kotch 
escreveu:
>
>
>
> Em sexta-feira, 9 de novembro de 2018 00:06:30 UTC-2, gjr80 escreveu:
>>
>> Oi,
>>
>> Tenha em mente que eu estou do outro lado do mundo e não uso o CWOP, mas 
>> tanto quanto eu posso dizer, o CWOP aceita dados de radiação solar (também 
>> conhecidos como radiação em termos de weeWX), mas não dados UV. Claro 
>> que eu posso estar errado :)
>>
>> O uploader WeeWX CWOP não permite que o usuário inclua dados UV sem 
>> modificar o código weeWX. É um trabalho fácil incluir UV e se você puder 
>> fornecer um link que indique que o CWOP aceita dados UV e o formato usado, 
>> eu ficaria feliz em examiná-lo ainda mais.
>>
>> Gary
>>
>> Na quarta-feira, 7 de novembro de 2018 21:56:32 UTC + 10, Jose Luiz Kotch 
>> escreveu:
>>>
>>> Olá a todos, gostaria de enviar mais dados pro cwop como UV, onde faço 
>>> esta modificação
>>>
>>> obrigado!
>>>
>>

-- 
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: how to send more data to cwop

2018-11-09 Thread Jose Luiz Kotch


Em sexta-feira, 9 de novembro de 2018 00:06:30 UTC-2, gjr80 escreveu:
>
> Oi,
>
> Tenha em mente que eu estou do outro lado do mundo e não uso o CWOP, mas 
> tanto quanto eu posso dizer, o CWOP aceita dados de radiação solar (também 
> conhecidos como radiação em termos de weeWX), mas não dados UV. Claro que 
> eu posso estar errado :)
>
> O uploader WeeWX CWOP não permite que o usuário inclua dados UV sem 
> modificar o código weeWX. É um trabalho fácil incluir UV e se você puder 
> fornecer um link que indique que o CWOP aceita dados UV e o formato usado, 
> eu ficaria feliz em examiná-lo ainda mais.
>
> Gary
>
> Na quarta-feira, 7 de novembro de 2018 21:56:32 UTC + 10, Jose Luiz Kotch 
> escreveu:
>>
>> Olá a todos, gostaria de enviar mais dados pro cwop como UV, onde faço 
>> esta modificação
>>
>> obrigado!
>>
>

-- 
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] fousb issue with raspberry pi and stretch.......maybe

2018-11-09 Thread ianprescott10
aaahhh! (a light bulb moment)
So because I grabbed the latest version of stretch (complete with a later 
version of pyusb) the later version of pyusb is not compatible with your 
usb utility, and by assumption and for the same reason the fineoffset usb 
driver used by weewx also has an issue. 

from the jessie version I get
pi@weatherpi:~ $ apt list pyusb
Listing... Done
pi@weatherpi:~ $ apt -h
apt 1.0.9.8.4 for armhf compiled on Dec 13 2016 22:26:22
Usage: apt [options] command

CLI for apt.
Basic commands: 
 list - list packages based on package names
 search - search in package descriptions
 show - show package details

 update - update list of available packages

 install - install packages
 remove  - remove packages

 upgrade - upgrade the system by installing/upgrading packages
 full-upgrade - upgrade the system by removing/installing/upgrading packages

 edit-sources - edit the source information file
pi@weatherpi:~ $ apt search pyusb
Sorting... Done
Full Text Search... Done
python-usb/oldstable,now 0.4.3-1 armhf [installed,automatic]
  USB interface for Python

pi@weatherpi:~ $

and from the stretch version I get

pi@weatherpi:~ $ apt search pyusb
Sorting... Done
Full Text Search... Done
pypy-libusb1/stable 1.6.3-1 all
  Python wrapper for libusb1 (PyPy)

python-libusb1/stable 1.6.3-1 all
  Python wrapper for libusb1 (Python 2)

python3-libusb1/stable 1.6.3-1 all
  Python wrapper for libusb1 (Python 3)

python3-usb/stable 1.0.0-1 all
  USB interface for Python (Python3)

pi@weatherpi:~ $ apt list pyusb
Listing... Done
pi@weatherpi:~ $

Ok so I am in way over my head now. I have no idea on how to change 
from the current pyusb to a older version.
I did a  "find / -name *us*.py on the stretch version and got back (along 
with a lot of other stuff)
/usr/lib/python2.7/dist-packages/usb/backend/libusb1.py
/usr/lib/python2.7/dist-packages/usb/backend/openusb.py
/usr/lib/python2.7/dist-packages/usb/backend/libusb0.py

these were the only files that had any usb flavor. 
Would there be any raspberry pi / apt-get gurus willing to give me some 
guidance on how to find/replace/install an older version python library 
file over a newer version.

Thanks M for your help and patience... it took me a while before it 
clicked on what was happening.

On Friday, 9 November 2018 22:59:01 UTC+10, mwall wrote:
>
>
>
> On Friday, November 9, 2018 at 7:24:29 AM UTC-5, ianprescott10 wrote:
>>
>> Hi
>>
>> check the pyusb version on each os.  this is due to a difference in the 
>> pyusb version, not jessie vs stretch.
>>
>> I am using the same usb utility u wrote to test the 4 port usb hub using 
>> either stretch or jessie.
>> It works on jessie but not on stretch as shown below. (the hardware 
>> remains the same)
>>
>
> the utility only works with pyusb 0.x, not pyusb 1.x.  this is because 
> pyusb 1.x removed the bus and device numbers.
>
>
>  
>
>> So I am confused now, u mentioned pyusb 1.x,  so is this your usb 
>> utility (later version) or some other code supplied with the os???   and 
>> how do I check.
>> I am only using your usb utility (usb_control-0.6.py) as a test, I rely 
>> on weewx fousb to do power cycling in the event of a usb lockup.
>> The log shows *Nov  6 18:23:36 weatherpi weewx[2689]: fousb: found 
>> station on USB bus= device=*
>> So is this pyusb code issue or weewx fousb issue??
>>
>
> pyusb is a python library for communicating with usb.  you either 
> installed it as a system package using apt or yum, or you installed it 
> using pip.  or maybe it came with your system.
>
> if you installed using pip, you can get the version using 'pip freeze':
>
> pip freeze | grep usb
>
> if you installed using apt or yum, then use your package manager to figure 
> out the version.  for example:
>
> rpm -qa | grep usb
>
> or 
>
> apt list pyusb
>
>  
>
>> you should be able to run debian9 (stretch) if you install pyusb 0.4
>> So how do I get (stretch version) weewx using fineoffset usb driver to 
>> use pyusb 0.4 to power cycle a usb port lockup?
>>
>
> you need to install pyusb 0.4 on your system instead of pyusb 1.x.  do 
> this using your system's package manager (apt, yum, etc) if you manage your 
> python using system packages, or pip if you manage your python separately 
> from the system packages.
>
> 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] fousb issue with raspberry pi and stretch.......maybe

2018-11-09 Thread mwall


On Friday, November 9, 2018 at 7:24:29 AM UTC-5, ianprescott10 wrote:
>
> Hi
>
> check the pyusb version on each os.  this is due to a difference in the 
> pyusb version, not jessie vs stretch.
>
> I am using the same usb utility u wrote to test the 4 port usb hub using 
> either stretch or jessie.
> It works on jessie but not on stretch as shown below. (the hardware 
> remains the same)
>

the utility only works with pyusb 0.x, not pyusb 1.x.  this is because 
pyusb 1.x removed the bus and device numbers.


 

> So I am confused now, u mentioned pyusb 1.x,  so is this your usb 
> utility (later version) or some other code supplied with the os???   and 
> how do I check.
> I am only using your usb utility (usb_control-0.6.py) as a test, I rely 
> on weewx fousb to do power cycling in the event of a usb lockup.
> The log shows *Nov  6 18:23:36 weatherpi weewx[2689]: fousb: found 
> station on USB bus= device=*
> So is this pyusb code issue or weewx fousb issue??
>

pyusb is a python library for communicating with usb.  you either installed 
it as a system package using apt or yum, or you installed it using pip.  or 
maybe it came with your system.

if you installed using pip, you can get the version using 'pip freeze':

pip freeze | grep usb

if you installed using apt or yum, then use your package manager to figure 
out the version.  for example:

rpm -qa | grep usb

or 

apt list pyusb

 

> you should be able to run debian9 (stretch) if you install pyusb 0.4
> So how do I get (stretch version) weewx using fineoffset usb driver to use 
> pyusb 
> 0.4 to power cycle a usb port lockup?
>

you need to install pyusb 0.4 on your system instead of pyusb 1.x.  do this 
using your system's package manager (apt, yum, etc) if you manage your 
python using system packages, or pip if you manage your python separately 
from the system packages.

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] fousb issue with raspberry pi and stretch.......maybe

2018-11-09 Thread ianprescott10
Hi

check the pyusb version on each os.  this is due to a difference in the 
pyusb version, not jessie vs stretch.

I am using the same usb utility u wrote to test the 4 port usb hub using 
either stretch or jessie.
It works on jessie but not on stretch as shown below. (the hardware remains 
the same)

pi@weatherpi:~/Desktop $ sudo python usb_control-0.6.py --hub 001:005 
--port 4 --indicator 0
Traceback (most recent call last):
  File "usb_control-0.6.py", line 190, in 
main()
  File "usb_control-0.6.py", line 185, in main
docmd(CMD_INDICATOR, options.hub, options.port, options.indicator)
  File "usb_control-0.6.py", line 136, in docmd
devid = "%s:%03d" % (bus.dirname, dev.devnum)
TypeError: %d format: a number is required, not NoneType
pi@weatherpi:~/Desktop $ lsusb
Bus 001 Device 006: ID 1941:8021 Dream Link WH1080 Weather Station / USB 
Missile Launcher
Bus 001 Device 005: ID 0409:0058 NEC Corp. HighSpeed Hub
Bus 001 Device 004: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for 
Bluetooth
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 
Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So I am confused now, u mentioned pyusb 1.x,  so is this your usb 
utility (later version) or some other code supplied with the os???   and 
how do I check.
I am only using your usb utility (usb_control-0.6.py) as a test, I rely on 
weewx fousb to do power cycling in the event of a usb lockup.
The log shows *Nov  6 18:23:36 weatherpi weewx[2689]: fousb: found station 
on USB bus= device=*
So is this pyusb code issue or weewx fousb issue??

you should be able to run debian9 (stretch) if you install pyusb 0.4
So how do I get (stretch version) weewx using fineoffset usb driver to use 
pyusb 
0.4 to power cycle a usb port lockup?

So with a limited understanding so far, using the log below, weewx fousb 
(fineoffset usb driver) is attempting a power cycle of a locked up usb port 
but cannot do it because of
*Nov  6 18:23:36 weatherpi weewx[2689]: fousb: found station on USB bus= 
device= *(for the reason u mentioned above.no numbers)
this would indicate that weewx fousb (fineoffset usb driver) uses the same 
principles as your earlier versions of usb utility.
 
Nov  9 07:08:50 weatherpi weewx[3742]: fousb: Attempting to power cycle
Nov  9 07:08:50 weatherpi weewx[3742]: engine: Caught unrecoverable 
exception in engine:
Nov  9 07:08:50 weatherpi weewx[3742]:   %d format: a number is 
required, not NoneType
Nov  9 07:08:50 weatherpi weewx[3742]:   Traceback (most recent 
call last):
Nov  9 07:08:50 weatherpi weewx[3742]: File 
"/usr/share/weewx/weewx/engine.py", line 871, in main
Nov  9 07:08:50 weatherpi weewx[3742]:   engine = 
engine_class(config_dict)
Nov  9 07:08:50 weatherpi weewx[3742]: File 
"/usr/share/weewx/weewx/engine.py", line 78, in __init__
Nov  9 07:08:50 weatherpi weewx[3742]:   
self.loadServices(config_dict)
Nov  9 07:08:50 weatherpi weewx[3742]: File 
"/usr/share/weewx/weewx/engine.py", line 142, in loadServices
Nov  9 07:08:50 weatherpi weewx[3742]:   
self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Nov  9 07:08:50 weatherpi weewx[3742]: File 
"/usr/share/weewx/weewx/engine.py", line 467, in __init__
Nov  9 07:08:50 weatherpi weewx[3742]:   if software_interval 
!= self.engine.console.archive_interval:
Nov  9 07:08:50 weatherpi weewx[3742]: File 
"/usr/share/weewx/weewx/drivers/fousb.py", line 991, in archive_interval
Nov  9 07:08:50 weatherpi weewx[3742]:   return 
self._archive_interval_minutes() * 60
Nov  9 07:08:50 weatherpi weewx[3742]: File 
"/usr/share/weewx/weewx/drivers/fousb.py", line 1006, in 
_archive_interval_minutes
Nov  9 07:08:50 weatherpi weewx[3742]:   
power_cycle_station(self.pc_hub, self.pc_port)
Nov  9 07:08:50 weatherpi weewx[3742]: File 
"/usr/share/weewx/weewx/drivers/fousb.py", line 715, in power_cycle_station
Nov  9 07:08:50 weatherpi weewx[3742]:   devid = "%s:%03d" % 
(bus.dirname, dev.devnum)
Nov  9 07:08:50 weatherpi weewx[3742]:   TypeError: %d format: a 
number is required, not NoneType
Nov  9 07:08:50 weatherpi weewx[3742]:   Exiting.

So how do I get weewx fineoffset usb driver to power cycle a locked up usb 
port..or am I missing something??
Thanks




On Friday, 9 November 2018 09:52:32 UTC+10, mwall wrote:
>
> On Thursday, November 8, 2018 at 5:22:01 PM UTC-5, Ian Prescott wrote:
>>
>> sad news, weewx (stretch version) crashed this morning. It had been 
>> running for more than 24hrs.
>> I am at the end of my abilities and ask for some pointers on how to find 
>> a solution.
>> I have restored the jessie version on the raspberry pi.
>> Thanks 
>> Ian
>>
>
> the failure you 

Re: [weewx-user] Multiple errors in weewx 3.8.2

2018-11-09 Thread Jonis Maurin Ceará
Sure!
And one more info: this error (wind) happens on all skins.

pi@SkyWeather:~ $ locale
> LANG=en_GB.UTF-8
> LANGUAGE=
> LC_CTYPE="en_GB.UTF-8"
> LC_NUMERIC="en_GB.UTF-8"
> LC_TIME="en_GB.UTF-8"
> LC_COLLATE="en_GB.UTF-8"
> LC_MONETARY="en_GB.UTF-8"
> LC_MESSAGES="en_GB.UTF-8"
> LC_PAPER="en_GB.UTF-8"
> LC_NAME="en_GB.UTF-8"
> LC_ADDRESS="en_GB.UTF-8"
> LC_TELEPHONE="en_GB.UTF-8"
> LC_MEASUREMENT="en_GB.UTF-8"
> LC_IDENTIFICATION="en_GB.UTF-8"
> LC_ALL=
> pi@SkyWeather:~ $ timedatectl
>   Local time: Fri 2018-11-09 08:26:49 -02
>   Universal time: Fri 2018-11-09 10:26:49 UTC
> RTC time: n/a
>Time zone: America/Sao_Paulo (-02, -0200)
>  Network time on: yes
> NTP synchronized: yes
>  RTC in local TZ: no



Em sex, 9 de nov de 2018 às 00:53, gjr80  escreveu:

> I have not forgotten this. Definitely starting with a clean database:
>
> Nov  5 10:02:31 SkyWeather weewx[30088]: manager: Created and initialized
> table 'archive' in database 'weewx.sdb'
> Nov  5 10:02:31 SkyWeather weewx[30088]: manager: Created daily summary
> tables
>
> Interesting that the only template that fails is week.html.tmpl, all of
> its friends (index.html.tmpl, month.html.tmpl and year.html.tmpl) also
> contain wind tags but only week.html.tmpl fails. Suggests the issue is
> confined to week.wind.xxx.
>
> Can I ask you to run a couple of commands on your weeWX system and post
> the output. The commands are:
>
> locale
> timedatectl
>
>
> Gary
>
>
> On Tuesday, 6 November 2018 23:50:02 UTC+10, Jonis Maurin Ceará wrote:
>>
>> Yes, logs from fresh install yesterday.
>>
>>
>> Nov  5 10:02:31 SkyWeather weewx[30084]: engine: Initializing weewx
 version 3.8.2
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30084]: engine: Using Python 2.7.13
 (default, Sep 26 2018, 18:42:22) #012[GCC 6.3.0 20170516]
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30084]: engine: Platform
 Linux-4.14.71-v7+-armv7l-with-debian-9.4
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30084]: engine: Locale is 'en_GB.UTF-8'
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30084]: engine: pid file is
 /var/run/weewx.pid
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: engine: Using configuration
 file /etc/weewx/weewx.conf
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: engine: Loading station type
 Simulator (weewx.drivers.simulator)
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30073]: Starting weewx weather system:
 weewx.
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: engine: StdConvert target unit
 is 0x1
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: wxcalculate: The following
 values will be calculated: barometer=prefer_hardware,
 windchill=prefer_hardware, dewpoint=prefer_hardware,
 appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware,
 heatindex=prefer_hardware, maxSolarRad=prefer_hardware,
 humidex=prefer_hardware, pressure=prefer_hardware,
 inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware,
 cloudbase=prefer_hardware
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: wxcalculate: The following
 algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: engine: Archive will use data
 binding wx_binding
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: engine: Record generation will
 be attempted in 'hardware'
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: engine: Using archive interval
 of 300 seconds (specified in weewx configuration)
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: manager: Created and
 initialized table 'archive' in database 'weewx.sdb'
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: manager: Created daily summary
 tables
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: engine: Using binding
 'wx_binding' to database 'weewx.sdb'
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: manager: Starting backfill of
 daily summaries
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: restx: StationRegistry:
 Registration not requested.
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: restx: Wunderground: Posting
 not enabled.
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: restx: PWSweather: Posting not
 enabled.
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: restx: CWOP: Posting not
 enabled.
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: restx: WOW: Posting not enabled.
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: restx: AWEKAS: Posting not
 enabled.
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: engine: Starting up weewx
 version 3.8.2
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: engine: Clock error is -0.30
 seconds (positive is fast)
>>>
>>> Nov  5 10:02:31 SkyWeather weewx[30088]: engine: Starting main packet
 loop.
>>>
>>> Nov  5 10:05:16 SkyWeather weewx[30088]: manager: Added record
 2018-11-05 10:05:00 -02 (1541419500) to database 'weewx.sdb'
>>>
>>> Nov  5 10:05:16 SkyWeather weewx[30088]: