Skip to content

z1mEk/voicemoticz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VoiceMoticz (frozen)

Ask Domoticz a natural language about the temperature or ask him to turn on the light in the living room.

ChangeLog

2018.11.28

  • add support "unknown ask" plase add keys 'reply_unknown' in rules.json and conf.json (see my example files)
  • add support float number recognize from phrase

2018.12.04

TODO

  • text processor
  • config
  • get data from Domoticz
  • set data to Domoticz
  • say to Google Home
  • as Flask webservice
  • daemon
  • get text from Google Home Assistant

Install requirements python library

pip3 install pyjq
pip3 install flask

Install for tests

git clone https://github.com/z1mEk/voicemoticz.git
sudo chmod +x voicemoticz.py

Config

Open the ./config/config.json file and set your Domoticz API url.

Set rules

Open the ./config/rules.json and modify data for your preference and your Domoticz. Keys 'elicitation_pattern' and 'name_pattern' suported regex. You must do it carefully, keeping the logic

Run Test

./voicemoticz.py "Jaka jest temperatura u Marysi?"

or

./voicemoticz.py "Ile stopni jest u Szymka w pokoju?"

or

./voicemoticz.py "Ciepło jest na dworze?"

or

./voicemoticz.py "Włącz kinkiety w salonie?"

Run webservice test

./webservice.py
/GET http://server.port/directask?txt=sample%20tekst

or

/POST http://server.port/ask
{
  'text':'sample text'
}

curl example

curl --header "Content-Type: application/json" --request POST --data '{"text":"Ile stopni jest w salonie?"}' http://192.168.1.175:8071/ask

Example Result

Temperatura w pokoju Szymka wynosi 20.5℃
OK, włączam kinkiety w salonie

About

!alfa version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages