Miss any of our Open RFC calls?Watch the recordings here! »

@mangar2/sunnyportal

1.0.0 • Public • Published

Table of Contents

Meta

  • copyright: Copyright (c) 2020 Volker Böhm

  • author: Volker Böhm

  • license: This software is licensed under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. It is furnished "as is", without any support, and with no warranty, express or implied, as to its usefulness for any purpose.

SunnyPortal

Gets current production/consumption infos from sunny portal Constructs a new sunny portal object

Parameters

  • config Object configuration options
    • config.host string host of open sense map
    • config.port port portnumer of open sense map (usually 443) (optional, default 443)
    • config.user string name of the login user
    • config.password string login password
    • config.paths Object needed paths to access the specific parts of the page

Examples

const config = {
  user: 'your user',
  password: 'your password',
  host: 'www.sunnyportal.com',
  port: 443,
  paths: {
      login: '/Templates/Start.aspx',
      logout: '/Templates/Logout.aspx',
      production: '/Dashboard?_=1'
  }
}
const sunnyportal = new SunnyPortal(config)
const messages = sunnyportal.getMessages()
console.log(messages)

getMessages

Gets messages to send to the client

Returns Array<Message> Messages to send

Install

npm i @mangar2/sunnyportal

DownloadsWeekly Downloads

17

Version

1.0.0

License

LGPL-3.0-or-later

Unpacked Size

14 kB

Total Files

4

Last publish

Collaborators

  • avatar