• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Error on Wiki Examples page
#1
Hi,
On the page Wiki - Events - Examples - Sunrise / Sunset Event, I think that there is an error:
Code:
"sunset": {
    "rule": "IF ((sunriseset.sunset == (datetime.hour + (datetime.minute / 100)) AND light.state IS off) AND datetime.second == 0) THEN switch DEVICE light TO on",
    "active": 1
},
"sunrise": {
    "rule": "IF ((sunriseset.sunset == (datetime.hour + (datetime.minute / 100)) AND light.state IS off) AND datetime.second == 0) THEN switch DEVICE light TO on",
    "active": 1
}

In the rule "sunrise" sunriseset.sunset should be sunriseset.sunrise.

Regards.
 
Reply
#2
Feel free to fix it.
 
Reply
#3
Hi,
On the DATE_FORMAT page, the following example is given:
>> IF DATE_FORMAT(DATE_ADD(datetime, +1 HOUR), "%Y-%m-%d %H:%M:%S", %H.%M)

This is an invalid JSON format. It should be:
>> IF DATE_FORMAT(DATE_ADD(datetime, +1 HOUR), \"%Y-%m-%d %H:%M:%S\", %H.%M)

I fixed it on the Wiki page.
(I'm new to this forum, please let me know if this is undesired behavior)
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  No link from manual-pages to main page? sirtet 7 3,864 01-12-2019, 01:22 PM
Last Post: lisDuh
  User manual: error in wiring schema for USB nano? Fabrizio 0 1,804 11-25-2015, 04:52 PM
Last Post: Fabrizio
  Wiki Protocols Date&Time and Sunrise/Sunset troccolo 4 2,661 08-04-2015, 04:35 PM
Last Post: troccolo
  improvement in wiki function page Peppi 2 1,876 06-18-2015, 07:12 AM
Last Post: Peppi
  Typo on FAQ page BigSjedow 5 3,857 03-17-2015, 08:13 AM
Last Post: koos147
  [Fixed] donate error on website creamers 1 2,159 09-15-2014, 09:30 AM
Last Post: curlymo
  error on wiki pilight-deamon page fredegeld 1 2,370 06-12-2014, 06:15 PM
Last Post: curlymo
  Search error Sibren 1 1,605 05-25-2014, 12:19 AM
Last Post: curlymo
  Wiki Protocols wrong link LMD 1 1,988 03-26-2014, 01:14 PM
Last Post: curlymo
  [Solved] Error on protocols page meloen 1 1,707 03-11-2014, 09:08 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)