Important community news
Released pimatic-wunderground@0.2.4

version 0.2.4 released 2018-05-09

Provided PWS support for history device Bugfix for days/hours with leading zero in history device added solarradiation, uv, precip and precip_total as variables

Discuss here:

read more
Everything that doesn't fit elsewhere
Play specific title on sonos ?

@t1m0 i guess it is working then?

read more
Here you will find good setup tutorials!
HowTo Control Alexa via Script

this guy build a pretty easy script to Control Alexa:

Great Work, running well. Have Fun!

Commandline Options:

echo "$0 [-d <device>|ALL] -e <pause|play|next|prev|fwd|rwd|shuffle|vol:<0-100>> | -b [list|<\"AA:BB:CC:DD:EE:FF\">] | -q | -r <\"station name\"|stationid> | -s <trackID> | -t <ASIN> |" echo " -u <seedID> | -v <queueID> | -w <playlistId> | -i | -p | -P | -S | -a | -m <multiroom_device> [device_1 .. device_X] | -lastalexa | -l | -h" echo " -e : run command" echo " -b : connect/disconnect/list bluetooth device" echo " -q : query queue" echo " -r : play tunein radio" echo " -s : play library track" echo " -t : play Prime playlist" echo " -u : play Prime station" echo " -v : play Prime historical queue" echo " -w : play library playlist" echo " -i : list imported library tracks" echo " -p : list purchased library tracks" echo " -P : list Prime playlists" echo " -S : list Prime stations" echo " -a : list available devices" echo " -m : delete multiroom and/or create new multiroom containing devices" echo " -lastalexa : print device that received the last voice command" echo " -l : logoff" echo " -h : help"


Version History:

Amazon Alexa Remote Control

2017-10-10: v0.1 initial release
2017-10-11: v0.2 TuneIn Station Search
2017-10-11: v0.2a commands on special device “ALL” are executed on all ECHO+WHA
2017-10-16: v0.3 added playback of library tracks
2017-10-24: v0.4 added playback information
2017-11-21: v0.5 added Prime station and playlist
2017-11-22: v0.6 added Prime historical queue and replaced getopts
2017-11-25: v0.6a cURL is now configurable
2017-11-25: v0.7 added multiroom create/delete, playback of library playlist
2017-11-30: v0.7a added US config, fixed device names containing spaces
2017-12-07: v0.7b added Bluetooth connect/disconnect
2017-12-18: v0.7c fixed US version
2017-12-19: v0.7d fixed AWK csrf extraction on some systems
2017-12-20: v0.7e moved get_devlist after check_status
2018-01-08: v0.7f added echo-show to ALL group, TuneIn station can now be up to 6 digits
2018-01-08: v0.8 added bluetooth list function
2018-01-10: v0.8a abort when login was unsuccessful
2018-01-25: v0.8b added echo-spot to ALL group
2018-01-28: v0.8c added configurable browser string
2018-02-17: v0.8d no need to write the cookie file on every "check_status"
2018-02-27: v0.8e added “lastalexa” option for HA-Bridge to send its command to a specific device
(Markus Wennesheimer:
2018-02-27: v0.9 unsuccessful logins will now give a short info how to debug the login
2018-03-09: v0.9a workaround for login problem, force curl to use http1.1
2018-05-17: v0.9b update browser string and accept language

(no BASHisms were used, should run with any shell)

requires cURL for web communication (GNU) sed and awk for extraction jq as command line JSON parser (optional for the fancy bits)

read more
Discussion about Hardware.
The big ZigBee topic

@justice said in The big ZigBee topic:

Thanks it’s working nou and after all logic step to do

Great. Just a side note: If you update deconz via the web UI the service script may be overwritten and as a result deconz will be no longer operational. In this case you need to apply the changes to the service script gain and restart deconz

read more

All about code

[Solved] Relay with Button - Button does not react! [At the end it was a Timing issue]


/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: * * Documentation: * Support Forum: * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * Example sketch for a "light switch" where you can control light or something * else from both HA controller and a local physical button * (connected between digital pin 3 and GND). * This node also works as a repeader for other nodes * */ // Enable debug prints to serial monitor #define MY_DEBUG #define MY_RF24_PA_LEVEL RF24_PA_MAX // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #define MY_RF24_PA_LEVEL RF24_PA_HIGH // Enabled repeater feature for this node #define MY_REPEATER_FEATURE #include <SPI.h> #include <MySensors.h> #include <Bounce2.h> #include <NewPing.h> #define RELAY_PIN 4 // Arduino Digital I/O pin number for relay #define BUTTON_PIN 3 // Arduino Digital I/O pin number for button #define CHILD_ID_RELAY 1 // Id of the sensor child #define RELAY_ON 0 #define RELAY_OFF 1 #define CHILD_ID_DIST 10 #define TRIGGER_PIN 6 // Arduino pin tied to trigger pin on the ultrasonic sensor. #define ECHO_PIN 5 // Arduino pin tied to echo pin on the ultrasonic sensor. #define MAX_DISTANCE 300 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. unsigned long SLEEP_TIME = 5000; // Sleep time between reads (in milliseconds) NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. MyMessage msgDist(CHILD_ID_DIST, V_DISTANCE); int lastDist; bool metric = true; Bounce debouncer = Bounce(); int oldValue=0; bool state; MyMessage msgRelay(CHILD_ID_RELAY,V_LIGHT); long previousMillis = 0; // will store last time Distance was measured long interval = 10000; // interval at which to measure (milliseconds) void setup() { // Setup the button pinMode(BUTTON_PIN,INPUT); // Activate internal pull-up digitalWrite(BUTTON_PIN,HIGH); // After setting up the button, setup debouncer debouncer.attach(BUTTON_PIN); debouncer.interval(1); // Make sure relays are off when starting up digitalWrite(RELAY_PIN, RELAY_OFF); // Then set relay pins in output mode pinMode(RELAY_PIN, OUTPUT); // Set relay to last known state (using eeprom storage) state = loadState(CHILD_ID_RELAY); digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF); metric = getControllerConfig().isMetric; } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Relay & Button Distance", "1.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID_RELAY, S_LIGHT); present(CHILD_ID_DIST, S_DISTANCE); } /* * Example on how to asynchronously check for new messages from gw */ void loop() { debouncer.update(); // Get the update value int value =; if (value != oldValue && value==0) { send(msgRelay.set(state?false:true), true); // Send new state and request ack back } oldValue = value; // here is where you'd put code that needs to be running all the time. // check to see if it's time to blink the LED; that is, if the // difference between the current time and last time you blinked // the LED is bigger than the interval at which you want to // blink the LED. unsigned long currentMillis = millis(); if(currentMillis - previousMillis > interval) { // save the last time you blinked the LED previousMillis = currentMillis; int dist = metric?sonar.ping_cm():sonar.ping_in(); Serial.print("Ping: "); Serial.print(dist); // Convert ping time to distance in cm and print result (0 = outside set distance range) Serial.println(metric?" cm":" in"); if (dist != lastDist) { send(msgDist.set(dist)); lastDist = dist; } } // sleep(SLEEP_TIME); } void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.isAck()) { Serial.println("This is an ack from gateway"); } if (message.type == V_LIGHT) { // Change relay state state = message.getBool(); digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF); // Store state in eeprom saveState(CHILD_ID_RELAY, state); // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.println(message.getBool()); } }

Thanks for the Help!

p.s. Any advice regarding cleanup of the Code welcome :-)

read more
Please report bugs on github!

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