• sebster6

    @mwittig said in Smart plug recommendation?:

    I’ll fix the authentication issue asap.

    Thank you very much! :)

    posted in Hardware read more
  • sebster6

    Got the plug delivered today and just tried it out - works with the official (albeit ugly) Edimax app, but I’m having problems getting it to run in Pimatic :(
    https://github.com/mwittig/pimatic-edimax/issues/24

    posted in Hardware read more
  • sebster6

    It’s working! :D
    Thanks so much, Pimatic started successfully after following the instructions above! Nevertheless, ordered a new SD card to clone my installation to…

    posted in pimatic v0.9 read more
  • sebster6

    Thanks @rikki78, I rebuilt the file and startup continues a little step further. But I guess @mwittig is right and there’s a problem with the SD card:

    pi@raspberrypi:~/pimatic-app $ sudo node /home/pi/pimatic-app/node_modules/pimatic/pimatic.js
    12:31:18.374 2017-04-21 Friday
    12:31:27.432 [pimatic] Starting pimatic version 0.9.39
    12:31:30.017 [pimatic] Startup error: SyntaxError: Unexpected token ILLEGAL
    12:31:30.017 [pimatic]>    at exports.runInThisContext (vm.js:53:16)
    12:31:30.017 [pimatic]>    at Module._compile (module.js:373:25)
    12:31:30.017 [pimatic]>    at Object.Module._extensions..js (module.js:416:10)
    12:31:30.017 [pimatic]>    at Module.load (/home/pi/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    12:31:30.017 [pimatic]>    at Function.Module._load (module.js:300:12)
    12:31:30.017 [pimatic]>    at Module.require (module.js:353:17)
    12:31:30.017 [pimatic]>    at require (internal/module.js:12:17)
    12:31:30.017 [pimatic]>    at Object.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic/node_modules/body-parser/node_modules/http-errors/index.js:17:16)
    12:31:30.017 [pimatic]>    at Module._compile (module.js:409:26)
    12:31:30.017 [pimatic]>    at Object.Module._extensions..js (module.js:416:10)
    12:31:30.017 [pimatic]>    at Module.load (/home/pi/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    12:31:30.017 [pimatic]>    at Function.Module._load (module.js:300:12)
    12:31:30.017 [pimatic]>    at Module.require (module.js:353:17)
    12:31:30.017 [pimatic]>    at require (internal/module.js:12:17)
    12:31:30.017 [pimatic]>    at Object.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic/node_modules/body-parser/lib/types/urlencoded.js:17:19)
    12:31:30.017 [pimatic]>    at Module._compile (module.js:409:26)
    12:31:30.017 [pimatic]>    at Object.Module._extensions..js (module.js:416:10)
    12:31:30.017 [pimatic]>    at Module.load (/home/pi/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    12:31:30.017 [pimatic]>    at Function.Module._load (module.js:300:12)
    12:31:30.017 [pimatic]>    at Module.require (module.js:353:17)
    12:31:30.017 [pimatic]>    at require (internal/module.js:12:17)
    12:31:30.017 [pimatic]>    at loadParser (/home/pi/pimatic-app/node_modules/pimatic/node_modules/body-parser/index.js:151:16)
    12:31:30.017 [pimatic]>    at Function.get [as urlencoded] (/home/pi/pimatic-app/node_modules/pimatic/node_modules/body-parser/index.js:123:12)
    12:31:30.017 [pimatic]>    at Framework._setupExpressApp (/home/pi/pimatic-app/node_modules/pimatic/lib/framework.coffee:268:26)
    12:31:30.017 [pimatic]>    at new Framework (/home/pi/pimatic-app/node_modules/pimatic/lib/framework.coffee:87:8)
    12:31:30.017 [pimatic]>    at /home/pi/pimatic-app/node_modules/pimatic/startup.coffee:94:17
    12:31:30.017 [pimatic]>    at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/util.js:16:23)
    12:31:30.017 [pimatic]>    at Function.Promise.attempt.Promise.try (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/method.js:39:29)
    12:31:30.017 [pimatic]>    at Object.startup (/home/pi/pimatic-app/node_modules/pimatic/startup.coffee:93:10)
    12:31:30.017 [pimatic]>    at run (/home/pi/pimatic-app/node_modules/pimatic/pimatic.js:15:24)
    12:31:30.017 [pimatic]>    at Object.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic/pimatic.js:20:3)
    12:31:30.017 [pimatic]>    at Module._compile (module.js:409:26)
    12:31:30.017 [pimatic]>    at Object.Module._extensions..js (module.js:416:10)
    12:31:30.017 [pimatic]>    at Module.load (module.js:343:32)
    12:31:30.017 [pimatic]>    at Function.Module._load (module.js:300:12)
    12:31:30.017 [pimatic]>    at Function.Module.runMain (module.js:441:10)
    12:31:30.017 [pimatic]>    at startup (node.js:139:18)
    12:31:30.017 [pimatic]>    at node.js:974:3
    12:31:30.027 [pimatic] exiting...
    

    Trying the solution mentioned above now…

    posted in pimatic v0.9 read more
  • sebster6

    Okay, I get some error message when not running Pimatic as a daemon. Any idea what this means?

    I checked ~/pimatic-app/node_modules/pimatic/node_modules/knex/node_modules/debug/package.json and it’s just a file of unreadable garbage characters… can I “reinstall” this part of the installation?

    pi@raspberrypi:~/pimatic-app $ sudo node /home/pi/pimatic-app/node_modules/pimatic/pimatic.js
    07:29:34.005 2017-04-21 Friday
    module.js:85
        throw e;
        ^
    
    SyntaxError: Error parsing /home/pi/pimatic-app/node_modules/pimatic/node_modules/knex/node_modules/debug/package.json: Unexpected token �
        at Object.parse (native)
        at readPackage (module.js:81:52)
        at tryPackage (module.js:91:13)
        at Function.Module._findPath (module.js:153:20)
        at Function.Module._resolveFilename (module.js:323:25)
        at Function.Module._load (module.js:276:25)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic/node_modules/knex/lib/raw.js:39:14)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (/home/pi/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
        at Function.Module._load (module.js:300:12)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic/node_modules/knex/lib/index.js:15:12)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (/home/pi/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
        at Function.Module._load (module.js:300:12)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic/node_modules/knex/knex.js:8:18)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (/home/pi/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
        at Function.Module._load (module.js:300:12)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic/lib/database.coffee:11:8)
        at Module._compile (module.js:409:26)
        at Object.compile (/home/pi/pimatic-app/node_modules/pimatic/coffee-cache.js:169:17)
        at Module.load (/home/pi/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
        at Function.Module._load (module.js:300:12)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic/startup.coffee:22:16)
        at Module._compile (module.js:409:26)
        at Object.compile (/home/pi/pimatic-app/node_modules/pimatic/coffee-cache.js:169:17)
        at Module.load (/home/pi/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
        at Function.Module._load (module.js:300:12)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at run (/home/pi/pimatic-app/node_modules/pimatic/pimatic.js:15:3)
        at Object.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic/pimatic.js:20:3)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)
        at Function.Module.runMain (module.js:441:10)
        at startup (node.js:139:18)
        at node.js:974:3
    pi@raspberrypi:~/pimatic-app $

    posted in pimatic v0.9 read more
  • sebster6

    Hi there,

    just like I always do from time to time, I checked for updates yesterday, and since there was one for pimatic-shell-execute, I ran the update and clicked the Restart button after it finished. Unfortunately, Pimatic won’t start anymore now (there’s probably no connection to the plugin, but I can’t be sure).
    When I run “sudo service pimatic start” or “sudo node_modules/pimatic/pimatic.js start”, only the current date/time is written to /home/pi/pimatic-app/pimatic-daemon.log, before the process seems to die almost instantaneously. Since there are no further log infos, I’m not sure where to start analyzing.
    What I did so far: Restarting, sudo apt-get update/upgrade, power cycling the Pi, remove pimatic-shell-execute from config, remove Pimatic database file - no changes. Help please :(

    pi@raspberrypi:~/pimatic-app $ sudo tail -f -n 200 /home/pi/pimatic-app/pimatic-daemon.log 
    [...]
    22:24:53.280 [pimatic] info: Installing: "pimatic-shell-execute@0.9.10" from npm-registry.
    22:25:42.405 [pimatic, ppm] info: WARN unmet dependency /home/pi/pimatic-app/node_modules/pimatic-echo/node_modules/hapi/node_modules/subtext/node_modules/pez requires boom@'3.x.x' but will load
    22:25:42.422 [pimatic, ppm] info: WARN unmet dependency /home/pi/pimatic-app/node_modules/pimatic-echo/node_modules/hapi/node_modules/boom,
    22:25:42.425 [pimatic, ppm] info: WARN unmet dependency which is version 4.0.0
    22:25:43.023 [pimatic, ppm] info: pimatic-shell-execute@0.9.10 node_modules/pimatic-shell-execute
    22:25:43.028 [pimatic, ppm] info: └── pimatic-plugin-commons@0.9.4
    22:36:02.983 [pimatic] info: Restarting...
    22:36:04.577 [pimatic] info: Flushing database to disk, please wait...
    22:36:06.218 [pimatic] info: Flushing database to disk, please wait... Done.
    22:36:06.223 [pimatic] info: exiting...
    22:42:10.105 2017-04-20 Thursday
    22:48:32.904 2017-04-20 Thursday
    22:55:06.350 2017-04-20 Thursday
    23:00:05.925 2017-04-20 Thursday
    06:32:12.868 2017-04-21 Friday
    pi@raspberrypi:~/pimatic-app sudo node_modules/pimatic/pimatic.js status
    Pidfile exists, but process is dead.

    posted in pimatic v0.9 read more
  • sebster6

    Great, that looks exactly like the plug I was looking for. Just ordered the SP-2101W from Amazon. :)
    Now if only I didn’t somehow mess up Pimatic yesterday - after an update, it won’t start anymore. :( But that’s a story for another thread…

    posted in Hardware read more
  • sebster6

    Hi guys,

    I’m planning to control my garden shed / garden lights from the shed (the lights are connected to a regular 230V plug within the shed). My initial plan was to use DECT (Fritzdect 200), but due to the range from the house (the shed is on the other side of the garden) it’s not working reliably. The same problem arises using 433 MHz from my Arduino connected to my Pi (I’m using these two options within the rest of the house successfully).

    So currently I’m thinking about using a directed Wifi connection from the house to the shed (pimping a Fritzbox with https://frixtender.de/shop/frixtender-produkte/frixtender-p-hirose-spezial). Is there a “smart plug” that can easily be included in Pimatic (preferably available from Amazon Germany) and uses Wifi instead of RF or DECT?

    Plan B would be another Pi within the shed to send 433 MHz RF to our classic beloved plugs… ;)

    posted in Hardware read more
  • sebster6

    I already tried to get in contact over at Github, but unfortunately without success: https://github.com/markbergsma/pimatic-hue-zll/issues/13

    posted in Plugins read more
  • sebster6

    @leader21 The previous error (January 5th) from the log file is this one:

    11:48:40.446 [pimatic] info: rule hi-indoor: set $hi-indoor to 20.8
    11:48:40.591 [pimatic] info: rule display-lo-hi-indoor: displaying "LO 19.5'C HI 20.8'C" on lcd line 2
    11:52:41.972 [pimatic] info: rule hi-indoor: set $hi-indoor to 20.9
    11:52:42.110 [pimatic] info: rule display-lo-hi-indoor: displaying "LO 19.5'C HI 20.9'C" on lcd line 2
    11:57:42.101 [pimatic] info: rule hi-indoor: set $hi-indoor to 21
    11:57:42.232 [pimatic] info: rule display-lo-hi-indoor: displaying "LO 19.5'C HI 21'C" on lcd line 2
    Fatal Error: update "deviceAttribute" set "lastUpdate" = '2017-01-05 12:36:46.422', "lastValue" = 20.700000762939453 where "id" = 31 - SQLITE_BUSY: database is locked
    
    

    So, it’s exactly the same database ID that’s supposed to be updated. It seems to be my living room temperature, coming from a DHT 22 sensor connected to the Raspberry (GPIO PIN 7, interval 60000).
    Frankly, I don’t think it’s due to a defective SD card (especially since it’s the same error). But of course, I do automatic backups every week to my NAS. ;)

    So, the DHT22 sensor values are:
    $wz-sensor.temperature
    $wz-sensor.humidity

    For the display, I’m using variables
    $wz-temp = round($wz-sensor.temperature,2)
    $wz-humid = round($wz-sensor.humidity,2)

    Any chance I can dig further into the database entries?

    posted in pimatic v0.9 read more

Looks like your connection to pimatic forum was lost, please wait while we try to reconnect.