Can I use this mechanism to store and retrieve credentials and other parameters?
In the extension’s skin include an [Extras] field under which I could have
various parameters. for example:
[Extras]
snowIP=‘192.168.1.###’
snowUser=‘me’
snowPW=‘password’
snowMAXmm=2438
then, in the extension I can grab the parameters using something like:
snowIP=self.skin_dict['Extras'][’snowIP’]
etc
thanks once more!
> On Dec 22, 2017, at 2:21 PM, Joe Percival <[email protected]> wrote:
>
> I have and executable python script on a remote raspberry pi that will get
> snow depth data from a MaxBotix TTL ultrasonic sensor (I hope) I have tested
> from the “local” machine where weewx resides using pysftp and exectute the
> program.
> The extension I’m writing merely has to connect via sftp, use the
> connection.execute() method and a list of strings is returned which I will
> process in the weewx extension to populate the new database.
> I’m using a modified version of the MaxBotix sample script on the remote
> machine. Modification was required for use with raspbian stretch on a RPi3
> I am heavily modifying the mem extension that you, Vince, and Tom put
> together for my extension.
> thanks,
> joe
>
>> On Dec 22, 2017, at 2:11 PM, mwall <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> btw, ssh is really awesome for remote access, and not just for interactive
>> shells.
>>
>> you can limit a user to run only a single application
>>
>> you can chroot a user into a jail that limits his/her access to the file
>> system
>>
>> you can enable a remote user to have sudo rights, but only for specific
>> binaries or groups
>>
>> it makes automation of tasks easy.
>>
>> perhaps best of all, it is really easy to test. the biggest gotchas are
>> usually when you put everything into a shell script - getting nested quotes
>> and variable expansion can be tricky.
>>
>> m
>>
>> --
>> 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/uFsf5r_gEYw/unsubscribe
>> <https://groups.google.com/d/topic/weewx-user/uFsf5r_gEYw/unsubscribe>.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected]
>> <mailto:[email protected]>.
>> For more options, visit https://groups.google.com/d/optout
>> <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/uFsf5r_gEYw/unsubscribe
> <https://groups.google.com/d/topic/weewx-user/uFsf5r_gEYw/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> [email protected]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout
> <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 [email protected].
For more options, visit https://groups.google.com/d/optout.