Since OP hasn’t replied, I took it upon myself to figure this out today and migrated from my smart-plug setup. I’m using a nebulizing diffuser that uses the Aroma-Link app.
If anyone wants to automate one of these diffusers, there are a few steps you’ll need to take since you’ll need to get your API key, device ID, and user ID.
Node Red flow is below. You’ll need to open the functions and the HTTP nodes and enter the device + user IDs and your API token.
I used an app called “Packet Capture” on Android (the icon kind of looks like a yellow pencil on a blue background and says “SSL”) to reverse engineer the calls and capture the parameters. To get the params, simply open the app, press the play button symbol with a “1” on it, search for “Aroma-Link” and select it. A toast message will say something about the VPN service running. At that point open Aroma-Link and perform any action. Navigate back to Packet Capture and press the stop button, then click the top entry on your screen. In that entry, select any Aroma-Link line-item and locate the needed info.
Additionally, you’ll need to create three Home Assistant helpers - a “diffuse time” number (how long you want the machine to run), a “wait time” number (how long between diffusions), and an on/off toggle that you can control as desired (i.e. overnight or when you go out) if you want to use my flow as-is.
@lockeman if you haven’t purchased a diffuser yet, I also have the JCloud; although an unbranded version. You can get the same machine far cheaper on Aliexpress and even cheaper from AliBaba. If you’re scenting more than ~1,500 sqft I’d get something more powerful.
[{"id":"d10da6230773aeb8","type":"server-state-changed","z":"fab9ef29.39d25","name":"Diffuse time","server":"95d0e223.bc05a","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.diffuse_time","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":350,"y":2920,"wires":[["5876c8c71336edbc","69fe0804dd7f58a8"]]},{"id":"5876c8c71336edbc","type":"function","z":"fab9ef29.39d25","name":"Set diffuse time","func":"var diffTime = parseInt(msg.payload);\nflow.set('diffuseS', diffTime, \"store\");\nvar diffMs = diffTime * 1000;\nflow.set('delayMs', diffMs, \"store\");","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":2920,"wires":[[]]},{"id":"cd8c146de43bed86","type":"comment","z":"fab9ef29.39d25","name":"Set diffuse and wait times","info":"","x":390,"y":2860,"wires":[]},{"id":"4de8a39b228a07f7","type":"server-state-changed","z":"fab9ef29.39d25","name":"Diffuse wait","server":"95d0e223.bc05a","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.diffuser_wait","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":350,"y":2980,"wires":[["47f09e32449696ad","69fe0804dd7f58a8"]]},{"id":"47f09e32449696ad","type":"function","z":"fab9ef29.39d25","name":"Set wait time","func":"var waitTime = parseInt(msg.payload);\nflow.set('waitTime', waitTime, \"store\");","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":2980,"wires":[[]]},{"id":"2289681d502da424","type":"link out","z":"fab9ef29.39d25","name":"Diffuser link","mode":"link","links":["8797600f6eeaa51b","15792441b2019c0d"],"x":675,"y":3040,"wires":[]},{"id":"69fe0804dd7f58a8","type":"delay","z":"fab9ef29.39d25","name":"","pauseType":"delay","timeout":"150","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":570,"y":3040,"wires":[["2289681d502da424"]]},{"id":"1a2fd2036f9a3d5d","type":"server-state-changed","z":"fab9ef29.39d25","name":"Diffuser on?","server":"95d0e223.bc05a","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.diffuser","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":370,"y":3380,"wires":[["46e12f2105930680"],["0dfd9265428d659e"]]},{"id":"ea34f6aef72debd2","type":"comment","z":"fab9ef29.39d25","name":"API diffuser control","info":"","x":370,"y":3100,"wires":[]},{"id":"530ceba525d30d14","type":"http request","z":"fab9ef29.39d25","name":"Aroma-link POST","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://www.aroma-link.com/v1/app/data/workSetApp","tls":"","persist":true,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"access_token","valueType":"other","valueValue":"TOKEN HERE"}],"x":1090,"y":3240,"wires":[[]]},{"id":"bca8d6a57bf7af1e","type":"function","z":"fab9ef29.39d25","name":"Diffuser command","func":"msg.headers = { \"Content-Type\": \"application/json\", \"Transfer-Encoding\": \"chunked\", \"Connection\": \"keep-alive\", \"access-token\": \"YOUR_TOKEN_HERE\"};\nif (flow.get('waitTime', \"store\") && flow.get('diffuseS', \"store\")){\n msg.payload = { \"deviceId\": YOUR_ID_HERE, \"userId\": YOUR_ID_HERE, \"week\": [0, 1, 2, 3, 4, 5, 6], \"workTimeList\": [{ \"consistenceLevel\": 1, \"enabled\": 1, \"endTime\": \"23:59\", \"pauseDuration\": flow.get('waitTime', \"store\") * 60, \"startTime\": \"00:00\", \"workDuration\": flow.get('diffuseS', \"store\") }, { \"consistenceLevel\": 1, \"enabled\": 0, \"endTime\": \"00:00\", \"pauseDuration\": 120, \"startTime\": \"00:00\", \"workDuration\": 10 }, { \"consistenceLevel\": 1, \"enabled\": 0, \"endTime\": \"00:00\", \"pauseDuration\": 120, \"startTime\": \"00:00\", \"workDuration\": 10 }, { \"consistenceLevel\": 1, \"enabled\": 0, \"endTime\": \"00:00\", \"pauseDuration\": 120, \"startTime\": \"00:00\", \"workDuration\": 10 }, { \"consistenceLevel\": 1, \"enabled\": 0, \"endTime\": \"00:00\", \"pauseDuration\": 120, \"startTime\": \"00:00\", \"workDuration\": 10 }] };\n}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":2,"initialize":"","finalize":"","libs":[],"x":870,"y":3240,"wires":[["530ceba525d30d14"]]},{"id":"7a086d3e3351b319","type":"api-current-state","z":"fab9ef29.39d25","name":"API diffuser control?","server":"95d0e223.bc05a","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.api_diffuser_control","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":640,"y":3240,"wires":[["bca8d6a57bf7af1e"],[]]},{"id":"cc5d5dda475e9a6c","type":"http request","z":"fab9ef29.39d25","name":"Aroma-link switch","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://www.aroma-link.com/v1/app/data/newSwitch","tls":"","persist":true,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"access_token","valueType":"other","valueValue":"TOKEN HERE"}],"x":1090,"y":3380,"wires":[[]]},{"id":"0c7499f98ba63480","type":"function","z":"fab9ef29.39d25","name":"Diffuser on","func":"msg.headers = { \"Content-Type\": \"application/x-www-form-urlencoded\", \"Transfer-Encoding\": \"chunked\", \"Connection\": \"keep-alive\", \"access-token\": \"YOUR_TOKEN_HERE\"};\nmsg.payload = \"deviceId=YOUR_ID_HERE&&userId=YOUR_ID_HERE&onOff=1\";\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":3360,"wires":[["cc5d5dda475e9a6c","2fa65de51321e519"]]},{"id":"0dfd9265428d659e","type":"api-current-state","z":"fab9ef29.39d25","name":"API diffuser control?","server":"95d0e223.bc05a","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.api_diffuser_control","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":640,"y":3420,"wires":[["04a857f1c3255105"],[]]},{"id":"46e12f2105930680","type":"api-current-state","z":"fab9ef29.39d25","name":"API diffuser control?","server":"95d0e223.bc05a","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.api_diffuser_control","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":640,"y":3340,"wires":[["0c7499f98ba63480"],[]]},{"id":"2fa65de51321e519","type":"delay","z":"fab9ef29.39d25","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":900,"y":3300,"wires":[["bca8d6a57bf7af1e"]]},{"id":"15792441b2019c0d","type":"link in","z":"fab9ef29.39d25","name":"Diffuser link","links":["61c76889ca25f7af","2289681d502da424"],"x":425,"y":3240,"wires":[["7a086d3e3351b319"]]},{"id":"04a857f1c3255105","type":"function","z":"fab9ef29.39d25","name":"Diffuser off","func":"msg.headers = { \"Content-Type\": \"application/x-www-form-urlencoded\", \"Transfer-Encoding\": \"chunked\", \"Connection\": \"keep-alive\", \"access-token\": \"YOUR_TOKEN_HERE\"};\nmsg.payload = \"deviceId=YOUR_ID_HERE&&userId=YOUR_ID_HERE&onOff=0\";\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":3400,"wires":[["cc5d5dda475e9a6c"]]},{"id":"95d0e223.bc05a","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]