Control all4hue by other apps

Everything about the external control of the Android version of all4hue.
Alles über die externe Steuerung der Android Version of all4hue.
Post Reply
User avatar
ReneWahl
Site Admin
Posts: 184
Joined: Wed Jan 16, 2019 8:44 pm

Control all4hue by other apps

Post by ReneWahl » Sun Jan 20, 2019 11:16 am

"all 4 hue" can be controlled by other apps (e.g. Tasker) by sending actions with so called "intents". The following actions are supported:

Actions belonging to groups:

Switch lights on:
Action: "de.renewahl.all4hue.action.on"
Extra: -

Switch lights off:
Action: "de.renewahl.all4hue.action.off"
Extra: -

Set brightness:
Action: "de.renewahl.all4hue.action.set_brightness"
Extra: "value" = Percentage (0..100%) of brightness

Increase/decrease brightness:
Action: "de.renewahl.all4hue.action.change_brightness"
Extra: "value" = Percentage (0..100%) of change of brightness

Flash lights once:
Action: "de.renewahl.all4hue.action.flash_short"
Extra: -

Flash lights several times:
Action: "de.renewahl.all4hue.action.flash_long"
Extra: -

Activate scene:
Action: "de.renewahl.all4hue.action.scene_id"
Extra: "value" = Identifier of scene, not its name. The identifier of a scene can be determined with the app (see context menu "show identification" of corresponding scene).

For each action an additional extra can be passed in order to select the affected group of lights.
Extra: "group_id" = Identifier of group, not its name. The identifier of a group can be determined with the app (see context menu "show identification" of corresponding group).

Actions belonging to sensors (new in all4hue V9.1):

Write number to memory sensor:
Action: "de.renewahl.all4hue.action.sensor_write_number"
Extra: "sensor_id" = Identifier of sensor, not its name. The identifier of a sensor can be determined with the app (see context menu "show identification" of corresponding sensor).
Extra: "value" = Value to be written to sensor.

Write flag to memory sensor:
Action: "de.renewahl.all4hue.action.sensor_write_flag"
Extra: "sensor_id" = Identifier of sensor, not its name. The identifier of a sensor can be determined with the app (see context menu "show identification" of corresponding sensor).
Extra: "value" = Flag to be written to sensor, either "true" or "false".

The quotation marks must not be entered. Important: All Parameters are strings, not integers. Numbers have to be passed in string format.

Example for "Tasker" app:
Action "Send Intent" with action "de.renewahl.all4hue.action.scene_id" with extra "value:PFHS74893274" will activate scene with ID "PFHS74893274". Action "Send Intent" wich action "de.renewahl.all4hue.action.set_brightness" with extra "value:25" and extra "group_id:7" will set brightness of group with ID 7 to 25%.

Actions belonging effects (Entertainment effects new in V9.1):

Start disco effect:
Action: "de.renewahl.all4hue.effect.disco"
Extra: -

Start colorloop effect:
Action: "de.renewahl.all4hue.effect.colorloop"
Extra: -

Start bonfire effect:
Action: "de.renewahl.all4hue.effect.bonfire"
Extra: -

Start disco effect based on Entertainment protocol:
Action: "de.renewahl.all4hue.effect.disco_entertain"
Extra: -

Start colorloop effect based on Entertainment protocol:
Action: "de.renewahl.all4hue.effect.colorloop_entertain"
Extra: -

Start bonfire effect based on Entertainment protocol:
Action: "de.renewahl.all4hue.effect.bonfire_entertain"
Extra: -

If you want to stop an effect, you can pass additionally an extra "status" with value "off". If no additional Parameter is passed, the corresponding effect is started.

Remark: This post was updated on 25.04.2019.
all4hue Developer / Entwickler

User avatar
ReneWahl
Site Admin
Posts: 184
Joined: Wed Jan 16, 2019 8:44 pm

Re: Control all4hue by other apps

Post by ReneWahl » Tue Apr 16, 2019 4:28 pm

Hi together,

There are often questions and issues about the configuration of the external events. Therefore I created the following small test app to play with the external events. Just enter the action and the extra parameters in the app and press "send" to post the data to all4hue.

Set the brightness of a group:
Image

Change the brightness of a group:
Image

Write number to memory sensor:
Image

Write flag to memory sensor:
Image

Turn group on:
Image

Turn group of a special hue bridge on (addressed by MAC address):
Image

The app can be downloaded from here:

http://www.all4hue.com/download/externa ... elease.apk

BR
Rene
all4hue Developer / Entwickler

User avatar
ReneWahl
Site Admin
Posts: 184
Joined: Wed Jan 16, 2019 8:44 pm

Re: Control all4hue by other apps

Post by ReneWahl » Thu Apr 25, 2019 10:07 am

Remark: With the latest BETA version of all4hue (Rel.132) the compatibility with Tasker was improved. Now ALL external Events are working properly in combination with Tasker.

The reason why it did not always work: Tasker converts numbers to Integers (see https://tasker.joaoapps.com/userguide/en/intents.html) but all4hue expected Strings. With the latest all4hue improvement Integers and Strings are accepted by all4hue.

Important: "Activity" has to be defined as target in Tasker.
all4hue Developer / Entwickler

Post Reply