Aller au contenu

Blogs

 

QR 88 – Des raccourcis clavier qui s’affichent… ou ne s’affichent pas dans FileMaker…

Les questions que vous nous posez nous donnent parfois l’occasion de faire des découvertes et de remarquer enfin ce qui était sous nos yeux tous les jours 😉 Mais comme l’utilisation de FileMaker est très différente d’une personne à l’autre, qu’elle varie en fonction du besoin qu’on en a et de ses habitudes de travail, ce n’est […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

DevCon 2018 Follow-up: The Story of Billy Bass – Part Five

This is the final post in my series about the demo I presented during my “IoT and the FileMaker Data API” session. Using Visemes The 'master' branch is the more interesting one as it uses the viseme information that Amazon Polly provides. For this to work I needed some linguistics help to interpret what those visemes mean. In my DevCon session I jokingly stated that the session happened because of the help of both my daughters, one is in university studying Biology (fish, get it?) and the other is in university studying Linguistics. So I was all set Thanks, Girls! Back to those visemes, Figure 28 shows what Amazon sends you: Figure 28 - Viseme information It tells you the mouth position at any time as it changes during the audio. And we can determine the duration from the time elapsed between two entries. But which of those weird-looking viseme characters indicate whether the mouth is open or closed? Obviously, the plastic fish doesn’t have the full mouth range as we have, it can’t purse its lips for instance. So, I just had to find the ones that mean that the mouth is open, half open, or closed. Figure 29 shows the visemes in master branch code.
Figure 29 – Viseme characters in the master branch code Expand image Query the FileMaker Data API As we query the FileMaker Data API and we retrieve the viseme data we received from Amazon Polly, we process it and build a smaller list of those events that have to do with the vowels that open the mouth:
Figure 30 – Query the FileMaker Data API Expand image Later in the code when it is time to play the audio and move the head and mouth we spawn a separate thread (lines 267 and 273) to process the data we retained (see Figure 31). Line 267 invokes this function that loops through that viseme data array and move the mouth at the appropriate time.
Figure 31 – A separate thread is spawned to process the retained data Expand image In Figure 32, Line 78 opens the mouth for a pre-determined length of time (set in billy.ini) and line 83 puts the subroutine in waiting mode until it is time for the next line in the viseme data, based on the time stamps in the Polly data.
Figure 32 – Code Expand image You will note that line 272 in Figure 31 introduces a delay between starting the voice (the audio playback) and starting the thread for the mouth, that's a value set in billy.ini and set to what I found to be necessary to make sure the mouth action did not start earlier than the audio playback. And with that I was pretty much done. Everything was working as I wanted. The new pinion gears arrived, and I replaced the old gears on all three of my Billy Basses (the original one and my two Billy Bass Bones), and now the heads turned the proper 90 degrees, making Billy look straight at you as it begins talking. Mission Accomplished! My last worry was whether or not I would be able to access my virtual instance of Windows 10 where my Visual Studio 2017 lives (it’s on a VMware server here in the office, behind a VPN) given how flaky hotel networks can be. It turns out that the excellent (and free) Visual Studio Code editor on macOS also supports Python as shown in Figure 33.
Figure 33 – Visual Studio Code editor Expand image All I had to do was clone my GitHub repository to my Mac, and away I went. From my Mac, I can SCP (Secure Copy Protocol) to copy the modified Python scripts over to the Raspberry Pi and use SSH in Terminal to run the main Python script to put the Raspberry Pi in its wait-and-read loop. Figure 34 shows the Python script running on the Raspberry Pi, logging every step of its actions. Figure 34 - Python script running on the Raspberry Pi And here is a final picture of my hotel room with the whole thing set up for last-minute testing: Figure 35 - Final testing Time for a little fun then. Early on I mentioned that the text we are sending to Amazon Polly uses SSML markup. Using SSML allows us to specify things like accents. Or tell Polly to speed up the text narration, like so: <speak>
Hi, my name is Andrew Lecates, when I get going, <prosody rate="x-fast">you really have to fasten your seatbelts, because there is a lot to cover and you are standing between me and my coffee, or red bull, or whatever the heck it is that makes me talk like this.</prosody><amazon:breath duration="x-long" volume="x-loud"/><break time="500ms"/>b</speak> FileMaker Go Figure 36 – Demo file on iPhone or iPad Expand image If you open the demo file on your iPhone or iPad, you’ll go straight to a device-specific layout where you can flip between the records and use the big buttons to flag the record you want Billy to speak. You can also use the “Head” button to make Billy only turn his head without saying anything.
Conclusion I had a lot of fun putting this particular DevCon presentation together, and there is something immensely satisfying to seeing devices collect sensor data and being able to things move from a FileMaker solution. If nothing else I hope I have demonstrated that the FileMaker platform fits in very well in this IoT environment. Writing the code to run on the Raspberry Pi was fairly straightforward, in both C# and Python. None of the demos that I used in my session are more than 300 lines of code, with plenty of whitespace, comments and logging. Don’t let unfamiliarity with those languages deter you. It's easier than you think. Questions about anything in this series; leave a comment here or find me on community.filemaker.com
The Story of Billy Bass - Part One (setting it up) The Story of Billy Bass - Part Two (making Billy Bass move) The Story of Billy Bass - Part Three (using Raspberry Pi) The Story of Billy Bass - Part Four (switching to Python) The Story of Billy Bass - Part Five (using Visemes) The post DevCon 2018 Follow-up: The Story of Billy Bass – Part Five appeared first on Soliant Consulting.
Voir le billet d'origine

Soliant Consulting

Soliant Consulting

 

bBox for FileMaker v0.90 Now Available

We are pleased to release bBox version 0.90. bBox is a free utility plug-in to extend FileMaker solutions to easily use code libraries and macOS-based functions from Python, JavaScript, PHP, Ruby, AppleScript, Bash/sh, XPath, and SQLite. Included is a demo file that has over 200 examples of how you can put bBox functions to work for you. New Features: bBox_MacNotifications Creates macOS notifications. […]
Afficher la totalité du billet

vincenzo

vincenzo

 

Réfléchir à la stratégie FileMaker

Investir dans FileMaker… Guides ou fiches techniques, articles, conférences en ligne et conseils personnalisés sont là pour vous informer de toute l’actualité de FileMaker. Forts de toutes ces informations, vous aurez certainement les éléments qu’il vous faut pour prendre une décision… Mais vous pouvez avoir besoin de plus… Les informations concernant la mise à jour […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Nouveauté FileMaker 17 : une table externe sur l’OT active (2)…

Une table externe un peu particulière… La semaine dernière, nous avons commencé à découvrir l’une des nouveautés de FileMaker Pro Advanced 17 : la possibilité de créer une table externe fondée sur les enregistrements du modèle courant. La simplicité d’utilisation pour sa mise en place tout comme sa pertinence en termes d’interface utilisateur en font, à […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Universal Date Picker

FileMaker Pro provides us with a wonderfully blank canvas in order to present data however we wish. It's called Layout Mode. When you combine that feature with the recently added Card Windows the power to solve presentation problems goes up quite significantly. Such is the case when it comes to providing users with a date picker, or a calendar widget if you will. In previous videos, I've provided instruction on how to make a very simple calendar widget. When you combine that widget with a Card Window you simply gain full control about how a user makes selections for date values. So, what's the best method of implementation? Well, like all things, there are many ways to approach the problem. In this video I discuss the use of global variables and the differences in context when working with Card Windows. I present some of the better ways to approach the solution and how to clean up after yourself when considering the use of global variables. If you're in need of expanding your FileMaker knowledge and you happen to also need a simple, yet powerful date picker, then I'm sure you'll enjoy watching this video about a Universal Date Picker. Click the title or link to this article to view the video.
Afficher la totalité du billet

FileMaker Magazine

FileMaker Magazine

 

IoT, FileMaker, and You

IoT, FileMaker, and You The Internet of Things (IoT) is quickly taking over our day to day interactions with the world. Forbes has predicted the global IoT market to grow to $8.9T in 2020, while the manufacturing and healthcare industries are predicted to spend $890B and $1.335T respectively. Is IoT a good fit for you business? We take a look at how the the Internet of Things can help improve your productivity and quality. Let’s first define IoT. To put it simply, IoT is connecting any device to the internet. Now you may be thinking my cell phone connects to the internet, is it an IoT device? The answer would be yes. However for the purpose of this discussion we are focusing on use cases that can be applied to a common business problem using a simple device: a button.  IoT in Business IoT has many uses today from inventory control, temperature monitoring, asset management, and product optimization. Much like FileMaker itself many IoT solutions are custom built to fit the needs and requirements of the individual business. Let us imagine your company produces the latest and greatest widget. These widgets require material to be supplied to each machine. As the material supply for each machine can run out at random times, how will you know when to resupply? Many companies rely on radios or other employees to constantly monitor and check to ensure the material remains supplied. What if each machine had a simple mechanism to request new material, allowing your FileMaker application to simultaneously gather metrics and notify key people when a machine needs material, maintenance, or went offline. IoT to the Rescue Amazon’s AWS IoT Button is a cloud-programmable button that allows for a quick setup to get you up and running. We choose this for our article because of its simple deployment and programming. For a larger scale deployment a custom IoT device can be built from scratch to fit your business needs. This button allows you to configure 3 separate button pushes (short, long, and double), which can be used to trigger separate actions within your custom FileMaker Application. Integrating with FileMaker Continuing with the AWS approach we look to AWS Lambda to handle the communication between the physical world and digital world. Lambda is serverless computing allowing you to run code without provisioning or managing servers. You pay only for the compute time you consume – there is no charge when your code is not running. AWS Lambda acts as a middle man between the physical button and the FileMaker application. The sample code provided for Lambda is written in node.js. It allows you to enter your own information as environmental variables making it even simpler for you to configure. When the IoT button is pressed, Lambda will perform our node.js code that makes use of the FileMaker Data API to communicate with FileMaker Server. In this example we create a record in a WEB_LOG table then perform a script to handle the type of button pushed. Out of the box the button can distinguish between a single, double, or long click type. {“serialNumber”:”8675309″,”batteryVoltage”:”1714mV”,”clickType”:”SINGLE”} The beauty of this approach is that with the power of FileMaker scripting you can do anything with this information. Just a few ideas to get you started. Display a chart on a dashboard to monitor the count of maintenance requests by department. Broadcast on a series of TV monitors throughout the facility for everyone to keep an eye on production status. Email or send a text message to key members of the company. Fully automate your reorder process by creating a PO within FileMaker and integrating suppliers to purchase inventory. Conclusion Integrating your custom FileMaker app with a custom IoT solution gives you endless possibilities to streamline, monitor, and create an overall better business environment. Feel free to contact us if you need further assistance or to discuss getting your IoT device integrated with FileMaker. Download IoT, FileMaker, and You Demo Please complete the form below to download your FREE FileMaker database file. Name* First Last Company Phone* Email* Deployment Assistance?Please contact us to assist integrating into your FileMaker Database. Yes Terms of Use I agree OPT-IN: I agree that I am downloading a completely free FileMaker application file with no strings attached. This database is unlocked, and I may use it for my business or organization as I see fit. Because I am downloading a free database, I agree that I should receive occasional marketing. I understand that I can OPT-OUT of these emails at anytime.
Afficher la totalité du billet

DB Services

DB Services

 

DevCon 2018 Follow-up: The Story of Billy Bass – Part Four

This is the fourth in a series of posts about the demo I presented during my “IoT and the FileMaker Data API” session. Making it Work in Python The first half of my DevCon presentation would be about collecting sensor data from a Raspberry Pi and sending that data to FMS through the Data API, and I am using Windows 10 IoT and .NET code for that. If I could do the second half of the presentation using Python, then it would show off the versatility of both the Raspberry Pi device and the FileMaker Data API. Raspberry Pis don’t have hard drives; they use Micro SD cards to run from so switching operating systems is as easy as switching SD cards. I got one with the latest Raspbian installed and then followed the Adafruit instructions to get their Python library installed and run the tests. The tests worked just fine, so I could move on to figuring out how to write the code in Python. Finding the Right IDE I was trying to figure out what IDE (Integrated Development Environment) I would need to write Python code but turns out that Visual Studio 2017 does that just fine, so I didn't have to learn a new tool. The fully working source code for what I ended up doing in my Devcon session is here on GitHub: https://github.com/wimdecorte/BillyPython Figure 22 is from a Windows virtual instance, running Visual Studio 2017 and shows what files there are in my source code: billy.ini is the config file (my FileMaker Server address, name of the file, layout and login credentials, and so on) BillyPython.py is the working version of the whole thing: query the FileMaker Data API to see if we need to play audio and the code to make the mouth and head turn Before I got to writing the whole thing, I needed to figure out what the correct settings were to move the fish’s mouth and head. For that I started with two test files: BillyBodyTest.py and BillyMouthTest.py Figure 22 – Python code Expand image The purpose of those test files was to figure out what the ideal settings were for the motor to deliver sufficient power for just long enough to make the head and mouth move, but not so much power that I would break the mechanism. If you want to build your own Billy Bass setup, then I strongly suggest using these two files to find those ideal settings for your fish. I was working with two Billy Bass Bones since I wanted redundancy in case I broke one and found that they each required subtle differences in those values for maximum effect. Since time was running out, I ended up storing these motor values in the billy.ini config file (see Figure 23) instead of storing them in the FileMaker file and reading them from there. It would not be a big change to add that since I had it working in .NET (see the MOTOR and MOTORHAT layouts in the FileMaker demo file).
Figure 23 – Motor values stored in the billy.ini config file. Expand image Re-coding in Python I already had most of the code developed in C# so the logic was clear to me. Figure 24 shows the workflow that I needed to re-code in Python. The Raspberry Pi would query FileMaker Server twice every second to see if any records were flagged there. If there was such a record, it would download the mp3 and play it back while moving the mouth and the head. The first order of business was to find a good Python wrapper around the FileMaker Data API.  I settled on David Hamann’s fmrest, on GitHub. As I had never written Python before, David was very gracious in answering my questions to keep me going. One of the challenges was finding out how to do multiprocessing in Python because moving the head and mouth had to happen at the same time as playing the audio. That took a bit of Googling to get right. Fortunately, there is a ton of useful info around. Moving the head was easy enough, once I have the audio I can figure out how long it is and then send a signal to the head motor to move in the right direction for that length of time. That happens in this block of code as shown in Figure 25.
Figure 24 – Workflow for re-coding in Python Expand image Figure 25 - Code block Expand image But there was the obvious big challenge: how do I make the mouth move in an approximation of what the audio was saying? When you check the source code on GitHub, you’ll notice that there are three branches (see Figure 26). “Pacat” can be ignored, that was an attempt to have the Raspberry Pi ‘listen back’ to the audio as it was playing to try and determine when to open and close the mouth based on volume or something else. I abandoned that branch as I was running out of time. The “master” branch is where I am using the visemes as supplied by Amazon’s Polly to move the mouth and “AudioSample” is using the mp3 amplitude to determine when to mouth the mouth. This approach does not work with the visemes but just inspects the audio file itself.
Figure 26 – Three branches in the source code Expand image Using Amplitude "AudioSample" in essence uses the block of code shown below to chunk up the audio into segments of 200 millisecond and for each segment it determines the amplitude of that chunk (see Figure 27). If the amplitude is higher than the threshold it runs the motor to open the mouth for the preset duration and then closes it again. Figure 27 - Code block for "AudioSample" Expand image The variables involved here to make this look natural are: length of the audio segment amplitude threshold 'fish_mouth_duration': how long do you keep the mouth open? 'time_allow_for_spent' to account for the time it takes to mechanically open and close the mouth With some careful testing, you can get them just right depending on your fish. The code depends on the pydub library for the audio-inspection. The Story of Billy Bass - Part One (setting it up) The Story of Billy Bass - Part Two (making Billy Bass move) The Story of Billy Bass - Part Three (using Raspberry Pi) In my final post, I'll show how I used Visemes. The post DevCon 2018 Follow-up: The Story of Billy Bass – Part Four appeared first on Soliant Consulting.
Voir le billet d'origine

Soliant Consulting

Soliant Consulting

 

FileMaker mène l’enquête…

Un meurtre a été commis au manoir et vous êtes chargé de l’enquête… Vous notez scrupuleusement les indices et les faits : le lieu où cela s’est passé, l’arme du crime, l’identité de la victime et surtout, les personnes présentes au moment où cela s’est passé… Alors, qui est le coupable ? Mademoiselle Rose ou le […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

DevCon 2018 Follow-up: The Story of Billy Bass – Part Three

This is the third in a series of posts about the demo I presented during my “IoT and the FileMaker Data API” session. Construct #2 - Billy Bass Bones As mentioned in my previous post, I decided to do everything from the Raspberry Pi to control the Billy Bass toy. While I was scouring eBay looking for pristine Billy Basses I came across this one as shown in Figure 15. Figure 15 - Ordering a Billy Bass I thought that would be funny and I could make the story about the fact that almost 20 years have passed since Billy Bass’ first DevCon and that he… well… became bones. Unfortunately, when I got this fish, it too did not turn its head the full 90 degrees that I wanted. Nevertheless, I ‘gutted’ the fish in the same way as the original one by removing its controller unit and only leaving the wires that come down from the motors and the speakers (see Figure 16). This type of Billy Bass has two motors: one for the mouth and one that drives the head or the tail depending on whether you run the motor forward or backward.
Figure 16 – Inside Billy Bass with the controller unit removed Issue with the Pinion Gear Since I was seriously disappointed about both Billy's not turning their head properly, I did some more searching and found that it was a bit of a known issue: the pinion gear that sits on the shaft of the motor that moves the body can crack. In fact, it almost certainly will break given enough usage and time. And since all of these toys are second-hand, it is pretty much a given that they will have been used enough times that those gears will have cracked and that the head will no longer turn all the way. There are some informative videos on YouTube that show how to replace it so after a lot of trepidation I decided to go ahead and disassemble the fish further to get to the body motor. Figure 17 - Pinion gear on the shaft of the motor can crack You cannot tell from the pictures in Figure 17, but there was indeed a crack between two of the teeth and because of it, the gear is not tight enough on the shaft. When the motor turns, it does not deliver all of its power through the gear, and the gear slips. And that is why the head does not turn all the way. Not all Billy Basses, however, use the same types of gear. While they all have 2mm shafts, some gears have nine teeth and some 10 or 11. So you need to get it out first before you know which ones to get. Mine were all 9-teeth gear, so I got a bunch from Amazon.They are very cheap, but the delivery time was making me a bit nervous. And at this point, I wasn't entirely certain that I could re-assemble the whole fish While I was waiting for the replacement gears to arrive, I set about finding out how to drive them from the Raspberry Pi. I settled on the MotorHat from Adafruit. Adafruit makes a bunch of quality hardware for Raspberry Pis and Arduinos, the documentation is excellent, and they have a good support forum. They also have a .NET library for their hardware including this motor hat. The MotorHat has four motor connections, more than enough to drive the two Billy Bass motors. “Hats” or “Shields” are an integral part of the Raspberry ecosphere and that of similar boards like the Arduino and Particle. Hats add hardware functionality very easily. I have a few slides in my DevCon presentation that show the concept: https://community.filemaker.com/docs/DOC-9255. To my dismay, however, the motor hat had to be soldered together. I looked for pre-assembled ones before I became resigned to the fact that, yes: I would have to solder. So it was back to Amazon, and I got a soldering iron set. But it stopped working after just one use, so I bit the bullet and got a decent one. It turns out that soldering is a lot of fun. Who knew. It helps that the Adafruit instructions are complete and easy to follow. By this time my dining table started to look quite full (Figure 18).
Figure 18 – My “workshop” With just a few weeks left before DevCon... Of course, none of this would have happened without the support of my loving wife Nicky — a fellow FileMaker developer and great artist — whom I robbed of that dining room table for a few months, and whose patience I know I’ve tested on more than one occasion. To keep the soldering to a minimum and to allow for quick assembly and disassembly I was still using a breadboard and jumper cables to connect the Raspberry Pi and Billy Bass. Figure 19 shows the Raspberry Pi with the MotorHat on and the cables running to the breadboard. That takes care of the hardware to control the motors. Now I needed to write code to send instructions from the Raspberry Pi, through the Motor Hat to the Billy Bass. I started with the MotorHat demo for C# that they have on GitHub and the underlying Adafruit C# library: https://github.com/adafruit/AdafruitClassLibrary.
Figure 19 – Raspberry Pi and MotorHat Looking at their demo I could see that there are a few settings that need to be specified to drive a motor correctly: the Pulse Width Modulation frequency (PWM), the direction of the motor (forward or backward), the speed, and the duration. I broke those out in my FileMaker demo file so that I can could just modify the settings right there in my FileMaker record and have the Raspberry Pi read from FileMaker Server and send the instructions to the motors. Figure 20 - Modifying the motor settings in my FileMaker demo file Having learned that those pinion gears on the fish were a little fragile and since I did not have the replacements yet I did not want to experiment with the actual Billy Bass. It was very likely that I'd mess things up at some point and drive the motors too hard and too long. So I just hooked up a DC motor to the hat so that I could tell if it was running correctly, based on my code. The source code is here on GitHub: https://github.com/wimdecorte/BillyBassPolly2 In Figure 21, it shows the hardware setup, since I am using jumper cables and a breadboard I can easily switch the motor from port 1 to port 2 and change its polarity so that ‘forward’ in my code corresponded to the motor running in the right direction. Note that you will need a good power adapter to run the MotorHat. I tried to skimp on that but found that the hat did not respond very well so I ended up getting the power adapter directly from Adafruit. Everything was working well except that I was getting an error every second time I ran the code. Trying to troubleshoot it I came across an open issue in the Adafruit .NET library and the suggested fixes did not work for me. It looked like I was stuck, and we were into June now. I waited a couple of days to see if there was any feedback on the issue, but none came. Figure 21 – Hardware setup Since the default OS for a Raspberry Pi is Raspbian Linux, and most of the example code you'll find is Python, and Adafruit has a Python library for their MotorHat, I decided to switch gears and see if I could make it all work in Python. I've never touched Python before, so I was feeling more than a little bit of anxious. But I was also excited by the idea.
DevCon 2018 Follow-up: The Story of Billy Bass - Part One DevCon 2018 Follow-up: The Story of Billy Bass - Part Two In my next post, I'll discuss how I made it work in Python. The post DevCon 2018 Follow-up: The Story of Billy Bass – Part Three appeared first on Soliant Consulting.
Voir le billet d'origine

Soliant Consulting

Soliant Consulting

 

Attention : repensons le fait de repenser le versioning : FMDataMigrationTool corrompt les index

Lors de la sortie de la version 17, nous postions un article enthousiaste sur les possibilités de versioning avec le nouvel outil Data Migration Tool. L’utilisant à maintes reprises, nous avons constaté un bug qui rend l’outil pratiquement inutilisable (si on ne prend pas la peine de faire l’étape finale proposée dans la solution ci-dessous) […] Cet article Attention : repensons le fait de repenser le versioning : FMDataMigrationTool corrompt les index est apparu en premier sur 1-more-thing.
>>> Lire la suite… <<<

fabriceN

fabriceN

 

Obsolescence de FileMaker 14

Une obsolescence programmée Je viens de l’écrire dans l’article de ce matin, le rôle de ce blog est de vous informer de l’actualité de FileMaker. Dans cette actualité, il y a bien entendu, tout ce qui concerne les licences : nouvelles versions, mises à jour et aussi, obsolescence… Et voici qu’aujourd’hui, certains ont peut-être reçu […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

S’informer sur les licences FileMaker

Savoir où trouver l’information dont on a besoin… La rentrée est bien là et c’est sans délai que vous nous écrivez vos questions. Bravo, cela nous donne l’occasion de partager à plusieurs les réponses qui peuvent y être trouvées. Car ce qui intéresse l’un d’entre vous, qui prend la peine de nous écrire, peut intéresser […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

DevCon 2018 Follow-up: The Story of Billy Bass – Part Two

This is the second in a series of posts about the demo I presented during my “IoT and the FileMaker Data API” session. Construct #1 - the original Billy Bass I wanted to find a Billy Bass that was as close to the original one used in the 2001 DevCon session, so I started digging around on eBay, and this is the one I ended up buying: Figure 9 - Buying an original Billy Bass When it arrived, I unscrewed the back to see how I could get at the motors (see Figure 10). There's a small controller unit in there with wires going to the motors, the speaker, the motion sensor, and the battery compartment. Figure 10 - Controller unit wired to components I cut all the wires as close to the controller unit as I could and then removed everything except the wires that go to the three motors and the wires that come down from the speaker.
This particular Billy has three motors: one for the head, one for the tail, and one for the mouth. Those are the wires that go off to the big white area in the center of the fish. When I was done with the demolition, I had just the three pairs of wires that each led to each of the motors.
Figure 11 – Cut controller wires These motors are fairly basic 6V brushless DC items (as I would find out much later in the process – at this particular time in the process I saw no reason to take them out just to look at them, since I was not confident that I could put it all back together).
Figure 12 – Motor Linking the Raspberry Pi and the Motors Now I had to find something to connect those motors to and make them run: a motor controller board that would bridge the gap between the Raspberry Pi and the motors.
As I was searching for existing Billy Bass projects (there are a few that use Alexa), I came across a small device named the Audio Servo Controller that seemed promising. In talking to Jack - who created the board - he mentioned that he had another board that was better suited for the task: the Squawker Talker. You can see it an action in a demo video on page 2 of this thread. Squawker Talker drives the motors and since it has a built-in 3-Watt amplifier that uses Line-In for its audio input, I could use a simple 3.5mm male-to-male audio cable from the Raspberry Pi to this unit to play the audio and connect the amplifier on the board to the Billy Bass speaker. And it comes with a power supply to drive it all. That looked perfect, so I ordered one the Squawker Talker units ($65) At this point, I was not comfortable with soldering, so I settled on using heat shrink seals to connect the Billy wires to small jumper cables to plug into a breadboard. With the heat shrink seals, I can use a heat gun to ‘melt’ the wires together and avoid the soldering. You can see the result with the heat shrink seals in that picture above that shows the motor, about halfway on the wire. When I had all the wires connected, it looked like Figure 13. The green unit is the Squawker Talker, the white unit is the breadboard where I plug in the cables. Figure 13 - Billy Bass wires connected to the Squaker Talker. How Does it Work? The Squawker Talker controls the motors and the speaker. So where does the Raspberry Pi come into play then? The Raspberry Pi (RPI) is the 'connected device' in this IoT setup. In other words, it has to run on its own, and have a connection to the internet so that it can check whether we have flagged a record in FileMaker to be played by Billy Bass. I was already using Raspberry Pis as IoT devices to collect sensor information and send it to FileMaker Server, and I was using Windows 10 IoT as the operating system for the RPIs, so I decided to use Windows 10 IoT here too. My preferred language for this is C#, and I have an open source project on GitHub that is a .NET wrapper around the FMS Data API (https://github.com/wimdecorte/FMdotNet__DataAPI).
With that, it was a natural thing for me to turn to C# to write the code to run the Raspberry Pi. You can download the code here: https://github.com/wimdecorte/BillyBassPolly.
In a nutshell, the code does this: There is a small config file to store the name of the FileMaker server, the name of the FileMaker file, the layout to use and the FileMaker account and password to access the file; The Raspberry Pi loops every half second and queries the FileMaker Server through the Data API (the interval is a config setting too), it looks for any records that have the “flag_ready” field set to 1 (the checkbox labeled “Speak It” on the BILLY layout); If it finds a record where that checkbox is checked, it downloads the mp3 from the container field; And then it uses the Operating System media player to play the mp3; At this point the Squawker Talker takes over and forwards the audio to the Billy Bass speaker and moves the body and mouth. Figure 14 – Raspberry Pi connected to the Squawker Talker And here is the end result:
Based on the audio input, the mouth will move in sync, and you can adjust the threshold level on the Squawker Talker by adjusting screws on the board. The body and tail move randomly. As you can see in the video, the head does not turn entirely in a 90-degree angle and I was a little unhappy about that. I wanted the head to turn all the way so that Billy Bass would look at you, as it is meant to. I also felt that the whole construct was a little too... easy — it's not driving the motors directly; the Squawker Talker board takes care of that. I decided to have another go at it, and this time without the Squawker Talker board, I would do everything from the Raspberry Pi. And I wanted a fish whose head was working properly. So, I looked around on eBay a little more to see if I can find one that is guaranteed to have a head that turns better and then find a way to interact with the motors.
DevCon 2018: The Billy Bass Story - Part One" In my next post, I'll show how I used the Raspberry Pi to control the Billy Bass head. The post DevCon 2018 Follow-up: The Story of Billy Bass – Part Two appeared first on Soliant Consulting.
Voir le billet d'origine
 

Nouveauté FileMaker 17 : une table externe sur l’OT active (1)…

Un auto-lien sans lien ! C’est un bravo sans réserve que je décerne aujourd’hui à l’éditeur FileMaker avec la nouveauté que nous allons voir aujourd’hui… D’ailleurs, si vous êtes déjà en version 17, peut-être vous êtes-vous déjà précipités dessus ! Nous avons maintenant la possibilité de créer en un clic de souris ce qui nous prenait […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Why Use FileMaker® Instead of an Out-of-the-Box CRM Solution

If you’re looking for a CRM solution to improve your company’s processes and productivity, you’re spoiled for choice. Capterra, a site that reviews software, lists over 400 products under the CRM category. And Gartner reported that in 2017, worldwide customer relationship management (CRM) software revenue overtook the previous leader, database management systems (DBMSs), making [...] The post Why Use FileMaker® Instead of an Out-of-the-Box CRM Solution appeared first on The Scarpetta Group, Inc..
Afficher la totalité du billet
 

Using FileMaker's Grid

Recently, while providing intermediate training at the annual FileMaker Devcon, I had an attendee approach me and ask a very simple question. "How do you turn off the grid in FileMaker?" Like all questions, it was asked within the context of innocent ignorance. This was simply because this person had not yet used, nor explored this area of FileMaker. This is totally understandable with the increasing number of options found across the increasing number of palettes within FileMaker. However, if you think this video is simply about how you turn on/off the grid, then you'll be missing out on a whole host of features and options which can both benefit your layout designs and make things much faster for you within the area of your designs. This video is about taking full advantage of the grid and making decisions about how to use it and how to choose the right width for your designs. Plus, you'll get all kinds of tips about how to make your layouts feel "visually comfortable" so they appeal to users. Think you know about using FileMaker's Grids? Double-check by watching this video! Click the title or link to this article to view the video.
Afficher la totalité du billet
 

DevCon 2018 Follow-up: The Story of Billy Bass – Part One

At this year’s DevCon in Dallas, TX, I presented a session on FileMaker and IoT (Internet of Things); in preparing for it I settled on this definition of IoT:
Based on that definition and the highlighted core elements, I split up the DevCon session into two parts: Collecting sensor data and sending it to FileMaker Server through the Data API; and Manipulate the environment by driving motors based on data retrieved from FileMaker Server. The first part was easy, using a couple of Raspberry Pi 3s, a SenseHat on one, and a GrovePi hat on the other and using various sensors to collect data. You can download the FileMaker demo file and find links to the source code here: https://community.filemaker.com/docs/DOC-9255. I had been using those same Raspberry Pis to stress-test the beta versions of FileMaker 16 and 17's Data API, and it has made me a big fan of the Data API: it is fast and robust. But I had to find a good demo that showed that second aspect; to drive those motors. A robot or a car were apparent choices but probably too obvious. I toyed a bit with the idea of a "useless box" but couldn't quite work in a good FileMaker angle. Then I thought of Billy Bass. Back in 2001/2002, Rich Coulombre and his team at The Support Group used the Troi serial plugin to connect Billy Bass to their computer and make it talk: https://www.troi.com/software/billybass.html A Gemmy Billy Bass toy has two or three motors to move the body, tail and mouth so it would be perfect, and a nice link to the past, so I went for it. The following lists how it had to look like upon completing the work: a FileMaker file hosted on FileMaker Server, and to keep things in the 'Cloud' realm, specifically a FileMaker Server 17 running on an Amazon EC2 instance; the user should be able to type anything into a text field in that FileMaker file; and Billy Bass should then speak what is typed. The Billy Bass is connected to the internet through a Raspberry Pi and listening for instructions through the FileMaker Data API. Figure 1 - Diagram of the Billy Bass workflow Expand image Off to work then. FileMaker Server and the FileMaker file: text-to-speech Putting the file on a FileMaker Server was easy, I chose my dev server which is part of our soliant.cloud infrastructure (https://www.soliant.cloud). It's a Windows instance on Amazon Web Services (AWS), in the Amazon us-east-1 region which comes down to North Virginia. The server is fully patched with FileMaker Server 17v2. Now for the user typing text into that hosted file. The end result is that we need to get audio for whatever was typed in. We need a text-to-speech service that we can send that text to and that will generate audio for the speech playback. There are several of those services around, but I am most familiar with the Amazon Polly service: https://aws.amazon.com/polly/ https://docs.aws.amazon.com/polly/latest/dg/what-is.html If you want to play around with the service, you can test it out here after signing in with your AWS account: https://console.aws.amazon.com/polly/home/SynthesizeSpeech To interact with Polly from inside FileMaker we will be using the Polly REST API. I could have used the Raspberry Pi itself to interact with Polly through one the available SDKs but I wanted this demo to be about FileMaker’s capabilities, and FileMaker is extremely good at interacting with REST APIs. So, FileMaker will send the text to Polly and receive the audio file in return.
In the FileMaker file the API settings are stored on the API layout, and that’s where you’d enter your own AWS API key (see Figure 2): The other thing we need to provide is somewhere to enter the text you want Billy Bass to speak. That’s the BILLY layout (see Figure 3).
Figure 2 – Provide your own AWS API key on the API layout Expand image Figure 3 - Enter text for Billy Bass to speak As you enter text, it’s automatically tagged with the and XML-like tags. That's because we will take advantage of Polly's ability to process text that is marked up with SSML (Speech Synthesis Markup Language). You will see why later. Polly itself can work with just pure text as well; you have to indicate your choice in the JSON instructions that you send over to Polly. Besides the actual text that we want to synthesize, we also have to send some other information over to Polly. According to the API documentation, the call should look like this: POST /v1/speech HTTP/1.1 Content-type: application/json Body: { "LanguageCode": "string", "LexiconNames": [ "string" ], "OutputFormat": "string", "SampleRate": "string", "SpeechMarkTypes": [ "string" ], "Text": "string", "TextType": "string", "VoiceId": "string" } That's easy enough to do, FileMaker is excellent at creating JSON, and the "Insert from URL" cURL options will let us specify the POST method and set the Content-Type header. To make sure that Polly will accept the request we are sending to it, we have to include authentication information in the header of the call. That is probably the biggest challenge in making this REST call. The section quoted below comes from the Authentication and Access Control for Amazon Polly page and describes our options for authenticating.
The SDK and CLI tools use the access keys to cryptographically sign your request. If you don’t use AWS tools, you must sign the request yourself. Amazon Polly supports Signature Version 4, a protocol for authenticating inbound API requests. For more information about authenticating requests, see Signature Version 4 Signing Process in the AWS General Reference. Since we are not using any of the AWS SDKs or the AWS CLIs, this means that we need to use that "Signature Version 4" protocol, which comes down to sending a special Authorization header as part of the cURL options. As it so happens, Salvatore Colangelo from Goya (famous for their BaseElements analysis tool and BaseElements plugin) demoed this at the 2017 Devcon and described the process in this blog post: http://www.goya.com.au/blog/generate-aws-signature-version-4-in-filemaker/
So, I gratefully borrowed his script and supplemented it with the rest of the data that Polly needs: what language to use, what voice for that language, whether we are sending SSML text or pure text, and whether we want an MP3 file back and at what bitrate. The language and voice are something we want to play with, so I made those choices available on the FileMaker layout (see Figure 4).
Figure 4 – Specify the language and voice Expand image The other settings we leave pretty much to their default because they produce a nice small MP3 file that the Raspberry Pi will be able to download efficiently. To synthesize the text shown above, the request that our script produces is this:
The JSON body of the request is stored in the variable $request_params and contains just the bare minimum that we must send (se.e Figure 5) Figure 5 -$request_params variable Expand image We use that variable as part of the cURL options in the variable named $options, so that together those cURL options that we will feed to the “insert from URL” script step look like (see Figure 6).
Figure 6 – $options variable Expand image Figure 7 shows the script at the step where we call that "insert from URL" script step and point it to the container field that will store Polly's mp3 audio file. Figure 7 - Use the "Insert from URL" script step to point to the container field that will hold the audio file. Expand image When we run the script, Polly sends us the audio file of our text: Figure 8 - Audio file of the text So far so good. That's #1 and #2 done. Time to start on #3: how to make Billy Bass move.
In my next post, I'll show how I made Billy Bass move. The post DevCon 2018 Follow-up: The Story of Billy Bass – Part One appeared first on Soliant Consulting.
Voir le billet d'origine
 

Une rentrée FileMaker toute en douceur…

« Sur la plage abandonnée, coquillages et crustacés… » Eh oui, c’est la rentrée ! En France, les enfants ont repris le chemin de l’école, et les parents suivent… Quelques privilégiés profitent encore des derniers beaux jours sans les inconvénients de la canicule qui nous a frappés sévèrement cet été… Bonne rentrée à tous ! Bonne rentrée […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Introducing FileMaker as your Workplace Innovation Platform

FileMaker, Inc. recently adopted a new core message that encapsulates the strength of their software platform and helps business leaders better understand their focus. FileMaker is a Workplace Innovation Platform. Essentially, the platform bridges the gap between appliance applications (like Quickbooks, Microsoft Office, file sharing) and enterprise systems (ERPs, CRMs) in order to free up time to focus on critical and strategic projects by eliminating manual processes, managing spreadsheets, disconnected systems and administrative tasks. https://gomainspring.com/wp-content/uploads/filemaker_wip-overview_1920x1080_60sec_en.mp4   Are you spending too much time on repetitive tasks? Do you feel like your time would be better spent working to grow your business, but you’re too bogged-down with manual processes? You are in a work rut. It’s likely that you’re using a mix of limited appliance apps and enterprise systems that have a different focus and are cumbersome to customize. This is where a Workplace Innovation Platform comes in – it’s a customizable tool that allows you to put your ideas and expertise into action. FileMaker’s Workplace Innovation Platform provides a way to easily create applications that can be shared across your organization and integrated into your other applications. There’s no other tool that’s as easy to get started with developing that still has the depth to create powerful applications. While the ability for self-service development is one huge advantage to the FileMaker platform, the efficient development toolset also means that working with a development partner amplifies your return on investment. Innovation made simple with FileMaker Innovation is the driving force behind FileMaker. When it comes to building custom apps, getting an idea out of your head and into the world can be a daunting task. FileMaker focuses on removing the barriers between ideation and actualization. A basic custom app can be produced in minutes – hours instead of weeks – months. Choosing a platform with a low entry barrier and quick delivery time means that you’re able to achieve results with a small, initial investment, while still reaping the rewards of having a customized tool. MainSpring’s development process MainSpring has rolled out a new way for clients to work with our expert development teams that’s specifically driven by the rhythms of developing in the FileMaker platform. Our AMP Pro program provides our clients with the process and tools to quickly deliver custom applications. We teach you how to define and communicate your ideas so that they can be translated into working custom applications as quickly as possible. Once your applications are deployed, we work with you to provide continued proactive development so that you can adopt a cycle of continuous improvement and innovation. MainSpring also provides cloud hosting, application, and end user support, making FileMaker easy to integrate into your organization. Free development consultation MainSpring’s expertise in the FileMaker platform extends over 20 years. Our team of skilled consultants and certified developers is paired with processes and tools that we’ve developed to ensure success. If you’re stuck in a work rut, or think that there must be a better way to get your team to achieve their goals—chances are that FileMaker’s Workplace Innovation Platform is the solution that you need.
Afficher la totalité du billet

MainSpring

MainSpring

 

Fiche Astuce n°130 – Création de rangées externes dans une table supplémentaire FileMaker

Comment utiliser les tables supplémentaires de FileMaker ? FileMaker Pro Advanced 17 propose des nouveautés étonnantes. Il est clair que l’objectif de ces nouveautés est de simplifier la vie du développeur, en lui permettant de développer à la volée une solution. Ainsi, FileMaker vient-il à votre place, créer cinq ou six rubriques techniques dès que vous […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

8 Reasons FileMaker is the Best Platform for a Small Business CRM

FileMaker is an easy-to-use and flexible platform for creating a CRM solution that’s customizable and cost effective for small businesses. It allows you to bring the many different components of the sales and customer service processes together under one roof. FileMaker gives businesses improved access to data and a more efficient workflow. Business owners [...] The post 8 Reasons FileMaker is the Best Platform for a Small Business CRM appeared first on The Scarpetta Group, Inc..
Afficher la totalité du billet
 

Duplicating Related Records - Server Side

The age old question commonly arises on FileMaker forums around the world. "How can I duplicate the whole record?" In other words, how can I duplicate the parent record and all related children records which make it seem like it's one whole entity. Well, at least, that's how a newer user/developer sees it. They may visually see the one record with all of its related records presented within the portal, but making the distinction that you're actually looking at 1 record plus N related records isn't super obvious from a UI standpoint. However, as a FileMaker developer, you need to know how to duplicate the whole collection of records so the user can conveniently click that one single button which reads "Duplicate". There are many methods you can use to accomplish this task, but there are a few tricks to making to work successfully and reliably depending on your specific requirements. In this video I present one of the most efficient methods for duplicating whole related record sets. No matter how many sets of related records you have, you can always take advantage of the inside knowledge on how to accomplish this type of task in FileMaker Pro. Click the title or link to this article to view the video.
Afficher la totalité du billet
×