GithubHelp home page GithubHelp logo

pimatic-lcd's Introduction

pimatic

Build Status NPM version Mentioned in Awesome SmartHome

This project is no longer maintained!

pimatic is a home automation framework that runs on node.js. It provides a common extensible platform for home control and automation tasks.

Read more at pimatic.org or visit the forum.

Join the chat at https://gitter.im/pimatic/pimatic

Screenshots

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4

Getting Started

Installation instructions can be found on pimatic.org. If you need any help, please ask at the forum.

Donation

Happy with pimatic and using it every day? Consider a donation to support development and keeping the website and forum up: PayPal donate button

We promise, that pimatic will always be free to use and its code be open sourced.

Get Involved

pimatic is your opportunity to contribute to a growing OpenSource-Project.

Architecture Overview

+-------------------------------------------+
| mobile-  | rest- | cron | homeduino | ... |  Plugins (Views, Device-/Preidcates-
| frontend | api   |      |           |     |  Action-Provider, Services)
|-------------------------------------------|
| pimatic (framework)                       |  Framework
|-------------------------------------------|
| rule   | device    | (core)     | (core)  |  Model
| system | schemata  | predicates | actions |
|-------------------------------------------|
| node.js (non-blocking, async IO,          |  Low-Level Infrastructure
| event-loop, v8)                           |
+-------------------------------------------+

Extensions and Hacking

The framework is built to be extendable by plugins. If you have devices that are currently not supported please add a plugin for your devices. As well, if you have nice ideas for plugins or need support for special devices you are welcome to create an issue or submit a patch.

For plugin development take a look at the development guide and plugin template.

Feel free to ask development questions at the plugin template repository.

Copyright / License

Copyright (C) 2014-2019 Oliver Schneider <[email protected]>
and contributors


pimatic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

pimatic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with pimatic.  If not, see <http://www.gnu.org/licenses/>.

pimatic-lcd's People

Contributors

mwittig avatar sweetpi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pimatic-lcd's Issues

device connected @ /dev/usb/iowarriorX

Hi there,
it is not possible to connect 44780 display to USB Port with IOWarrior24 Device; shouldn't this also work via /dev/usb/iowarrior0 or /dev/usb/iowarrior1? thank you in advance.

init log info:
Unhandled rejection TypeError: Failed to set address
at TypeError (native)
at i2c.setAddress (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/i2c/lib/i2c.coffee:38:10)
at i2c.writeByte (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/i2c/lib/i2c.coffee:57:6)
at i2c.tryCatcher (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/release/util.js:16:23)
at i2c.ret [as writeByteAsync] (eval at (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/release/promisify.js:184:12), :13:39)
at /home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/lib/lcd.js:68:26
at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromiseCtx (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/release/promise.js:604:10)
at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/release/async.js:143:12)
at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/release/async.js:17:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)

Pimatic-LCD error Cannot write to device at i2c.writeByte

Hello,

I am facing an issue with pimatic-lcd or i2c plugin. I am using lcd to display current temperature and time based on rule every 5 seconds. After few hours lcd stops responding with following error:

debug [pimatic]: Error: Cannot write to device at i2c.writeByte (/i2c.coffee:58:10) at
i2c.tryCatcher (/root/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-
lcd/node_modules/bluebird/js/main/util.js:24:31) at i2c.ret [as writeByteAsync](eval at
%28/root/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-
lcd/node_modules/bluebird/js/main/promisify.js:154:12%29, :12:39) at /root/pimatic-
app/node_modules/pimatic-lcd/node_modules/i2c-lcd/lib/lcd.js:72:26 at tryCatcher
(/root/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-
lcd/node_modules/bluebird/js/main/util.js:24:31) at Promise._settlePromiseFromHandler
(/root/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-
lcd/node_modules/bluebird/js/main/promise.js:454:31) at Promise._settlePromiseAt
(/root/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-
lcd/node_modules/bluebird/js/main/promise.js:530:18) at Async._drainQueue (/root/pimatic-
app/node_modules/pimatic-lcd/node_modules/i2c-
lcd/node_modules/bluebird/js/main/async.js:84:12) at Async._drainQueues (/root/pimatic-
app/node_modules/pimatic-lcd/node_modules/i2c-
lcd/node_modules/bluebird/js/main/async.js:89:10) at Async.drainQueues (/root/pimatic-
app/node_modules/pimatic-lcd/node_modules/i2c-
lcd/node_modules/bluebird/js/main/async.js:14:14) at process._tickCallback (node.js:415:13

Firstly I thought that it is hardware isssue but python script is running ok
python2 /root/python-i2c-lcd/display.py test1test2test3~test4
Only pimatic restart helps but just for few hour...

Thank you for any idea how to fix it.
BR, Michal

hardcoded address?

Hi,

here is something wrong, my lcd runs on i2c-1 address 20

/usr/local/pimatic-app# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

I can display whatever i want with some python scripts,

This dont work for me
{
"plugin": "lcd",
"bus": "/dev/i2c-1",
"rows": 2,
"cols": 16
},
This also dont work:
{
"plugin": "lcd",
"bus": "/dev/i2c-1",
"address": 20,
"rows": 2,
"cols": 16
},

19:40:19.375 [pimatic-homeduino] info: Connected to homeduino device.
Possibly unhandled Error: Cannot write to device
at i2c.writeByte (/usr/local/pimatic-app/i2c.coffee:51:10)
at i2c.writeByteAsync (eval at makeNodePromisifiedEval (/usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/main/promisify.js:201:12), :12:22)
at /usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/lib/lcd.js:68:26
at tryCatch1 (/usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/main/util.js:45:21)
at Promise$_callHandler as _callHandler
at Promise$_settlePromiseFromHandler as _settlePromiseFromHandler
at Promise$_settlePromiseAt as _settlePromiseAt
at Async$_consumeFunctionBuffer as _consumeFunctionBuffer
at Async$consumeFunctionBuffer (/usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/main/async.js:40:14)
at process._tickCallback (node.js:415:13)
19:40:22.105 [pimatic] info: new device "EasyBox"...

But if i change the lcd-config-schema.coffee default and remove "address" from config.json pimatic startup without errors:

module.exports = {
title: "lcd plugin config options"
type: "object"
properties:
bus:
description: "i2c bus device"
type: "string"
default: "/dev/i2c-1"
address:
description: "address of the device"
type: "number"
default: 0x20
rows:
description: "number of rows (lines) of the LCD"
type: "number"
default: 2
cols:
description: "number of cols (characters in a line) of the LCD"
type: "number"
default: 16

but if i set a rule like this it will run and say "displaying xx on line 1" but nothing happend on line 1

"rules": [
{
"id": "aa",
"name": "aa",
"rule": "if $syssensor1.cpu changes then display "CPU: {$syssensor1.cpu}%" on lcd line 1",
"active": true,
"logging": true
}

i also see in my logs a error in the first install of pimatic-lcd:

19:17:29.044 [pimatic] info: loading plugin: "pimatic-sunrise" (0.8.0)
19:17:29.209 [pimatic-cron] info: the time is: Sat Jan 03 2015 19:17:29 GMT+0100 (CET)
19:17:29.534 [pimatic-sunrise] info: Your location is set to lat: 53.682185431, long: 9.749752655
Possibly unhandled TypeError: Failed to set address
at i2c.setAddress (/usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/i2c/lib/i2c.coffe
e:64:10)
at i2c.writeByte (/usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/i2c/lib/i2c.coffee
:81:10)
at i2c.writeByteAsync (eval at makeNodePromisifiedEval (/usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i
2c-lcd/node_modules/bluebird/js/main/promisify.js:201:12), :12:22)
at /usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/lib/lcd.js:68:26
at tryCatch1 (/usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/main/util.
js:45:21)
at Promise$_callHandler [as _callHandler](/usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_m
odules/bluebird/js/main/promise.js:660:13)
at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler](/usr/local/pimatic-app/node_modules/pimatic-lcd/n
ode_modules/i2c-lcd/node_modules/bluebird/js/main/promise.js:675:18)
at Promise$_settlePromiseAt [as _settlePromiseAt](/usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lc
d/node_modules/bluebird/js/main/promise.js:845:14)
at Async$_consumeFunctionBuffer as _consumeFunctionBuffer
at Async$consumeFunctionBuffer (/usr/local/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/bluebird/js/main/async.js:40:14)
at process._tickCallback (node.js:415:13)
19:17:29.811 [pimatic-homeduino] info: Connected to homeduino device.
19:17:38.676 [pimatic] info: new device "EasyBox"...

It looks like something (address) is hardcode or the installation was wrong...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.