Hello guys,
during christmas time i have checked the functionality to determine if someone is still at home or everybody has left and no one is at home.
Idea
We would like to close all of our shutters if we are leaving the home during the day for more than an hour. During this time the shutter should be closed automatically and opend up again if anyone is back at home.
FHEM is offering an module to send a standard ping request to the devices. It will check if the ping request has received an answer from the device or not.
But modern smartphone have energy saving modes which try to save battery. If it is not used, the wireless connection will be cut and the solution using the ping functionality will not work anymore.
Some guys at german FHEM Forum have published a solution which will be a two step solution.
First step will do a normal ping and the second step will be executed if the first ping was not sucessfull. For the second step the program arp-scan and hping3.
This solution looks very nice and is doing its jobs.
Please check the following post and FHEM Forum for current (23.12.2018) solution.
https://forum.fhem.de/index.php/topic,76342.msg769242.html#msg769242
Furthermore the user rights for user FHEM which is used for general FHEM installation whoudl be extended to execute super user rights to execute arp-scan and hping3 as well as the mentioned script.
Try it and give feedback about your experiences reagarding this solution.
Thank you.
Sonntag, 23. Dezember 2018
Dienstag, 18. April 2017
Stratus Forms for Sharepoint
hello guys,
i found a very cool project, which provide an open source for non-commercial use scripts to use powerfull infopath like forms in sharepoint
It sound very fancy and powerful.
Please check the follwoing link: http://www.stratusforms.com
I just post the benefits of this project:
Do you already used this framwork? Then leave me a message about your experience.
This is a video which shows the functioanlity and gives osme advices how to use it.
https://collab365.community/infopath-we-dont-need-no-stinkin-infopath/
Greetings
i found a very cool project, which provide an open source for non-commercial use scripts to use powerfull infopath like forms in sharepoint
It sound very fancy and powerful.
Please check the follwoing link: http://www.stratusforms.com
I just post the benefits of this project:
- Allows you to create rich/powerful/responsive/mobile friendly forms using simple HTML, CSS, and JavaScript
- Works in all versions of SharePoint
- Requires ZERO installation
- Acts as an InfoPath replacement
- Allows you to encrypt an entire form or specific fields
- Does NOT store your data in some proprietary fashion
- Is FREE for non-commercial use!
Do you already used this framwork? Then leave me a message about your experience.
This is a video which shows the functioanlity and gives osme advices how to use it.
https://collab365.community/infopath-we-dont-need-no-stinkin-infopath/
Greetings
Donnerstag, 21. Januar 2016
REST SharePoint API - Meaning of the Value
Hi there,
creating a Call-HTTP Werbservice needs to specify a "Dictionary". In this dictionary, you have to declare the "Content-Type" as well as "Accept".
This Site explains what does the value exactly mean and what does it do.
https://blogs.office.com/2014/08/13/json-light-support-rest-sharepoint-api-released/
greetz
creating a Call-HTTP Werbservice needs to specify a "Dictionary". In this dictionary, you have to declare the "Content-Type" as well as "Accept".
This Site explains what does the value exactly mean and what does it do.
https://blogs.office.com/2014/08/13/json-light-support-rest-sharepoint-api-released/
- accept: application/json; odata=verbose
- accept: application/json; odata=minimalmetadata
- accept: application/json; odata=nometadata
greetz
Donnerstag, 7. Januar 2016
Sharepoint 2013 Online Workflow - Get current Time and Date
Hi,
at the moment I'm working very much with Sharepoint 2013 Online and - thank god - I have access to the SharepointDesigner.
It wasn't very beautiful, that the workflow has started every day on the same time I started the workflow the first time (9 o'clock in the morning). Looking in the future, the amount of treatys will raise. Therefor using the resources of sharepoint during the daybusiness, is not very helpful. Yes of course, I could wake up in the middle of the night an start the workflow once but this solution is too simple and not cool.
So I was looking for a possibility to trigger the workflow by time. Specify the starting time isn't complicated. You can specify it using a sharepint list and capture the entry by the workflow or just set a workflow variable with the specific time.
But, the workflow still not knows the current time and date.
He describes some services which offered an API to get time and date as well as some services using JSONP but they are alredy down.
Then Mr. Wellsons had an "heureka":
Building Workflows using the SharePoint Designer, it offeres the action "Call HTTP Webservice".
So all we need is calling a GET-Method to a random website, filtering the response for "date" and voilá, we have the current date and time (GMT).
Step by step:
Thanks for reading.
//Edit 17.02.2016:
Meanwhile I have extracted the solution to an seperate website workflow which starts every day at 00:01 and waits 24h until it starts again. The website workflow determines the actual date and write it to a seperate list. In this list i use calculated columns to determine the date of yesterday, of tomorrow as well as the last and the next year.
at the moment I'm working very much with Sharepoint 2013 Online and - thank god - I have access to the SharepointDesigner.
Background
I was trying to create a workflow which had the purpose to check a list of treatys. If they run out of time, they may need to be quit. This workflow runs once a day forever (simple infinity loop).It wasn't very beautiful, that the workflow has started every day on the same time I started the workflow the first time (9 o'clock in the morning). Looking in the future, the amount of treatys will raise. Therefor using the resources of sharepoint during the daybusiness, is not very helpful. Yes of course, I could wake up in the middle of the night an start the workflow once but this solution is too simple and not cool.
So I was looking for a possibility to trigger the workflow by time. Specify the starting time isn't complicated. You can specify it using a sharepint list and capture the entry by the workflow or just set a workflow variable with the specific time.
But, the workflow still not knows the current time and date.
Solutions of the Web
I found some solutions on the web but they weren't very helpful for my situation. Why? Well, the workflow willl never ends. he will always run. Therefor it is necessary it requires less ressources and produces less amount of data or using less memory.- One solution was to create or modify a dummy file and capture the datetime of creation/ modification.
- the second solution suggests to create a history log entry with an unique description. Then the workflow has to capture the creation date of the log entry. Well this would work but considiring my problem, the system would create one log entry each day. That means 365 - btw 366 in this year 2016 - entries each year would be stored in the system. I haven't figured out how to delete them. Maybe it is very easy.
My Solution
I found the following blog entry of Chris Wellons. He describes his problem that he doesn't trust the local system time and wanted to get the time and date from a different source.He describes some services which offered an API to get time and date as well as some services using JSONP but they are alredy down.
Then Mr. Wellsons had an "heureka":
"This is when the lightbulb went off: web servers hand out
date strings all the time! It’s a standard HTTP header: Date!"
Now we are in business. Building Workflows using the SharePoint Designer, it offeres the action "Call HTTP Webservice".
So all we need is calling a GET-Method to a random website, filtering the response for "date" and voilá, we have the current date and time (GMT).
Step by step:
- Reading the specification RFC 2616 Chapter 14.18 (Wikipedia), the respond as well as the request of an HTTP Request contains the date and time of the request as well as of the respond.To check the specification, use Web-Sniffer to see which content your request will have.
The request to google will respond with the following information:
The field "Date" ist interesting, because it rovides the information about the current time (GMT) and date. - Open SharePoint Designer and create a new Workflow 2013, not 2010.
- Create a new dictionary
- Add the following elements:
I'm not sure, if this is necessary but it will work. - Store the Output in a new variable of the type "dictionary" and name it "dictionary"
- Create "Call HTTP-WebService"-Action
- Click on "This" and add the webservice. To be mentioned: I don't want to get the content of the webservice. I'm only interested in the meta information. Therfore i used the follwoing third party service to transform the respons in propper JSON style: http://www.firstamong.com/json/index.php?q=
This is a suggestion by HyongGuk Kim. We add http://www.google.de to the adress and write it to the HTTP Call. The HTTP-Method is set to "HTTP Get". - The respond has to be stored somewhere. Therefor we store it in a variable "Header" of the type "dictionary".
- Furthermore we have to set a variable of the type "dictionary" to tore the respond output for "RespnseStatusCode". But we will not need it. The Software will create an error, if no variable is set.
- Click with your right moue button on the "Call HTTP-Webservice"-Action and choose "properties". Set the dictionary we created in step 3 to "Request Header" like shown in the following picture:
- Now first test it. Add "Send Mail"-Action and send it to your self with the content of the variable "Header". Save and publish your workflow and start it.
- The variable Header has the following content:
Using the WebService JSON Parser Online by Olivier Cuenot, you can transform the output of the header in a much better human readable style:
Now you can see, that "COnnecntion", "Date", "Server" and "X-Powered-By" are arrays containing one field only. Now we can build our parser to get the information from the first field of the array "Date". - Go to your workflow again. Add "Get Item from Dictionary"-Action and write for "item by name or path":
Date/(0)
Why? Well Date, Server, Connection,... are all root elements of the type array. Each of them only consits of one element. The first element will be assigned by using the index 0 in brackets. Of course you can get the information about the Server or the Connection on the same way like writing: Server/(0) or Connection/(0) . - The infomration are stored in the variable "Header". Store the output in the variable "Date" of the type "Date and Time".
Add the variable "Date" to the "Send a Mail"-Action. Looking Up the wrkflow variable, you can retrive the infomration tored in the date variable of the type "date and time" in different format, e.g. long/ short time, long/ short date, string or iso - Finally save and publish yur workflow and start it.
- The mail looks like this:
- Now we are able to use the current date and time working with a Sharepoint 2013 workflow.
To be mentioned: You will see that the respond time is in GMT +-0 timezone and the exact time and date stored in the variable date is in GMT +1. Maybe a nice function of Sharepoint? Don't know.
Thanks for reading.
//Edit 17.02.2016:
Meanwhile I have extracted the solution to an seperate website workflow which starts every day at 00:01 and waits 24h until it starts again. The website workflow determines the actual date and write it to a seperate list. In this list i use calculated columns to determine the date of yesterday, of tomorrow as well as the last and the next year.
References
- http://nullprogram.com/blog/2013/05/11/ , 07.01.2016
- http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=224 , 07.01.2016
- http://blogs.msdn.com/b/sridhara/archive/2014/08/21/fix-sharepoint-2013-workflow-recursion-prevention-part-2.aspx , 07.01.2016
- https://de.wikipedia.org/wiki/Liste_der_HTTP-Headerfelder#Antwort-Headerfelder , 07.01.2016
- http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 , 07.01.2016
- https://blogs.msdn.microsoft.com/sharepointdesigner/2012/09/04/how-to-work-with-web-service-using-call-http-web-service-action-in-sharepoint-designer-2013/ , 07.01.2016
- http://blog.appliedis.com/2014/10/09/sharepoint-designer-2013-workflow-working-with-web-services/ , 07.01.2016
- http://blogs.evocom.de/af/archive/2013/08/06/sharepoint-2013-workflows-teil-1-call-http-web-service.aspx , 07.01.2016
- https://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/ , 07.01.2016
- http://json.parser.online.fr/ , 07.01.2016
Labels:
call http webservice,
datum,
get current date and time,
JSON,
REST,
sharepoint 2013,
Sharepoint Designer 2013,
sharepoint workflow 2013,
sp2013,
sp32013 online,
spo 2013,
tag,
uhrzeit,
workflow 2013
Abonnieren
Posts (Atom)