I am currently using voice control on ALEXA and Google Assistant for
- Switching Lights On and Off (using RPI-GPIO & Relay modules)
- Announcing Current Temperature values (using SQL Query to database)
The platform I am using is called Home Assistant which sits on a Raspberry Pi in my case. It is possible to make certain functionality available in ALEXA or Google Assistant (This can be done long hand manually or pay a $5 monthly subscription to do it quickly).
I recently noticed that there is a Modbus Integration https://www.home-assistant.io/integrations/modbus/ so I thought I would test it with Open PLC.
I decided to test the simplest functions with Output Coils and Discrete Input Registers. The Software refers to entities / functionality as follows:-
Binary Sensor
Reads discrete inputs and state of output coils (Modbus Functions FC1 & FC2) https://www.home-assistant.io/integrations/binary_sensor.modbus/
Switch
Write an Output Coil (Modbus Function FC5) https://www.home-assistant.io/integrations/switch.modbus/
If you look at the video in the link you will see that these functions work well.
- ix00 = %ix0.0 = PLC Heartbeat
- qx10 = %qx1.0 = Test Output Coil
https://youtu.be/HqmrSO1tRRc
Whilst this is only proof of concept it seems this Software provides interesting functionality for OpenPLC enthusiasts/users:
- Functioning Modbus Master
- Animation & Control using Web Browser Interface, Android & iOS apps.
- Historical Logging of states and values
- Gateway to both Amazon ALEXA and Google Assistant
My next steps will be test briefly
- Holding Registers (Read & Write Analogue Values)
- Which functions can be extended to Voice Control & How.