Actually I will run my getrain.py as a service so all I will need to do is
access the ramdisk.
Nev
On Monday, May 25, 2020 at 3:58:17 PM UTC+10, Neville Davis wrote:
>
> I have managed to hack owget.py to output directly to a csv file I create
> in a ramdisk...and I get this by not entering any arguments..so a simple
> call to to owget.py.
>
> Using this csv I will pull the data into my main sensor reading file..
>
> The csv holds the correct data but I get some extra characters I will have
> to mask...so getting there :)
>
> Neville
>
> On Monday, May 25, 2020 at 11:37:59 AM UTC+10, Neville Davis wrote:
>>
>> I have almost everything working in version 4, all my i2C modules are
>> detected wind sensors air-conditioning data etc all except my 1wire rain
>> system.
>> Everything is setup for python 3 so I understand from other posts of the
>> issue with python-ow.
>> I installed ow-server and pyownet and I get this from the command prompt
>>
>> *pi@raspberrypi*:*/home/sensorreadings $* python getrain.py
>> //localhost:4304/1D.E3AB0D000000/counter.B
>>
>> 16570
>>
>> *pi@raspberrypi*:*/home/sensorreadings $*
>>
>> which is great and does show correct bucket tip info.
>>
>> What I am now attempting to do (with very little success , i am blaming
>> my age(75) :) is how to get the command line arguments required with the
>> owget.py script and call that script from my main sensordata.py script
>> (this collects all data from i2C network and wind.
>>
>> What I want to end up with e.g 16570 returned to my main script and I
>> process it further from there.
>>
>> I have been looking at subprocess but I am way over my head and any
>> guidance would be appreciated.
>>
>>
>> Neville
>>
>> On Thursday, May 21, 2020 at 6:32:25 PM UTC+10, Neville Davis wrote:
>>>
>>> Thanks very much Gary,,,,
>>>
>>> Nev
>>>
>>> On Thursday, May 21, 2020 at 5:45:16 PM UTC+10, gjr80 wrote:
>>>>
>>>> You did a setup.py install so just install 3.9.1 over the top. The user
>>>> directory won't be touched and of course backup your data. Might be
>>>> worthwhile looking at the log rather than the abbreviated systemctl
>>>> view, the last part of the systemctl output tells me nothing, there
>>>> almost certainly will be more in the log.
>>>>
>>>> A tip for posting logs too, rather than using systemctl status weewx
>>>> run another terminal and tail the WeeWX log file (nominally
>>>> /var/log/syslog) in that terminal with something like tail -f -n50
>>>> /var/log/syslog and take copies as required or edit and copy from the
>>>> log file. that way you can get a longer log extract not the 'looking
>>>> through a straw' view that systemctl gives you.
>>>>
>>>> Gary
>>>>
>>>> On Thursday, 21 May 2020 17:35:55 UTC+10, Neville Davis wrote:
>>>>>
>>>>> Well done those edits that problem with my driver cleared others have
>>>>> happened. I then tried to run on simulator and I get
>>>>>
>>>>> *●* weewx.service - LSB: weewx weather system
>>>>>
>>>>> Loaded: loaded (/etc/init.d/weewx)
>>>>>
>>>>> Active: *active (exited)* since Thu 2020-05-21 16:20:37 AEST; 1h
>>>>> 9min ago
>>>>>
>>>>> Process: 426 ExecStart=/etc/init.d/weewx start (code=exited,
>>>>> status=0/SUCCESS)
>>>>>
>>>>>
>>>>> May 21 16:20:37 raspberrypi weewxd[558]: *weewx[558] CRITICAL
>>>>> __main__: **** if console and hasattr(console, 'hardware_name'):*
>>>>>
>>>>> May 21 16:20:37 raspberrypi weewxd[558]: *weewx[558] CRITICAL
>>>>> __main__: **** File "/home/weewx/bin/weewx/drivers/__init__.py",
>>>>> line 17, in hardware_name*
>>>>>
>>>>> May 21 16:20:37 raspberrypi weewxd[558]: *weewx[558] CRITICAL
>>>>> __main__: **** raise NotImplementedError("Property
>>>>> 'hardware_name'
>>>>> not implemented")*
>>>>>
>>>>> May 21 16:20:37 raspberrypi weewxd[558]: *weewx[558] CRITICAL
>>>>> __main__: **** NotImplementedError: Property 'hardware_name' not
>>>>> implemented*
>>>>>
>>>>> May 21 16:20:37 raspberrypi weewxd[558]: *weewx[558] CRITICAL
>>>>> __main__: **** Exiting.*
>>>>>
>>>>> May 21 16:39:53 raspberrypi systemd[1]: Started LSB: weewx weather
>>>>> system.
>>>>>
>>>>> May 21 16:48:24 raspberrypi systemd[1]: Started LSB: weewx weather
>>>>> system.
>>>>>
>>>>> May 21 16:58:44 raspberrypi systemd[1]: Started LSB: weewx weather
>>>>> system.
>>>>>
>>>>> May 21 17:25:32 raspberrypi systemd[1]: Started LSB: weewx weather
>>>>> system.
>>>>>
>>>>> May 21 17:30:24 raspberrypi systemd[1]: Started LSB: weewx weather
>>>>> system.
>>>>>
>>>>> *pi@raspberrypi*:*/home/weewx/bin/weewx/drivers $*
>>>>> So now I have a bit of work to do.
>>>>> I have another system I have started to build up so will proceed with
>>>>> that get the basic system working then find out why I am having issues
>>>>> with
>>>>> my driver.
>>>>>
>>>>> Don' suppose there is a quick revert to version 3.9.1 ?? in the interim
>>>>>
>>>>> Nev
>>>>>
>>>>> On Thursday, May 21, 2020 at 2:51:39 PM UTC+10, Neville Davis wrote:
>>>>>>
>>>>>> the following from setup and status
>>>>>>
>>>>>> copying util/import/cumulus-example.conf -> /home/weewx/util/import
>>>>>>
>>>>>> copying util/launchd/com.weewx.weewxd.plist ->
>>>>>> /home/weewx/util/launchd
>>>>>>
>>>>>> creating /home/weewx/util/default
>>>>>>
>>>>>> copying util/default/weewx -> /home/weewx/util/default
>>>>>>
>>>>>> running install_egg_info
>>>>>>
>>>>>> Writing /home/weewx/bin/weewx-4.0.0.egg-info
>>>>>>
>>>>>> Traceback (most recent call last):
>>>>>>
>>>>>> File "/home/weewx/bin/wee_config", line 12, in <module>
>>>>>>
>>>>>> import weeutil.logger
>>>>>>
>>>>>> File "/home/weewx/bin/weeutil/logger.py", line 14, in <module>
>>>>>>
>>>>>> import configobj
>>>>>>
>>>>>> ImportError: No module named 'configobj'
>>>>>>
>>>>>> *pi@raspberrypi*:*~ $* sudo systemctl status weewx
>>>>>>
>>>>>> *●* weewx.service - LSB: weewx weather system
>>>>>>
>>>>>> Loaded: loaded (/etc/init.d/weewx)
>>>>>>
>>>>>> Active: *failed* (Result: exit-code) since Thu 2020-05-21
>>>>>> 14:41:54 AEST; 50s ago
>>>>>>
>>>>>> Process: 422 ExecStart=/etc/init.d/weewx start *(code=exited,
>>>>>> status=1/FAILURE)*
>>>>>>
>>>>>>
>>>>>> May 21 14:41:54 raspberrypi weewx[422]: Starting weewx weather
>>>>>> system: weewxTraceback (most recent call last):
>>>>>>
>>>>>> May 21 14:41:54 raspberrypi weewx[422]: File
>>>>>> "/home/weewx/bin/weewxd", line 21, in <module>
>>>>>>
>>>>>> May 21 14:41:54 raspberrypi weewx[422]: import weecfg
>>>>>>
>>>>>> May 21 14:41:54 raspberrypi weewx[422]: File
>>>>>> "/home/weewx/bin/weecfg/__init__.py", line 22, in <module>
>>>>>>
>>>>>> May 21 14:41:54 raspberrypi weewx[422]: import configobj
>>>>>>
>>>>>> May 21 14:41:54 raspberrypi weewx[422]: ImportError: No module named
>>>>>> 'configobj'
>>>>>>
>>>>>> May 21 14:41:54 raspberrypi weewx[422]: failed!
>>>>>>
>>>>>> May 21 14:41:54 raspberrypi systemd[1]: *weewx.service: control
>>>>>> process exited, code=exited status=1*
>>>>>>
>>>>>> May 21 14:41:54 raspberrypi systemd[1]: *Failed to start LSB: weewx
>>>>>> weather system.*
>>>>>>
>>>>>> May 21 14:41:54 raspberrypi systemd[1]: *Unit weewx.service entered
>>>>>> failed state.*
>>>>>>
>>>>>>
>>>>>> *What have I forgotten to do ???*
>>>>>>
>>>>>> *Nev*
>>>>>>
>>>>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/48251abc-e294-4ab1-887b-b7fc919be3a2%40googlegroups.com.